something broke with core
This commit is contained in:
parent
a518a89798
commit
6300ef0e35
|
|
@ -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);
|
||||
|
|
|
|||
|
|
@ -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();
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue