From b2392cf01e6fd0c15bc52941177fbe4b8a5d1a69 Mon Sep 17 00:00:00 2001 From: quou Date: Sat, 18 Jan 2025 17:05:58 +1100 Subject: entity debugger --- c2.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'c2.cpp') diff --git a/c2.cpp b/c2.cpp index d686765..28e63b5 100644 --- a/c2.cpp +++ b/c2.cpp @@ -638,8 +638,10 @@ struct C2 : public App { per_frame_memory_size ); clamped_linear = create_clamped_linear(dev); + world = (World*)arena_alloc(arena, sizeof *world); + world->init(arena); ui = UI::create(dev, this, &ui_arena, ui_shader->id); - init_editor(ui); + init_editor(ui, world); lr.init(dev, &assets); assert(per_frame != 0); vbo = upload_verts(dev); @@ -649,8 +651,6 @@ struct C2 : public App { sky.init(dev, &assets); eprobe.init(dev, &assets, 256); camera.init(); - world = (World*)arena_alloc(arena, sizeof *world); - world->init(arena); { monkey = world->create_entity(); auto [_, mod] = world->add(monkey); @@ -804,7 +804,7 @@ struct C2 : public App { mx, my ); - editor_on_select(*world, a, b); + editor_on_select(a, b); } lr.colour(v3f(1.0f, 0.0f, 0.0f)); -- cgit v1.2.3-54-g00ecf