From 7024214000b323b85af96d4c053ef2687bd4b5f3 Mon Sep 17 00:00:00 2001 From: louis Date: Sun, 28 Jan 2024 19:59:40 -0500 Subject: [PATCH 1/2] format --- ZAPD/OtherStructs/CutsceneMM_Commands.cpp | 51 +++++++++------ ZAPD/OtherStructs/CutsceneMM_Commands.h | 16 +++-- ZAPD/ZCKeyFrame.cpp | 80 ++++++++++------------- ZAPD/ZCKeyFrame.h | 12 ++-- ZAPD/ZCKeyFrameAnim.cpp | 26 ++++---- ZAPD/ZCkeyFrameAnim.h | 6 +- 6 files changed, 97 insertions(+), 94 deletions(-) diff --git a/ZAPD/OtherStructs/CutsceneMM_Commands.cpp b/ZAPD/OtherStructs/CutsceneMM_Commands.cpp index b47bc40e..5a10ab41 100644 --- a/ZAPD/OtherStructs/CutsceneMM_Commands.cpp +++ b/ZAPD/OtherStructs/CutsceneMM_Commands.cpp @@ -127,8 +127,9 @@ std::string CutsceneMMCommand_GenericCmd::GetCommandMacro() const /**** CAMERA ****/ -CutsceneSubCommandEntry_SplineCamPoint::CutsceneSubCommandEntry_SplineCamPoint(const std::vector& rawData, - offset_t rawDataIndex): CutsceneSubCommandEntry(rawData, rawDataIndex) +CutsceneSubCommandEntry_SplineCamPoint::CutsceneSubCommandEntry_SplineCamPoint( + const std::vector& rawData, offset_t rawDataIndex) + : CutsceneSubCommandEntry(rawData, rawDataIndex) { interpType = BitConverter::ToUInt8BE(rawData, rawDataIndex + 0); weight = BitConverter::ToUInt8BE(rawData, rawDataIndex + 1); @@ -144,7 +145,9 @@ std::string CutsceneSubCommandEntry_SplineCamPoint::GetBodySourceCode() const const auto interpTypeMap = &Globals::Instance->cfg.enumData.interpType; const auto relToMap = &Globals::Instance->cfg.enumData.relTo; - return StringHelper::Sprintf("CS_CAM_POINT(%s, 0x%02X, 0x%04X, 0x%04X, 0x%04X, 0x%04X, %s)", interpTypeMap->at(interpType).c_str(), weight, duration, posX, posY, posZ, relToMap->at(relTo).c_str()); + return StringHelper::Sprintf("CS_CAM_POINT(%s, 0x%02X, 0x%04X, 0x%04X, 0x%04X, 0x%04X, %s)", + interpTypeMap->at(interpType).c_str(), weight, duration, posX, + posY, posZ, relToMap->at(relTo).c_str()); } size_t CutsceneSubCommandEntry_SplineCamPoint::GetRawSize() const @@ -152,9 +155,9 @@ size_t CutsceneSubCommandEntry_SplineCamPoint::GetRawSize() const return 0x0C; } - -CutsceneSubCommandEntry_SplineMiscPoint::CutsceneSubCommandEntry_SplineMiscPoint(const std::vector& rawData, - offset_t rawDataIndex): CutsceneSubCommandEntry(rawData, rawDataIndex) +CutsceneSubCommandEntry_SplineMiscPoint::CutsceneSubCommandEntry_SplineMiscPoint( + const std::vector& rawData, offset_t rawDataIndex) + : CutsceneSubCommandEntry(rawData, rawDataIndex) { unused0 = BitConverter::ToUInt16BE(rawData, rawDataIndex + 0); roll = BitConverter::ToUInt16BE(rawData, rawDataIndex + 2); @@ -164,7 +167,8 @@ CutsceneSubCommandEntry_SplineMiscPoint::CutsceneSubCommandEntry_SplineMiscPoint std::string CutsceneSubCommandEntry_SplineMiscPoint::GetBodySourceCode() const { - return StringHelper::Sprintf("CS_CAM_MISC(0x%04X, 0x%04X, 0x%04X, 0x%04X)", unused0, roll, fov, unused1); + return StringHelper::Sprintf("CS_CAM_MISC(0x%04X, 0x%04X, 0x%04X, 0x%04X)", unused0, roll, fov, + unused1); } size_t CutsceneSubCommandEntry_SplineMiscPoint::GetRawSize() const @@ -172,8 +176,9 @@ size_t CutsceneSubCommandEntry_SplineMiscPoint::GetRawSize() const return 0x08; } -CutsceneSubCommandEntry_SplineHeader::CutsceneSubCommandEntry_SplineHeader(const std::vector& rawData, - offset_t rawDataIndex): CutsceneSubCommandEntry(rawData, rawDataIndex) +CutsceneSubCommandEntry_SplineHeader::CutsceneSubCommandEntry_SplineHeader( + const std::vector& rawData, offset_t rawDataIndex) + : CutsceneSubCommandEntry(rawData, rawDataIndex) { numEntries = BitConverter::ToUInt16BE(rawData, rawDataIndex + 0); unused0 = BitConverter::ToUInt16BE(rawData, rawDataIndex + 2); @@ -183,8 +188,8 @@ CutsceneSubCommandEntry_SplineHeader::CutsceneSubCommandEntry_SplineHeader(const std::string CutsceneSubCommandEntry_SplineHeader::GetBodySourceCode() const { - return StringHelper::Sprintf("CS_CAM_SPLINE(0x%04X, 0x%04X, 0x%04X, 0x%04X)", numEntries, unused0, unused1, duration); - + return StringHelper::Sprintf("CS_CAM_SPLINE(0x%04X, 0x%04X, 0x%04X, 0x%04X)", numEntries, + unused0, unused1, duration); } size_t CutsceneSubCommandEntry_SplineHeader::GetRawSize() const @@ -192,16 +197,19 @@ size_t CutsceneSubCommandEntry_SplineHeader::GetRawSize() const return 0x08; } -CutsceneSubCommandEntry_SplineFooter::CutsceneSubCommandEntry_SplineFooter(const std::vector& rawData, - offset_t rawDataIndex): CutsceneSubCommandEntry(rawData, rawDataIndex) +CutsceneSubCommandEntry_SplineFooter::CutsceneSubCommandEntry_SplineFooter( + const std::vector& rawData, offset_t rawDataIndex) + : CutsceneSubCommandEntry(rawData, rawDataIndex) { uint16_t firstHalfWord = BitConverter::ToUInt16BE(rawData, rawDataIndex); uint16_t secondHalfWord = BitConverter::ToUInt16BE(rawData, rawDataIndex + 2); - if (firstHalfWord != 0xFFFF || secondHalfWord != 4) { + if (firstHalfWord != 0xFFFF || secondHalfWord != 4) + { HANDLE_ERROR(WarningType::InvalidExtractedData, "Invalid Spline Footer", - StringHelper::Sprintf("Invalid Spline footer. Was expecting 0xFFFF, 0x0004. Got 0x%04X, 0x%04X", - firstHalfWord, secondHalfWord)); + StringHelper::Sprintf( + "Invalid Spline footer. Was expecting 0xFFFF, 0x0004. Got 0x%04X, 0x%04X", + firstHalfWord, secondHalfWord)); } } @@ -223,8 +231,10 @@ CutsceneMMCommand_Spline::CutsceneMMCommand_Spline(const std::vector& r totalCommands = 0; rawDataIndex += 4; - while(1) { - if (BitConverter::ToUInt16BE(rawData, rawDataIndex) == 0xFFFF) { + while (1) + { + if (BitConverter::ToUInt16BE(rawData, rawDataIndex) == 0xFFFF) + { break; } numHeaders++; @@ -232,7 +242,7 @@ CutsceneMMCommand_Spline::CutsceneMMCommand_Spline(const std::vector& r auto* header = new CutsceneSubCommandEntry_SplineHeader(rawData, rawDataIndex); rawDataIndex += header->GetRawSize(); entries.push_back(header); - + totalCommands += header->numEntries; for (uint32_t i = 0; i < header->numEntries; i++) @@ -269,7 +279,8 @@ std::string CutsceneMMCommand_Spline::GetCommandMacro() const size_t CutsceneMMCommand_Spline::GetCommandSize() const { - // 8 Bytes once for the spline command, 8 Bytes per spline the header, two groups of size 12, 1 group of size 8, 4 bytes for the footer. + // 8 Bytes once for the spline command, 8 Bytes per spline the header, two groups of size 12, 1 + // group of size 8, 4 bytes for the footer. return 8 + (8 * numHeaders) + ((totalCommands * 2) * 0xC) + (totalCommands * 8) + 4; } diff --git a/ZAPD/OtherStructs/CutsceneMM_Commands.h b/ZAPD/OtherStructs/CutsceneMM_Commands.h index 9891a24a..597f6788 100644 --- a/ZAPD/OtherStructs/CutsceneMM_Commands.h +++ b/ZAPD/OtherStructs/CutsceneMM_Commands.h @@ -282,7 +282,8 @@ class CutsceneSubCommandEntry_SplineCamPoint : public CutsceneSubCommandEntry uint16_t posZ; uint16_t relTo; - CutsceneSubCommandEntry_SplineCamPoint(const std::vector& rawData, offset_t rawDataIndex); + CutsceneSubCommandEntry_SplineCamPoint(const std::vector& rawData, + offset_t rawDataIndex); std::string GetBodySourceCode() const override; @@ -296,8 +297,9 @@ class CutsceneSubCommandEntry_SplineMiscPoint : public CutsceneSubCommandEntry uint16_t roll; uint16_t fov; uint16_t unused1; - - CutsceneSubCommandEntry_SplineMiscPoint(const std::vector& rawData, offset_t rawDataIndex); + + CutsceneSubCommandEntry_SplineMiscPoint(const std::vector& rawData, + offset_t rawDataIndex); std::string GetBodySourceCode() const override; @@ -306,8 +308,9 @@ class CutsceneSubCommandEntry_SplineMiscPoint : public CutsceneSubCommandEntry class CutsceneSubCommandEntry_SplineFooter : public CutsceneSubCommandEntry { -public: - CutsceneSubCommandEntry_SplineFooter(const std::vector& rawData, offset_t rawDataIndex); +public: + CutsceneSubCommandEntry_SplineFooter(const std::vector& rawData, + offset_t rawDataIndex); std::string GetBodySourceCode() const override; @@ -321,7 +324,8 @@ class CutsceneSubCommandEntry_SplineHeader : public CutsceneSubCommandEntry uint16_t unused0; uint16_t unused1; uint16_t duration; - CutsceneSubCommandEntry_SplineHeader(const std::vector& rawData, offset_t rawDataIndex); + CutsceneSubCommandEntry_SplineHeader(const std::vector& rawData, + offset_t rawDataIndex); std::string GetBodySourceCode() const override; diff --git a/ZAPD/ZCKeyFrame.cpp b/ZAPD/ZCKeyFrame.cpp index ece78368..4c884dea 100644 --- a/ZAPD/ZCKeyFrame.cpp +++ b/ZAPD/ZCKeyFrame.cpp @@ -21,7 +21,6 @@ ZKeyFrameLimb::ZKeyFrameLimb(ZFile* nParent) : ZResource(nParent) { } - ZKeyFrameStandardLimb::ZKeyFrameStandardLimb(ZFile* nParent) : ZKeyFrameLimb(nParent) { } @@ -54,15 +53,13 @@ void ZKeyFrameSkel::ParseXML(tinyxml2::XMLElement* reader) ZResource::ParseXML(reader); std::string limbTypeStr = registeredAttributes.at("LimbType").value; - + limbType = ZKeyFrameLimbList::ParseLimbTypeStr(limbTypeStr); if (limbType == ZKeyframeSkelType::Error) HANDLE_ERROR_RESOURCE( WarningType::InvalidXML, parent, this, rawDataIndex, "Invalid limb type", StringHelper::Sprintf("Invalid limb type. Was expecting 'Flex' or 'Normal'. Got %s.", limbTypeStr.c_str())); - - } void ZKeyFrameLimbList::ParseXML(tinyxml2::XMLElement* reader) { @@ -77,7 +74,7 @@ void ZKeyFrameLimbList::ParseXML(tinyxml2::XMLElement* reader) HANDLE_ERROR_RESOURCE( WarningType::InvalidXML, parent, this, rawDataIndex, "Invalid limb type", StringHelper::Sprintf("Invalid limb type. Was expecting 'Flex' or 'Normal'. Got %s.", - limbTypeStr.c_str())); + limbTypeStr.c_str())); numLimbs = (uint8_t)StringHelper::StrToL(numLimbStr); } @@ -90,7 +87,7 @@ void ZKeyFrameSkel::ParseRawData() limbCount = BitConverter::ToUInt8BE(rawData, rawDataIndex + 0); dListCount = BitConverter::ToUInt8BE(rawData, rawDataIndex + 1); limbsPtr = BitConverter::ToUInt32BE(rawData, rawDataIndex + 4); - + limbList = std::make_unique(parent, limbCount, limbType); limbList->SetRawDataIndex(GETSEGOFFSET(limbsPtr)); limbList->ParseRawData(); @@ -106,25 +103,24 @@ void ZKeyFrameSkel::DeclareReferences(const std::string& prefix) ZResource::DeclareReferences(defaultPrefix); declaration += limbList->GetBodySourceCode(); - parent->AddDeclarationArray(GETSEGOFFSET(limbsPtr), DeclarationAlignment::Align4, limbList->GetRawDataSize(), + parent->AddDeclarationArray( + GETSEGOFFSET(limbsPtr), DeclarationAlignment::Align4, limbList->GetRawDataSize(), limbList->GetSourceTypeName(), - StringHelper::Sprintf("%s_KeyFrameLimbs_%06X", prefix.c_str(), rawDataIndex),limbList->limbs.size(), - declaration); + StringHelper::Sprintf("%s_KeyFrameLimbs_%06X", prefix.c_str(), rawDataIndex), + limbList->limbs.size(), declaration); } std::string ZKeyFrameSkel::GetBodySourceCode() const { - std::string limbStr; if (limbType == ZKeyframeSkelType::Normal) Globals::Instance->GetSegmentedPtrName(limbsPtr, parent, "KeyFrameStandardLimb", limbStr); - else + else Globals::Instance->GetSegmentedPtrName(limbsPtr, parent, "KeyFrameFlexLimb", limbStr); - - - return StringHelper::Sprintf("\n\t0x%02X, 0x%02X, %s\n", limbCount, dListCount, limbStr.c_str()); + return StringHelper::Sprintf("\n\t0x%02X, 0x%02X, %s\n", limbCount, dListCount, + limbStr.c_str()); } size_t ZKeyFrameSkel::GetRawDataSize() const @@ -142,13 +138,11 @@ ZResourceType ZKeyFrameSkel::GetResourceType() const return ZResourceType::KeyFrameSkel; } - size_t ZKeyFrameStandardLimb::GetRawDataSize() const { return 0xC; } - size_t ZKeyFrameFlexLimb::GetRawDataSize() const { return 0x8; @@ -161,7 +155,7 @@ size_t ZKeyFrameLimbList::GetRawDataSize() const limbSize = 8; else limbSize = 0xC; - + return limbSize * numLimbs; } @@ -184,11 +178,10 @@ void ZKeyFrameLimb::ParseRawData() flags = BitConverter::ToUInt8BE(rawData, rawDataIndex + 0x5); } - void ZKeyFrameStandardLimb::ParseRawData() { const auto& rawData = parent->GetRawData(); - + ZKeyFrameLimb::ParseRawData(); translation.x = BitConverter::ToUInt16BE(rawData, rawDataIndex + 0x6); translation.y = BitConverter::ToUInt16BE(rawData, rawDataIndex + 0x8); @@ -196,9 +189,9 @@ void ZKeyFrameStandardLimb::ParseRawData() } void ZKeyFrameFlexLimb::ParseRawData() -{ +{ const auto& rawData = parent->GetRawData(); - + ZKeyFrameLimb::ParseRawData(); callbackIndex = BitConverter::ToUInt8BE(rawData, rawDataIndex + 0x6); } @@ -239,26 +232,25 @@ std::string ZKeyFrameStandardLimb::GetBodySourceCode() const Globals::Instance->GetSegmentedArrayIndexedName(dlist, 8, parent, "Gfx", dlString); - declaration += StringHelper::Sprintf("%s, 0x%02X, 0x%02X, { 0x%04X, 0x%04X, 0x%04X},", dlString.c_str(), numChildren, flags, translation.x, translation.y, translation.z); + declaration += + StringHelper::Sprintf("%s, 0x%02X, 0x%02X, { 0x%04X, 0x%04X, 0x%04X},", dlString.c_str(), + numChildren, flags, translation.x, translation.y, translation.z); return declaration; } std::string ZKeyFrameFlexLimb::GetBodySourceCode() const { std::string declaration; - + std::string dlString; Globals::Instance->GetSegmentedArrayIndexedName(dlist, 8, parent, "Gfx", dlString); - declaration += - StringHelper::Sprintf("%s, 0x%02X, 0x%02X, 0x%02X", dlString.c_str(), - numChildren, flags, callbackIndex); + declaration += StringHelper::Sprintf("%s, 0x%02X, 0x%02X, 0x%02X", dlString.c_str(), + numChildren, flags, callbackIndex); return declaration; } - - std::string ZKeyFrameStandardLimb::GetSourceTypeName() const { return "KeyFrameStandardLimb"; @@ -273,14 +265,14 @@ std::string ZKeyFrameLimbList::GetSourceTypeName() const { switch (limbType) { - case ZKeyframeSkelType::Flex: - return "KeyFrameFlexLimb"; - case ZKeyframeSkelType::Normal: - return "KeyFrameStandardLimb"; - default: - HANDLE_ERROR_RESOURCE(WarningType::InvalidXML, parent, this, rawDataIndex, - "Invalid limb type", ""); - break; + case ZKeyframeSkelType::Flex: + return "KeyFrameFlexLimb"; + case ZKeyframeSkelType::Normal: + return "KeyFrameStandardLimb"; + default: + HANDLE_ERROR_RESOURCE(WarningType::InvalidXML, parent, this, rawDataIndex, + "Invalid limb type", ""); + break; } } @@ -298,13 +290,13 @@ ZResourceType ZKeyFrameLimbList::GetResourceType() const { switch (limbType) { - case ZKeyframeSkelType::Flex: - return ZResourceType::KeyFrameFlexLimb; - case ZKeyframeSkelType::Normal: - return ZResourceType::KeyFrameStandardLimb; - default: - HANDLE_ERROR_RESOURCE(WarningType::InvalidXML, parent, this, rawDataIndex, - "Invalid limb type", ""); - break; + case ZKeyframeSkelType::Flex: + return ZResourceType::KeyFrameFlexLimb; + case ZKeyframeSkelType::Normal: + return ZResourceType::KeyFrameStandardLimb; + default: + HANDLE_ERROR_RESOURCE(WarningType::InvalidXML, parent, this, rawDataIndex, + "Invalid limb type", ""); + break; } } diff --git a/ZAPD/ZCKeyFrame.h b/ZAPD/ZCKeyFrame.h index 714293a3..d03fdd56 100644 --- a/ZAPD/ZCKeyFrame.h +++ b/ZAPD/ZCKeyFrame.h @@ -29,7 +29,7 @@ class ZKeyFrameLimbList : public ZResource ZKeyFrameLimbList(); ZKeyFrameLimbList(ZFile* nParent); ZKeyFrameLimbList(ZFile* nParent, uint32_t limbCount, ZKeyframeSkelType type); - + ~ZKeyFrameLimbList(); void ParseRawData() override; @@ -67,12 +67,12 @@ class ZKeyFrameStandardLimb : public ZKeyFrameLimb Vec3s translation; ZKeyFrameStandardLimb(ZFile* nParent); - //void ParseXML(tinyxml2::XMLElement* reader) override; + // void ParseXML(tinyxml2::XMLElement* reader) override; void ParseRawData() override; std::string GetBodySourceCode() const override; - //std::string GetSourceOutputHeader(const std::string& prefix) override; + // std::string GetSourceOutputHeader(const std::string& prefix) override; std::string GetSourceTypeName() const override; ZResourceType GetResourceType() const override; @@ -86,12 +86,12 @@ class ZKeyFrameFlexLimb : public ZKeyFrameLimb uint8_t callbackIndex; ZKeyFrameFlexLimb(ZFile* nParent); - //void ParseXML(tinyxml2::XMLElement* reader) override; + // void ParseXML(tinyxml2::XMLElement* reader) override; void ParseRawData() override; std::string GetBodySourceCode() const override; - //std::string GetSourceOutputHeader(const std::string& prefix) override; + // std::string GetSourceOutputHeader(const std::string& prefix) override; std::string GetSourceTypeName() const override; ZResourceType GetResourceType() const override; @@ -117,7 +117,7 @@ class ZKeyFrameSkel : public ZResource std::string GetBodySourceCode() const override; - //std::string GetSourceOutputHeader(const std::string& prefix) override; + // std::string GetSourceOutputHeader(const std::string& prefix) override; std::string GetSourceTypeName() const override; ZResourceType GetResourceType() const override; diff --git a/ZAPD/ZCKeyFrameAnim.cpp b/ZAPD/ZCKeyFrameAnim.cpp index be4d86ec..937fd1ef 100644 --- a/ZAPD/ZCKeyFrameAnim.cpp +++ b/ZAPD/ZCKeyFrameAnim.cpp @@ -58,12 +58,11 @@ void ZKeyFrameAnim::DeclareReferencesLate(const std::string& prefix) } } declaration.clear(); - for (const auto kf : keyFrames) { - declaration += StringHelper::Sprintf(" \t { %i, %i, %i, },\n", kf.frame, kf.value, - kf.velocity); + declaration += + StringHelper::Sprintf(" \t { %i, %i, %i, },\n", kf.frame, kf.value, kf.velocity); } declaration = declaration.substr(0, declaration.length() - 1); parent->AddDeclarationArray( @@ -73,7 +72,6 @@ void ZKeyFrameAnim::DeclareReferencesLate(const std::string& prefix) declaration.clear(); - declaration += "\t"; for (const auto kfNum : kfNums) @@ -88,7 +86,7 @@ void ZKeyFrameAnim::DeclareReferencesLate(const std::string& prefix) declaration += "\n"; declaration.clear(); - + declaration += "\t"; for (const auto pv : presentValues) @@ -97,17 +95,16 @@ void ZKeyFrameAnim::DeclareReferencesLate(const std::string& prefix) } declaration += "\n"; parent->AddDeclarationArray( - GETSEGOFFSET(presentValuesAddr), DeclarationAlignment::Align4, presentValues.size() * 2, - "s16", StringHelper::Sprintf("%s_presetValues_%06X", prefix.c_str(), rawDataIndex), - presentValues.size(), declaration); - + GETSEGOFFSET(presentValuesAddr), DeclarationAlignment::Align4, presentValues.size() * 2, + "s16", StringHelper::Sprintf("%s_presetValues_%06X", prefix.c_str(), rawDataIndex), + presentValues.size(), declaration); } // ParseRawDataLate is used because we need to make sure the flex skel has been processed first. void ZKeyFrameAnim::ParseRawDataLate() { const auto& rawData = parent->GetRawData(); - + skel = static_cast(parent->FindResource(skelOffset)); size_t numLimbs = skel->limbCount; @@ -129,7 +126,6 @@ void ZKeyFrameAnim::ParseRawDataLate() kfNumsSize += GetSetBits((uint8_t)(e & 0b111111)); presetValuesSize += GetSetBits((uint8_t)((e ^ 0xFF) & 0b111111)); } - } else { @@ -146,7 +142,7 @@ void ZKeyFrameAnim::ParseRawDataLate() for (uint32_t i = 0; i < kfNumsSize; i++) { int16_t kfNum = BitConverter::ToUInt16BE(rawData, GETSEGOFFSET(kfNumsAddr) + (i * 2)); - keyFramesCount += kfNum;// std::max(keyFramesCount, (uint32_t)kfNum); + keyFramesCount += kfNum; // std::max(keyFramesCount, (uint32_t)kfNum); kfNums.push_back(kfNum); } @@ -184,9 +180,9 @@ std::string ZKeyFrameAnim::GetBodySourceCode() const Globals::Instance->GetSegmentedPtrName(kfNumsAddr, parent, "", kfNumsStr); Globals::Instance->GetSegmentedPtrName(presentValuesAddr, parent, "", presetValuesStr); - return StringHelper::Sprintf("\n\t%s, %s, %s, %s, 0x%04X, 0x%04X\n", bitFlagsStr.c_str(), keyFrameStr.c_str(), - kfNumsStr.c_str(), presetValuesStr.c_str(), unk_10, duration); - + return StringHelper::Sprintf("\n\t%s, %s, %s, %s, 0x%04X, 0x%04X\n", bitFlagsStr.c_str(), + keyFrameStr.c_str(), kfNumsStr.c_str(), presetValuesStr.c_str(), + unk_10, duration); } std::string ZKeyFrameAnim::GetSourceTypeName() const diff --git a/ZAPD/ZCkeyFrameAnim.h b/ZAPD/ZCkeyFrameAnim.h index c5ac292f..cd7f7789 100644 --- a/ZAPD/ZCkeyFrameAnim.h +++ b/ZAPD/ZCkeyFrameAnim.h @@ -19,8 +19,8 @@ class ZKeyFrameAnim : public ZResource { public: ZKeyFrameSkel* skel; - std::vector bitFlags; // Standard only - std::vector bitFlagsFLex; // Flex only + std::vector bitFlags; // Standard only + std::vector bitFlagsFLex; // Flex only std::vector keyFrames; std::vector kfNums; @@ -47,6 +47,6 @@ class ZKeyFrameAnim : public ZResource segptr_t keyFramesAddr; segptr_t kfNumsAddr; segptr_t presentValuesAddr; - template + template uint32_t GetSetBits(T data) const; }; From 346c96d5d072f28009d781345eef0c286d5b6582 Mon Sep 17 00:00:00 2001 From: louist103 <35883445+louist103@users.noreply.github.com> Date: Sun, 28 Jan 2024 23:11:29 -0500 Subject: [PATCH 2/2] Fix actions --- .github/workflows/main.yml | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index a22af21b..4c35dfac 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -37,12 +37,14 @@ jobs: - name: Setup OOT run: | cd oot - cp ~/baserom_original.z64 ./baserom_original.z64 + mkdir -p baseroms/gc-eu-mq-dbg + cp ~/baserom_original.z64 ./baseroms/gc-eu-mq-dbg/baserom.z64 + make venv make -C tools -j cp ../ZAPD.out tools/ZAPD/ - python3 fixbaserom.py - python3 extract_baserom.py - python3 extract_assets.py + .venv/bin/python3 tools/decompress_baserom.py gc-eu-mq-dbg + .venv/bin/python3 extract_baserom.py + .venv/bin/python3 extract_assets.py -j 4 - name: Install Python dependencies run: | @@ -68,6 +70,7 @@ jobs: - name: Build oot run: | cd oot + make venv make -j - name: Build mm