From 4994e732406ffa2942f9c9ea6ff14c424cd0b896 Mon Sep 17 00:00:00 2001 From: Anghelo Carvajal Date: Tue, 5 Oct 2021 13:55:55 -0300 Subject: ZResource cleanup (#178) * Add some general use methods to ZResource * change zarray * adapt ztexture * Clean up ZCollision, ZPath, ZScalar and ZVector * cleanup background * cleanup zmtx * Clean up skeleton and limb * mark GetSourceTypeName as abstract * Remove redundant ExtractFromXML * Reorder stuff to minimize changes in github * remove extra ZDisplayList constructor * Remove using namespace tinyxml2; * run formatter * Add some brief descriptions, and remove some methods * Remove trivials GetSourceOutputCode and a bit of cleanup * Add more descriptions to methods * Fix blob build * improve descriptions a bit * Run formatter * Now builds * Add attributes and fix some warnings * format * fix merge issues * fix merge issues and some clang warnings * format * Run formatter * Fix merge issues * Format * add SEGMENTED_NULL * Fix merge issues * Run format * dumb fix * whoops * format * whoops --- ZAPD/ZTexture.h | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'ZAPD/ZTexture.h') diff --git a/ZAPD/ZTexture.h b/ZAPD/ZTexture.h index 2ec4a4c..f844159 100644 --- a/ZAPD/ZTexture.h +++ b/ZAPD/ZTexture.h @@ -55,15 +55,16 @@ public: bool isPalette = false; - void ExtractFromXML(tinyxml2::XMLElement* reader, uint32_t nRawDataIndex) override; - void FromBinary(uint32_t nRawDataIndex, int32_t nWidth, int32_t nHeight, TextureType nType, - bool nIsPalette); + void ExtractFromBinary(uint32_t nRawDataIndex, int32_t nWidth, int32_t nHeight, + TextureType nType, bool nIsPalette); void FromPNG(const fs::path& pngFilePath, TextureType texType); static TextureType GetTextureTypeFromString(std::string str); void ParseXML(tinyxml2::XMLElement* reader) override; void ParseRawData() override; void DeclareReferences(const std::string& prefix) override; + + Declaration* DeclareVar(const std::string& prefix, const std::string& bodyStr) override; std::string GetBodySourceCode() const override; void CalcHash() override; void Save(const fs::path& outFolder) override; @@ -76,7 +77,7 @@ public: size_t GetRawDataSize() const override; std::string GetIMFmtFromType(); std::string GetIMSizFromType(); - std::string GetDefaultName(const std::string& prefix); + std::string GetDefaultName(const std::string& prefix) const override; uint32_t GetWidth() const; uint32_t GetHeight() const; void SetDimensions(uint32_t nWidth, uint32_t nHeight); -- cgit v1.2.3