Add core functionality for loading and processing game assets
- Implemented palette loading from binary files in `palette.cpp`. - Added runtime utilities for reading text and JSON files in `runtime.cpp`. - Created shape archive handling in `shape_archive.cpp`, including frame parsing and pixel decoding. - Introduced type flag loading functionality in `type_flags.cpp`. - Developed tests for combat tactics, entity dispatch entries, file system operations, fixed maps, flex archives, glob archives, map rendering, palette loading, shape archives, and type flags. - Added a Python script for importing Ghidra-exported function slices with reporting capabilities.
This commit is contained in:
parent
6ca3b18c3e
commit
8907604b84
41 changed files with 2889 additions and 0 deletions
144
rebuild/remorse/CMakeLists.txt
Normal file
144
rebuild/remorse/CMakeLists.txt
Normal file
|
|
@ -0,0 +1,144 @@
|
|||
cmake_minimum_required(VERSION 3.20)
|
||||
|
||||
project(remorse_rebuild LANGUAGES CXX)
|
||||
|
||||
add_library(remorse_core
|
||||
src/combat_tactics.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/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)
|
||||
|
||||
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(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(remorse_map_preview PRIVATE /W4 /permissive-)
|
||||
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(remorse_map_preview PRIVATE -Wall -Wextra -Wpedantic)
|
||||
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()
|
||||
Loading…
Add table
Add a link
Reference in a new issue