aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJuan J. Martinez <jjm@usebox.net>2023-07-15 16:54:01 +0100
committerJuan J. Martinez <jjm@usebox.net>2023-07-15 16:54:01 +0100
commitbb7ec5e1b79dabaca52656572d8ec17673f7d35e (patch)
tree3c1aebafe63823991d4126994ed2efe8aac70f82 /src
parent1ac83c4fc1d3ae63d29ae67b2569ebbb4126d154 (diff)
downloadgold-mine-run-bb7ec5e1b79dabaca52656572d8ec17673f7d35e.tar.gz
gold-mine-run-bb7ec5e1b79dabaca52656572d8ec17673f7d35e.zip
Stage 5
Diffstat (limited to 'src')
-rw-r--r--src/data.h1
-rw-r--r--src/game.c9
2 files changed, 7 insertions, 3 deletions
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();