aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJuan J. Martinez <jjm@usebox.net>2023-07-16 22:21:51 +0100
committerJuan J. Martinez <jjm@usebox.net>2023-07-16 22:22:10 +0100
commitbf565300d6a71975f120097028bcba7065ea7a4d (patch)
tree570dc8d5ad1c9f0c8d762d02b407c14d6ba3cb2a
parent60d0d1e4d0941b6742af594c9fa3658124d0e29a (diff)
downloadgold-mine-run-bf565300d6a71975f120097028bcba7065ea7a4d.tar.gz
gold-mine-run-bf565300d6a71975f120097028bcba7065ea7a4d.zip
Stage 11
-rw-r--r--data/stage11.json175
-rw-r--r--src/data.h1
-rw-r--r--src/game.c5
3 files changed, 179 insertions, 2 deletions
diff --git a/data/stage11.json b/data/stage11.json
new file mode 100644
index 0000000..e0f5df2
--- /dev/null
+++ b/data/stage11.json
@@ -0,0 +1,175 @@
+{ "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, 5, 6, 24, 71, 72, 51, 52, 3, 5, 6, 4, 3, 4, 3, 4, 3, 4, 3, 4, 5, 6, 3, 4, 3, 4, 3, 4, 3, 4, 3, 4, 3, 4, 5, 6, 3, 4, 3, 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, 5, 6, 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, 4, 3, 4, 3, 4, 3, 4, 3, 4, 3, 4, 3, 4, 3, 4, 3, 4, 3, 4, 51, 52, 71, 72, 23, 24, 23, 24, 23, 24, 50, 50, 50, 50, 23, 24, 23, 24, 23, 5, 6, 24, 23, 24, 23, 24, 23, 24, 23, 24, 50, 50, 50, 50, 5, 6, 23, 24, 23, 24, 71, 72, 51, 52, 3, 4, 3, 5, 6, 4, 1, 1, 2, 1, 3, 4, 3, 4, 3, 4, 3, 4, 3, 4, 3, 4, 3, 4, 3, 4, 1, 2, 1, 1, 3, 4, 3, 4, 3, 4, 51, 52, 71, 72, 23, 24, 23, 24, 23, 24, 23, 24, 22, 24, 23, 24, 23, 50, 50, 50, 53, 54, 53, 54, 50, 50, 50, 24, 23, 24, 23, 22, 23, 24, 23, 24, 23, 24, 5, 6, 71, 72, 51, 52, 3, 4, 3, 4, 3, 4, 3, 4, 22, 4, 3, 4, 3, 1, 1, 1, 71, 72, 71, 72, 1, 1, 1, 5, 6, 4, 3, 22, 3, 4, 3, 4, 3, 4, 3, 4, 51, 52, 71, 72, 5, 6, 23, 24, 23, 24, 23, 24, 22, 24, 23, 24, 23, 24, 23, 24, 51, 52, 51, 52, 23, 24, 23, 24, 23, 24, 23, 22, 23, 24, 23, 24, 23, 24, 23, 24, 71, 72, 51, 52, 3, 4, 3, 4, 3, 4, 50, 50, 73, 74, 50, 50, 50, 50, 50, 50, 71, 72, 71, 72, 50, 50, 50, 50, 50, 50, 73, 74, 50, 50, 3, 4, 3, 4, 3, 4, 51, 52, 71, 72, 23, 24, 23, 24, 23, 24, 1, 1, 51, 52, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 51, 52, 1, 1, 23, 5, 6, 24, 23, 24, 71, 72, 51, 52, 3, 4, 3, 4, 5, 6, 3, 4, 71, 72, 3, 4, 5, 6, 3, 4, 3, 4, 3, 4, 3, 4, 3, 4, 3, 4, 71, 72, 3, 4, 3, 4, 3, 4, 3, 4, 51, 52, 71, 72, 23, 24, 23, 24, 50, 50, 50, 50, 51, 52, 50, 50, 50, 50, 50, 50, 53, 54, 53, 54, 50, 50, 50, 50, 50, 50, 51, 52, 50, 50, 50, 50, 23, 24, 23, 24, 71, 72, 51, 52, 3, 4, 3, 4, 1, 1, 1, 1, 71, 72, 1, 1, 1, 1, 1, 1, 71, 72, 71, 72, 1, 1, 1, 1, 1, 1, 71, 72, 1, 1, 1, 1, 3, 5, 6, 4, 51, 52, 71, 72, 5, 6, 23, 24, 23, 24, 23, 24, 51, 52, 23, 24, 23, 24, 23, 24, 51, 52, 51, 52, 23, 24, 5, 6, 23, 24, 51, 52, 23, 24, 23, 24, 23, 24, 23, 24, 71, 72, 51, 52, 3, 4, 3, 4, 3, 4, 50, 50, 71, 72, 50, 50, 50, 50, 50, 50, 71, 72, 71, 72, 50, 50, 50, 50, 50, 50, 71, 72, 50, 50, 3, 4, 3, 4, 3, 4, 51, 52, 71, 72, 23, 11, 12, 24, 23, 24, 1, 1, 46, 47, 1, 1, 1, 1, 1, 1, 51, 52, 51, 52, 1, 1, 1, 1, 1, 1, 46, 47, 1, 1, 23, 24, 23, 24, 23, 24, 71, 72, 51, 52, 3, 31, 32, 4, 3, 4, 3, 4, 66, 67, 3, 4, 3, 4, 5, 6, 71, 72, 71, 72, 3, 4, 3, 4, 3, 4, 66, 67, 3, 4, 5, 6, 3, 4, 3, 4, 51, 52, 71, 72, 53, 54, 53, 54, 53, 54, 53, 54, 53, 54, 53, 54, 53, 54, 53, 54, 51, 52, 51, 52, 53, 54, 53, 54, 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, 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],
+ "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,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1,
+ "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":24,
+ "y":152
+ },
+ {
+ "height":16,
+ "id":28,
+ "name":"GoldKey",
+ "rotation":0,
+ "type":"",
+ "visible":true,
+ "width":16,
+ "x":240,
+ "y":40
+ },
+ {
+ "height":16,
+ "id":29,
+ "name":"Bonus",
+ "rotation":0,
+ "type":"",
+ "visible":true,
+ "width":16,
+ "x":280,
+ "y":152
+ },
+ {
+ "height":16,
+ "id":30,
+ "name":"Pickaxe",
+ "rotation":0,
+ "type":"",
+ "visible":true,
+ "width":16,
+ "x":64,
+ "y":40
+ },
+ {
+ "height":16,
+ "id":31,
+ "name":"Snake",
+ "rotation":0,
+ "type":"",
+ "visible":true,
+ "width":16,
+ "x":104,
+ "y":104
+ },
+ {
+ "height":16,
+ "id":32,
+ "name":"Bones",
+ "rotation":0,
+ "type":"",
+ "visible":true,
+ "width":16,
+ "x":96,
+ "y":152
+ },
+ {
+ "height":16,
+ "id":33,
+ "name":"Bones",
+ "properties":[
+ {
+ "name":"dir",
+ "type":"string",
+ "value":"left"
+ }],
+ "rotation":0,
+ "type":"",
+ "visible":true,
+ "width":16,
+ "x":208,
+ "y":152
+ },
+ {
+ "height":16,
+ "id":34,
+ "name":"Old",
+ "rotation":0,
+ "type":"",
+ "visible":true,
+ "width":16,
+ "x":80,
+ "y":80
+ },
+ {
+ "height":16,
+ "id":35,
+ "name":"Old",
+ "properties":[
+ {
+ "name":"dir",
+ "type":"string",
+ "value":"left"
+ }],
+ "rotation":0,
+ "type":"",
+ "visible":true,
+ "width":16,
+ "x":224,
+ "y":80
+ }],
+ "opacity":1,
+ "type":"objectgroup",
+ "visible":true,
+ "x":0,
+ "y":0
+ }],
+ "nextlayerid":4,
+ "nextobjectid":36,
+ "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 255ec35..3c97c07 100644
--- a/src/data.h
+++ b/src/data.h
@@ -24,6 +24,7 @@ extern const uint8_t binary_stage07_start[];
extern const uint8_t binary_stage08_start[];
extern const uint8_t binary_stage09_start[];
extern const uint8_t binary_stage10_start[];
+extern const uint8_t binary_stage11_start[];
/* sound */
extern const uint8_t binary_music_start[];
diff --git a/src/game.c b/src/game.c
index c18b9ad..70de080 100644
--- a/src/game.c
+++ b/src/game.c
@@ -53,12 +53,12 @@ static Entity *tmonster;
/* 0-index */
#define START_STAGE 0
-#define STAGES_LEN 10
+#define STAGES_LEN 11
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_stage09_start, binary_stage10_start, binary_stage11_start
};
static void hud_render()
@@ -317,6 +317,7 @@ next_stage:
tmonster = NULL;
entities_warp_out_all();
sound_play_efx(EFX_WARP);
+ player_stageclear();
stageclear = STAGECLEAR_DELAY;
}