diff options
Diffstat (limited to 'main.c')
-rw-r--r-- | main.c | 24 |
1 files changed, 5 insertions, 19 deletions
@@ -1,12 +1,7 @@ -#include "asset.h" -#include "player.h" -#include "render.h" +#include "game.h" #include "standard.h" -#include "systems.h" -#include "world.h" -#include "enemy.h" -World world; +Game game; void on_init(int argc, char** argv) { seed_rng(500); @@ -15,23 +10,14 @@ void on_init(int argc, char** argv) { load_assets(); - init_world(&world); - - init_player(&world.player, &world); - - new_skull(&world, 0, 0); + game_init(&game, game_state_menu); } void on_update() { renderer_begin_frame(); - update_player(&world.player, &world); - enemy_system(&world); - bullet_system(&world); - collision_system(&world); - animation_system(&world); - sprite_system(&world); + game_update(&game); } void on_deinit() { - + game_deinit(&game); } |