aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJuan J. Martinez <jjm@usebox.net>2023-07-20 21:02:04 +0100
committerJuan J. Martinez <jjm@usebox.net>2023-07-20 21:02:04 +0100
commit756e425585ba717915b74573741c52020b1b724a (patch)
treed90aa252a037143eb6ac328eedf8c1e8d7280f45
parent21d5ae817f2c59815b89014413a73084dfa47133 (diff)
downloadgold-mine-run-756e425585ba717915b74573741c52020b1b724a.tar.gz
gold-mine-run-756e425585ba717915b74573741c52020b1b724a.zip
Stage 16
-rw-r--r--data/stage16.json197
-rw-r--r--src/data.h1
-rw-r--r--src/game.c4
3 files changed, 200 insertions, 2 deletions
diff --git a/data/stage16.json b/data/stage16.json
new file mode 100644
index 0000000..a6f95a5
--- /dev/null
+++ b/data/stage16.json
@@ -0,0 +1,197 @@
+{ "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, 51, 52, 51, 52, 51, 52, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 51, 52, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 51, 52, 71, 72, 23, 24, 71, 72, 71, 72, 71, 72, 23, 24, 23, 24, 23, 24, 23, 24, 23, 24, 71, 72, 23, 24, 23, 24, 23, 24, 23, 24, 23, 24, 5, 6, 23, 24, 23, 24, 71, 72, 51, 52, 3, 4, 1, 1, 51, 52, 1, 1, 3, 4, 3, 5, 6, 4, 3, 4, 3, 4, 51, 52, 3, 5, 6, 4, 3, 4, 3, 4, 3, 4, 3, 4, 3, 4, 3, 4, 51, 52, 71, 72, 5, 6, 23, 24, 71, 72, 23, 24, 23, 24, 23, 24, 23, 24, 23, 24, 23, 24, 71, 72, 23, 24, 23, 24, 23, 24, 23, 24, 23, 24, 23, 24, 23, 24, 5, 6, 71, 72, 51, 52, 3, 4, 3, 4, 51, 52, 3, 4, 3, 4, 3, 4, 3, 4, 3, 4, 3, 4, 1, 1, 3, 4, 3, 4, 50, 50, 50, 50, 50, 73, 74, 50, 50, 50, 50, 50, 51, 52, 71, 72, 23, 24, 23, 24, 71, 72, 23, 24, 23, 24, 23, 24, 23, 24, 23, 5, 6, 24, 23, 24, 23, 24, 23, 24, 1, 1, 2, 1, 1, 51, 52, 1, 1, 1, 1, 1, 71, 72, 51, 52, 3, 4, 5, 6, 51, 52, 3, 4, 3, 4, 3, 4, 3, 4, 3, 4, 3, 4, 3, 4, 3, 4, 3, 4, 3, 4, 22, 4, 3, 71, 72, 4, 3, 4, 3, 4, 51, 52, 71, 72, 23, 24, 23, 24, 48, 49, 23, 24, 23, 5, 6, 24, 23, 24, 50, 50, 50, 50, 53, 54, 50, 50, 50, 50, 50, 50, 50, 50, 50, 51, 52, 50, 50, 50, 50, 50, 71, 72, 51, 52, 3, 4, 3, 4, 68, 69, 3, 4, 3, 4, 3, 4, 3, 4, 1, 2, 1, 1, 71, 72, 1, 2, 1, 1, 2, 1, 1, 1, 1, 71, 72, 1, 1, 1, 1, 1, 51, 52, 71, 72, 23, 24, 23, 24, 53, 54, 53, 54, 23, 24, 23, 24, 23, 24, 23, 22, 23, 24, 51, 52, 23, 22, 23, 24, 22, 24, 23, 24, 23, 51, 52, 24, 5, 6, 23, 24, 71, 72, 51, 52, 5, 6, 3, 4, 71, 72, 71, 72, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 71, 72, 3, 22, 3, 4, 22, 5, 6, 4, 3, 71, 72, 50, 50, 50, 50, 50, 51, 52, 71, 72, 23, 24, 23, 24, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 23, 22, 23, 24, 22, 24, 23, 24, 23, 46, 47, 1, 1, 1, 1, 1, 71, 72, 51, 52, 3, 4, 3, 4, 3, 4, 3, 4, 3, 4, 3, 4, 3, 4, 3, 4, 3, 4, 3, 4, 3, 22, 3, 4, 22, 4, 3, 4, 3, 66, 67, 4, 3, 4, 3, 4, 51, 52, 71, 72, 23, 24, 23, 24, 23, 24, 50, 50, 50, 50, 50, 24, 23, 24, 23, 5, 6, 3, 4, 3, 4, 22, 23, 50, 50, 50, 50, 50, 50, 53, 54, 50, 50, 50, 50, 50, 71, 72, 51, 52, 3, 4, 3, 5, 6, 4, 1, 2, 1, 1, 1, 4, 3, 4, 3, 4, 3, 23, 24, 23, 24, 22, 3, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 51, 52, 71, 72, 23, 24, 23, 24, 23, 24, 23, 22, 23, 5, 6, 24, 23, 24, 23, 24, 23, 24, 23, 24, 23, 22, 23, 24, 23, 3, 4, 3, 4, 5, 6, 24, 23, 24, 23, 24, 71, 72, 51, 52, 3, 4, 50, 50, 50, 50, 50, 50, 3, 4, 3, 4, 3, 4, 3, 4, 3, 4, 3, 4, 50, 50, 50, 50, 50, 50, 24, 23, 24, 23, 24, 4, 3, 4, 3, 4, 51, 52, 71, 72, 23, 24, 1, 1, 2, 1, 1, 1, 23, 24, 23, 24, 23, 24, 23, 24, 23, 24, 23, 24, 1, 1, 1, 1, 1, 1, 4, 3, 4, 3, 4, 24, 23, 11, 12, 24, 71, 72, 51, 52, 3, 4, 5, 6, 22, 4, 3, 4, 3, 4, 3, 4, 3, 4, 3, 4, 3, 4, 3, 4, 3, 5, 6, 4, 3, 23, 24, 23, 24, 23, 24, 5, 6, 31, 32, 4, 51, 52, 71, 72, 53, 54, 53, 54, 53, 54, 53, 54, 53, 3, 4, 5, 6, 3, 4, 54, 53, 3, 3, 4, 3, 4, 3, 4, 53, 54, 53, 54, 53, 54, 53, 54, 53, 54, 53, 54, 71, 72, 51, 52, 71, 72, 71, 72, 71, 72, 71, 72, 71, 102, 102, 102, 102, 102, 102, 72, 71, 102, 102, 102, 102, 102, 102, 102, 71, 72, 71, 72, 71, 72, 71, 72, 71, 72, 71, 72, 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, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,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":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":"GoldKey",
+ "rotation":0,
+ "type":"",
+ "visible":true,
+ "width":16,
+ "x":136,
+ "y":152
+ },
+ {
+ "height":16,
+ "id":31,
+ "name":"Time",
+ "rotation":0,
+ "type":"",
+ "visible":true,
+ "width":16,
+ "x":160,
+ "y":56
+ },
+ {
+ "height":16,
+ "id":32,
+ "name":"Snake",
+ "rotation":0,
+ "type":"",
+ "visible":true,
+ "width":16,
+ "x":128,
+ "y":56
+ },
+ {
+ "height":16,
+ "id":36,
+ "name":"Old",
+ "rotation":0,
+ "type":"",
+ "visible":true,
+ "width":16,
+ "x":264,
+ "y":104
+ },
+ {
+ "height":16,
+ "id":33,
+ "name":"Bat",
+ "rotation":0,
+ "type":"",
+ "visible":true,
+ "width":16,
+ "x":136,
+ "y":120
+ },
+ {
+ "height":16,
+ "id":34,
+ "name":"Bones",
+ "rotation":0,
+ "type":"",
+ "visible":true,
+ "width":16,
+ "x":32,
+ "y":152
+ },
+ {
+ "height":16,
+ "id":35,
+ "name":"Bones",
+ "properties":[
+ {
+ "name":"dir",
+ "type":"string",
+ "value":"left"
+ }],
+ "rotation":0,
+ "type":"",
+ "visible":true,
+ "width":16,
+ "x":64,
+ "y":152
+ },
+ {
+ "height":16,
+ "id":30,
+ "name":"Bonus",
+ "rotation":0,
+ "type":"",
+ "visible":true,
+ "width":16,
+ "x":64,
+ "y":152
+ },
+ {
+ "height":16,
+ "id":29,
+ "name":"SilverKey",
+ "rotation":0,
+ "type":"",
+ "visible":true,
+ "width":16,
+ "x":232,
+ "y":56
+ },
+ {
+ "height":16,
+ "id":38,
+ "name":"Pickaxe",
+ "rotation":0,
+ "type":"",
+ "visible":true,
+ "width":16,
+ "x":288,
+ "y":32
+ }],
+ "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 24bd449..5b2d118 100644
--- a/src/data.h
+++ b/src/data.h
@@ -29,6 +29,7 @@ extern const uint8_t binary_stage12_start[];
extern const uint8_t binary_stage13_start[];
extern const uint8_t binary_stage14_start[];
extern const uint8_t binary_stage15_start[];
+extern const uint8_t binary_stage16_start[];
/* sound */
extern const uint8_t binary_music_start[];
diff --git a/src/game.c b/src/game.c
index 52ea64c..9f9b8e3 100644
--- a/src/game.c
+++ b/src/game.c
@@ -53,13 +53,13 @@ static Entity *tmonster;
/* 0-index */
#define START_STAGE 0
-#define STAGES_LEN 15
+#define STAGES_LEN 16
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_stage13_start, binary_stage14_start, binary_stage15_start, binary_stage16_start,
};
static void hud_render()