Compare commits

...

2 Commits

Author SHA1 Message Date
bgiraudr eff11d7908
Merge pull request #2 from lephe/master
fix JSON map dependencies and support Tiled 1.9
2022-07-24 23:05:06 +02:00
Lephenixnoir 686548cfbc
fix JSON map dependencies and support Tiled 1.9 2022-07-24 21:53:29 +01:00
2 changed files with 3 additions and 1 deletions

View File

@ -13,6 +13,8 @@ fxconv_declare_converters(assets-cg/converters.py)
add_custom_command(
OUTPUT "${CMAKE_CURRENT_LIST_DIR}/assets-cg/maps/testCarte.json"
"${CMAKE_CURRENT_LIST_DIR}/assets-cg/maps/1.json"
"${CMAKE_CURRENT_LIST_DIR}/assets-cg/maps/2.json"
"${CMAKE_CURRENT_LIST_DIR}/assets-cg/maps/inside/1.json"
"${CMAKE_CURRENT_LIST_DIR}/assets-cg/maps/inside/2.json"
COMMENT "Convert tmx map to json"

View File

@ -73,7 +73,7 @@ def convert_map(input, output, params, target):
#create a dictionnary {tile id:type}
for i in data_tileset["tiles"]:
id = i["id"]+1
type = i["type"]
type = i["class"] if "class" in i else i["type"]
value = tile_type.get(type) if type in tile_type else TILE_AIR
tile_value[id] = value