aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJuan J. Martinez <jjm@usebox.net>2023-07-22 21:53:08 +0100
committerJuan J. Martinez <jjm@usebox.net>2023-07-22 21:53:08 +0100
commita26f820e8f63238ad57e91062e7d0d22195598cd (patch)
tree69e44ed6d43fd246df691f052f09fd02e457d318
parentd11a8ff7daf064f2015a0e270ebee900e6088e45 (diff)
downloadgold-mine-run-a26f820e8f63238ad57e91062e7d0d22195598cd.tar.gz
gold-mine-run-a26f820e8f63238ad57e91062e7d0d22195598cd.zip
Stage 20
-rw-r--r--data/stage20.json198
-rw-r--r--src/data.h1
-rw-r--r--src/game.c4
3 files changed, 201 insertions, 2 deletions
diff --git a/data/stage20.json b/data/stage20.json
new file mode 100644
index 0000000..d98c3bc
--- /dev/null
+++ b/data/stage20.json
@@ -0,0 +1,198 @@
+{ "compressionlevel":-1,
+ "height":23,
+ "infinite":false,
+ "layers":[
+ {
+ "data":[56, 57, 56, 57, 56, 57, 56, 57, 56, 57, 56, 57, 56, 57, 56, 57, 56, 57, 56, 57, 56, 57, 56, 57, 56, 57, 56, 57, 56, 57, 56, 57, 56, 57, 56, 57, 56, 57, 56, 57, 76, 77, 76, 77, 76, 77, 76, 77, 76, 77, 76, 77, 76, 77, 76, 77, 76, 77, 76, 77, 76, 77, 76, 77, 76, 77, 76, 77, 76, 77, 76, 77, 76, 77, 76, 77, 76, 77, 76, 77, 56, 57, 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, 1, 1, 1, 1, 1, 1, 1, 1, 56, 57, 76, 77, 23, 5, 6, 24, 23, 24, 23, 24, 23, 24, 23, 24, 23, 24, 23, 24, 23, 5, 6, 24, 23, 24, 23, 24, 23, 24, 23, 24, 23, 24, 5, 6, 23, 24, 23, 24, 76, 77, 56, 57, 3, 4, 3, 4, 3, 4, 3, 4, 3, 4, 3, 4, 3, 4, 3, 4, 3, 4, 3, 4, 3, 4, 3, 4, 3, 4, 3, 4, 3, 4, 3, 4, 3, 4, 3, 4, 56, 57, 76, 77, 23, 24, 23, 24, 23, 24, 23, 24, 23, 24, 23, 24, 23, 24, 23, 24, 23, 24, 23, 24, 23, 24, 23, 24, 5, 6, 23, 24, 23, 24, 23, 24, 23, 24, 5, 6, 76, 77, 56, 57, 3, 4, 3, 4, 3, 4, 5, 6, 3, 4, 55, 55, 55, 55, 55, 55, 3, 4, 3, 4, 55, 55, 55, 55, 55, 55, 3, 4, 3, 4, 3, 4, 3, 4, 3, 4, 56, 57, 76, 77, 23, 24, 23, 24, 23, 24, 23, 24, 23, 24, 1, 1, 1, 1, 1, 13, 23, 24, 23, 24, 13, 1, 1, 1, 1, 1, 23, 24, 23, 24, 23, 24, 23, 24, 23, 24, 76, 77, 56, 57, 3, 4, 3, 4, 3, 4, 3, 4, 3, 4, 3, 4, 3, 4, 3, 33, 3, 4, 3, 4, 33, 4, 3, 4, 3, 4, 3, 4, 3, 5, 6, 4, 3, 4, 3, 4, 56, 57, 76, 77, 23, 5, 6, 24, 23, 24, 23, 24, 23, 24, 23, 24, 23, 24, 55, 55, 55, 55, 55, 55, 55, 55, 23, 24, 5, 6, 23, 24, 23, 24, 23, 24, 23, 24, 23, 24, 76, 77, 56, 57, 3, 4, 3, 4, 3, 4, 3, 4, 3, 4, 3, 4, 3, 4, 1, 13, 1, 1, 1, 1, 13, 1, 3, 4, 3, 4, 3, 4, 3, 4, 3, 4, 3, 4, 3, 4, 56, 57, 76, 77, 23, 24, 23, 24, 23, 24, 23, 24, 23, 24, 23, 24, 23, 24, 23, 33, 5, 6, 23, 24, 33, 24, 23, 24, 23, 24, 23, 24, 23, 24, 23, 24, 23, 24, 23, 24, 76, 77, 56, 57, 3, 4, 3, 4, 58, 59, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 3, 4, 3, 4, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 58, 59, 3, 4, 3, 4, 56, 57, 76, 77, 23, 24, 23, 24, 76, 77, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 23, 24, 23, 24, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 76, 77, 23, 24, 5, 6, 76, 77, 56, 57, 3, 4, 5, 6, 56, 57, 3, 4, 3, 4, 3, 4, 3, 4, 3, 4, 3, 4, 3, 4, 3, 4, 3, 4, 3, 4, 3, 4, 3, 4, 56, 57, 3, 4, 3, 4, 56, 57, 76, 77, 23, 24, 23, 24, 76, 77, 55, 55, 55, 55, 58, 59, 23, 24, 23, 24, 23, 24, 23, 24, 23, 24, 23, 24, 58, 59, 55, 55, 55, 55, 76, 77, 23, 24, 23, 24, 76, 77, 56, 57, 3, 4, 3, 4, 1, 1, 1, 1, 1, 1, 76, 77, 3, 4, 3, 4, 3, 4, 5, 6, 3, 4, 3, 4, 76, 77, 1, 1, 1, 1, 1, 1, 3, 4, 3, 4, 56, 57, 76, 77, 23, 24, 23, 24, 23, 24, 23, 24, 23, 24, 56, 57, 4, 3, 4, 3, 4, 3, 4, 3, 4, 3, 4, 3, 56, 57, 23, 24, 23, 24, 23, 24, 5, 6, 23, 24, 76, 77, 56, 57, 3, 4, 3, 4, 55, 55, 55, 55, 55, 55, 76, 77, 24, 23, 24, 23, 24, 23, 24, 23, 24, 23, 24, 23, 76, 77, 55, 55, 55, 55, 55, 55, 3, 4, 3, 4, 56, 57, 76, 77, 5, 6, 4, 24, 1, 13, 1, 1, 13, 1, 1, 1, 4, 3, 5, 6, 4, 3, 4, 3, 4, 3, 4, 3, 1, 1, 1, 13, 1, 1, 13, 1, 23, 14, 15, 24, 76, 77, 56, 57, 3, 23, 24, 4, 3, 33, 3, 4, 33, 4, 3, 23, 24, 23, 24, 23, 24, 23, 24, 23, 24, 23, 5, 6, 24, 4, 3, 33, 3, 4, 33, 4, 3, 34, 35, 4, 56, 57, 76, 77, 58, 59, 58, 59, 58, 59, 58, 59, 58, 59, 58, 59, 30, 29, 30, 29, 30, 29, 30, 29, 30, 29, 30, 29, 58, 59, 58, 59, 58, 59, 58, 59, 58, 59, 58, 59, 76, 77, 56, 57, 76, 77, 76, 77, 76, 77, 76, 77, 76, 77, 76, 77, 104, 103, 104, 103, 104, 103, 104, 103, 104, 103, 104, 103, 76, 77, 76, 77, 76, 77, 76, 77, 76, 77, 76, 77, 56, 57],
+ "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, 21, 21, 21, 21, 21, 21, 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,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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",
+ "properties":[
+ {
+ "name":"dir",
+ "type":"string",
+ "value":"left"
+ }],
+ "rotation":0,
+ "type":"",
+ "visible":true,
+ "width":16,
+ "x":280,
+ "y":152
+ },
+ {
+ "height":16,
+ "id":28,
+ "name":"Bat",
+ "properties":[
+ {
+ "name":"dir",
+ "type":"string",
+ "value":"left"
+ }],
+ "rotation":0,
+ "type":"",
+ "visible":true,
+ "width":16,
+ "x":176,
+ "y":120
+ },
+ {
+ "height":16,
+ "id":31,
+ "name":"Bat",
+ "rotation":0,
+ "type":"",
+ "visible":true,
+ "width":16,
+ "x":128,
+ "y":120
+ },
+ {
+ "height":16,
+ "id":29,
+ "name":"Bones",
+ "properties":[
+ {
+ "name":"dir",
+ "type":"string",
+ "value":"left"
+ }],
+ "rotation":0,
+ "type":"",
+ "visible":true,
+ "width":16,
+ "x":240,
+ "y":80
+ },
+ {
+ "height":16,
+ "id":37,
+ "name":"Bones",
+ "properties":[
+ {
+ "name":"dir",
+ "type":"string",
+ "value":"left"
+ }],
+ "rotation":0,
+ "type":"",
+ "visible":true,
+ "width":16,
+ "x":240,
+ "y":128
+ },
+ {
+ "height":16,
+ "id":32,
+ "name":"Bonus",
+ "rotation":0,
+ "type":"",
+ "visible":true,
+ "width":16,
+ "x":208,
+ "y":152
+ },
+ {
+ "height":16,
+ "id":33,
+ "name":"Pickaxe",
+ "rotation":0,
+ "type":"",
+ "visible":true,
+ "width":16,
+ "x":96,
+ "y":152
+ },
+ {
+ "height":16,
+ "id":35,
+ "name":"Bonus",
+ "rotation":0,
+ "type":"",
+ "visible":true,
+ "width":16,
+ "x":176,
+ "y":80
+ },
+ {
+ "height":16,
+ "id":30,
+ "name":"Bones",
+ "rotation":0,
+ "type":"",
+ "visible":true,
+ "width":16,
+ "x":64,
+ "y":80
+ },
+ {
+ "height":16,
+ "id":36,
+ "name":"Bones",
+ "rotation":0,
+ "type":"",
+ "visible":true,
+ "width":16,
+ "x":64,
+ "y":128
+ }],
+ "opacity":1,
+ "type":"objectgroup",
+ "visible":true,
+ "x":0,
+ "y":0
+ }],
+ "nextlayerid":4,
+ "nextobjectid":38,
+ "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 a0d93d2..d45dc96 100644
--- a/src/data.h
+++ b/src/data.h
@@ -33,6 +33,7 @@ extern const uint8_t binary_stage16_start[];
extern const uint8_t binary_stage17_start[];
extern const uint8_t binary_stage18_start[];
extern const uint8_t binary_stage19_start[];
+extern const uint8_t binary_stage20_start[];
/* sound */
extern const uint8_t binary_music_start[];
diff --git a/src/game.c b/src/game.c
index b561795..080e330 100644
--- a/src/game.c
+++ b/src/game.c
@@ -53,14 +53,14 @@ static Entity *tmonster;
/* 0-index */
#define START_STAGE 0
-#define STAGES_LEN 19
+#define STAGES_LEN 20
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_stage09_start, binary_stage10_start, binary_stage11_start, binary_stage12_start,
binary_stage13_start, binary_stage14_start, binary_stage15_start, binary_stage16_start,
- binary_stage17_start, binary_stage18_start, binary_stage19_start,
+ binary_stage17_start, binary_stage18_start, binary_stage19_start, binary_stage20_start,
};
static void hud_render()