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);
|
gEngine.* = try Engine.init(allocator);
|
||||||
staticsInitialized = true;
|
staticsInitialized = true;
|
||||||
|
|
||||||
|
_ = try createObject(ModuleLoader, .{});
|
||||||
try console.start();
|
try console.start();
|
||||||
|
|
||||||
const engineName = try std.fmt.allocPrint(allocator, "{s}Engine.ini", .{name});
|
const engineName = try std.fmt.allocPrint(allocator, "{s}Engine.ini", .{name});
|
||||||
defer allocator.free(engineName);
|
defer allocator.free(engineName);
|
||||||
try algorithm.string_pool.setup(allocator);
|
|
||||||
gEngine.stringContext = algorithm.string_pool.gStringContext;
|
|
||||||
|
|
||||||
try configVars.setupConfigs(engineName);
|
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 logging.setupLogging(gEngine);
|
||||||
}
|
}
|
||||||
|
|
||||||
_ = try createObject(ModuleLoader, .{});
|
try ecs.setup(allocator);
|
||||||
_ = try gEngine.createObject(ecs.EcsRegistry, .{ .can_tick = true, .isCore = true });
|
|
||||||
_ = try gEngine.createObject(scene.SceneSystem, .{ .can_tick = true });
|
_ = 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
|
// components define
|
||||||
try ecs.defineComponentList(ComponentList, allocator);
|
try ecs.defineComponentList(ComponentList, allocator);
|
||||||
|
|
|
||||||
|
|
@ -92,11 +92,13 @@ pub fn startEngine(spec: *core.SpecVariantMap) bool {
|
||||||
const moduleName = spec.get("moduleName").?.string;
|
const moduleName = spec.get("moduleName").?.string;
|
||||||
|
|
||||||
if (comptime core.BuildOption("static_build")) {
|
if (comptime core.BuildOption("static_build")) {
|
||||||
|
core.engine_logs("static build");
|
||||||
const modlaunch = @import("modulelaunch.zig");
|
const modlaunch = @import("modulelaunch.zig");
|
||||||
var modargs = core.externModule.getModuleLoaderArgs(true);
|
var modargs = core.externModule.getModuleLoaderArgs(true);
|
||||||
var modalloc = allocator;
|
var modalloc = allocator;
|
||||||
_ = modlaunch.startup_module(&modalloc, &modargs);
|
_ = modlaunch.startup_module(&modalloc, &modargs);
|
||||||
} else {
|
} else {
|
||||||
|
core.engine_logs("using hot reloading");
|
||||||
const platform = @import("platform").module;
|
const platform = @import("platform").module;
|
||||||
platform.watchModules();
|
platform.watchModules();
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue