feat(editor): writer surgical del bloc data: al YAML del tilemap

This commit is contained in:
JailDesigner committed 2026-04-23 11:51:49 +02:00
1 parent 459d18b49c
commit 6d8423764d
4 files changed
+345

No files matched your search

+16
View File
@@ -92,6 +92,7 @@ set(APP_SOURCES
source/game/entities/player.cpp
source/game/map/map.cpp
source/game/map/tilemap.cpp
source/game/map/tilemap_writer.cpp
${ENTITY_SOURCES}
# Fitxer només del binari principal: `loadFromLevel` depèn de
# Resource::Cache (→ Surface → GIF → àudio). Separat per no arrossegar
@@ -327,4 +328,19 @@ if(BUILD_TESTS)
add_test(NAME scene_flow
COMMAND test_scene_flow
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR})
# Smoke del writer surgical del tilemap (escriu el bloc `data:` sense
# tocar la resta del fitxer). Pura manipulació de text, zero
# dependències: no cal ni SDL ni el Resource::Cache.
add_executable(test_tilemap_writer
tests/test_tilemap_writer.cpp
source/game/map/tilemap_writer.cpp
)
target_include_directories(test_tilemap_writer PRIVATE
"${CMAKE_SOURCE_DIR}/source"
)
target_compile_options(test_tilemap_writer PRIVATE -Wall -Wextra -Wpedantic)
add_test(NAME tilemap_writer
COMMAND test_tilemap_writer
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR})
endif()