mirror of
https://git.eden-emu.dev/eden-emu/eden.git
synced 2025-10-12 18:17:48 +00:00
ips_layer: Add IPSwitchCompiler to process IPSwitch format
This commit is contained in:
parent
e0ea8e6ca5
commit
a2602dddbe
2 changed files with 168 additions and 0 deletions
|
@ -12,4 +12,30 @@ namespace FileSys {
|
|||
|
||||
VirtualFile PatchIPS(const VirtualFile& in, const VirtualFile& ips);
|
||||
|
||||
class IPSwitchCompiler {
|
||||
public:
|
||||
explicit IPSwitchCompiler(VirtualFile patch_text);
|
||||
std::array<u8, 0x20> GetBuildID() const;
|
||||
bool IsValid() const;
|
||||
VirtualFile Apply(const VirtualFile& in) const;
|
||||
|
||||
private:
|
||||
void Parse();
|
||||
|
||||
bool valid;
|
||||
|
||||
struct IPSwitchPatch {
|
||||
std::string name;
|
||||
bool enabled;
|
||||
std::map<u32, std::vector<u8>> records;
|
||||
};
|
||||
|
||||
VirtualFile patch_text;
|
||||
std::vector<IPSwitchPatch> patches;
|
||||
std::array<u8, 0x20> nso_build_id;
|
||||
bool is_little_endian;
|
||||
u64 offset_shift;
|
||||
bool print_values;
|
||||
};
|
||||
|
||||
} // namespace FileSys
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue