diff options
| author | Nicholas Estelami <NEstelami@users.noreply.github.com> | 2021-05-06 18:20:07 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-05-06 18:20:07 -0400 |
| commit | 5a721d58d4b28f4797d6fdf29d9926e5e968a939 (patch) | |
| tree | cb01d50cec516391b25ec8c0e34bb1699a151719 /ZAPD | |
| parent | bd4735480a2e6b53585a4f764ae13804e0737a21 (diff) | |
Refactor: Removed `relPath` since it is no longer used. (#136)
* Refactor: Removed relPath since it is no longer used.
* Removed remaining references
Co-authored-by: Jack Walker <7463599+Jack-Walker@users.noreply.github.com>
Diffstat (limited to 'ZAPD')
38 files changed, 62 insertions, 83 deletions
diff --git a/ZAPD/ZAnimation.cpp b/ZAPD/ZAnimation.cpp index 2eaeee2..e111dc5 100644 --- a/ZAPD/ZAnimation.cpp +++ b/ZAPD/ZAnimation.cpp @@ -124,7 +124,7 @@ std::string ZNormalAnimation::GetSourceTypeName() void ZNormalAnimation::ExtractFromXML(tinyxml2::XMLElement* reader, const std::vector<uint8_t>& nRawData, - const uint32_t nRawDataIndex, const std::string& nRelPath) + const uint32_t nRawDataIndex) { rawData = std::move(nRawData); rawDataIndex = nRawDataIndex; @@ -199,7 +199,7 @@ std::string ZLinkAnimation::GetSourceTypeName() void ZLinkAnimation::ExtractFromXML(tinyxml2::XMLElement* reader, const std::vector<uint8_t>& nRawData, - const uint32_t nRawDataIndex, const std::string& nRelPath) + const uint32_t nRawDataIndex) { rawData = std::move(nRawData); rawDataIndex = nRawDataIndex; @@ -287,9 +287,9 @@ void ZCurveAnimation::ParseRawData() void ZCurveAnimation::ExtractFromXML(tinyxml2::XMLElement* reader, const std::vector<uint8_t>& nRawData, - const uint32_t nRawDataIndex, const std::string& nRelPath) + const uint32_t nRawDataIndex) { - ZResource::ExtractFromXML(reader, nRawData, nRawDataIndex, nRelPath); + ZResource::ExtractFromXML(reader, nRawData, nRawDataIndex); skel = new ZSkeleton(ZSkeletonType::Curve, ZLimbType::Curve, "CurveAnim", nRawData, Seg2Filespace(skelOffset, parent->baseAddress), parent); diff --git a/ZAPD/ZAnimation.h b/ZAPD/ZAnimation.h index e6dc1e2..de57bca 100644 --- a/ZAPD/ZAnimation.h +++ b/ZAPD/ZAnimation.h @@ -53,7 +53,7 @@ public: std::string GetSourceTypeName() override; void ExtractFromXML(tinyxml2::XMLElement* reader, const std::vector<uint8_t>& nRawData, - const uint32_t nRawDataIndex, const std::string& nRelPath) override; + const uint32_t nRawDataIndex) override; protected: virtual void ParseRawData() override; @@ -71,7 +71,7 @@ public: std::string GetSourceTypeName() override; void ExtractFromXML(tinyxml2::XMLElement* reader, const std::vector<uint8_t>& nRawData, - const uint32_t nRawDataIndex, const std::string& nRelPath) override; + const uint32_t nRawDataIndex) override; protected: virtual void ParseRawData() override; @@ -134,7 +134,7 @@ public: void ParseXML(tinyxml2::XMLElement* reader) override; void ParseRawData() override; void ExtractFromXML(tinyxml2::XMLElement* reader, const std::vector<uint8_t>& nRawData, - const uint32_t nRawDataIndex, const std::string& nRelPath) override; + const uint32_t nRawDataIndex) override; void PreGenValues(const std::string& prefix); size_t GetRawDataSize() override; diff --git a/ZAPD/ZArray.cpp b/ZAPD/ZArray.cpp index ac9561b..ca440c9 100644 --- a/ZAPD/ZArray.cpp +++ b/ZAPD/ZArray.cpp @@ -69,7 +69,7 @@ size_t ZArray::GetRawDataSize() } void ZArray::ExtractFromXML(tinyxml2::XMLElement* reader, const std::vector<uint8_t>& nRawData, - const uint32_t nRawDataIndex, const std::string& nRelPath) + const uint32_t nRawDataIndex) { rawData = nRawData; rawDataIndex = nRawDataIndex; diff --git a/ZAPD/ZArray.h b/ZAPD/ZArray.h index ebad2a4..248a2a1 100644 --- a/ZAPD/ZArray.h +++ b/ZAPD/ZArray.h @@ -17,7 +17,7 @@ public: size_t GetRawDataSize() override; void ExtractFromXML(tinyxml2::XMLElement* reader, const std::vector<uint8_t>& nRawData, - const uint32_t nRawDataIndex, const std::string& nRelPath) override; + const uint32_t nRawDataIndex) override; protected: size_t arrayCnt; diff --git a/ZAPD/ZBackground.cpp b/ZAPD/ZBackground.cpp index cb7446d..a877c70 100644 --- a/ZAPD/ZBackground.cpp +++ b/ZAPD/ZBackground.cpp @@ -62,9 +62,9 @@ void ZBackground::ParseBinaryFile(const std::string& inFolder, bool appendOutNam } void ZBackground::ExtractFromXML(tinyxml2::XMLElement* reader, const std::vector<uint8_t>& nRawData, - uint32_t nRawDataIndex, const std::string& nRelPath) + uint32_t nRawDataIndex) { - ZResource::ExtractFromXML(reader, nRawData, nRawDataIndex, nRelPath); + ZResource::ExtractFromXML(reader, nRawData, nRawDataIndex); DeclareVar("", ""); } diff --git a/ZAPD/ZBackground.h b/ZAPD/ZBackground.h index 55cbf2b..000a2a1 100644 --- a/ZAPD/ZBackground.h +++ b/ZAPD/ZBackground.h @@ -16,7 +16,7 @@ public: void ParseRawData() override; void ParseBinaryFile(const std::string& inFolder, bool appendOutName); void ExtractFromXML(tinyxml2::XMLElement* reader, const std::vector<uint8_t>& nRawData, - uint32_t nRawDataIndex, const std::string& nRelPath) override; + uint32_t nRawDataIndex) override; void CheckValidJpeg(const std::string& filepath); diff --git a/ZAPD/ZBlob.cpp b/ZAPD/ZBlob.cpp index 53cd006..171433e 100644 --- a/ZAPD/ZBlob.cpp +++ b/ZAPD/ZBlob.cpp @@ -25,7 +25,7 @@ ZBlob::ZBlob(const std::vector<uint8_t>& nRawData, uint32_t nRawDataIndex, size_ } void ZBlob::ExtractFromXML(tinyxml2::XMLElement* reader, const std::vector<uint8_t>& nRawData, - const uint32_t nRawDataIndex, const std::string& nRelPath) + const uint32_t nRawDataIndex) { rawDataIndex = nRawDataIndex; @@ -33,7 +33,6 @@ void ZBlob::ExtractFromXML(tinyxml2::XMLElement* reader, const std::vector<uint8 long size = strtol(reader->Attribute("Size"), NULL, 16); rawData = vector<uint8_t>(nRawData.data() + rawDataIndex, nRawData.data() + rawDataIndex + size); - relativePath = std::move(nRelPath); } // Build Source File Mode diff --git a/ZAPD/ZBlob.h b/ZAPD/ZBlob.h index dda3e4e..bfc8a30 100644 --- a/ZAPD/ZBlob.h +++ b/ZAPD/ZBlob.h @@ -11,8 +11,7 @@ public: std::string nName, ZFile* nParent); void ExtractFromXML(tinyxml2::XMLElement* reader, const std::vector<uint8_t>& nRawData, - const uint32_t nRawDataIndex, - const std::string& nRelPath) override; // Extract Mode + const uint32_t nRawDataIndex) override; // Extract Mode static ZBlob* BuildFromXML(tinyxml2::XMLElement* reader, const std::string& inFolder, bool readFile); diff --git a/ZAPD/ZCollision.cpp b/ZAPD/ZCollision.cpp index 118ef79..f0c881d 100644 --- a/ZAPD/ZCollision.cpp +++ b/ZAPD/ZCollision.cpp @@ -28,9 +28,9 @@ ZResourceType ZCollisionHeader::GetResourceType() void ZCollisionHeader::ExtractFromXML(tinyxml2::XMLElement* reader, const std::vector<uint8_t>& nRawData, - const uint32_t nRawDataIndex, const std::string& nRelPath) + const uint32_t nRawDataIndex) { - ZResource::ExtractFromXML(reader, nRawData, nRawDataIndex, nRelPath); + ZResource::ExtractFromXML(reader, nRawData, nRawDataIndex); } void ZCollisionHeader::ParseRawData() diff --git a/ZAPD/ZCollision.h b/ZAPD/ZCollision.h index 7626da7..f58b56e 100644 --- a/ZAPD/ZCollision.h +++ b/ZAPD/ZCollision.h @@ -93,6 +93,6 @@ public: ZResourceType GetResourceType() override; void ExtractFromXML(tinyxml2::XMLElement* reader, const std::vector<uint8_t>& nRawData, - const uint32_t nRawDataIndex, const std::string& nRelPath) override; + const uint32_t nRawDataIndex) override; void ParseRawData() override; }; diff --git a/ZAPD/ZCutscene.cpp b/ZAPD/ZCutscene.cpp index d947f62..5ea58f8 100644 --- a/ZAPD/ZCutscene.cpp +++ b/ZAPD/ZCutscene.cpp @@ -155,9 +155,9 @@ size_t ZCutscene::GetRawDataSize() } void ZCutscene::ExtractFromXML(tinyxml2::XMLElement* reader, const std::vector<uint8_t>& nRawData, - const uint32_t nRawDataIndex, const std::string& nRelPath) + const uint32_t nRawDataIndex) { - ZResource::ExtractFromXML(reader, nRawData, nRawDataIndex, nRelPath); + ZResource::ExtractFromXML(reader, nRawData, nRawDataIndex); DeclareVar(parent->GetName(), ""); } diff --git a/ZAPD/ZCutscene.h b/ZAPD/ZCutscene.h index f5b68ea..1e5b699 100644 --- a/ZAPD/ZCutscene.h +++ b/ZAPD/ZCutscene.h @@ -433,7 +433,7 @@ public: ZResourceType GetResourceType() override; void ExtractFromXML(tinyxml2::XMLElement* reader, const std::vector<uint8_t>& nRawData, - const uint32_t nRawDataIndex, const std::string& nRelPath) override; + const uint32_t nRawDataIndex) override; protected: int32_t numCommands; diff --git a/ZAPD/ZCutsceneMM.cpp b/ZAPD/ZCutsceneMM.cpp index 0474b63..3277e57 100644 --- a/ZAPD/ZCutsceneMM.cpp +++ b/ZAPD/ZCutsceneMM.cpp @@ -62,9 +62,9 @@ size_t ZCutsceneMM::GetRawDataSize() } void ZCutsceneMM::ExtractFromXML(tinyxml2::XMLElement* reader, const std::vector<uint8_t>& nRawData, - const uint32_t nRawDataIndex, const std::string& nRelPath) + const uint32_t nRawDataIndex) { - ZResource::ExtractFromXML(reader, nRawData, nRawDataIndex, nRelPath); + ZResource::ExtractFromXML(reader, nRawData, nRawDataIndex); DeclareVar(parent->GetName(), ""); } diff --git a/ZAPD/ZCutsceneMM.h b/ZAPD/ZCutsceneMM.h index 97dae93..48d1cab 100644 --- a/ZAPD/ZCutsceneMM.h +++ b/ZAPD/ZCutsceneMM.h @@ -25,7 +25,7 @@ public: ZResourceType GetResourceType() override; void ExtractFromXML(tinyxml2::XMLElement* reader, const std::vector<uint8_t>& nRawData, - const uint32_t nRawDataIndex, const std::string& nRelPath) override; + const uint32_t nRawDataIndex) override; protected: int32_t numCommands; diff --git a/ZAPD/ZDisplayList.cpp b/ZAPD/ZDisplayList.cpp index dd4a02d..fafdd99 100644 --- a/ZAPD/ZDisplayList.cpp +++ b/ZAPD/ZDisplayList.cpp @@ -57,14 +57,13 @@ ZDisplayList::~ZDisplayList() // EXTRACT MODE void ZDisplayList::ExtractFromXML(tinyxml2::XMLElement* reader, const std::vector<uint8_t>& nRawData, - const uint32_t nRawDataIndex, const std::string& nRelPath) + const uint32_t nRawDataIndex) { rawDataIndex = nRawDataIndex; ParseXML(reader); // name = reader->Attribute("Name"); fileData = nRawData; - relativePath = nRelPath; int32_t rawDataSize = ZDisplayList::GetDListLength( nRawData, rawDataIndex, Globals::Instance->game == ZGame::OOT_SW97 ? DListType::F3DEX : DListType::F3DZEX); diff --git a/ZAPD/ZDisplayList.h b/ZAPD/ZDisplayList.h index f390720..41166ba 100644 --- a/ZAPD/ZDisplayList.h +++ b/ZAPD/ZDisplayList.h @@ -371,7 +371,7 @@ public: ~ZDisplayList(); void ExtractFromXML(tinyxml2::XMLElement* reader, const std::vector<uint8_t>& nRawData, - const uint32_t nRawDataIndex, const std::string& nRelPath) override; + const uint32_t nRawDataIndex) override; // static ZDisplayList* BuildFromXML(tinyxml2::XMLElement* reader, std::string inFolder, bool // readFile, ZFile* nParent); diff --git a/ZAPD/ZFile.cpp b/ZAPD/ZFile.cpp index ada9f38..b2a3996 100644 --- a/ZAPD/ZFile.cpp +++ b/ZAPD/ZFile.cpp @@ -192,7 +192,7 @@ void ZFile::ParseXML(ZFileMode mode, XMLElement* reader, std::string filename, b nRes->parent = this; if (mode == ZFileMode::Extract) - nRes->ExtractFromXML(child, rawData, rawDataIndex, folderName); + nRes->ExtractFromXML(child, rawData, rawDataIndex); // TODO: See if we can make this part of the ZRoom code... if (nRes->GetResourceType() == ZResourceType::Room) diff --git a/ZAPD/ZLimb.cpp b/ZAPD/ZLimb.cpp index d71d168..d903655 100644 --- a/ZAPD/ZLimb.cpp +++ b/ZAPD/ZLimb.cpp @@ -461,9 +461,9 @@ void ZLimb::ParseRawData() } void ZLimb::ExtractFromXML(tinyxml2::XMLElement* reader, const std::vector<uint8_t>& nRawData, - const uint32_t nRawDataIndex, const std::string& nRelPath) + const uint32_t nRawDataIndex) { - ZResource::ExtractFromXML(reader, nRawData, nRawDataIndex, nRelPath); + ZResource::ExtractFromXML(reader, nRawData, nRawDataIndex); segAddress = nRawDataIndex; parent->AddDeclaration(GetFileAddress(), DeclarationAlignment::None, GetRawDataSize(), diff --git a/ZAPD/ZLimb.h b/ZAPD/ZLimb.h index b923e6f..00d095c 100644 --- a/ZAPD/ZLimb.h +++ b/ZAPD/ZLimb.h @@ -151,7 +151,7 @@ public: void ParseXML(tinyxml2::XMLElement* reader) override; void ParseRawData() override; void ExtractFromXML(tinyxml2::XMLElement* reader, const std::vector<uint8_t>& nRawData, - const uint32_t nRawDataIndex, const std::string& nRelPath) override; + const uint32_t nRawDataIndex) override; size_t GetRawDataSize() override; std::string GetSourceOutputCode(const std::string& prefix) override; std::string GetSourceTypeName() override; diff --git a/ZAPD/ZMtx.cpp b/ZAPD/ZMtx.cpp index 9a90c29..6da80a8 100644 --- a/ZAPD/ZMtx.cpp +++ b/ZAPD/ZMtx.cpp @@ -14,7 +14,7 @@ ZMtx::ZMtx(const std::string& prefix, const std::vector<uint8_t>& nRawData, uint : ZResource(nParent) { name = GetDefaultName(prefix.c_str(), rawDataIndex); - ExtractFromFile(nRawData, nRawDataIndex, ""); + ExtractFromFile(nRawData, nRawDataIndex); DeclareVar("", ""); } @@ -28,9 +28,9 @@ void ZMtx::ParseRawData() } void ZMtx::ExtractFromXML(tinyxml2::XMLElement* reader, const std::vector<uint8_t>& nRawData, - uint32_t nRawDataIndex, const std::string& nRelPath) + uint32_t nRawDataIndex) { - ZResource::ExtractFromXML(reader, nRawData, nRawDataIndex, nRelPath); + ZResource::ExtractFromXML(reader, nRawData, nRawDataIndex); DeclareVar("", ""); } diff --git a/ZAPD/ZMtx.h b/ZAPD/ZMtx.h index 5888882..c9ed6de 100644 --- a/ZAPD/ZMtx.h +++ b/ZAPD/ZMtx.h @@ -16,7 +16,7 @@ public: ZFile* nParent); void ParseRawData() override; void ExtractFromXML(tinyxml2::XMLElement* reader, const std::vector<uint8_t>& nRawData, - uint32_t nRawDataIndex, const std::string& nRelPath) override; + uint32_t nRawDataIndex) override; size_t GetRawDataSize() override; diff --git a/ZAPD/ZResource.cpp b/ZAPD/ZResource.cpp index 9e16f27..466b3ab 100644 --- a/ZAPD/ZResource.cpp +++ b/ZAPD/ZResource.cpp @@ -10,7 +10,6 @@ ZResource::ZResource(ZFile* nParent) parent = nParent; name = ""; outName = ""; - relativePath = ""; sourceOutput = ""; rawData = vector<uint8_t>(); rawDataIndex = 0; @@ -18,11 +17,10 @@ ZResource::ZResource(ZFile* nParent) } void ZResource::ExtractFromXML(tinyxml2::XMLElement* reader, const std::vector<uint8_t>& nRawData, - const uint32_t nRawDataIndex, const std::string& nRelPath) + const uint32_t nRawDataIndex) { rawData = nRawData; rawDataIndex = nRawDataIndex; - relativePath = nRelPath; if (reader != nullptr) ParseXML(reader); @@ -30,12 +28,10 @@ void ZResource::ExtractFromXML(tinyxml2::XMLElement* reader, const std::vector<u ParseRawData(); } -void ZResource::ExtractFromFile(const std::vector<uint8_t>& nRawData, uint32_t nRawDataIndex, - const std::string& nRelPath) +void ZResource::ExtractFromFile(const std::vector<uint8_t>& nRawData, uint32_t nRawDataIndex) { rawData = nRawData; rawDataIndex = nRawDataIndex; - relativePath = nRelPath; ParseRawData(); } @@ -124,11 +120,6 @@ std::string ZResource::GetExternalExtension() return ""; } -string ZResource::GetRelativePath() -{ - return relativePath; -} - vector<uint8_t> ZResource::GetRawData() { return rawData; diff --git a/ZAPD/ZResource.h b/ZAPD/ZResource.h index 53e2486..5b411d2 100644 --- a/ZAPD/ZResource.h +++ b/ZAPD/ZResource.h @@ -58,10 +58,8 @@ public: // Parsing from File virtual void ExtractFromXML(tinyxml2::XMLElement* reader, const std::vector<uint8_t>& nRawData, - const uint32_t nRawDataIndex, - const std::string& nRelPath); // Extract Mode - virtual void ExtractFromFile(const std::vector<uint8_t>& nRawData, uint32_t nRawDataIndex, - const std::string& nRelPath); + const uint32_t nRawDataIndex); // Extract Mode + virtual void ExtractFromFile(const std::vector<uint8_t>& nRawData, uint32_t nRawDataIndex); // Misc virtual void ParseXML(tinyxml2::XMLElement* reader); @@ -85,7 +83,6 @@ public: void SetName(std::string nName); std::string GetOutName(); void SetOutName(std::string nName); - std::string GetRelativePath(); virtual uint32_t GetRawDataIndex(); virtual void SetRawDataIndex(uint32_t value); virtual size_t GetRawDataSize(); @@ -95,7 +92,6 @@ public: protected: std::string name; std::string outName; - std::string relativePath; std::vector<uint8_t> rawData; uint32_t rawDataIndex; std::string sourceOutput; diff --git a/ZAPD/ZRoom/Commands/SetCutscenes.cpp b/ZAPD/ZRoom/Commands/SetCutscenes.cpp index b342e86..345dca1 100644 --- a/ZAPD/ZRoom/Commands/SetCutscenes.cpp +++ b/ZAPD/ZRoom/Commands/SetCutscenes.cpp @@ -18,7 +18,7 @@ SetCutscenes::SetCutscenes(ZRoom* nZRoom, std::vector<uint8_t> rawData, uint32_t if (Globals::Instance->game == ZGame::OOT_RETAIL || Globals::Instance->game == ZGame::OOT_SW97) { ZCutscene* cutscene = new ZCutscene(nZRoom->parent); - cutscene->ExtractFromFile(rawData, segmentOffset, ""); + cutscene->ExtractFromFile(rawData, segmentOffset); auto decl = nZRoom->parent->GetDeclaration(segmentOffset); if (decl == nullptr) @@ -48,8 +48,7 @@ SetCutscenes::SetCutscenes(ZRoom* nZRoom, std::vector<uint8_t> rawData, uint32_t ZCutsceneMM* cutscene = new ZCutsceneMM(nZRoom->parent); cutscene->ExtractFromXML( - nullptr, rawData, entry->segmentOffset, - ""); // TODO: Use ExtractFromFile() here when that gets implemented + nullptr, rawData, entry->segmentOffset); // TODO: Use ExtractFromFile() here when that gets implemented cutscenes.push_back(cutscene); } diff --git a/ZAPD/ZRoom/ZRoom.cpp b/ZAPD/ZRoom/ZRoom.cpp index 9dcaee6..de73b97 100644 --- a/ZAPD/ZRoom/ZRoom.cpp +++ b/ZAPD/ZRoom/ZRoom.cpp @@ -69,9 +69,9 @@ ZRoom::~ZRoom() } void ZRoom::ExtractFromXML(tinyxml2::XMLElement* reader, const std::vector<uint8_t>& nRawData, - const uint32_t nRawDataIndex, const std::string& nRelPath) + const uint32_t nRawDataIndex) { - ZResource::ExtractFromXML(reader, nRawData, nRawDataIndex, nRelPath); + ZResource::ExtractFromXML(reader, nRawData, nRawDataIndex); // room->scene = nScene; scene = Globals::Instance->lastScene; @@ -125,7 +125,7 @@ void ZRoom::ExtractFromXML(tinyxml2::XMLElement* reader, const std::vector<uint8 // ZCutscene* cutscene = new ZCutscene(rawData, address, 9999, parent); ZCutscene* cutscene = new ZCutscene(parent); - cutscene->ExtractFromXML(child, rawData, address, ""); + cutscene->ExtractFromXML(child, rawData, address); cutscene->GetSourceOutputCode(name); diff --git a/ZAPD/ZRoom/ZRoom.h b/ZAPD/ZRoom/ZRoom.h index b1fe869..1068ee2 100644 --- a/ZAPD/ZRoom/ZRoom.h +++ b/ZAPD/ZRoom/ZRoom.h @@ -31,7 +31,7 @@ public: virtual ~ZRoom(); void ExtractFromXML(tinyxml2::XMLElement* reader, const std::vector<uint8_t>& nRawData, - const uint32_t nRawDataIndex, const std::string& nRelPath) override; + const uint32_t nRawDataIndex) override; void ParseCommands(std::vector<ZRoomCommand*>& commandList, CommandSet commandSet); size_t GetDeclarationSizeFromNeighbor(int32_t declarationAddress); size_t GetCommandSizeFromNeighbor(ZRoomCommand* cmd); diff --git a/ZAPD/ZScalar.cpp b/ZAPD/ZScalar.cpp index af48dc3..5d6fce0 100644 --- a/ZAPD/ZScalar.cpp +++ b/ZAPD/ZScalar.cpp @@ -19,9 +19,9 @@ ZScalar::ZScalar(const ZScalarType scalarType, ZFile* nParent) : ZScalar(nParent } void ZScalar::ExtractFromXML(tinyxml2::XMLElement* reader, const std::vector<uint8_t>& nRawData, - const uint32_t nRawDataIndex, const std::string& nRelPath) + const uint32_t nRawDataIndex) { - ZResource::ExtractFromXML(reader, nRawData, nRawDataIndex, nRelPath); + ZResource::ExtractFromXML(reader, nRawData, nRawDataIndex); } void ZScalar::ParseXML(tinyxml2::XMLElement* reader) diff --git a/ZAPD/ZScalar.h b/ZAPD/ZScalar.h index 92d6365..434e90a 100644 --- a/ZAPD/ZScalar.h +++ b/ZAPD/ZScalar.h @@ -56,7 +56,7 @@ public: void ParseRawData() override; void ExtractFromXML(tinyxml2::XMLElement* reader, const std::vector<uint8_t>& nRawData, - const uint32_t nRawDataIndex, const std::string& nRelPath) override; + const uint32_t nRawDataIndex) override; static size_t MapTypeToSize(const ZScalarType scalarType); static ZScalarType MapOutputTypeToScalarType(const std::string& type); static std::string MapScalarTypeToOutputType(const ZScalarType scalarType); diff --git a/ZAPD/ZSkeleton.cpp b/ZAPD/ZSkeleton.cpp index a635be5..3838450 100644 --- a/ZAPD/ZSkeleton.cpp +++ b/ZAPD/ZSkeleton.cpp @@ -124,9 +124,9 @@ void ZSkeleton::ParseRawData() } void ZSkeleton::ExtractFromXML(tinyxml2::XMLElement* reader, const std::vector<uint8_t>& nRawData, - const uint32_t nRawDataIndex, const std::string& nRelPath) + const uint32_t nRawDataIndex) { - ZResource::ExtractFromXML(reader, nRawData, nRawDataIndex, nRelPath); + ZResource::ExtractFromXML(reader, nRawData, nRawDataIndex); parent->AddDeclaration(rawDataIndex, DeclarationAlignment::Align16, GetRawDataSize(), GetSourceTypeName(), name, ""); @@ -143,7 +143,7 @@ void ZSkeleton::ExtractFromXML(tinyxml2::XMLElement* reader, const std::vector<u ZLimb* limb = new ZLimb(parent); limb->SetLimbType(limbType); limb->SetName(StringHelper::Sprintf("%sLimb_%06X", defaultPrefix.c_str(), ptr2)); - limb->ExtractFromXML(nullptr, rawData, ptr2, nRelPath); + limb->ExtractFromXML(nullptr, rawData, ptr2); limbs.push_back(limb); ptr += 4; diff --git a/ZAPD/ZSkeleton.h b/ZAPD/ZSkeleton.h index d930144..400d6c1 100644 --- a/ZAPD/ZSkeleton.h +++ b/ZAPD/ZSkeleton.h @@ -31,7 +31,7 @@ public: void ParseXML(tinyxml2::XMLElement* reader) override; void ParseRawData() override; void ExtractFromXML(tinyxml2::XMLElement* reader, const std::vector<uint8_t>& nRawData, - const uint32_t nRawDataIndex, const std::string& nRelPath) override; + const uint32_t nRawDataIndex) override; void Save(const std::string& outFolder) override; void GenerateHLIntermediette(HLFileIntermediette& hlFile) override; diff --git a/ZAPD/ZSymbol.cpp b/ZAPD/ZSymbol.cpp index 811c759..1a5779a 100644 --- a/ZAPD/ZSymbol.cpp +++ b/ZAPD/ZSymbol.cpp @@ -9,9 +9,9 @@ ZSymbol::ZSymbol(ZFile* nParent) : ZResource(nParent) } void ZSymbol::ExtractFromXML(tinyxml2::XMLElement* reader, const std::vector<uint8_t>& nRawData, - const uint32_t nRawDataIndex, const std::string& nRelPath) + const uint32_t nRawDataIndex) { - ZResource::ExtractFromXML(reader, nRawData, nRawDataIndex, nRelPath); + ZResource::ExtractFromXML(reader, nRawData, nRawDataIndex); } void ZSymbol::ParseXML(tinyxml2::XMLElement* reader) diff --git a/ZAPD/ZSymbol.h b/ZAPD/ZSymbol.h index 1ad906f..f0a6397 100644 --- a/ZAPD/ZSymbol.h +++ b/ZAPD/ZSymbol.h @@ -15,7 +15,7 @@ public: ZSymbol(ZFile* nParent); void ExtractFromXML(tinyxml2::XMLElement* reader, const std::vector<uint8_t>& nRawData, - const uint32_t nRawDataIndex, const std::string& nRelPath) override; + const uint32_t nRawDataIndex) override; void ParseXML(tinyxml2::XMLElement* reader) override; diff --git a/ZAPD/ZTexture.cpp b/ZAPD/ZTexture.cpp index 3bdf270..ebd7c55 100644 --- a/ZAPD/ZTexture.cpp +++ b/ZAPD/ZTexture.cpp @@ -49,15 +49,13 @@ ZTexture::~ZTexture() } void ZTexture::ExtractFromXML(tinyxml2::XMLElement* reader, const std::vector<uint8_t>& nRawData, - const uint32_t nRawDataIndex, const std::string& nRelPath) + const uint32_t nRawDataIndex) { ParseXML(reader); rawDataIndex = nRawDataIndex; rawData = vector<uint8_t>(nRawData.data() + rawDataIndex, nRawData.data() + rawDataIndex + GetRawDataSize()); - relativePath = nRelPath; - FixRawData(); PrepareBitmap(); } @@ -840,8 +838,7 @@ void ZTexture::Save(const std::string& outFolder) string ZTexture::GetSourceOutputCode(const std::string& prefix) { sourceOutput = ""; - - relativePath = "build/assets/" + relativePath; + FixRawData(); uint8_t* rawDataArr = rawData.data(); diff --git a/ZAPD/ZTexture.h b/ZAPD/ZTexture.h index b0a5a85..ef87441 100644 --- a/ZAPD/ZTexture.h +++ b/ZAPD/ZTexture.h @@ -33,8 +33,7 @@ protected: void ParseXML(tinyxml2::XMLElement* reader) override; void FixRawData(); void ExtractFromXML(tinyxml2::XMLElement* reader, const std::vector<uint8_t>& nRawData, - const uint32_t nRawDataIndex, - const std::string& nRelPath) override; // Extract Mode + const uint32_t nRawDataIndex) override; // Extract Mode void PrepareBitmap(); void PrepareBitmapRGBA16(); diff --git a/ZAPD/ZVector.cpp b/ZAPD/ZVector.cpp index 160d2aa..c84e4c6 100644 --- a/ZAPD/ZVector.cpp +++ b/ZAPD/ZVector.cpp @@ -29,9 +29,9 @@ void ZVector::ClearScalars() } void ZVector::ExtractFromXML(tinyxml2::XMLElement* reader, const std::vector<uint8_t>& nRawData, - const uint32_t nRawDataIndex, const std::string& nRelPath) + const uint32_t nRawDataIndex) { - ZResource::ExtractFromXML(reader, nRawData, nRawDataIndex, nRelPath); + ZResource::ExtractFromXML(reader, nRawData, nRawDataIndex); } void ZVector::ParseXML(tinyxml2::XMLElement* reader) diff --git a/ZAPD/ZVector.h b/ZAPD/ZVector.h index 50dd478..a808835 100644 --- a/ZAPD/ZVector.h +++ b/ZAPD/ZVector.h @@ -27,7 +27,7 @@ public: ZResourceType GetResourceType() override; void ExtractFromXML(tinyxml2::XMLElement* reader, const std::vector<uint8_t>& nRawData, - const uint32_t nRawDataIndex, const std::string& nRelPath) override; + const uint32_t nRawDataIndex) override; private: void ClearScalars(); diff --git a/ZAPD/ZVtx.cpp b/ZAPD/ZVtx.cpp index b48015d..4c80895 100644 --- a/ZAPD/ZVtx.cpp +++ b/ZAPD/ZVtx.cpp @@ -86,7 +86,7 @@ std::string ZVtx::GetExternalExtension() } void ZVtx::ExtractFromXML(tinyxml2::XMLElement* reader, const std::vector<uint8_t>& nRawData, - const uint32_t nRawDataIndex, const std::string& nRelPath) + const uint32_t nRawDataIndex) { - ZResource::ExtractFromXML(reader, nRawData, nRawDataIndex, nRelPath); + ZResource::ExtractFromXML(reader, nRawData, nRawDataIndex); } diff --git a/ZAPD/ZVtx.h b/ZAPD/ZVtx.h index dadf838..d400d44 100644 --- a/ZAPD/ZVtx.h +++ b/ZAPD/ZVtx.h @@ -28,7 +28,7 @@ public: virtual std::string GetExternalExtension() override; void ExtractFromXML(tinyxml2::XMLElement* reader, const std::vector<uint8_t>& nRawData, - const uint32_t nRawDataIndex, const std::string& nRelPath) override; + const uint32_t nRawDataIndex) override; protected: };
\ No newline at end of file |
