- Implemented collision tests to verify overlap and movement logic for collision bodies. - Enhanced entity dispatch entry tests to cover initialization, group ID management, and process handling. - Expanded file system tests to include crash diagnostics and ensure proper game data root detection. - Created isometric controls tests to validate movement requests and screen projection calculations. - Added map renderer tests to check fixed map loading and rendering functionality. - Introduced map sorter tests to confirm correct rendering order for various items.
200 lines
6.4 KiB
CMake
200 lines
6.4 KiB
CMake
cmake_minimum_required(VERSION 3.20)
|
|
|
|
project(remorse_rebuild LANGUAGES CXX)
|
|
|
|
add_library(remorse_core
|
|
src/animation_archive.cpp
|
|
src/combat_tactics.cpp
|
|
src/collision.cpp
|
|
src/entity_dispatch_entry.cpp
|
|
src/file_system.cpp
|
|
src/flex_archive.cpp
|
|
src/fixed_map.cpp
|
|
src/glob_archive.cpp
|
|
src/map_renderer.cpp
|
|
src/map_sorter.cpp
|
|
src/palette.cpp
|
|
src/runtime.cpp
|
|
src/shape_archive.cpp
|
|
src/type_flags.cpp
|
|
)
|
|
|
|
target_compile_features(remorse_core PUBLIC cxx_std_17)
|
|
target_include_directories(remorse_core PUBLIC include)
|
|
|
|
add_executable(remorse_rebuild
|
|
src/main.cpp
|
|
)
|
|
|
|
target_link_libraries(remorse_rebuild PRIVATE remorse_core)
|
|
|
|
add_executable(remorse_map_preview
|
|
src/map_preview_main.cpp
|
|
)
|
|
|
|
target_link_libraries(remorse_map_preview PRIVATE remorse_core)
|
|
|
|
if(WIN32)
|
|
add_executable(remorse_game WIN32
|
|
src/windowed_game_main.cpp
|
|
)
|
|
target_link_libraries(remorse_game PRIVATE remorse_core user32 gdi32)
|
|
endif()
|
|
|
|
enable_testing()
|
|
|
|
add_executable(entity_dispatch_entry_tests
|
|
tests/entity_dispatch_entry_tests.cpp
|
|
)
|
|
|
|
target_link_libraries(entity_dispatch_entry_tests PRIVATE remorse_core)
|
|
|
|
add_test(NAME entity_dispatch_entry_tests COMMAND entity_dispatch_entry_tests)
|
|
|
|
add_executable(file_system_tests
|
|
tests/file_system_tests.cpp
|
|
)
|
|
|
|
target_link_libraries(file_system_tests PRIVATE remorse_core)
|
|
|
|
add_test(NAME file_system_tests COMMAND file_system_tests)
|
|
|
|
add_executable(palette_tests
|
|
tests/palette_tests.cpp
|
|
)
|
|
|
|
target_link_libraries(palette_tests PRIVATE remorse_core)
|
|
|
|
add_test(NAME palette_tests COMMAND palette_tests)
|
|
|
|
add_executable(flex_archive_tests
|
|
tests/flex_archive_tests.cpp
|
|
)
|
|
|
|
target_link_libraries(flex_archive_tests PRIVATE remorse_core)
|
|
|
|
add_test(NAME flex_archive_tests COMMAND flex_archive_tests)
|
|
|
|
add_executable(fixed_map_tests
|
|
tests/fixed_map_tests.cpp
|
|
)
|
|
|
|
target_link_libraries(fixed_map_tests PRIVATE remorse_core)
|
|
|
|
add_test(NAME fixed_map_tests COMMAND fixed_map_tests)
|
|
|
|
add_executable(glob_archive_tests
|
|
tests/glob_archive_tests.cpp
|
|
)
|
|
|
|
target_link_libraries(glob_archive_tests PRIVATE remorse_core)
|
|
|
|
add_test(NAME glob_archive_tests COMMAND glob_archive_tests)
|
|
|
|
add_executable(type_flags_tests
|
|
tests/type_flags_tests.cpp
|
|
)
|
|
|
|
target_link_libraries(type_flags_tests PRIVATE remorse_core)
|
|
|
|
add_test(NAME type_flags_tests COMMAND type_flags_tests)
|
|
|
|
add_executable(shape_archive_tests
|
|
tests/shape_archive_tests.cpp
|
|
)
|
|
|
|
target_link_libraries(shape_archive_tests PRIVATE remorse_core)
|
|
|
|
add_test(NAME shape_archive_tests COMMAND shape_archive_tests)
|
|
|
|
add_executable(map_renderer_tests
|
|
tests/map_renderer_tests.cpp
|
|
)
|
|
|
|
target_link_libraries(map_renderer_tests PRIVATE remorse_core)
|
|
|
|
add_test(NAME map_renderer_tests COMMAND map_renderer_tests)
|
|
|
|
add_executable(map_sorter_tests
|
|
tests/map_sorter_tests.cpp
|
|
)
|
|
|
|
target_link_libraries(map_sorter_tests PRIVATE remorse_core)
|
|
|
|
add_test(NAME map_sorter_tests COMMAND map_sorter_tests)
|
|
|
|
add_executable(isometric_controls_tests
|
|
tests/isometric_controls_tests.cpp
|
|
)
|
|
|
|
target_link_libraries(isometric_controls_tests PRIVATE remorse_core)
|
|
|
|
add_test(NAME isometric_controls_tests COMMAND isometric_controls_tests)
|
|
|
|
add_executable(animation_archive_tests
|
|
tests/animation_archive_tests.cpp
|
|
)
|
|
|
|
target_link_libraries(animation_archive_tests PRIVATE remorse_core)
|
|
|
|
add_test(NAME animation_archive_tests COMMAND animation_archive_tests)
|
|
|
|
add_executable(collision_tests
|
|
tests/collision_tests.cpp
|
|
)
|
|
|
|
target_link_libraries(collision_tests PRIVATE remorse_core)
|
|
|
|
add_test(NAME collision_tests COMMAND collision_tests)
|
|
|
|
add_executable(combat_tactics_tests
|
|
tests/combat_tactics_tests.cpp
|
|
)
|
|
|
|
target_link_libraries(combat_tactics_tests PRIVATE remorse_core)
|
|
|
|
add_test(NAME combat_tactics_tests COMMAND combat_tactics_tests)
|
|
|
|
if(MSVC)
|
|
target_compile_options(remorse_core PRIVATE /W4 /permissive-)
|
|
target_compile_options(combat_tactics_tests PRIVATE /W4 /permissive-)
|
|
target_compile_options(map_renderer_tests PRIVATE /W4 /permissive-)
|
|
target_compile_options(map_sorter_tests PRIVATE /W4 /permissive-)
|
|
target_compile_options(isometric_controls_tests PRIVATE /W4 /permissive-)
|
|
target_compile_options(animation_archive_tests PRIVATE /W4 /permissive-)
|
|
target_compile_options(collision_tests PRIVATE /W4 /permissive-)
|
|
target_compile_options(remorse_map_preview PRIVATE /W4 /permissive-)
|
|
if(WIN32)
|
|
target_compile_options(remorse_game PRIVATE /W4 /permissive-)
|
|
endif()
|
|
target_compile_options(remorse_rebuild PRIVATE /W4 /permissive-)
|
|
target_compile_options(entity_dispatch_entry_tests PRIVATE /W4 /permissive-)
|
|
target_compile_options(file_system_tests PRIVATE /W4 /permissive-)
|
|
target_compile_options(flex_archive_tests PRIVATE /W4 /permissive-)
|
|
target_compile_options(fixed_map_tests PRIVATE /W4 /permissive-)
|
|
target_compile_options(glob_archive_tests PRIVATE /W4 /permissive-)
|
|
target_compile_options(palette_tests PRIVATE /W4 /permissive-)
|
|
target_compile_options(shape_archive_tests PRIVATE /W4 /permissive-)
|
|
target_compile_options(type_flags_tests PRIVATE /W4 /permissive-)
|
|
else()
|
|
target_compile_options(remorse_core PRIVATE -Wall -Wextra -Wpedantic)
|
|
target_compile_options(combat_tactics_tests PRIVATE -Wall -Wextra -Wpedantic)
|
|
target_compile_options(map_renderer_tests PRIVATE -Wall -Wextra -Wpedantic)
|
|
target_compile_options(map_sorter_tests PRIVATE -Wall -Wextra -Wpedantic)
|
|
target_compile_options(isometric_controls_tests PRIVATE -Wall -Wextra -Wpedantic)
|
|
target_compile_options(animation_archive_tests PRIVATE -Wall -Wextra -Wpedantic)
|
|
target_compile_options(collision_tests PRIVATE -Wall -Wextra -Wpedantic)
|
|
target_compile_options(remorse_map_preview PRIVATE -Wall -Wextra -Wpedantic)
|
|
if(WIN32)
|
|
target_compile_options(remorse_game PRIVATE -Wall -Wextra -Wpedantic)
|
|
endif()
|
|
target_compile_options(remorse_rebuild PRIVATE -Wall -Wextra -Wpedantic)
|
|
target_compile_options(entity_dispatch_entry_tests PRIVATE -Wall -Wextra -Wpedantic)
|
|
target_compile_options(file_system_tests PRIVATE -Wall -Wextra -Wpedantic)
|
|
target_compile_options(flex_archive_tests PRIVATE -Wall -Wextra -Wpedantic)
|
|
target_compile_options(fixed_map_tests PRIVATE -Wall -Wextra -Wpedantic)
|
|
target_compile_options(glob_archive_tests PRIVATE -Wall -Wextra -Wpedantic)
|
|
target_compile_options(palette_tests PRIVATE -Wall -Wextra -Wpedantic)
|
|
target_compile_options(shape_archive_tests PRIVATE -Wall -Wextra -Wpedantic)
|
|
target_compile_options(type_flags_tests PRIVATE -Wall -Wextra -Wpedantic)
|
|
endif()
|