From 2ab411c4b8855d11d48454a93262e8eae3ba7fc7 Mon Sep 17 00:00:00 2001 From: quou Date: Sat, 6 May 2023 09:02:04 +1000 Subject: Menus, game over, dying, etc. --- main.c | 24 +++++------------------- 1 file changed, 5 insertions(+), 19 deletions(-) (limited to 'main.c') diff --git a/main.c b/main.c index 9d2aff8..0e26dd3 100644 --- a/main.c +++ b/main.c @@ -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); } -- cgit v1.2.3-54-g00ecf