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
23
rebuild/remorse/tests/combat_tactics_tests.cpp
Normal file
23
rebuild/remorse/tests/combat_tactics_tests.cpp
Normal file
|
|
@ -0,0 +1,23 @@
|
|||
#include "remorse/combat_tactics.h"
|
||||
#include "remorse/file_system.h"
|
||||
|
||||
#include <cassert>
|
||||
#include <filesystem>
|
||||
|
||||
int main()
|
||||
{
|
||||
const auto root = remorse::findGameDataRoot(std::filesystem::current_path());
|
||||
assert(root.has_value());
|
||||
|
||||
const auto combatPath = remorse::resolveGameDataPath(*root, std::filesystem::path("STATIC") / "COMBAT.DAT");
|
||||
assert(combatPath.has_value());
|
||||
|
||||
const auto tactics = remorse::loadCombatTactics(*combatPath);
|
||||
assert(tactics.has_value());
|
||||
assert(tactics->size() == 14);
|
||||
assert((*tactics)[0].name == "Dumb");
|
||||
assert((*tactics)[0].blockOffsets[0] == 0x002c);
|
||||
assert((*tactics)[0].blockOffsets[1] == 0x0031);
|
||||
assert(!(*tactics)[0].bytecode.empty());
|
||||
return 0;
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue