diff --git a/assets-fx/levels/tileset1b_bak.png b/assets-fx/levels/tileset1b_bak.png deleted file mode 100644 index 2a94191..0000000 Binary files a/assets-fx/levels/tileset1b_bak.png and /dev/null differ diff --git a/assets/level0.tmx b/assets/level0.tmx index ada6b7b..a5b3e5e 100644 --- a/assets/level0.tmx +++ b/assets/level0.tmx @@ -3,54 +3,54 @@ -257,297,298,299,300,257,386,297,298,299,300,2,2,2,2,2,257,2,2,225,226,227,228,201,202,203,204,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2, -253,205,229,205,229,280,179,180,179,156,156,156,158,157,179,180,253,2,2,249,250,251,252,225,226,227,228,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2, -301,125,126,127,128,2,385,303,350,351,303,2,2,2,350,351,301,2,2,273,274,275,276,249,250,251,252,201,202,203,204,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2, -325,149,150,151,152,2,2,327,374,375,327,2,184,185,374,375,325,2,279,297,298,299,300,273,274,275,276,225,226,227,228,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2, -257,2,2,385,2,2,385,2,265,266,2,2,208,209,352,353,257,2,302,2,130,129,166,297,298,299,300,249,250,251,252,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2, -281,176,2,2,278,2,2,385,289,290,2,2,232,233,376,377,281,2,326,2,154,153,190,201,202,203,204,273,274,275,276,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2, -201,202,203,204,302,385,2,2,265,266,2,385,2,2,2,2,2,2,2,2,2,2,166,225,226,227,228,297,298,299,300,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2, -225,226,227,228,326,2,385,2,265,266,2,2,2,2,214,215,2,2,2,2,2,2,190,249,250,251,252,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2, -249,250,251,252,201,202,203,204,289,290,2,258,259,260,238,239,260,260,261,262,262,263,264,273,274,275,276,2,93,94,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2, -273,274,275,276,225,226,227,228,265,266,2,282,283,284,285,285,285,285,285,285,286,287,288,297,298,299,300,2,117,118,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2, -297,298,299,300,249,250,251,252,290,2,2,306,307,308,309,308,309,308,309,310,310,311,312,131,2,339,340,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2, -202,203,204,386,273,274,275,276,2,2,2,330,331,332,333,332,333,332,333,334,334,335,336,132,2,363,364,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2, -226,227,228,386,297,298,299,300,2,290,2,162,163,164,165,162,163,164,165,162,163,164,165,132,2,201,202,203,204,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2, -250,251,252,2,2,2,2,2,2,2,2,86,87,88,89,186,187,188,189,86,87,88,89,132,2,225,226,227,228,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2, -274,275,276,2,270,271,271,271,272,2,2,110,111,112,113,210,211,212,213,110,111,112,113,133,2,249,250,251,252,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2, -298,299,300,2,294,1,1,1,296,2,2,136,137,0,0,234,290,265,237,2,2,339,340,2,2,273,274,275,276,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2, -202,203,204,2,294,1,1,1,296,2,2,160,161,265,266,266,265,266,2,2,2,363,364,2,2,297,298,299,300,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2, -226,227,228,2,318,319,319,319,320,2,2,2,2,289,290,265,266,290,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2, -250,251,252,2,2,2,2,2,2,385,386,2,2,265,265,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2, -274,275,276,201,202,203,204,257,2,2,2,257,2,265,265,2,257,2,2,2,257,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2, -298,299,300,225,226,227,228,253,205,229,205,253,2,290,265,2,253,205,229,205,253,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2, -2,2,386,249,250,251,252,345,346,347,348,277,2,265,266,2,301,386,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2, -202,203,204,273,274,275,276,369,370,371,372,301,2,289,290,2,325,387,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2, -226,227,228,297,298,299,300,393,394,395,396,325,2,265,266,2,301,386,2,2,2,2,257,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2 +257,297,298,299,300,257,386,297,298,299,300,2,2,2,2,2,257,2,2,225,226,227,228,201,202,203,204,273,274,275,276,249,250,251,252,297,298,299,93,94,2,345,346,347,348,2,337,338, +253,205,229,205,229,280,179,180,179,156,156,156,158,157,179,180,253,2,2,249,250,251,252,225,226,227,228,297,298,299,300,273,274,275,276,25,26,27,117,118,28,369,370,371,372,2,361,362, +301,125,126,127,128,2,385,303,350,351,303,2,2,2,350,351,301,2,2,273,274,275,276,249,250,251,252,201,202,203,204,297,298,299,300,49,9,10,2,2,52,393,394,395,396,337,338,2, +325,149,150,151,152,2,2,327,374,375,327,2,184,185,374,375,325,2,279,297,298,299,300,273,274,275,276,225,226,227,228,2,2,2,2,73,33,34,2,2,76,2,2,2,2,361,362,2, +257,2,2,385,2,2,385,2,265,266,2,2,208,209,352,353,257,2,302,2,130,129,166,297,298,299,300,249,250,251,252,25,26,27,27,97,98,99,98,99,100,26,26,27,28,2,201,202, +281,176,2,2,278,2,2,385,289,290,2,2,232,233,376,377,281,2,326,2,154,153,190,201,202,203,204,273,274,275,276,49,356,357,2,121,59,60,60,61,124,2,354,355,52,2,225,226, +201,202,203,204,302,385,2,2,265,266,2,385,2,2,2,2,2,2,2,2,2,2,166,225,226,227,228,297,298,299,300,73,380,381,2,145,83,84,84,85,148,2,378,379,76,2,249,250, +225,226,227,228,326,2,385,2,265,266,2,2,2,2,214,215,2,2,2,2,2,2,190,249,250,251,252,2,2,385,2,49,404,405,2,169,107,108,108,109,172,2,402,403,76,2,273,274, +249,250,251,252,201,202,203,204,289,290,2,258,259,260,238,239,260,260,261,262,262,263,264,273,274,275,276,2,93,94,385,49,2,2,2,2,166,2,2,166,2,2,2,2,52,2,297,298, +273,274,275,276,225,226,227,228,265,266,2,282,283,284,285,285,285,285,285,285,286,287,288,297,298,299,300,2,117,118,2,73,2,2,2,2,190,373,373,190,2,2,2,2,76,201,202,203, +297,298,299,300,249,250,251,252,290,2,2,306,307,308,309,308,309,308,309,310,310,311,312,131,2,339,340,2,2,2,2,97,98,99,99,98,99,2,2,98,98,99,98,99,100,225,226,227, +202,203,204,386,273,274,275,276,2,2,2,330,331,332,333,332,333,332,333,334,334,335,336,132,2,363,364,2,2,2,2,121,122,122,122,123,124,81,82,121,122,123,122,123,124,249,250,251, +226,227,228,386,297,298,299,300,2,290,2,162,163,164,165,162,163,164,165,162,163,164,165,132,2,201,202,203,204,2,2,145,146,146,146,147,148,57,58,145,146,147,146,147,148,273,274,275, +250,251,252,2,2,2,2,2,2,2,2,86,87,88,89,186,187,188,189,86,87,88,89,132,385,225,226,227,228,2,2,169,170,170,170,171,172,81,82,169,170,171,14,15,27,26,27,27, +274,275,276,2,270,271,271,271,272,2,2,110,111,112,113,210,211,212,213,110,111,112,113,133,2,249,250,251,252,2,2,2,2,2,2,136,137,290,265,265,266,266,38,39,2,2,2,51, +298,299,300,2,294,1,1,1,296,2,2,136,137,0,0,234,290,265,237,2,2,2,339,340,385,273,274,275,276,2,2,2,2,2,2,160,161,265,266,289,290,265,62,63,73,74,75,75, +202,203,204,2,294,1,1,1,296,2,2,160,161,265,266,266,265,266,290,2,2,2,363,364,2,297,298,299,300,2,2,2,2,2,2,2,2,266,290,2,2,2,398,399,97,98,99,99, +226,227,228,2,318,319,319,319,320,2,265,266,266,289,290,265,266,241,265,266,266,265,266,241,385,2,2,2,241,265,266,266,265,266,265,266,266,265,266,2,2,2,206,207,121,122,123,123, +250,251,252,2,2,2,2,2,2,385,289,290,265,265,265,2,2,241,289,290,265,266,290,266,265,266,266,265,266,289,290,265,266,290,289,290,265,266,290,2,2,2,230,231,145,146,147,147, +274,275,276,201,202,203,204,257,2,2,2,257,2,265,265,2,257,2,2,2,257,2,241,241,289,290,265,266,290,241,2,2,2,2,2,2,21,22,23,24,2,2,254,255,169,170,171,171, +298,299,300,225,226,227,228,253,205,229,205,253,2,290,265,2,253,205,229,205,253,201,202,203,204,2,2,2,2,2,2,2,2,2,2,2,45,46,47,48,2,2,2,2,2,201,202,203, +2,2,386,249,250,251,252,345,346,347,348,277,2,265,266,2,301,386,2,2,2,225,226,227,228,2,2,2,2,2,2,2,2,2,339,340,69,70,71,72,387,201,202,203,204,225,226,227, +202,203,204,273,274,275,276,369,370,371,372,301,2,289,290,2,325,387,201,202,204,249,250,251,252,201,203,204,2,2,2,2,387,2,363,364,2,2,2,2,2,225,226,227,228,249,250,251, +226,227,228,297,298,299,300,393,394,395,396,325,2,265,266,2,301,386,225,226,228,273,274,275,276,225,227,228,201,202,203,204,201,202,203,204,387,201,202,203,204,249,250,251,252,273,274,275 +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,337,338,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,361,362,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,25,0,0,0,0,28,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,386,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,49,0,0,134,135,52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,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,386,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,386,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,386,0,0,0,0,0,0,0,0,0,0,0,0,0,0,386,0,0,0,0,0,0,0,385,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,386,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, diff --git a/src/mapstruct.h b/src/mapstruct.h index bcf1c77..321107b 100644 --- a/src/mapstruct.h +++ b/src/mapstruct.h @@ -3,6 +3,17 @@ #include + + +typedef struct { + /* the ID of the tile, as per tiled configuration, first is ID=0, then line by line, each line left to right, +1 at each tile.*/ + int tileID; + /* maximum speed on that tile for the player */ + /* Note : Speed = 0 means that the tile is not walkable */ + int speed; +} Tile_Data; + + typedef struct { /* width, height and the number of layer of the map */ int w, h, nblayers; @@ -15,4 +26,5 @@ typedef struct { short *layers[]; } Map; + #endif