aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJuan J. Martinez <jjm@usebox.net>2023-07-15 22:13:06 +0100
committerJuan J. Martinez <jjm@usebox.net>2023-07-15 22:13:06 +0100
commit41044ad3f9ee7430963e81ad38bd1cf27c714d21 (patch)
treeb0011a6dcac1f221f3fc7be3653a1903bf21baac
parent9c910552f551ec9bff014c6b2741756283ccb506 (diff)
downloadgold-mine-run-41044ad3f9ee7430963e81ad38bd1cf27c714d21.tar.gz
gold-mine-run-41044ad3f9ee7430963e81ad38bd1cf27c714d21.zip
Stage 9
-rw-r--r--data/stage09.json164
-rw-r--r--src/data.h1
-rw-r--r--src/game.c5
3 files changed, 168 insertions, 2 deletions
diff --git a/data/stage09.json b/data/stage09.json
new file mode 100644
index 0000000..693918f
--- /dev/null
+++ b/data/stage09.json
@@ -0,0 +1,164 @@
+{ "compressionlevel":-1,
+ "height":23,
+ "infinite":false,
+ "layers":[
+ {
+ "data":[1, 1, 1, 1, 41, 42, 41, 42, 41, 42, 41, 42, 41, 42, 41, 42, 41, 42, 41, 42, 41, 42, 41, 42, 41, 42, 41, 42, 41, 42, 41, 42, 41, 42, 41, 42, 1, 1, 1, 1, 1, 1, 1, 1, 61, 62, 61, 62, 61, 62, 61, 62, 61, 62, 61, 62, 61, 62, 61, 62, 61, 62, 61, 62, 61, 62, 61, 62, 61, 62, 61, 62, 61, 62, 61, 62, 1, 1, 1, 1, 1, 1, 1, 1, 41, 42, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 41, 42, 1, 1, 1, 1, 1, 1, 1, 1, 61, 62, 23, 24, 23, 24, 23, 24, 23, 24, 23, 24, 23, 24, 23, 24, 23, 24, 23, 24, 23, 24, 23, 24, 23, 24, 23, 24, 23, 24, 61, 62, 1, 1, 1, 1, 1, 1, 1, 1, 41, 42, 3, 4, 3, 5, 6, 4, 3, 4, 3, 4, 3, 4, 5, 6, 3, 4, 3, 4, 3, 4, 3, 4, 3, 4, 3, 4, 3, 4, 41, 42, 1, 1, 1, 1, 1, 1, 1, 1, 61, 62, 23, 24, 23, 24, 23, 24, 23, 24, 23, 24, 23, 24, 23, 24, 23, 24, 23, 24, 23, 5, 6, 24, 23, 24, 23, 24, 23, 24, 61, 62, 1, 1, 1, 1, 1, 1, 1, 1, 41, 42, 3, 4, 3, 4, 3, 4, 3, 4, 3, 4, 3, 45, 45, 45, 45, 45, 45, 4, 3, 4, 3, 4, 3, 4, 3, 4, 3, 4, 41, 42, 1, 1, 1, 1, 1, 1, 1, 1, 61, 62, 23, 24, 23, 24, 3, 4, 7, 8, 3, 4, 3, 1, 2, 1, 1, 2, 1, 4, 3, 4, 3, 4, 3, 4, 23, 24, 5, 6, 61, 62, 1, 1, 1, 1, 1, 1, 1, 1, 41, 42, 5, 6, 3, 4, 23, 24, 27, 28, 23, 24, 23, 24, 22, 24, 23, 22, 5, 6, 23, 24, 23, 24, 23, 24, 3, 4, 3, 4, 41, 42, 1, 1, 1, 1, 1, 1, 1, 1, 61, 62, 23, 24, 23, 24, 43, 44, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 43, 44, 23, 24, 23, 24, 61, 62, 1, 1, 1, 1, 1, 1, 1, 1, 41, 42, 3, 4, 3, 4, 61, 62, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 61, 62, 3, 4, 3, 4, 41, 42, 1, 1, 1, 1, 1, 1, 1, 1, 61, 62, 23, 24, 23, 24, 41, 42, 23, 24, 5, 6, 23, 24, 23, 24, 23, 24, 23, 24, 23, 24, 23, 24, 41, 42, 23, 24, 23, 24, 61, 62, 1, 1, 1, 1, 1, 1, 1, 1, 41, 42, 3, 4, 3, 4, 61, 62, 45, 45, 45, 45, 45, 45, 23, 24, 23, 24, 45, 45, 45, 45, 45, 45, 61, 62, 5, 6, 3, 4, 41, 42, 1, 1, 1, 1, 1, 1, 1, 1, 61, 62, 23, 24, 5, 6, 1, 1, 1, 1, 2, 1, 1, 1, 3, 4, 3, 4, 1, 1, 1, 2, 1, 1, 1, 1, 23, 24, 23, 24, 61, 62, 1, 1, 1, 1, 1, 1, 1, 1, 41, 42, 3, 4, 3, 4, 3, 4, 3, 4, 22, 4, 3, 4, 3, 4, 3, 4, 3, 4, 3, 22, 3, 4, 3, 4, 3, 4, 3, 4, 41, 42, 1, 1, 1, 1, 1, 1, 1, 1, 61, 62, 23, 24, 23, 24, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 23, 24, 23, 24, 61, 62, 1, 1, 1, 1, 1, 1, 1, 1, 41, 42, 3, 4, 3, 4, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 3, 4, 3, 4, 41, 42, 1, 1, 1, 1, 1, 1, 1, 1, 61, 62, 5, 6, 23, 24, 3, 4, 3, 4, 22, 4, 3, 4, 3, 4, 3, 4, 3, 4, 3, 22, 3, 4, 3, 4, 23, 24, 23, 24, 61, 62, 1, 1, 1, 1, 1, 1, 1, 1, 41, 42, 3, 4, 3, 4, 63, 64, 45, 45, 45, 45, 45, 45, 63, 64, 63, 64, 45, 45, 45, 45, 45, 45, 63, 64, 3, 4, 5, 6, 41, 42, 1, 1, 1, 1, 1, 1, 1, 1, 61, 62, 23, 24, 23, 24, 46, 47, 1, 1, 1, 1, 1, 1, 41, 42, 41, 42, 1, 1, 1, 1, 1, 1, 46, 47, 23, 24, 23, 24, 61, 62, 1, 1, 1, 1, 1, 1, 1, 1, 41, 42, 3, 4, 3, 4, 66, 67, 3, 4, 3, 4, 3, 4, 61, 62, 61, 62, 3, 4, 3, 4, 5, 6, 66, 67, 3, 4, 3, 4, 41, 42, 1, 1, 1, 1, 1, 1, 1, 1, 61, 62, 43, 44, 43, 44, 43, 44, 43, 44, 43, 44, 43, 44, 41, 42, 41, 42, 43, 44, 43, 44, 43, 44, 43, 44, 43, 44, 43, 44, 61, 62, 1, 1, 1, 1, 1, 1, 1, 1, 41, 42, 61, 62, 61, 62, 61, 62, 61, 62, 61, 62, 61, 62, 61, 62, 61, 62, 61, 62, 61, 62, 61, 62, 61, 62, 61, 62, 61, 62, 41, 42, 1, 1, 1, 1],
+ "height":23,
+ "id":1,
+ "name":"Map",
+ "opacity":1,
+ "type":"tilelayer",
+ "visible":true,
+ "width":40,
+ "x":0,
+ "y":0
+ },
+ {
+ "data":[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 21, 21, 21, 21, 21, 21, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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,
+ "type":"tilelayer",
+ "visible":true,
+ "width":40,
+ "x":0,
+ "y":0
+ },
+ {
+ "draworder":"topdown",
+ "id":3,
+ "name":"Entities",
+ "objects":[
+ {
+ "height":16,
+ "id":1,
+ "name":"Player",
+ "rotation":0,
+ "type":"",
+ "visible":true,
+ "width":16,
+ "x":96,
+ "y":56
+ },
+ {
+ "height":16,
+ "id":32,
+ "name":"GoldKey",
+ "rotation":0,
+ "type":"",
+ "visible":true,
+ "width":16,
+ "x":224,
+ "y":56
+ },
+ {
+ "height":16,
+ "id":33,
+ "name":"Bonus",
+ "rotation":0,
+ "type":"",
+ "visible":true,
+ "width":16,
+ "x":80,
+ "y":128
+ },
+ {
+ "height":16,
+ "id":34,
+ "name":"Time",
+ "rotation":0,
+ "type":"",
+ "visible":true,
+ "width":16,
+ "x":224,
+ "y":128
+ },
+ {
+ "height":16,
+ "id":28,
+ "name":"Old",
+ "rotation":0,
+ "type":"",
+ "visible":true,
+ "width":16,
+ "x":96,
+ "y":128
+ },
+ {
+ "height":16,
+ "id":30,
+ "name":"Snake",
+ "rotation":0,
+ "type":"",
+ "visible":true,
+ "width":16,
+ "x":80,
+ "y":104
+ },
+ {
+ "height":16,
+ "id":29,
+ "name":"Old",
+ "properties":[
+ {
+ "name":"dir",
+ "type":"string",
+ "value":"left"
+ }],
+ "rotation":0,
+ "type":"",
+ "visible":true,
+ "width":16,
+ "x":208,
+ "y":128
+ },
+ {
+ "height":16,
+ "id":31,
+ "name":"Snake",
+ "properties":[
+ {
+ "name":"dir",
+ "type":"string",
+ "value":"left"
+ }],
+ "rotation":0,
+ "type":"",
+ "visible":true,
+ "width":16,
+ "x":224,
+ "y":104
+ }],
+ "opacity":1,
+ "type":"objectgroup",
+ "visible":true,
+ "x":0,
+ "y":0
+ }],
+ "nextlayerid":4,
+ "nextobjectid":35,
+ "orientation":"orthogonal",
+ "renderorder":"right-down",
+ "tiledversion":"1.7.2",
+ "tileheight":8,
+ "tilesets":[
+ {
+ "columns":20,
+ "firstgid":1,
+ "image":"tiles.png",
+ "imageheight":48,
+ "imagewidth":160,
+ "margin":0,
+ "name":"Map",
+ "spacing":0,
+ "tilecount":120,
+ "tileheight":8,
+ "tilewidth":8
+ }],
+ "tilewidth":8,
+ "type":"map",
+ "version":"1.6",
+ "width":40
+} \ No newline at end of file
diff --git a/src/data.h b/src/data.h
index 2ed9805..1ea2bda 100644
--- a/src/data.h
+++ b/src/data.h
@@ -22,6 +22,7 @@ extern const uint8_t binary_stage05_start[];
extern const uint8_t binary_stage06_start[];
extern const uint8_t binary_stage07_start[];
extern const uint8_t binary_stage08_start[];
+extern const uint8_t binary_stage09_start[];
/* sound */
extern const uint8_t binary_music_start[];
diff --git a/src/game.c b/src/game.c
index 4f9e44f..b5f94dd 100644
--- a/src/game.c
+++ b/src/game.c
@@ -50,11 +50,12 @@ static Entity *tmonster;
/* 0-index */
#define START_STAGE 0
-#define STAGES_LEN 8
+#define STAGES_LEN 9
static const uint8_t *stages[STAGES_LEN] = {
binary_stage01_start, binary_stage02_start, binary_stage03_start, binary_stage04_start,
- binary_stage05_start, binary_stage06_start, binary_stage07_start, binary_stage08_start
+ binary_stage05_start, binary_stage06_start, binary_stage07_start, binary_stage08_start,
+ binary_stage09_start
};
static void hud_render()