- 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.
28 lines
774 B
C++
28 lines
774 B
C++
#include "remorse/file_system.h"
|
|
#include "remorse/glob_archive.h"
|
|
|
|
#include <cassert>
|
|
#include <filesystem>
|
|
|
|
int main()
|
|
{
|
|
const auto root = remorse::findGameDataRoot(std::filesystem::current_path());
|
|
assert(root.has_value());
|
|
|
|
const auto globPath = remorse::resolveGameDataPath(*root, std::filesystem::path("STATIC") / "GLOB.FLX");
|
|
assert(globPath.has_value());
|
|
|
|
const auto objects = remorse::loadGlobObjects(*globPath);
|
|
assert(objects.has_value());
|
|
assert(!objects->empty());
|
|
|
|
bool foundObjectWithEntries = false;
|
|
for (const remorse::GlobObject& object : *objects) {
|
|
if (!object.entries.empty()) {
|
|
foundObjectWithEntries = true;
|
|
break;
|
|
}
|
|
}
|
|
assert(foundObjectWithEntries);
|
|
return 0;
|
|
}
|