diff options
Diffstat (limited to 'src/Companion.h')
| -rw-r--r-- | src/Companion.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/Companion.h b/src/Companion.h index 748efbb..8fcde4a 100644 --- a/src/Companion.h +++ b/src/Companion.h @@ -85,6 +85,9 @@ public: } void Init(ExportType type); + + void PrepareCache(const std::string& string); + void Process(); bool IsOTRMode() const { return this->gConfig.otrMode; } @@ -122,8 +125,10 @@ private: TorchConfig gConfig; YAML::Node gModdingConfig; fs::path gCurrentDirectory; + std::string gCurrentCacheHash; std::vector<uint8_t> gRomData; std::filesystem::path gRomPath; + bool gNodeIsCacheable; std::shared_ptr<N64::Cartridge> gCartridge; std::unordered_map<std::string, std::unordered_map<int32_t, std::string>> gEnums; @@ -140,6 +145,7 @@ private: std::variant<std::vector<std::string>, std::string> gWriteOrder; std::unordered_map<std::string, std::shared_ptr<BaseFactory>> gFactories; std::unordered_map<std::string, std::string> gModdedAssetPaths; + std::unordered_map<std::string, std::vector<uint8_t>> gCacheData; std::unordered_map<std::string, std::map<std::string, std::vector<WriteEntry>>> gWriteMap; std::unordered_map<std::string, std::map<std::string, std::pair<YAML::Node, bool>>> gAssetDependencies; std::unordered_map<std::string, std::unordered_map<uint32_t, std::tuple<std::string, YAML::Node>>> gAddrMap; @@ -148,5 +154,8 @@ private: void ParseModdingConfig(); void ParseCurrentFileConfig(YAML::Node node); void RegisterFactory(const std::string& type, const std::shared_ptr<BaseFactory>& factory); + + void StoreCache(const std::vector<uint8_t>& value); + void ExtractNode(YAML::Node& node, std::string& name, SWrapper* binary); }; |
