summaryrefslogtreecommitdiff
path: root/ZAPD/ZSkeleton.cpp
diff options
context:
space:
mode:
authorAnghelo Carvajal <angheloalf95@gmail.com>2021-03-23 11:28:37 -0300
committerGitHub <noreply@github.com>2021-03-23 10:28:37 -0400
commit769b045ba4990729e025d4ba16135a7a22d5944e (patch)
treedd849a937ad8c17844542a2926934ea2cc7fffc3 /ZAPD/ZSkeleton.cpp
parent4751db5c9ee0a25a26379ca5b44efad72215d256 (diff)
Fix CurveLimbs warning and the "Intersection detected" warning (#101)
* fix curve limb warning Signed-off-by: Angie <angheloalf95@gmail.com> * Fix the intersection detected warning Signed-off-by: Angie <angheloalf95@gmail.com> * Implement GetSourceTypeName in ZAnimation Signed-off-by: Angie <angheloalf95@gmail.com>
Diffstat (limited to 'ZAPD/ZSkeleton.cpp')
-rw-r--r--ZAPD/ZSkeleton.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/ZAPD/ZSkeleton.cpp b/ZAPD/ZSkeleton.cpp
index e100e23..85e22fb 100644
--- a/ZAPD/ZSkeleton.cpp
+++ b/ZAPD/ZSkeleton.cpp
@@ -207,6 +207,10 @@ std::string ZSkeleton::GetSourceOutputCode(const std::string& prefix)
{
// Table
string tblStr = "";
+ string limbArrTypeStr = "static void*";
+ if (limbType == ZLimbType::Curve) {
+ limbArrTypeStr = StringHelper::Sprintf("static %s*", ZLimb::GetSourceTypeName(limbType));
+ }
for (size_t i = 0; i < limbs.size(); i++)
{
@@ -222,7 +226,7 @@ std::string ZSkeleton::GetSourceOutputCode(const std::string& prefix)
tblStr += decl;
}
- parent->AddDeclarationArray(ptr, DeclarationAlignment::None, 4 * limbCount, "static void*",
+ parent->AddDeclarationArray(ptr, DeclarationAlignment::None, 4 * limbCount, limbArrTypeStr,
StringHelper::Sprintf("%sLimbs", defaultPrefix.c_str()),
limbCount, tblStr);
}