From 6300ef0e35e4e78da06c7c17a36d85b763b20985 Mon Sep 17 00:00:00 2001 From: peterino2 Date: Thu, 8 Jan 2026 09:40:02 -0800 Subject: [PATCH] something broke with core --- engine/core/src/core.zig | 15 +++++++++------ engine/main2.zig | 2 ++ 2 files changed, 11 insertions(+), 6 deletions(-) diff --git a/engine/core/src/core.zig b/engine/core/src/core.zig index c32fbb4..22baa50 100644 --- a/engine/core/src/core.zig +++ b/engine/core/src/core.zig @@ -299,12 +299,11 @@ pub fn start_module_(map: *SpecVariantMap, args: anytype, allocator: std.mem.All gEngine.* = try Engine.init(allocator); staticsInitialized = true; + _ = try createObject(ModuleLoader, .{}); try console.start(); const engineName = try std.fmt.allocPrint(allocator, "{s}Engine.ini", .{name}); defer allocator.free(engineName); - try algorithm.string_pool.setup(allocator); - gEngine.stringContext = algorithm.string_pool.gStringContext; try configVars.setupConfigs(engineName); @@ -312,11 +311,15 @@ pub fn start_module_(map: *SpecVariantMap, args: anytype, allocator: std.mem.All try logging.setupLogging(gEngine); } - _ = try createObject(ModuleLoader, .{}); - _ = try gEngine.createObject(ecs.EcsRegistry, .{ .can_tick = true, .isCore = true }); + try ecs.setup(allocator); + _ = try gEngine.createObject(scene.SceneSystem, .{ .can_tick = true }); - _ = try gEngine.createObject(scene.SceneSystem, .{ .can_tick = true }); - _ = try gEngine.createObject(inputs.InputStack, .{}); + + try algorithm.string_pool.setup(allocator); + gEngine.stringContext = algorithm.string_pool.gStringContext; + + _ = try createObject(GameObjectSystem, .{ .can_tick = true }); + _ = try inputs.initInputStack(); // components define try ecs.defineComponentList(ComponentList, allocator); diff --git a/engine/main2.zig b/engine/main2.zig index b1aebf9..390b89b 100644 --- a/engine/main2.zig +++ b/engine/main2.zig @@ -92,11 +92,13 @@ pub fn startEngine(spec: *core.SpecVariantMap) bool { const moduleName = spec.get("moduleName").?.string; if (comptime core.BuildOption("static_build")) { + core.engine_logs("static build"); const modlaunch = @import("modulelaunch.zig"); var modargs = core.externModule.getModuleLoaderArgs(true); var modalloc = allocator; _ = modlaunch.startup_module(&modalloc, &modargs); } else { + core.engine_logs("using hot reloading"); const platform = @import("platform").module; platform.watchModules();