Merge pull request #2 from lephe/master

fix JSON map dependencies and support Tiled 1.9
master
bgiraudr 2 months ago committed by GitHub
commit eff11d7908
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      CMakeLists.txt
  2. 2
      assets-cg/converters.py

@ -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"

@ -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

Loading…
Cancel
Save