From bb7ec5e1b79dabaca52656572d8ec17673f7d35e Mon Sep 17 00:00:00 2001 From: "Juan J. Martinez" Date: Sat, 15 Jul 2023 16:54:01 +0100 Subject: Stage 5 --- src/data.h | 1 + src/game.c | 9 ++++++--- 2 files changed, 7 insertions(+), 3 deletions(-) (limited to 'src') diff --git a/src/data.h b/src/data.h index 59fa913..9f35f35 100644 --- a/src/data.h +++ b/src/data.h @@ -18,6 +18,7 @@ extern const uint8_t binary_stage01_start[]; extern const uint8_t binary_stage02_start[]; extern const uint8_t binary_stage03_start[]; extern const uint8_t binary_stage04_start[]; +extern const uint8_t binary_stage05_start[]; /* sound */ extern const uint8_t binary_music_start[]; diff --git a/src/game.c b/src/game.c index 2c58107..8c619ed 100644 --- a/src/game.c +++ b/src/game.c @@ -48,10 +48,13 @@ static uint8_t gameover; static uint8_t pause; static Entity *tmonster; -#define STAGES_LEN 4 +/* 0-index */ +#define START_STAGE 0 +#define STAGES_LEN 5 static const uint8_t *stages[STAGES_LEN] = { - binary_stage01_start, binary_stage02_start, binary_stage03_start, binary_stage04_start + binary_stage01_start, binary_stage02_start, binary_stage03_start, binary_stage04_start, + binary_stage05_start }; static void hud_render() @@ -227,7 +230,7 @@ void run_game() { lives = GAME_LIVES_START; score = 0; - stage = 0; + stage = START_STAGE; run_intro(); -- cgit v1.2.3