summaryrefslogtreecommitdiff
path: root/src/Companion.h
diff options
context:
space:
mode:
authorKiritoDv <kiritodev01@gmail.com>2024-03-25 19:00:25 -0600
committerKiritoDv <kiritodev01@gmail.com>2024-03-25 19:00:25 -0600
commit4b08b2b4c58534e6b434b6b6253c54505a0af1c6 (patch)
tree0d221a87fb0acb7839a120fa3fa696c1f40f5e82 /src/Companion.h
parent5a6f8adc024e53d5d53cb7abc58009312088dd3d (diff)
Fixed parse from cache
Diffstat (limited to 'src/Companion.h')
-rw-r--r--src/Companion.h7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/Companion.h b/src/Companion.h
index 8fcde4a..07d9f20 100644
--- a/src/Companion.h
+++ b/src/Companion.h
@@ -129,6 +129,7 @@ private:
std::vector<uint8_t> gRomData;
std::filesystem::path gRomPath;
bool gNodeIsCacheable;
+ YAML::Node gCacheNode;
std::shared_ptr<N64::Cartridge> gCartridge;
std::unordered_map<std::string, std::unordered_map<int32_t, std::string>> gEnums;
@@ -145,17 +146,19 @@ 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::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;
void ParseEnums(std::string& file);
+ void ParseCache();
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 StoreCache(std::string path, const std::vector<uint8_t>& value);
+ std::vector<uint8_t>& GetCache(std::string path);
void ExtractNode(YAML::Node& node, std::string& name, SWrapper* binary);
};