aboutsummaryrefslogtreecommitdiff
path: root/main.c
diff options
context:
space:
mode:
authorquou <quou@disroot.org>2023-05-06 09:02:04 +1000
committerquou <quou@disroot.org>2023-05-06 09:02:04 +1000
commit2ab411c4b8855d11d48454a93262e8eae3ba7fc7 (patch)
treee608ebd0bea71570be0a3619f9848f975669e5ef /main.c
parentfb104368dd33b66e0575dcc0327cbae7046a4e1e (diff)
Menus, game over, dying, etc.
Diffstat (limited to 'main.c')
-rw-r--r--main.c24
1 files changed, 5 insertions, 19 deletions
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);
}