{gfx,examples}: update all to new mach.Core module API
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
This commit is contained in:
parent
ac4fe65eb2
commit
d045b34f70
13 changed files with 910 additions and 689 deletions
|
|
@ -1,17 +1,18 @@
|
|||
// TODO(important): review all code in this file in-depth
|
||||
|
||||
// Experimental ECS app example. Not yet ready for actual use.
|
||||
const mach = @import("mach");
|
||||
|
||||
const Game = @import("Game.zig");
|
||||
|
||||
// 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,
|
||||
Game,
|
||||
@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()) {}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue