diff options
author | quou <quou@disroot.org> | 2023-05-06 09:02:04 +1000 |
---|---|---|
committer | quou <quou@disroot.org> | 2023-05-06 09:02:04 +1000 |
commit | 2ab411c4b8855d11d48454a93262e8eae3ba7fc7 (patch) | |
tree | e608ebd0bea71570be0a3619f9848f975669e5ef /main.c | |
parent | fb104368dd33b66e0575dcc0327cbae7046a4e1e (diff) |
Menus, game over, dying, etc.
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); } |