diff options
Diffstat (limited to 'src/main.cpp')
-rw-r--r-- | src/main.cpp | 13 |
1 files changed, 4 insertions, 9 deletions
diff --git a/src/main.cpp b/src/main.cpp index 0a5977f..c7a6f77 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -98,10 +98,8 @@ int main() sf::RenderWindow window(sf::VideoMode(800, 600), "Minitrem"); render::state_t render(&window); - game::state_t game; - interface::state_t interface(&window, &game); + game::pseudostate_t game(&window); - game.interface = &interface; debug_render = &render; window.setVerticalSyncEnabled(true); @@ -119,8 +117,7 @@ int main() dt = 0.1; before = now; - game.tick(now); - interface.tick(dt); + game.tick(now, dt); if (!window.isOpen()) break; @@ -128,10 +125,8 @@ int main() window.clear(); render.begin_frame(now, dt); - render.render(&game); - game.compute_ambience(&render); - interface.render_to(&render); - audio::update(interface.camera_3d, game.paused); + render.render(game.get_world()); + game.render_interface_to(&render); render.end_frame(); } |