Read in tile data from tilemap

This commit is contained in:
2025-06-20 00:24:34 -05:00
parent 1022f45565
commit 2a8183e9a3
9 changed files with 98 additions and 64 deletions

View File

@ -6,16 +6,15 @@
find_package(Python3 COMPONENTS Interpreter REQUIRED)
# Custom command to generate all header files
add_custom_target(DUSK_CHUNKS
# OUTPUT ${DUSK_GENERATED_HEADERS_DIR}/world/world.h
add_custom_target(DUSK_TILES
COMMAND
${Python3_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/mapcompile.py
${Python3_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/tilecompile.py
--output ${DUSK_GENERATED_HEADERS_DIR}
--input ${DUSK_DATA_DIR}/map.tmj
DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/mapcompile.py
COMMENT "Generating chunk header files"
--input ${DUSK_DATA_DIR}/overworld.tsx
DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/tilecompile.py
COMMENT "Generating tile header file"
VERBATIM
)
# Ensure headers are generated before compiling main
add_dependencies(${DUSK_TARGET_NAME} DUSK_CHUNKS)
add_dependencies(${DUSK_TARGET_NAME} DUSK_TILES)