From 769b045ba4990729e025d4ba16135a7a22d5944e Mon Sep 17 00:00:00 2001 From: Anghelo Carvajal Date: Tue, 23 Mar 2021 11:28:37 -0300 Subject: Fix CurveLimbs warning and the "Intersection detected" warning (#101) * fix curve limb warning Signed-off-by: Angie * Fix the intersection detected warning Signed-off-by: Angie * Implement GetSourceTypeName in ZAnimation Signed-off-by: Angie --- ZAPD/ZAnimation.cpp | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) (limited to 'ZAPD/ZAnimation.cpp') diff --git a/ZAPD/ZAnimation.cpp b/ZAPD/ZAnimation.cpp index 4ae07e1..417a26f 100644 --- a/ZAPD/ZAnimation.cpp +++ b/ZAPD/ZAnimation.cpp @@ -66,7 +66,7 @@ std::string ZNormalAnimation::GetSourceOutputCode(const std::string& prefix) string headerStr = StringHelper::Sprintf("{ %i }, %sFrameData, %sJointIndices, %i", frameCount, defaultPrefix.c_str(), defaultPrefix.c_str(), limit); - parent->AddDeclaration(rawDataIndex, DeclarationAlignment::None, 16, "AnimationHeader", + parent->AddDeclaration(rawDataIndex, DeclarationAlignment::None, GetRawDataSize(), GetSourceTypeName(), StringHelper::Sprintf("%s", name.c_str()), headerStr); string indicesStr = ""; @@ -111,6 +111,11 @@ int ZNormalAnimation::GetRawDataSize() return 16; } +std::string ZNormalAnimation::GetSourceTypeName() +{ + return "AnimationHeader"; +} + ZNormalAnimation* ZNormalAnimation::ExtractFromXML(tinyxml2::XMLElement* reader, std::vector nRawData, int rawDataIndex, const std::string& nRelPath) @@ -170,7 +175,7 @@ std::string ZLinkAnimation::GetSourceOutputCode(const std::string& prefix) segmentAddress, StringHelper::Sprintf("%sSeg%06X", name.c_str(), segmentAddress)); string headerStr = StringHelper::Sprintf("{ %i }, 0x%08X", frameCount, segmentAddress); - parent->AddDeclaration(rawDataIndex, DeclarationAlignment::None, 16, "LinkAnimationHeader", + parent->AddDeclaration(rawDataIndex, DeclarationAlignment::None, GetRawDataSize(), GetSourceTypeName(), StringHelper::Sprintf("%s", name.c_str()), headerStr); } @@ -182,6 +187,11 @@ int ZLinkAnimation::GetRawDataSize() return 8; } +std::string ZLinkAnimation::GetSourceTypeName() +{ + return "LinkAnimationHeader"; +} + ZLinkAnimation* ZLinkAnimation::ExtractFromXML(tinyxml2::XMLElement* reader, std::vector nRawData, int rawDataIndex, const std::string& nRelPath) -- cgit v1.2.3