{gfx,examples}: update all to new mach.Core module API

Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
This commit is contained in:
Stephen Gutekanst 2024-04-17 11:27:41 -07:00
parent ac4fe65eb2
commit d045b34f70
13 changed files with 910 additions and 689 deletions

View file

@ -1,16 +1,19 @@
// TODO(important): review all code in this file in-depth
// Experimental ECS app example. Not yet ready for actual use.
const mach = @import("mach");
// The list of modules to be used in our application. Our game itself is implemented in our own
// module called Game.
// The global list of Mach modules registered for use in our application.
pub const modules = .{
mach.Engine,
mach.Core,
mach.gfx.Sprite,
mach.gfx.SpritePipeline,
@import("Glyphs.zig"),
@import("Game.zig"),
};
pub const App = mach.App;
// TODO(important): use standard entrypoint instead
pub fn main() !void {
// Initialize mach.Core
try mach.core.initModule();
// Main loop
while (try mach.core.tick()) {}
}