diff options
author | Zach Hilman <zachhilman@gmail.com> | 2018-10-01 00:13:22 +0200 |
---|---|---|
committer | Zach Hilman <zachhilman@gmail.com> | 2018-10-04 17:32:10 +0200 |
commit | 306739c2c479b646270f7cd8000bb11483613d50 (patch) | |
tree | 969575650ff70c1bbb1df7a32ecd2637a526ecfd /src/core/file_sys/ips_layer.h | |
parent | hex_util: Add HexVectorToString and HexStringToVector (diff) | |
download | yuzu-306739c2c479b646270f7cd8000bb11483613d50.tar yuzu-306739c2c479b646270f7cd8000bb11483613d50.tar.gz yuzu-306739c2c479b646270f7cd8000bb11483613d50.tar.bz2 yuzu-306739c2c479b646270f7cd8000bb11483613d50.tar.lz yuzu-306739c2c479b646270f7cd8000bb11483613d50.tar.xz yuzu-306739c2c479b646270f7cd8000bb11483613d50.tar.zst yuzu-306739c2c479b646270f7cd8000bb11483613d50.zip |
Diffstat (limited to 'src/core/file_sys/ips_layer.h')
-rw-r--r-- | src/core/file_sys/ips_layer.h | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/src/core/file_sys/ips_layer.h b/src/core/file_sys/ips_layer.h index 81c163494..bb35542c8 100644 --- a/src/core/file_sys/ips_layer.h +++ b/src/core/file_sys/ips_layer.h @@ -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 |