hot reloading with trampoline
This commit is contained in:
parent
e69a8d13ec
commit
a518a89798
|
|
@ -299,11 +299,12 @@ 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);
|
||||
|
||||
|
|
@ -311,15 +312,11 @@ pub fn start_module_(map: *SpecVariantMap, args: anytype, allocator: std.mem.All
|
|||
try logging.setupLogging(gEngine);
|
||||
}
|
||||
|
||||
try ecs.setup(allocator);
|
||||
|
||||
_ = try createObject(ModuleLoader, .{});
|
||||
_ = try gEngine.createObject(ecs.EcsRegistry, .{ .can_tick = true, .isCore = true });
|
||||
_ = try gEngine.createObject(scene.SceneSystem, .{ .can_tick = true });
|
||||
|
||||
try algorithm.string_pool.setup(allocator);
|
||||
gEngine.stringContext = algorithm.string_pool.gStringContext;
|
||||
|
||||
_ = try createObject(GameObjectSystem, .{ .can_tick = true });
|
||||
_ = try inputs.initInputStack();
|
||||
_ = try gEngine.createObject(scene.SceneSystem, .{ .can_tick = true });
|
||||
_ = try gEngine.createObject(inputs.InputStack, .{});
|
||||
|
||||
// components define
|
||||
try ecs.defineComponentList(ComponentList, allocator);
|
||||
|
|
|
|||
|
|
@ -29,14 +29,6 @@ pub export fn startup_module(p_allocator: *anyopaque, p_a: ?*anyopaque) bool {
|
|||
|
||||
const moduleArgs = core.startup_getArgs(p_a.?);
|
||||
|
||||
// firstLoad: bool,
|
||||
// engine: *core.Engine,
|
||||
// nameRegistry: *p2.NameRegistry,
|
||||
// packerFS: *core.PackerFS,
|
||||
// // luaState: *anyopaque,
|
||||
// // luaAllocator: *anyopaque,
|
||||
// debugDrawInterface: ?*debug.DebugDrawInterface,
|
||||
|
||||
if (moduleArgs.firstLoad) {
|
||||
inline for (backlog.moduleList) |feature| {
|
||||
if (@hasDecl(backlog, feature) and !std.mem.eql(u8, "core", feature)) {
|
||||
|
|
|
|||
Loading…
Reference in New Issue