aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJuan J. Martinez <jjm@usebox.net>2023-07-17 22:39:45 +0100
committerJuan J. Martinez <jjm@usebox.net>2023-07-17 22:39:45 +0100
commitb18921f9b08442c52f6bed8645199408a26061c2 (patch)
tree0e902ad32882b4df9df2c9fb5310ccb949d48156
parent8cd2b20ac5bd4b3c0f779753f5fe1c9acf57b5dd (diff)
downloadgold-mine-run-b18921f9b08442c52f6bed8645199408a26061c2.tar.gz
gold-mine-run-b18921f9b08442c52f6bed8645199408a26061c2.zip
Stage 13
-rw-r--r--data/stage13.json214
-rw-r--r--src/data.h1
-rw-r--r--src/game.c5
3 files changed, 218 insertions, 2 deletions
diff --git a/data/stage13.json b/data/stage13.json
new file mode 100644
index 0000000..ed6e05a
--- /dev/null
+++ b/data/stage13.json
@@ -0,0 +1,214 @@
+{ "compressionlevel":-1,
+ "height":23,
+ "infinite":false,
+ "layers":[
+ {
+ "data":[51, 52, 51, 52, 51, 52, 51, 52, 51, 52, 51, 52, 51, 52, 51, 52, 51, 52, 51, 52, 51, 52, 51, 52, 51, 52, 51, 52, 51, 52, 51, 52, 51, 52, 51, 52, 51, 52, 51, 52, 71, 72, 71, 72, 71, 72, 71, 72, 71, 72, 71, 72, 71, 72, 71, 72, 71, 72, 71, 72, 71, 72, 71, 72, 71, 72, 71, 72, 71, 72, 71, 72, 71, 72, 71, 72, 71, 72, 71, 72, 51, 52, 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, 51, 52, 71, 72, 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, 23, 24, 23, 24, 23, 24, 23, 24, 71, 72, 51, 52, 5, 6, 3, 4, 3, 4, 3, 4, 3, 5, 6, 4, 3, 4, 3, 4, 3, 4, 3, 4, 5, 6, 3, 4, 3, 4, 3, 4, 3, 5, 6, 4, 3, 4, 3, 4, 51, 52, 71, 72, 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, 23, 24, 23, 24, 23, 24, 23, 24, 71, 72, 51, 52, 3, 4, 3, 4, 3, 5, 6, 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, 5, 6, 51, 52, 71, 72, 23, 24, 23, 24, 23, 24, 23, 24, 23, 24, 23, 24, 23, 24, 5, 6, 23, 11, 12, 24, 23, 24, 23, 24, 23, 24, 23, 24, 23, 24, 23, 24, 23, 24, 23, 24, 71, 72, 51, 52, 3, 4, 3, 4, 3, 4, 3, 4, 3, 4, 3, 4, 3, 4, 3, 4, 3, 31, 32, 4, 3, 4, 3, 4, 3, 4, 3, 4, 3, 4, 3, 4, 3, 4, 3, 4, 51, 52, 71, 72, 23, 5, 6, 24, 23, 24, 23, 24, 23, 24, 23, 24, 23, 24, 23, 24, 50, 50, 50, 50, 23, 24, 23, 24, 23, 50, 50, 50, 50, 24, 23, 24, 23, 24, 23, 24, 71, 72, 51, 52, 3, 4, 3, 4, 3, 4, 3, 4, 3, 5, 6, 4, 3, 4, 3, 4, 2, 1, 1, 2, 3, 4, 3, 5, 6, 2, 1, 1, 2, 4, 3, 5, 6, 4, 3, 4, 51, 52, 71, 72, 23, 24, 23, 24, 23, 24, 23, 24, 23, 24, 23, 24, 23, 24, 23, 24, 22, 24, 23, 22, 23, 24, 23, 24, 23, 22, 23, 24, 22, 24, 23, 24, 23, 24, 23, 24, 71, 72, 51, 52, 3, 4, 3, 4, 3, 4, 3, 4, 53, 54, 50, 50, 50, 50, 50, 50, 53, 54, 53, 54, 50, 50, 50, 50, 50, 50, 53, 54, 50, 50, 50, 50, 50, 50, 50, 50, 51, 52, 71, 72, 23, 24, 23, 5, 6, 24, 23, 24, 71, 72, 1, 1, 1, 1, 1, 1, 51, 52, 51, 52, 1, 1, 1, 1, 1, 1, 71, 72, 1, 1, 1, 1, 1, 1, 1, 1, 71, 72, 51, 52, 3, 4, 3, 4, 3, 4, 3, 4, 71, 72, 3, 4, 3, 4, 5, 6, 71, 72, 71, 72, 3, 4, 3, 4, 3, 4, 71, 72, 3, 5, 6, 4, 3, 4, 3, 4, 51, 52, 71, 72, 50, 50, 50, 50, 23, 24, 23, 24, 51, 52, 50, 50, 50, 50, 50, 50, 51, 52, 51, 52, 50, 50, 50, 50, 50, 50, 51, 52, 50, 50, 50, 50, 50, 50, 50, 50, 71, 72, 51, 52, 1, 1, 1, 1, 3, 4, 3, 4, 71, 72, 1, 1, 1, 1, 1, 1, 71, 72, 71, 72, 1, 1, 1, 1, 1, 1, 48, 49, 1, 1, 1, 1, 1, 1, 1, 1, 51, 52, 71, 72, 23, 24, 23, 24, 23, 24, 5, 6, 51, 52, 23, 24, 23, 24, 23, 24, 51, 52, 51, 52, 5, 6, 23, 24, 23, 24, 68, 69, 23, 24, 23, 24, 23, 24, 23, 24, 71, 72, 51, 52, 5, 6, 3, 4, 3, 4, 3, 4, 71, 72, 50, 50, 50, 50, 50, 50, 71, 72, 71, 72, 50, 50, 50, 50, 50, 50, 73, 74, 50, 50, 50, 50, 50, 50, 50, 50, 51, 52, 71, 72, 23, 24, 23, 24, 23, 24, 23, 24, 1, 1, 2, 1, 1, 1, 1, 2, 1, 1, 1, 1, 2, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 71, 72, 51, 52, 3, 4, 3, 4, 3, 4, 3, 4, 3, 4, 22, 4, 3, 5, 6, 22, 3, 4, 3, 4, 22, 4, 3, 4, 3, 22, 3, 4, 3, 4, 3, 4, 5, 6, 3, 4, 51, 52, 71, 72, 3, 4, 3, 5, 6, 4, 53, 54, 53, 54, 53, 54, 53, 54, 53, 54, 53, 54, 53, 54, 53, 54, 53, 54, 53, 54, 3, 4, 5, 6, 3, 4, 3, 4, 3, 4, 71, 72, 51, 52, 102, 102, 102, 102, 102, 102, 71, 72, 71, 72, 71, 72, 71, 72, 71, 72, 71, 72, 71, 72, 71, 72, 71, 72, 71, 72, 102, 102, 102, 102, 102, 102, 102, 102, 102, 102, 51, 52],
+ "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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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":152,
+ "y":56
+ },
+ {
+ "height":16,
+ "id":28,
+ "name":"SilverKey",
+ "rotation":0,
+ "type":"",
+ "visible":true,
+ "width":16,
+ "x":24,
+ "y":104
+ },
+ {
+ "height":16,
+ "id":32,
+ "name":"Bones",
+ "properties":[
+ {
+ "name":"dir",
+ "type":"string",
+ "value":"left"
+ }],
+ "rotation":0,
+ "type":"",
+ "visible":true,
+ "width":16,
+ "x":192,
+ "y":152
+ },
+ {
+ "height":16,
+ "id":38,
+ "name":"Old",
+ "properties":[
+ {
+ "name":"dir",
+ "type":"string",
+ "value":"left"
+ }],
+ "rotation":0,
+ "type":"",
+ "visible":true,
+ "width":16,
+ "x":288,
+ "y":128
+ },
+ {
+ "height":16,
+ "id":33,
+ "name":"Bones",
+ "rotation":0,
+ "type":"",
+ "visible":true,
+ "width":16,
+ "x":112,
+ "y":152
+ },
+ {
+ "height":16,
+ "id":37,
+ "name":"Old",
+ "rotation":0,
+ "type":"",
+ "visible":true,
+ "width":16,
+ "x":240,
+ "y":128
+ },
+ {
+ "height":16,
+ "id":34,
+ "name":"Snake",
+ "rotation":0,
+ "type":"",
+ "visible":true,
+ "width":16,
+ "x":96,
+ "y":80
+ },
+ {
+ "height":16,
+ "id":36,
+ "name":"Bat",
+ "rotation":0,
+ "type":"",
+ "visible":true,
+ "width":16,
+ "x":56,
+ "y":48
+ },
+ {
+ "height":16,
+ "id":35,
+ "name":"Snake",
+ "properties":[
+ {
+ "name":"dir",
+ "type":"string",
+ "value":"left"
+ }],
+ "rotation":0,
+ "type":"",
+ "visible":true,
+ "width":16,
+ "x":272,
+ "y":80
+ },
+ {
+ "height":16,
+ "id":29,
+ "name":"Pickaxe",
+ "rotation":0,
+ "type":"",
+ "visible":true,
+ "width":16,
+ "x":224,
+ "y":56
+ },
+ {
+ "height":16,
+ "id":31,
+ "name":"Pickaxe",
+ "rotation":0,
+ "type":"",
+ "visible":true,
+ "width":16,
+ "x":96,
+ "y":152
+ },
+ {
+ "height":16,
+ "id":30,
+ "name":"Bonus",
+ "rotation":0,
+ "type":"",
+ "visible":true,
+ "width":16,
+ "x":208,
+ "y":152
+ }],
+ "opacity":1,
+ "type":"objectgroup",
+ "visible":true,
+ "x":0,
+ "y":0
+ }],
+ "nextlayerid":4,
+ "nextobjectid":39,
+ "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 2987f7b..34612d2 100644
--- a/src/data.h
+++ b/src/data.h
@@ -26,6 +26,7 @@ extern const uint8_t binary_stage09_start[];
extern const uint8_t binary_stage10_start[];
extern const uint8_t binary_stage11_start[];
extern const uint8_t binary_stage12_start[];
+extern const uint8_t binary_stage13_start[];
/* sound */
extern const uint8_t binary_music_start[];
diff --git a/src/game.c b/src/game.c
index 535f985..9341cf0 100644
--- a/src/game.c
+++ b/src/game.c
@@ -53,12 +53,13 @@ static Entity *tmonster;
/* 0-index */
#define START_STAGE 0
-#define STAGES_LEN 12
+#define STAGES_LEN 13
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_stage09_start, binary_stage10_start, binary_stage11_start, binary_stage12_start,
+ binary_stage13_start,
};
static void hud_render()