diff options
author | Juan J. Martinez <jjm@usebox.net> | 2023-07-11 22:09:18 +0100 |
---|---|---|
committer | Juan J. Martinez <jjm@usebox.net> | 2023-07-11 22:09:18 +0100 |
commit | d8d566ddfc9535dd773d942c7e874b875cd803b4 (patch) | |
tree | 987779ae55454d2db9f98ca7c80160c9ef617450 /src/game.c | |
parent | 26ab42af5d43c641237a59ca12c97143c5fb571b (diff) | |
download | gold-mine-run-d8d566ddfc9535dd773d942c7e874b875cd803b4.tar.gz gold-mine-run-d8d566ddfc9535dd773d942c7e874b875cd803b4.zip |
Multiple stages
Diffstat (limited to 'src/game.c')
-rw-r--r-- | src/game.c | 14 |
1 files changed, 13 insertions, 1 deletions
@@ -48,6 +48,12 @@ static uint8_t gameover; static uint8_t pause; static Entity *tmonster; +#define STAGES_LEN 2 + +static const uint8_t *stages[STAGES_LEN] = { + binary_stage01_start, binary_stage02_start, +}; + static void hud_render() { char b[32]; @@ -175,7 +181,7 @@ next_stage: blit_target(TARGET_BUFFER); blit_erase(0); - map_init(binary_stage_start); + map_init(stages[stage]); map_render(); hud_render(); @@ -246,6 +252,12 @@ next_stage: if (stageclear == 1) { run_stageclear(); + stage++; + if (stage == STAGES_LEN) + { + /* TODO: endgame */ + break; + } goto next_stage; } } |