diff options
Diffstat (limited to 'game.c')
-rw-r--r-- | game.c | 12 |
1 files changed, 10 insertions, 2 deletions
@@ -87,18 +87,22 @@ static void menu_deinit(Game* game) { static void gameplay_init(Game* game) { init_world(&game->world); - + init_map(&game->world.map); init_player(&game->world.player, &game->world); - new_skull(&game->world, 0, 0); } static void gameplay_update(Game* game) { + int cx, cy; + cx = game->world.cam_x; + cy = game->world.cam_y; + update_player(&game->world.player, &game->world); enemy_system(&game->world); bullet_system(&game->world); collision_system(&game->world); animation_system(&game->world); + render_map(&game->world.map, cx, cy); sprite_system(&game->world); } @@ -127,11 +131,15 @@ static void dead_init(Game* game) { static void dead_update(Game* game) { const BM_Font* font; + int cx, cy; font = get_default_font(); update_menu(&game->menu); + cx = game->world.cam_x; + cy = game->world.cam_y; + render_map(&game->world.map, cx, cy); sprite_system(&game->world); rfont_text( |