diff --git a/CMakeLists.txt b/CMakeLists.txt index 87b0203..ab1552e 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -15,19 +15,19 @@ add_custom_command( OUTPUT "${CMAKE_CURRENT_LIST_DIR}/assets-cg/maps/testCarte.json" "${CMAKE_CURRENT_LIST_DIR}/assets-cg/maps/inside/1.json" "${CMAKE_CURRENT_LIST_DIR}/assets-cg/maps/inside/2.json" - "${CMAKE_CURRENT_LIST_DIR}/assets-cg/maps/inside/3.json" COMMENT "Convert tmx map to json" COMMAND tiled --export-tileset json tileset.tsx tileset.json + COMMAND tiled --export-tileset json inside/tileset_in.tsx inside/tileset_in.json COMMAND find | grep .*.tmx | sed 's/.tmx//g' | xargs -l bash -c 'tiled --export-map json $$0.tmx $$0.json' WORKING_DIRECTORY ${CMAKE_CURRENT_LIST_DIR}/assets-cg/maps/ DEPENDS assets-cg/maps/testCarte.tmx assets-cg/maps/1.tmx assets-cg/tileset.png assets-cg/maps/tileset.tsx + assets-cg/maps/inside/tileset_in.tsx assets-cg/converters.py assets-cg/maps/inside/1.tmx - assets-cg/maps/inside/2.tmx - assets-cg/maps/inside/3.tmx) + assets-cg/maps/inside/2.tmx) set(SOURCES src/main.c @@ -44,11 +44,11 @@ set(SOURCES set(ASSETS_cg assets-cg/tileset.png + assets-cg/maps/inside/tileset_in.png assets-cg/maps/testCarte.json assets-cg/maps/1.json assets-cg/maps/inside/1.json assets-cg/maps/inside/2.json - assets-cg/maps/inside/3.json assets-cg/spritesheet.png assets-cg/uf8x9 ) diff --git a/assets-cg/converters.py b/assets-cg/converters.py index efbf037..e3d09ec 100644 --- a/assets-cg/converters.py +++ b/assets-cg/converters.py @@ -33,6 +33,7 @@ def convert_map(input, output, params, target): tileset = open(tilesetPath, "r") data_tileset = json.load(tileset) + tileset_size = data_tileset.get("columns") tileset.close() tile_value = {} @@ -85,6 +86,7 @@ def convert_map(input, output, params, target): structMap += fxconv.u32(w) + fxconv.u32(h) + fxconv.u32(nbTilelayer) + fxconv.u32(nbDialog) + fxconv.u32(nbTelep) structMap += fxconv.ref(f"img_{nameTilesetFree}") + structMap += fxconv.u32(tileset_size) structMap += fxconv.ptr(dialogs) structMap += fxconv.ptr(teleporter) diff --git a/assets-cg/maps/inside/1.tmx b/assets-cg/maps/inside/1.tmx index 3eb9d36..d183916 100644 --- a/assets-cg/maps/inside/1.tmx +++ b/assets-cg/maps/inside/1.tmx @@ -1,48 +1,48 @@ - + - + -682,683,683,683,683,683,683,683,683,683,683,684, -711,712,712,712,712,712,712,712,712,712,712,713, -740,741,741,741,741,741,741,741,741,741,741,742, -617,617,617,617,617,617,617,617,617,617,617,617, -617,617,617,617,617,617,617,617,617,617,617,617, -617,617,617,617,617,617,617,617,617,617,617,617, -617,617,617,617,617,617,617,617,617,736,736,736, -617,617,617,617,617,617,617,617,736,736,736,736, -617,617,617,617,617,617,617,617,736,736,736,736, -617,617,0,617,617,617,617,617,617,736,736,736 +83,84,84,84,84,84,84,84,84,84,84,85, +100,101,101,101,101,101,101,101,101,101,101,102, +117,118,118,118,118,118,118,118,118,118,118,119, +42,42,42,42,42,113,113,42,42,42,42,42, +42,42,42,42,42,113,113,42,42,42,42,42, +113,42,42,42,42,42,42,42,42,42,42,42, +113,42,42,42,42,42,42,42,42,113,113,113, +42,42,42,42,42,42,42,42,113,113,113,113, +42,0,0,0,0,42,42,42,113,113,113,113, +0,0,0,0,0,0,42,42,42,113,113,113 0,0,0,0,0,0,0,0,0,0,0,0, -0,0,0,0,0,710,710,0,0,0,0,0, -678,0,701,701,0,739,739,0,0,0,646,647, -707,0,730,730,0,736,736,0,0,0,675,676, -0,0,0,0,0,736,736,0,0,0,0,0, -736,0,702,703,0,0,0,0,248,250,249,250, -736,0,731,732,0,0,0,0,277,704,705,736, -0,0,0,0,0,0,0,0,277,733,734,0, -614,615,615,615,615,616,0,0,0,735,735,678, -643,644,728,729,644,645,0,0,0,0,0,707 +0,0,0,0,0,99,99,0,0,0,0,0, +79,0,90,90,0,116,116,0,0,0,59,60, +96,0,107,107,0,0,0,0,0,0,76,77, +0,0,0,0,0,0,0,0,0,0,0,0, +0,0,91,92,0,0,0,0,0,0,0,0, +0,0,108,109,0,0,0,28,0,93,94,0, +0,0,0,0,0,0,0,45,0,110,111,0, +39,40,40,40,40,41,0,62,0,112,112,79, +56,57,105,106,57,58,0,0,0,0,0,96 - - + + - + - + - + diff --git a/assets-cg/maps/inside/2.tmx b/assets-cg/maps/inside/2.tmx index 3121d4e..d9a6bb1 100644 --- a/assets-cg/maps/inside/2.tmx +++ b/assets-cg/maps/inside/2.tmx @@ -1,63 +1,53 @@ - + - + -682,683,683,683,683,683,683,683,683,683,683,683,683,683,684, -711,712,712,712,712,712,712,712,712,712,712,712,712,712,713, -740,741,741,741,741,741,741,741,741,741,741,741,741,741,742, -617,617,617,617,617,617,617,617,617,617,617,617,617,617,617, -736,736,736,736,736,736,736,736,736,736,736,736,736,736,736, -736,736,736,736,736,736,736,736,736,736,736,736,736,736,736, -736,736,736,736,617,655,736,736,736,736,736,736,736,736,736, -617,617,736,736,617,655,736,736,736,736,736,736,736,736,736, -617,617,736,736,617,655,736,736,736,736,736,736,736,736,736, -736,736,736,736,617,655,736,736,736,736,736,736,736,736,736 +83,84,84,84,84,84,84,84,84,84,84,84,84,84,85, +100,101,101,101,101,101,101,101,101,101,101,101,101,101,102, +117,118,118,118,118,118,118,118,118,118,118,118,118,118,119, +42,42,42,42,42,42,42,42,42,42,42,42,42,42,42, +113,113,113,113,113,113,113,113,113,113,113,113,113,113,113, +113,113,113,113,113,113,113,113,113,113,113,40,40,113,113, +113,113,113,113,42,0,113,113,113,113,56,57,57,58,113, +42,42,113,113,42,0,113,113,113,113,113,74,74,113,113, +42,42,113,113,42,0,113,40,40,113,113,113,113,113,113, +113,113,113,113,42,0,113,105,106,113,113,113,113,113,113 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, -0,0,710,710,0,0,679,680,681,0,0,710,710,0,0, -678,0,739,739,0,0,0,0,0,0,0,739,739,646,647, -707,0,0,0,0,0,0,0,0,0,0,0,0,675,676, -0,706,706,0,0,0,0,0,0,0,0,0,0,0,0, -0,0,0,0,0,0,0,0,0,0,614,615,615,616,0, -708,709,0,0,0,654,0,0,0,0,643,644,644,645,0, -737,738,0,0,0,654,0,0,0,0,672,673,673,674,0, -0,0,0,0,0,654,614,615,615,616,0,0,0,0,0, -0,0,0,0,0,654,643,728,729,645,0,0,0,0,0 +0,0,99,99,0,0,81,82,0,0,0,0,0,0,0, +79,0,116,116,0,0,0,0,0,90,90,0,0,59,60, +96,0,0,0,0,0,0,0,0,107,107,0,0,76,77, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,39,91,92,41,0, +97,98,0,0,0,67,0,0,0,0,0,108,109,0,0, +114,115,0,0,0,67,0,0,0,0,73,0,0,75,0, +0,0,0,0,0,67,39,0,0,41,0,0,0,0,0, +0,0,0,0,0,67,56,0,0,58,0,0,0,0,0 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, -0,704,705,0,0,0,0,0,0,701,701,0,0,0,677, -0,733,734,0,0,0,0,0,0,730,730,0,0,0,0, +0,93,94,0,0,0,0,0,0,0,0,0,0,0,78, +0,110,111,0,0,0,0,0,0,0,0,0,0,0,0, +0,112,112,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, -0,0,0,0,0,0,0,0,0,0,0,702,703,0,0, -0,0,0,0,0,0,0,0,0,0,0,731,732,0,0, -0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, -0,0,0,0,0,0,678,0,0,678,0,0,0,0,0, -0,0,0,0,0,0,707,0,0,707,0,0,0,0,0 +0,0,0,0,0,68,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,68,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,68,79,0,0,79,0,0,0,0,0, +0,0,0,0,0,68,96,0,0,96,0,0,0,0,0 - - - - - - - - - - - - + + diff --git a/assets-cg/maps/inside/3.tmx b/assets-cg/maps/inside/3.tmx deleted file mode 100644 index d823b26..0000000 --- a/assets-cg/maps/inside/3.tmx +++ /dev/null @@ -1,92 +0,0 @@ - - - - - - - - -682,683,683,683,683,683,683,683,683,625,626,683,683,683,683,683,683,683,683,684, -711,0,0,712,712,712,712,712,712,654,655,712,0,0,712,712,0,0,712,713, -740,741,741,741,741,741,741,741,741,654,655,741,741,741,741,741,741,741,741,742, -617,617,617,617,617,617,617,617,617,0,0,617,617,617,617,617,617,617,617,617, -736,736,736,736,736,736,736,736,736,0,0,736,736,736,736,736,736,736,736,736, -736,736,736,736,736,736,736,736,736,736,736,736,736,736,736,736,736,736,736,736, -736,736,736,643,644,644,645,736,736,736,736,736,736,736,736,736,736,736,736,736, -736,736,736,643,644,644,645,736,736,736,736,736,736,736,736,736,736,736,736,736, -0,0,0,0,0,0,0,736,736,736,736,736,736,0,0,0,0,0,0,0, -0,0,0,0,0,0,0,736,736,736,736,736,736,0,0,0,0,0,0,0, -617,0,617,617,617,0,617,736,736,736,736,736,736,104,104,104,104,104,104,104, -736,736,736,736,736,736,736,736,736,736,736,736,736,191,191,191,191,191,191,191, -736,736,0,0,736,736,736,736,736,736,736,736,736,191,191,191,0,0,191,191, -736,736,736,736,736,736,736,736,736,736,736,736,736,191,191,191,191,191,191,191, -736,736,736,736,736,736,736,736,736,728,729,736,736,191,191,191,191,191,191,191 - - - - -0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, -0,710,710,0,0,0,0,679,0,0,0,0,710,710,0,0,710,710,0,0, -0,739,739,0,704,705,0,0,0,0,0,0,739,739,0,0,739,739,0,0, -0,0,0,0,733,734,0,0,0,654,655,0,0,0,0,0,0,0,0,0, -0,0,0,0,706,706,0,0,0,654,655,591,0,0,0,0,0,0,0,0, -0,0,591,614,615,615,616,0,0,711,713,620,0,0,0,0,0,0,0,0, -0,0,620,0,0,0,0,0,0,740,742,649,0,0,0,0,0,0,0,0, -682,683,649,683,683,683,684,0,0,0,0,0,0,682,683,683,683,683,683,684, -711,712,0,712,712,712,713,0,0,0,0,0,0,711,712,712,712,712,712,713, -740,701,0,741,741,701,742,0,0,239,0,0,0,740,741,741,741,741,741,742, -0,730,0,0,0,730,0,0,0,0,0,0,0,0,0,0,0,0,0,0, -0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, -0,0,0,0,0,0,0,0,0,0,0,239,0,0,0,0,702,703,0,0, -0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,731,732,0,0, -0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 - - - - -0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, -0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, -0,0,0,0,0,0,0,0,0,0,0,0,0,0,708,709,0,0,0,0, -0,0,0,0,0,0,0,0,0,0,0,0,0,0,737,738,0,0,0,0, -0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, -0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,708,709,708,709, -0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,737,738,737,738, -0,0,683,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, -0,0,712,0,679,0,0,0,0,0,0,0,0,0,0,0,680,681,0,0, -0,0,741,0,678,0,0,0,0,0,0,0,0,0,678,0,646,647,0,678, -0,0,0,0,707,0,0,0,0,0,0,0,0,0,707,0,675,676,0,707, -0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, -0,735,702,703,706,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, -0,706,731,732,735,0,0,0,0,0,0,0,0,0,0,0,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/assets-cg/maps/inside/fxconv-metadata.txt b/assets-cg/maps/inside/fxconv-metadata.txt index 7eaaba9..1f4c3f3 100644 --- a/assets-cg/maps/inside/fxconv-metadata.txt +++ b/assets-cg/maps/inside/fxconv-metadata.txt @@ -1,3 +1,8 @@ *.json: custom-type: map name_regex: (.*)\.json in_\1 + +tileset_in.png: + type: bopti-image + name: img_tileset_in + profile: p4 diff --git a/assets-cg/maps/inside/tileset_in.png b/assets-cg/maps/inside/tileset_in.png new file mode 100644 index 0000000..1bbf244 Binary files /dev/null and b/assets-cg/maps/inside/tileset_in.png differ diff --git a/assets-cg/maps/inside/tileset_in.tsx b/assets-cg/maps/inside/tileset_in.tsx new file mode 100644 index 0000000..0cb3a4a --- /dev/null +++ b/assets-cg/maps/inside/tileset_in.tsx @@ -0,0 +1,46 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/assets-cg/maps/testCarte.tmx b/assets-cg/maps/testCarte.tmx index 1be3e65..06df9ac 100644 --- a/assets-cg/maps/testCarte.tmx +++ b/assets-cg/maps/testCarte.tmx @@ -50,40 +50,40 @@ 295,295,294,294,0,0,0,0,0,0,294,294,295,295,294,0,0,108,0,0,0,0,0,0,0,0,137,138,138,138,138,84,0,0,82,138,138,138,138,138,138,138,138,138,138,138,84,0,320,321,322,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,20,21,0,110,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 294,295,294,0,0,320,321,322,0,0,0,294,295,294,0,0,0,137,138,138,138,138,84,0,0,0,0,0,0,0,0,108,0,0,110,0,0,0,0,0,0,0,0,0,0,0,113,0,349,350,351,0,28,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,49,50,0,110,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, -294,0,0,0,0,349,350,351,0,0,0,0,294,0,660,661,662,663,0,0,0,0,137,84,0,0,0,0,0,0,0,137,138,138,139,0,0,0,0,0,0,0,0,0,0,0,137,84,378,379,380,0,57,0,0,0,0,0,0,0,0,0,0,0,0,320,321,322,0,0,0,82,139,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, -294,0,0,0,0,378,379,380,22,23,0,0,0,0,689,690,691,692,0,0,0,0,0,137,84,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,174,0,0,0,0,113,0,0,0,0,0,0,0,0,0,0,0,26,0,0,0,0,0,349,350,351,0,0,82,139,0,0,0,0,0,323,324,325,0,0,0,0,0,0,0,28,0,323,324,325,0,0,0,0,0,0,0,0, -0,656,657,658,659,0,0,0,51,52,0,0,0,0,718,719,720,721,0,323,324,325,0,0,137,84,0,0,320,321,322,0,0,0,0,0,0,0,0,82,83,83,203,84,0,0,0,113,0,0,0,0,0,0,0,0,0,0,0,55,0,0,0,0,0,378,379,380,0,174,111,261,0,0,0,0,0,352,353,354,0,0,0,635,636,637,638,57,0,352,353,354,0,0,0,0,0,0,0,0, -0,685,686,687,688,0,0,0,0,0,0,0,0,0,747,748,749,750,0,352,353,354,0,0,0,137,84,0,349,350,351,0,0,0,0,0,0,0,0,111,0,0,232,113,0,0,0,137,84,0,0,0,0,320,321,322,0,0,0,0,0,0,0,0,0,0,0,0,0,203,139,0,0,0,0,0,0,381,382,383,0,245,0,664,665,666,667,0,0,381,382,383,0,0,0,0,0,0,0,0, -0,714,715,716,717,245,24,25,0,246,0,24,25,245,0,0,0,0,0,381,382,383,0,0,0,0,108,0,378,379,380,0,0,0,0,82,83,83,83,139,0,0,0,113,0,0,0,0,137,84,0,0,0,349,350,351,0,0,0,0,0,0,0,0,0,0,0,0,82,232,0,0,0,0,0,0,0,0,0,0,0,274,0,693,694,695,696,0,0,0,0,0,0,0,0,0,0,0,0,0, -0,743,744,745,746,274,53,54,0,275,0,53,54,274,0,0,0,0,0,0,0,0,0,0,0,0,108,0,0,0,0,0,0,0,0,111,0,0,0,0,0,0,0,113,0,656,657,658,659,108,0,0,0,378,379,380,0,0,0,0,0,0,0,0,0,0,82,138,139,0,0,0,0,0,0,0,0,0,0,0,0,303,0,722,723,724,725,0,0,0,0,0,635,636,637,638,0,245,0,0, -0,0,29,0,0,303,0,0,0,304,0,0,0,303,0,0,0,0,0,0,0,0,0,0,0,0,108,0,0,0,0,0,0,0,0,111,0,0,0,0,0,0,0,113,0,685,686,687,688,137,84,174,0,0,0,0,0,0,0,0,0,0,0,0,0,82,139,111,0,0,18,19,0,0,0,0,0,0,0,0,0,0,0,751,752,753,754,0,0,0,0,0,664,665,666,667,0,274,0,0, -0,0,58,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,635,636,637,638,0,79,142,0,0,0,0,0,0,0,0,111,0,0,0,0,0,29,0,113,0,714,715,716,717,0,137,203,138,138,84,0,0,0,0,0,0,0,82,138,138,139,0,140,81,0,47,48,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,24,25,0,0,693,694,695,696,0,303,0,0, -0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,664,665,666,667,0,108,0,0,0,0,0,0,0,0,0,111,0,239,0,0,0,58,0,113,0,743,744,745,746,0,0,232,0,0,137,138,138,138,138,138,138,138,139,0,0,0,0,0,111,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,53,54,0,0,722,723,724,725,0,0,0,0, -0,0,0,0,0,0,245,0,0,245,0,0,0,0,0,0,0,0,0,0,693,694,695,696,0,108,0,0,0,0,0,0,0,0,0,111,0,0,0,0,0,0,0,113,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,111,0,0,0,0,0,0,0,0,0,635,636,637,638,0,0,0,245,0,0,0,0,245,0,751,752,753,754,0,0,0,0, -0,0,320,321,322,0,274,0,0,274,0,0,0,0,0,0,0,0,0,0,722,723,724,725,0,108,0,0,0,0,0,0,0,0,0,140,141,141,141,141,141,141,141,142,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,320,321,322,0,0,0,111,0,0,323,324,325,0,0,0,0,664,665,666,667,0,0,0,274,0,323,324,325,274,0,0,0,0,0,0,0,0,0, -0,0,349,350,351,0,303,0,0,303,0,0,0,0,0,0,0,0,0,0,751,752,753,754,0,137,84,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,349,350,351,0,0,0,111,0,0,352,353,354,0,0,0,0,693,694,695,696,0,0,0,303,0,352,353,354,303,0,0,0,0,0,0,0,0,0, -0,0,378,379,380,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,113,320,321,322,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,378,379,380,0,0,0,111,0,0,381,382,383,0,0,0,0,722,723,724,725,0,0,0,0,0,381,382,383,0,0,0,0,0,0,323,324,325,0, -0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,108,349,350,351,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,111,0,0,0,0,0,0,0,0,0,751,752,753,754,0,0,0,0,0,22,23,0,29,0,0,0,0,0,352,353,354,0, +294,0,0,0,0,349,350,351,0,0,0,0,294,0,330,331,332,333,0,0,0,0,137,84,0,0,0,0,0,0,0,137,138,138,139,0,0,0,0,0,0,0,0,0,0,0,137,84,378,379,380,0,57,0,0,0,0,0,0,0,0,0,0,0,0,320,321,322,0,0,0,82,139,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +294,0,0,0,0,378,379,380,22,23,0,0,0,0,359,360,361,362,0,0,0,0,0,137,84,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,174,0,0,0,0,113,0,0,0,0,0,0,0,0,0,0,0,26,0,0,0,0,0,349,350,351,0,0,82,139,0,0,0,0,0,323,324,325,0,0,0,0,0,0,0,28,0,323,324,325,0,0,0,0,0,0,0,0, +0,326,327,328,329,0,0,0,51,52,0,0,0,0,388,389,390,391,0,323,324,325,0,0,137,84,0,0,320,321,322,0,0,0,0,0,0,0,0,82,83,83,203,84,0,0,0,113,0,0,0,0,0,0,0,0,0,0,0,55,0,0,0,0,0,378,379,380,0,174,111,261,0,0,0,0,0,352,353,354,0,0,0,334,335,336,337,57,0,352,353,354,0,0,0,0,0,0,0,0, +0,355,356,357,358,0,0,0,0,0,0,0,0,0,413,414,415,416,0,352,353,354,0,0,0,137,84,0,349,350,351,0,0,0,0,0,0,0,0,111,0,0,232,113,0,0,0,137,84,0,0,0,0,320,321,322,0,0,0,0,0,0,0,0,0,0,0,0,0,203,139,0,0,0,0,0,0,381,382,383,0,245,0,363,364,365,366,0,0,381,382,383,0,0,0,0,0,0,0,0, +0,384,385,386,387,245,24,25,0,246,0,24,25,245,0,0,0,0,0,381,382,383,0,0,0,0,108,0,378,379,380,0,0,0,0,82,83,83,83,139,0,0,0,113,0,0,0,0,137,84,0,0,0,349,350,351,0,0,0,0,0,0,0,0,0,0,0,0,82,232,0,0,0,0,0,0,0,0,0,0,0,274,0,392,393,394,395,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,413,414,415,416,274,53,54,0,275,0,53,54,274,0,0,0,0,0,0,0,0,0,0,0,0,108,0,0,0,0,0,0,0,0,111,0,0,0,0,0,0,0,113,0,326,327,328,329,108,0,0,0,378,379,380,0,0,0,0,0,0,0,0,0,0,82,138,139,0,0,0,0,0,0,0,0,0,0,0,0,303,0,421,422,423,424,0,0,0,0,0,334,335,336,337,0,245,0,0, +0,0,29,0,0,303,0,0,0,304,0,0,0,303,0,0,0,0,0,0,0,0,0,0,0,0,108,0,0,0,0,0,0,0,0,111,0,0,0,0,0,0,0,113,0,355,356,357,358,137,84,174,0,0,0,0,0,0,0,0,0,0,0,0,0,82,139,111,0,0,18,19,0,0,0,0,0,0,0,0,0,0,0,450,451,452,453,0,0,0,0,0,363,364,365,366,0,274,0,0, +0,0,58,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,334,335,336,337,0,79,142,0,0,0,0,0,0,0,0,111,0,0,0,0,0,29,0,113,0,384,385,386,387,0,137,203,138,138,84,0,0,0,0,0,0,0,82,138,138,139,0,140,81,0,47,48,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,24,25,0,0,392,393,394,395,0,303,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,363,364,365,366,0,108,0,0,0,0,0,0,0,0,0,111,0,239,0,0,0,58,0,113,0,413,414,415,416,0,0,232,0,0,137,138,138,138,138,138,138,138,139,0,0,0,0,0,111,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,53,54,0,0,421,422,423,424,0,0,0,0, +0,0,0,0,0,0,245,0,0,245,0,0,0,0,0,0,0,0,0,0,392,393,394,395,0,108,0,0,0,0,0,0,0,0,0,111,0,0,0,0,0,0,0,113,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,111,0,0,0,0,0,0,0,0,0,334,335,336,337,0,0,0,245,0,0,0,0,245,0,450,451,452,453,0,0,0,0, +0,0,320,321,322,0,274,0,0,274,0,0,0,0,0,0,0,0,0,0,421,422,423,424,0,108,0,0,0,0,0,0,0,0,0,140,141,141,141,141,141,141,141,142,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,320,321,322,0,0,0,111,0,0,323,324,325,0,0,0,0,363,364,365,366,0,0,0,274,0,323,324,325,274,0,0,0,0,0,0,0,0,0, +0,0,349,350,351,0,303,0,0,303,0,0,0,0,0,0,0,0,0,0,450,451,452,453,0,137,84,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,349,350,351,0,0,0,111,0,0,352,353,354,0,0,0,0,392,393,394,395,0,0,0,303,0,352,353,354,303,0,0,0,0,0,0,0,0,0, +0,0,378,379,380,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,113,320,321,322,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,378,379,380,0,0,0,111,0,0,381,382,383,0,0,0,0,421,422,423,424,0,0,0,0,0,381,382,383,0,0,0,0,0,0,323,324,325,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,108,349,350,351,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,111,0,0,0,0,0,0,0,0,0,450,451,452,453,0,0,0,0,0,22,23,0,29,0,0,0,0,0,352,353,354,0, 0,0,0,0,0,294,0,0,0,0,0,0,0,0,0,0,0,294,294,294,294,294,294,294,294,0,108,378,379,380,0,0,0,0,0,0,0,0,0,0,0,0,26,0,0,0,0,0,0,0,0,320,321,322,0,0,0,0,0,0,0,0,0,0,0,0,0,82,139,0,0,0,0,0,0,0,0,0,0,0,0,0,24,25,0,0,0,51,52,0,58,0,0,0,0,0,381,382,383,0, -0,0,0,0,294,294,0,0,0,0,0,0,0,0,0,0,0,0,294,294,294,294,294,294,294,0,108,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,55,0,0,0,0,0,0,0,0,349,350,351,0,0,0,0,0,0,0,0,0,0,0,0,0,111,0,0,0,660,661,662,663,0,28,0,0,0,0,0,53,54,0,0,0,0,0,0,0,0,0,656,657,658,659,0,0,0, -0,0,0,0,294,294,245,0,0,245,0,0,0,0,0,0,0,0,0,0,0,294,294,294,0,0,108,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,378,379,380,0,0,0,0,0,0,0,0,0,0,0,0,0,111,0,0,0,689,690,691,692,0,57,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,685,686,687,688,0,0,0, -0,0,0,294,294,294,274,0,0,274,20,21,320,321,322,0,0,0,0,0,0,0,294,0,0,0,108,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,82,139,0,0,0,718,719,720,721,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,714,715,716,717,0,0,0, -0,0,0,0,0,0,303,0,0,303,49,50,349,350,351,0,0,0,0,0,0,0,0,0,0,0,108,0,0,0,0,0,0,0,320,321,322,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,111,0,0,0,0,747,748,749,750,0,0,245,0,0,0,0,0,0,0,0,0,0,0,0,24,25,0,743,744,745,746,0,0,0, +0,0,0,0,294,294,0,0,0,0,0,0,0,0,0,0,0,0,294,294,294,294,294,294,294,0,108,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,55,0,0,0,0,0,0,0,0,349,350,351,0,0,0,0,0,0,0,0,0,0,0,0,0,111,0,0,0,330,331,332,333,0,28,0,0,0,0,0,53,54,0,0,0,0,0,0,0,0,0,326,327,328,329,0,0,0, +0,0,0,0,294,294,245,0,0,245,0,0,0,0,0,0,0,0,0,0,0,294,294,294,0,0,108,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,378,379,380,0,0,0,0,0,0,0,0,0,0,0,0,0,111,0,0,0,359,360,361,362,0,57,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,355,356,357,358,0,0,0, +0,0,0,294,294,294,274,0,0,274,20,21,320,321,322,0,0,0,0,0,0,0,294,0,0,0,108,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,82,139,0,0,0,388,389,390,391,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,384,385,386,387,0,0,0, +0,0,0,0,0,0,303,0,0,303,49,50,349,350,351,0,0,0,0,0,0,0,0,0,0,0,108,0,0,0,0,0,0,0,320,321,322,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,111,0,0,0,0,413,414,415,416,0,0,245,0,0,0,0,0,0,0,0,0,0,0,0,24,25,0,413,414,415,416,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,378,379,380,0,79,80,81,0,0,0,0,0,0,0,137,138,138,138,138,138,84,0,349,350,351,0,0,0,0,0,0,0,20,21,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,82,139,0,0,0,0,0,0,0,0,0,0,274,0,0,0,0,0,0,0,0,0,0,0,0,53,54,0,0,0,0,0,0,0,0, 320,321,322,0,0,0,0,0,0,0,0,0,0,306,249,249,108,0,140,80,81,0,0,0,0,0,0,0,0,0,0,0,108,0,378,379,380,0,0,0,0,0,0,0,49,50,0,0,0,0,22,23,0,0,0,0,0,0,0,0,0,0,0,0,0,111,0,0,0,0,0,0,0,0,0,0,0,303,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 349,350,351,0,0,0,0,0,0,0,0,0,0,0,0,0,137,138,84,0,110,249,249,249,249,249,249,249,250,249,251,0,108,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,51,52,0,0,0,0,0,0,0,0,320,321,322,0,82,139,0,0,0,0,0,0,323,324,325,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 378,379,380,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,137,138,139,0,0,0,0,0,0,0,0,0,280,0,137,138,138,138,138,138,84,0,0,0,174,174,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,349,350,351,0,111,0,0,0,0,0,0,0,352,353,354,0,0,0,0,0,0,0,0,0,323,324,325,0,0,0,0,0,0,0,0,0,0,0,0,0, -0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,280,635,636,637,638,0,0,0,137,83,138,138,203,203,138,138,138,84,0,0,0,0,0,0,0,0,0,0,0,0,378,379,380,82,139,0,0,0,0,0,0,0,381,382,383,0,0,255,256,257,258,0,0,0,352,353,354,0,0,0,0,0,0,0,0,0,0,0,0,0, -0,0,0,0,0,0,0,0,0,320,321,322,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,280,664,665,666,667,0,0,0,0,0,0,0,232,232,0,0,0,137,138,84,0,0,0,0,0,0,0,0,0,0,0,0,82,139,0,0,0,0,0,0,0,0,0,0,0,0,0,284,285,286,287,0,0,0,381,382,383,0,0,0,0,0,0,0,0,0,0,0,0,0, -0,0,0,0,0,0,0,0,0,349,350,351,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,306,693,694,695,696,0,0,0,0,0,0,0,0,0,0,0,0,0,0,137,84,0,0,0,0,0,0,0,0,0,82,138,139,0,0,0,0,0,0,0,0,0,0,0,0,0,0,284,285,286,287,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, -0,0,0,0,0,0,0,0,0,378,379,380,0,0,0,0,0,0,0,0,294,0,0,0,0,0,0,0,0,0,0,722,723,724,725,0,0,12,13,0,0,0,0,0,294,0,0,0,0,0,137,138,138,138,84,0,0,0,82,138,139,0,280,0,0,0,0,0,0,0,0,0,0,0,0,0,0,284,285,286,287,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,18,19, -0,0,0,0,0,0,0,0,0,294,294,0,0,0,0,0,0,0,0,0,294,0,0,0,0,294,0,0,0,0,0,751,752,753,754,0,0,41,42,0,0,0,0,0,294,294,0,0,0,0,29,0,0,0,137,138,138,138,139,0,0,0,280,0,0,0,0,0,0,0,0,0,0,0,0,0,0,284,285,286,287,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,47,48, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,280,334,335,336,337,0,0,0,137,83,138,138,203,203,138,138,138,84,0,0,0,0,0,0,0,0,0,0,0,0,378,379,380,82,139,0,0,0,0,0,0,0,381,382,383,0,0,255,256,257,258,0,0,0,352,353,354,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,320,321,322,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,280,363,364,365,366,0,0,0,0,0,0,0,232,232,0,0,0,137,138,84,0,0,0,0,0,0,0,0,0,0,0,0,82,139,0,0,0,0,0,0,0,0,0,0,0,0,0,284,285,286,287,0,0,0,381,382,383,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,349,350,351,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,306,392,393,394,395,0,0,0,0,0,0,0,0,0,0,0,0,0,0,137,84,0,0,0,0,0,0,0,0,0,82,138,139,0,0,0,0,0,0,0,0,0,0,0,0,0,0,284,285,286,287,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,378,379,380,0,0,0,0,0,0,0,0,294,0,0,0,0,0,0,0,0,0,0,421,422,423,424,0,0,12,13,0,0,0,0,0,294,0,0,0,0,0,137,138,138,138,84,0,0,0,82,138,139,0,280,0,0,0,0,0,0,0,0,0,0,0,0,0,0,284,285,286,287,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,18,19, +0,0,0,0,0,0,0,0,0,294,294,0,0,0,0,0,0,0,0,0,294,0,0,0,0,294,0,0,0,0,0,450,451,452,453,0,0,41,42,0,0,0,0,0,294,294,0,0,0,0,29,0,0,0,137,138,138,138,139,0,0,0,280,0,0,0,0,0,0,0,0,0,0,0,0,0,0,284,285,286,287,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,47,48, 0,0,0,0,0,0,0,0,0,294,294,56,0,0,0,0,0,0,294,294,294,0,0,0,0,294,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,294,294,0,0,0,0,58,0,0,0,0,0,0,0,0,0,0,0,280,0,0,0,0,0,0,0,0,0,0,0,0,0,0,284,285,286,287,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,294,294,294,0,0,0,0,0,0,0,0,0,0,0,0,0,294,294,0,0,0,0,0,0,252,253,253,0,28,0,253,253,254,0,0,294,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,284,285,286,287,0,0,0,0,0,0,0,0,0,12,13,0,0,0,0,0,0,0,0, -0,0,0,0,0,0,0,320,321,322,294,294,0,0,0,0,0,0,0,0,0,0,0,0,0,294,294,0,239,0,0,0,0,0,0,0,0,57,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,313,314,315,316,0,0,0,656,657,658,659,0,0,41,42,0,0,0,0,0,0,0,0, -0,0,0,0,0,0,0,349,350,351,56,294,0,0,0,0,0,0,0,0,0,0,0,0,0,294,294,0,0,0,239,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,342,343,344,345,0,0,0,685,686,687,688,0,0,0,0,0,0,0,0,0,0,0,0, -0,0,0,0,0,0,0,378,379,380,294,294,0,0,320,321,322,0,0,0,0,0,0,0,0,294,0,0,0,0,0,0,0,339,340,340,340,340,340,340,340,341,0,0,0,0,0,0,0,320,321,322,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,714,715,716,717,0,0,0,0,0,0,0,0,0,0,0,0, -294,0,0,0,0,0,0,0,0,0,0,0,0,0,349,350,351,0,0,294,294,294,294,294,294,294,323,324,325,323,324,325,323,324,325,0,0,0,0,0,0,0,0,0,0,0,0,0,0,349,350,351,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,12,13,0,0,0,0,0,0,0,0,28,0,743,744,745,746,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,320,321,322,294,294,0,0,0,0,0,0,0,0,0,0,0,0,0,294,294,0,239,0,0,0,0,0,0,0,0,57,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,313,314,315,316,0,0,0,326,327,328,329,0,0,41,42,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,349,350,351,56,294,0,0,0,0,0,0,0,0,0,0,0,0,0,294,294,0,0,0,239,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,342,343,344,345,0,0,0,355,356,357,358,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,378,379,380,294,294,0,0,320,321,322,0,0,0,0,0,0,0,0,294,0,0,0,0,0,0,0,339,340,340,340,340,340,340,340,341,0,0,0,0,0,0,0,320,321,322,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,384,385,386,387,0,0,0,0,0,0,0,0,0,0,0,0, +294,0,0,0,0,0,0,0,0,0,0,0,0,0,349,350,351,0,0,294,294,294,294,294,294,294,323,324,325,323,324,325,323,324,325,0,0,0,0,0,0,0,0,0,0,0,0,0,0,349,350,351,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,12,13,0,0,0,0,0,0,0,0,28,0,413,414,415,416,0,0,0,0,0,0,0,0,0,0,0,0, 294,0,0,0,0,0,0,0,0,0,0,0,0,0,378,379,380,0,0,0,294,294,294,294,0,0,352,353,354,352,353,354,352,353,354,0,0,0,0,0,0,0,0,0,0,0,0,0,0,378,379,380,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,41,42,0,0,0,0,0,0,0,0,57,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 294,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,381,382,383,381,382,383,381,382,383,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,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/assets-cg/maps/tileset.tsx b/assets-cg/maps/tileset.tsx index 9902698..4ea7542 100644 --- a/assets-cg/maps/tileset.tsx +++ b/assets-cg/maps/tileset.tsx @@ -1,9 +1,24 @@ - + - + + + + + + + + + + + + + + + + @@ -15,48 +30,211 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -84,6 +262,9 @@ + + + @@ -95,6 +276,7 @@ + @@ -114,17 +296,27 @@ + + + + + + + + + + @@ -133,12 +325,28 @@ + + + + + + + + + + + + + + + + @@ -146,115 +354,125 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/assets-cg/tileset.png b/assets-cg/tileset.png index c4146fa..5bbf628 100644 Binary files a/assets-cg/tileset.png and b/assets-cg/tileset.png differ diff --git a/include/define.h b/include/define.h index b0ffe0b..f628c65 100644 --- a/include/define.h +++ b/include/define.h @@ -1,5 +1,5 @@ #pragma once -/*the width of the tileset*/ -#define TILESET_WIDTH 29 /*the size of one tile*/ -#define TILE_SIZE 16 \ No newline at end of file +#define TILE_SIZE 16 + +#define NB_INTERIORS 2 \ No newline at end of file diff --git a/include/map.h b/include/map.h index 63bdc0b..5772cab 100644 --- a/include/map.h +++ b/include/map.h @@ -13,6 +13,7 @@ struct Map { int w, h, nb_layers, dialog_count, teleporter_count; /*the tileset to use*/ bopti_image_t *tileset; + int tileset_size; /*list of all the dialog*/ struct Talkable *dialogs; struct Teleporter *teleporters; diff --git a/src/engine.c b/src/engine.c index 20330bc..e84b3d9 100644 --- a/src/engine.c +++ b/src/engine.c @@ -28,6 +28,7 @@ void engine_draw(struct Game const *game) { void engine_draw_map(struct Game const *game) { const int x_offset = (game->camera.offset.x - DWIDTH/2); const int y_offset = (game->camera.offset.y - DHEIGHT/2); + const int tileset_size = game->map->tileset_size; for (int y = 1 ; y <= DHEIGHT / TILE_SIZE-1; y++) { for (int x = 1 ; x <= DWIDTH / TILE_SIZE; x++) { @@ -42,8 +43,8 @@ void engine_draw_map(struct Game const *game) { if (tile_id != 0) { tile_id--; - unsigned int tile_x = TILE_SIZE * (tile_id % TILESET_WIDTH); - unsigned int tile_y = TILE_SIZE * (tile_id / TILESET_WIDTH); + unsigned int tile_x = TILE_SIZE * (tile_id % tileset_size); + unsigned int tile_y = TILE_SIZE * (tile_id / tileset_size); dsubimage(x * TILE_SIZE - x_offset%TILE_SIZE, y * TILE_SIZE - y_offset%TILE_SIZE, game->map->tileset, diff --git a/src/map.c b/src/map.c index 77a1049..d4611cd 100644 --- a/src/map.c +++ b/src/map.c @@ -27,16 +27,12 @@ int map_get_player_tile(struct Game const *game) { /*generate the interior*/ void generate_interior_map(struct Game *game) { - const int NB_INTERIORS = 3; - extern struct Map in_1; extern struct Map in_2; - extern struct Map in_3; struct Map *interiors[] = { &in_1, &in_2, - &in_3 }; srand(game->player->pos.x * game->player->pos.y); @@ -45,7 +41,6 @@ void generate_interior_map(struct Game *game) { game->player->pos = locate_tile(game->map, TILE_DOOR_OUT); } -/*may be useful later*/ void set_map(struct Game *game, int id) { game->map = maps[id]; } diff --git a/src/talkable.c b/src/talkable.c index d777d4d..d02e0d8 100644 --- a/src/talkable.c +++ b/src/talkable.c @@ -26,7 +26,7 @@ void draw_dialog(struct Talkable *talkable) { dprint(25,20, C_BLACK, "%s", talkable->name); //TODO Il y a moyen de faire mieux avec seulement curr_line. - //Cela semble globalement fonctionner, mais j'ai pu oobserver des petites erreurs + //Cela semble globalement fonctionner, mais j'ai pu observer des petites erreurs if(strlen(curr_line) > LIMIT) { char remain[strlen(curr_line)+1]; char split[LIMIT+1];