From 9b811357a94f51a1dc1b2be80f470152dfbe397b Mon Sep 17 00:00:00 2001 From: "Juan J. Martinez" Date: Sat, 15 Jul 2023 21:00:20 +0100 Subject: Stage 8 --- data/stage08.json | 192 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ src/data.h | 1 + src/game.c | 4 +- 3 files changed, 195 insertions(+), 2 deletions(-) create mode 100644 data/stage08.json diff --git a/data/stage08.json b/data/stage08.json new file mode 100644 index 0000000..5c7a567 --- /dev/null +++ b/data/stage08.json @@ -0,0 +1,192 @@ +{ "compressionlevel":-1, + "height":23, + "infinite":false, + "layers":[ + { + "data":[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, 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, 1, 1, 1, 1, 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, 41, 42, 41, 42, 41, 42, 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, 61, 62, 61, 62, 61, 62, 61, 62, 61, 62, 61, 62, 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, 1, 1, 1, 1, 1, 1, 1, 1, 41, 42, 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, 23, 24, 23, 24, 23, 24, 23, 24, 61, 62, 61, 62, 23, 24, 23, 24, 23, 24, 23, 24, 7, 8, 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, 41, 42, 3, 4, 3, 4, 3, 4, 3, 4, 27, 28, 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, 41, 42, 61, 62, 23, 24, 23, 24, 23, 24, 23, 24, 63, 64, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 63, 64, 23, 24, 23, 24, 23, 24, 23, 24, 61, 62, 41, 42, 3, 4, 3, 4, 3, 4, 3, 4, 41, 42, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 41, 42, 3, 4, 3, 4, 3, 4, 3, 4, 41, 42, 61, 62, 23, 24, 23, 24, 23, 24, 23, 24, 61, 62, 23, 24, 23, 24, 23, 24, 23, 24, 23, 24, 23, 24, 23, 24, 23, 24, 61, 62, 23, 24, 23, 24, 23, 24, 23, 24, 61, 62, 41, 42, 3, 4, 3, 4, 3, 4, 3, 4, 41, 42, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 41, 42, 3, 4, 3, 4, 3, 4, 3, 4, 41, 42, 61, 62, 23, 24, 23, 24, 23, 24, 23, 24, 61, 62, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 61, 62, 23, 24, 23, 24, 23, 24, 23, 24, 61, 62, 41, 42, 3, 4, 3, 4, 3, 4, 3, 4, 41, 42, 3, 4, 3, 4, 3, 4, 3, 4, 3, 4, 3, 4, 3, 4, 3, 4, 41, 42, 3, 4, 3, 4, 3, 4, 3, 4, 41, 42, 61, 62, 23, 24, 23, 24, 23, 24, 23, 24, 61, 62, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 61, 62, 23, 24, 23, 24, 23, 24, 23, 24, 61, 62, 41, 42, 3, 4, 3, 4, 3, 4, 3, 4, 1, 1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 2, 1, 1, 1, 1, 1, 1, 1, 1, 3, 4, 3, 4, 3, 4, 3, 4, 41, 42, 61, 62, 23, 24, 23, 24, 23, 24, 23, 24, 23, 24, 23, 24, 43, 44, 23, 22, 23, 24, 23, 22, 23, 43, 44, 24, 23, 24, 23, 24, 23, 24, 23, 24, 23, 24, 23, 24, 61, 62, 41, 42, 3, 4, 3, 4, 45, 45, 45, 45, 45, 45, 3, 4, 61, 62, 45, 45, 45, 45, 45, 45, 45, 61, 62, 4, 3, 4, 45, 45, 45, 45, 45, 45, 3, 4, 3, 4, 41, 42, 61, 62, 23, 24, 23, 24, 1, 1, 1, 2, 1, 1, 23, 24, 1, 1, 1, 2, 1, 1, 1, 2, 1, 1, 1, 24, 23, 24, 1, 1, 2, 1, 1, 1, 23, 24, 23, 24, 61, 62, 41, 42, 3, 4, 3, 4, 3, 4, 3, 22, 3, 4, 3, 4, 3, 4, 3, 22, 3, 4, 3, 22, 3, 4, 3, 4, 3, 4, 3, 4, 22, 4, 3, 4, 3, 4, 3, 4, 41, 42, 61, 62, 3, 4, 3, 4, 43, 44, 43, 44, 43, 44, 43, 44, 43, 44, 43, 44, 43, 44, 43, 44, 43, 44, 43, 44, 43, 44, 43, 44, 43, 44, 43, 44, 3, 4, 3, 4, 61, 62, 41, 42, 101, 101, 101, 101, 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, 101, 101, 101, 101, 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, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1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 21, 21, 21, 21, 21, 21, 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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], + "height":23, + "id":2, + "name":"Gold", + "opacity":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":80, + "y":48 + }, + { + "height":16, + "id":28, + "name":"Snake", + "rotation":0, + "type":"", + "visible":true, + "width":16, + "x":96, + "y":96 + }, + { + "height":16, + "id":30, + "name":"Old", + "rotation":0, + "type":"", + "visible":true, + "width":16, + "x":128, + "y":120 + }, + { + "height":16, + "id":29, + "name":"Snake", + "properties":[ + { + "name":"dir", + "type":"string", + "value":"left" + }], + "rotation":0, + "type":"", + "visible":true, + "width":16, + "x":208, + "y":72 + }, + { + "height":16, + "id":31, + "name":"Old", + "properties":[ + { + "name":"dir", + "type":"string", + "value":"left" + }], + "rotation":0, + "type":"", + "visible":true, + "width":16, + "x":168, + "y":120 + }, + { + "height":16, + "id":32, + "name":"Bonus", + "rotation":0, + "type":"", + "visible":true, + "width":16, + "x":48, + "y":144 + }, + { + "height":16, + "id":33, + "name":"Time", + "rotation":0, + "type":"", + "visible":true, + "width":16, + "x":256, + "y":144 + }, + { + "height":16, + "id":35, + "name":"Pickaxe", + "rotation":0, + "type":"", + "visible":true, + "width":16, + "x":224, + "y":48 + }, + { + "height":16, + "id":34, + "name":"Bat", + "properties":[ + { + "name":"dir", + "type":"string", + "value":"left" + }], + "rotation":0, + "type":"", + "visible":true, + "width":16, + "x":256, + "y":88 + }, + { + "height":16, + "id":36, + "name":"Bat", + "rotation":0, + "type":"", + "visible":true, + "width":16, + "x":48, + "y":88 + }], + "opacity":1, + "type":"objectgroup", + "visible":true, + "x":0, + "y":0 + }], + "nextlayerid":4, + "nextobjectid":37, + "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 a0b0459..2ed9805 100644 --- a/src/data.h +++ b/src/data.h @@ -21,6 +21,7 @@ extern const uint8_t binary_stage04_start[]; 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[]; /* sound */ extern const uint8_t binary_music_start[]; diff --git a/src/game.c b/src/game.c index 9539ffc..4f9e44f 100644 --- a/src/game.c +++ b/src/game.c @@ -50,11 +50,11 @@ static Entity *tmonster; /* 0-index */ #define START_STAGE 0 -#define STAGES_LEN 7 +#define STAGES_LEN 8 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_stage05_start, binary_stage06_start, binary_stage07_start, binary_stage08_start }; static void hud_render() -- cgit v1.2.3