summaryrefslogtreecommitdiff
path: root/ZAPD/ZAnimation.cpp
diff options
context:
space:
mode:
authorAnghelo Carvajal <angheloalf95@gmail.com>2021-09-29 14:58:42 -0300
committerGitHub <noreply@github.com>2021-09-29 13:58:42 -0400
commit2e7e4c33db92944019cfd8c806054f703629c122 (patch)
tree77ad974baa8df0442b9bb165e143b5bffcfcf16d /ZAPD/ZAnimation.cpp
parentcac62bff64235ec4be71b79443afaa135d739a92 (diff)
Remove `DeclarationPadding` and `DeclarationAlignment::None` (#186)
* Nuke DeclarationPadding * Remove DeclarationAlignment::None * Fix AddDeclaration memory leaks * Run formatter * Remove extra AddDeclarationPlaceholder * Revert "Remove extra AddDeclarationPlaceholder" This reverts commit 7a5d6a19d80bb246e0a6c8fde009b2a00a84ef96.
Diffstat (limited to 'ZAPD/ZAnimation.cpp')
-rw-r--r--ZAPD/ZAnimation.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/ZAPD/ZAnimation.cpp b/ZAPD/ZAnimation.cpp
index e0ee263..79a4327 100644
--- a/ZAPD/ZAnimation.cpp
+++ b/ZAPD/ZAnimation.cpp
@@ -51,7 +51,7 @@ std::string ZNormalAnimation::GetSourceOutputCode([[maybe_unused]] const std::st
headerStr += StringHelper::Sprintf("\t%sFrameData,\n", defaultPrefix.c_str());
headerStr += StringHelper::Sprintf("\t%sJointIndices,\n", defaultPrefix.c_str());
headerStr += StringHelper::Sprintf("\t%i\n", limit);
- parent->AddDeclaration(rawDataIndex, DeclarationAlignment::None, GetRawDataSize(),
+ parent->AddDeclaration(rawDataIndex, DeclarationAlignment::Align4, GetRawDataSize(),
GetSourceTypeName(), StringHelper::Sprintf("%s", name.c_str()),
headerStr);
@@ -150,7 +150,7 @@ std::string ZLinkAnimation::GetSourceOutputCode([[maybe_unused]] const std::stri
StringHelper::Sprintf("%sSeg%06X", name.c_str(), segmentAddress));
std::string headerStr =
StringHelper::Sprintf("\n\t{ %i },\n\t0x%08X\n", frameCount, segmentAddress);
- parent->AddDeclaration(rawDataIndex, DeclarationAlignment::None, GetRawDataSize(),
+ parent->AddDeclaration(rawDataIndex, DeclarationAlignment::Align4, GetRawDataSize(),
GetSourceTypeName(), StringHelper::Sprintf("%s", name.c_str()),
headerStr);
}
@@ -308,7 +308,7 @@ void ZCurveAnimation::DeclareReferences(const std::string& prefix)
Declaration* decl = parent->GetDeclaration(refIndexOffset);
if (decl == nullptr)
{
- parent->AddDeclarationArray(refIndexOffset, DeclarationAlignment::None,
+ parent->AddDeclarationArray(refIndexOffset, DeclarationAlignment::Align4,
arrayItemCnt * 1, "u8", refIndexStr, arrayItemCnt,
entryStr);
}
@@ -338,7 +338,7 @@ void ZCurveAnimation::DeclareReferences(const std::string& prefix)
Declaration* decl = parent->GetDeclaration(transformDataOffset);
if (decl == nullptr)
{
- parent->AddDeclarationArray(transformDataOffset, DeclarationAlignment::None,
+ parent->AddDeclarationArray(transformDataOffset, DeclarationAlignment::Align4,
arrayItemCnt * transformDataArr.at(0).GetRawDataSize(),
transformDataArr.at(0).GetSourceTypeName(),
transformDataStr, arrayItemCnt, entryStr);
@@ -367,7 +367,7 @@ void ZCurveAnimation::DeclareReferences(const std::string& prefix)
Declaration* decl = parent->GetDeclaration(copyValuesOffset);
if (decl == nullptr)
{
- parent->AddDeclarationArray(copyValuesOffset, DeclarationAlignment::None,
+ parent->AddDeclarationArray(copyValuesOffset, DeclarationAlignment::Align4,
arrayItemCnt * 2, "s16", copyValuesStr, arrayItemCnt,
entryStr);
}
@@ -444,7 +444,7 @@ std::string ZCurveAnimation::GetSourceOutputCode(const std::string& prefix)
Declaration* decl = parent->GetDeclaration(address);
if (decl == nullptr)
{
- parent->AddDeclaration(address, DeclarationAlignment::None, GetRawDataSize(),
+ parent->AddDeclaration(address, DeclarationAlignment::Align4, GetRawDataSize(),
GetSourceTypeName(), name, bodyStr);
}
else