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:
MaddoScientisto 2026-04-27 21:15:01 +02:00
commit 8907604b84
41 changed files with 2889 additions and 0 deletions

View file

@ -0,0 +1,26 @@
#include "remorse/entity_dispatch_entry.h"
#include <cassert>
int main()
{
remorse::EntityDispatchEntryBase entry{};
remorse::EntityDispatchEntry::initBase(&entry);
remorse::EntityDispatchEntry::setSourceType(entry, 0x1234);
assert(entry.bytes[0x04] == 0x34);
assert(entry.bytes[0x05] == 0x12);
remorse::EntityDispatchEntry::setEventTypeChecked(entry, 0x00f2);
assert(entry.bytes[0x06] == 0xf2);
assert(entry.bytes[0x07] == 0x00);
entry.bytes[0x08] = 0xe0;
remorse::EntityDispatchEntry::setGroupId(entry, 0x23);
assert(entry.bytes[0x08] == 0xe3);
remorse::EntityDispatchEntry::incrementGroupId(entry);
assert(entry.bytes[0x08] == 0xe4);
return 0;
}