diff --git a/ZAPD/CMakeLists.txt b/ZAPD/CMakeLists.txt index 4739288..f570243 100644 --- a/ZAPD/CMakeLists.txt +++ b/ZAPD/CMakeLists.txt @@ -54,6 +54,8 @@ set(Header_Files__Z64 "ZBlob.h" "ZCollision.h" "ZCollisionPoly.h" + "ZCKeyFrame.h" + "ZCkeyFrameAnim.h" "ZCutscene.h" "ZDisplayList.h" "ZFile.h" @@ -170,6 +172,8 @@ set(Source_Files__Z64 "ZBlob.cpp" "ZCollision.cpp" "ZCollisionPoly.cpp" + "ZCKeyFrame.cpp" + "ZCKeyFrameAnim.cpp" "ZCutscene.cpp" "ZDisplayList.cpp" "ZFile.cpp" diff --git a/ZAPD/Main.cpp b/ZAPD/Main.cpp index eeb72b0..4536683 100644 --- a/ZAPD/Main.cpp +++ b/ZAPD/Main.cpp @@ -74,6 +74,13 @@ ZRoom room(nullptr); #include "ZPointer.h" ZPointer pointer(nullptr); + +#include "ZCKeyFrame.h" +ZKeyFrameSkel kfSKel(nullptr); + +#include "ZCkeyFrameAnim.h" +ZKeyFrameAnim kfAnim(nullptr); + // Linker Hacks End #include "ZFile.h" diff --git a/ZAPD/ZCKeyFrame.cpp b/ZAPD/ZCKeyFrame.cpp index 387f8ad..044eafd 100644 --- a/ZAPD/ZCKeyFrame.cpp +++ b/ZAPD/ZCKeyFrame.cpp @@ -11,6 +11,7 @@ REGISTER_ZFILENODE(KeyFrameLimbList, ZKeyFrameLimbList); ZKeyFrameSkel::ZKeyFrameSkel(ZFile* nParent) : ZResource(nParent) { RegisterRequiredAttribute("LimbType"); + genOTRDef = true; } ZKeyFrameSkel::~ZKeyFrameSkel() @@ -115,9 +116,11 @@ std::string ZKeyFrameSkel::GetBodySourceCode() const std::string limbStr; if (limbType == ZKeyframeSkelType::Normal) - Globals::Instance->GetSegmentedPtrName(limbsPtr, parent, "KeyFrameStandardLimb", limbStr); + Globals::Instance->GetSegmentedPtrName(limbsPtr, parent, "KeyFrameStandardLimb", limbStr, + parent->workerID); else - Globals::Instance->GetSegmentedPtrName(limbsPtr, parent, "KeyFrameFlexLimb", limbStr); + Globals::Instance->GetSegmentedPtrName(limbsPtr, parent, "KeyFrameFlexLimb", limbStr, + parent->workerID); return StringHelper::Sprintf("\n\t0x%02X, 0x%02X, %s\n", limbCount, dListCount, limbStr.c_str()); @@ -230,7 +233,8 @@ std::string ZKeyFrameStandardLimb::GetBodySourceCode() const std::string declaration; std::string dlString; - Globals::Instance->GetSegmentedArrayIndexedName(dlist, 8, parent, "Gfx", dlString); + Globals::Instance->GetSegmentedArrayIndexedName(dlist, 8, parent, "Gfx", dlString, + parent->workerID); declaration += StringHelper::Sprintf("%s, 0x%02X, 0x%02X, { 0x%04X, 0x%04X, 0x%04X},", dlString.c_str(), @@ -244,7 +248,8 @@ std::string ZKeyFrameFlexLimb::GetBodySourceCode() const std::string dlString; - Globals::Instance->GetSegmentedArrayIndexedName(dlist, 8, parent, "Gfx", dlString); + Globals::Instance->GetSegmentedArrayIndexedName(dlist, 8, parent, "Gfx", dlString, + parent->workerID); declaration += StringHelper::Sprintf("%s, 0x%02X, 0x%02X, 0x%02X", dlString.c_str(), numChildren, flags, callbackIndex); diff --git a/ZAPD/ZCKeyFrameAnim.cpp b/ZAPD/ZCKeyFrameAnim.cpp index 0b07471..fffb9f2 100644 --- a/ZAPD/ZCKeyFrameAnim.cpp +++ b/ZAPD/ZCKeyFrameAnim.cpp @@ -9,6 +9,7 @@ REGISTER_ZFILENODE(KeyFrameAnimation, ZKeyFrameAnim); ZKeyFrameAnim::ZKeyFrameAnim(ZFile* nParent) : ZResource(nParent) { RegisterRequiredAttribute("Skel"); + genOTRDef = true; } ZKeyFrameAnim::~ZKeyFrameAnim() @@ -179,10 +180,11 @@ std::string ZKeyFrameAnim::GetBodySourceCode() const std::string kfNumsStr; std::string presetValuesStr; - Globals::Instance->GetSegmentedPtrName(bitFlagsAddr, parent, "", bitFlagsStr); - Globals::Instance->GetSegmentedPtrName(keyFramesAddr, parent, "", keyFrameStr); - Globals::Instance->GetSegmentedPtrName(kfNumsAddr, parent, "", kfNumsStr); - Globals::Instance->GetSegmentedPtrName(presentValuesAddr, parent, "", presetValuesStr); + Globals::Instance->GetSegmentedPtrName(bitFlagsAddr, parent, "", bitFlagsStr, parent->workerID); + Globals::Instance->GetSegmentedPtrName(keyFramesAddr, parent, "", keyFrameStr, parent->workerID); + Globals::Instance->GetSegmentedPtrName(kfNumsAddr, parent, "", kfNumsStr, parent->workerID); + Globals::Instance->GetSegmentedPtrName(presentValuesAddr, parent, "", presetValuesStr, + parent->workerID); 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(),