diff options
| author | Anghelo Carvajal <angheloalf95@gmail.com> | 2021-06-10 15:29:09 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-06-10 15:29:09 -0400 |
| commit | 602e609c8036fd4e5dbd3aa2e1a6df59fa6a07ef (patch) | |
| tree | 6c3d80434649e2a085df975ad99a57d3996369bc /ZAPD/ZFile.h | |
| parent | 17fb7de37389f80285360b05e3fa188a97d77cb6 (diff) | |
Add `OutName` attribute to `<File>` node (#146)
* create attribute
* Minor fixes
* Remove redundant `outputPath`
* Add `OutName` to docs
* Whoops, wrong branch
Diffstat (limited to 'ZAPD/ZFile.h')
| -rw-r--r-- | ZAPD/ZFile.h | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/ZAPD/ZFile.h b/ZAPD/ZFile.h index a3765a0..c8f9291 100644 --- a/ZAPD/ZFile.h +++ b/ZAPD/ZFile.h @@ -36,18 +36,17 @@ public: int32_t segment; uint32_t baseAddress, rangeStart, rangeEnd; - ZFile(const fs::path& nOutPath, std::string nName); + ZFile(std::string nName); ZFile(ZFileMode mode, tinyxml2::XMLElement* reader, const fs::path& nBasePath, - const fs::path& nOutPath, std::string filename, const fs::path& nXmlFilePath, - bool placeholderMode); + std::string filename, const fs::path& nXmlFilePath, bool placeholderMode); ~ZFile(); std::string GetVarName(uint32_t address); std::string GetName() const; const fs::path& GetXmlFilePath() const; const std::vector<uint8_t>& GetRawData() const; - void ExtractResources(fs::path outputDir); - void BuildSourceFile(fs::path outputDir); + void ExtractResources(); + void BuildSourceFile(); void AddResource(ZResource* res); ZResource* FindResource(uint32_t rawDataIndex); std::vector<ZResource*> GetResourcesOfType(ZResourceType resType); @@ -89,14 +88,16 @@ public: void AddTextureResource(uint32_t offset, ZTexture* tex); ZTexture* GetTextureResource(uint32_t offset) const; + fs::path GetSourceOutputFolderPath() const; + static std::map<std::string, ZResourceFactoryFunc*>* GetNodeMap(); static void RegisterNode(std::string nodeName, ZResourceFactoryFunc* nodeFunc); protected: std::vector<uint8_t> rawData; std::string name; + fs::path outName = ""; fs::path basePath; - fs::path outputPath; fs::path xmlFilePath; // Keep track of every texture of this ZFile. // The pointers declared here are "borrowed" (somebody else is the owner), |
