- 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.
26 lines
514 B
C++
26 lines
514 B
C++
#pragma once
|
|
|
|
#include <filesystem>
|
|
#include <optional>
|
|
#include <vector>
|
|
|
|
#include "remorse/compat.h"
|
|
|
|
namespace remorse {
|
|
|
|
struct FlexEntry {
|
|
u32 index = 0;
|
|
u32 offset = 0;
|
|
u32 size = 0;
|
|
};
|
|
|
|
struct FlexArchive {
|
|
u32 entryCount = 0;
|
|
std::vector<FlexEntry> populatedEntries;
|
|
std::vector<u8> bytes;
|
|
};
|
|
|
|
std::optional<FlexArchive> loadFlexArchive(const std::filesystem::path& path);
|
|
std::optional<std::vector<u8>> readFlexEntry(const FlexArchive& archive, u32 index);
|
|
|
|
} // namespace remorse
|