Skip to content

Commit

Permalink
Add files to build
Browse files Browse the repository at this point in the history
  • Loading branch information
louist103 committed Jan 31, 2024
1 parent 1db7c31 commit 01ed7e8
Show file tree
Hide file tree
Showing 4 changed files with 26 additions and 8 deletions.
4 changes: 4 additions & 0 deletions ZAPD/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,8 @@ set(Header_Files__Z64
"ZBlob.h"
"ZCollision.h"
"ZCollisionPoly.h"
"ZCKeyFrame.h"
"ZCkeyFrameAnim.h"
"ZCutscene.h"
"ZDisplayList.h"
"ZFile.h"
Expand Down Expand Up @@ -170,6 +172,8 @@ set(Source_Files__Z64
"ZBlob.cpp"
"ZCollision.cpp"
"ZCollisionPoly.cpp"
"ZCKeyFrame.cpp"
"ZCKeyFrameAnim.cpp"
"ZCutscene.cpp"
"ZDisplayList.cpp"
"ZFile.cpp"
Expand Down
7 changes: 7 additions & 0 deletions ZAPD/Main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
13 changes: 9 additions & 4 deletions ZAPD/ZCKeyFrame.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ REGISTER_ZFILENODE(KeyFrameLimbList, ZKeyFrameLimbList);
ZKeyFrameSkel::ZKeyFrameSkel(ZFile* nParent) : ZResource(nParent)
{
RegisterRequiredAttribute("LimbType");
genOTRDef = true;
}

ZKeyFrameSkel::~ZKeyFrameSkel()
Expand Down Expand Up @@ -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());
Expand Down Expand Up @@ -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(),
Expand All @@ -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);
Expand Down
10 changes: 6 additions & 4 deletions ZAPD/ZCKeyFrameAnim.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ REGISTER_ZFILENODE(KeyFrameAnimation, ZKeyFrameAnim);
ZKeyFrameAnim::ZKeyFrameAnim(ZFile* nParent) : ZResource(nParent)
{
RegisterRequiredAttribute("Skel");
genOTRDef = true;
}

ZKeyFrameAnim::~ZKeyFrameAnim()
Expand Down Expand Up @@ -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(),
Expand Down

0 comments on commit 01ed7e8

Please sign in to comment.