aboutsummaryrefslogtreecommitdiff
path: root/main.c
diff options
context:
space:
mode:
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);
}