summaryrefslogtreecommitdiff
path: root/ZAPD/ZAnimation.cpp
diff options
context:
space:
mode:
authorlouist103 <35883445+louist103@users.noreply.github.com>2021-04-24 16:42:52 -0400
committerGitHub <noreply@github.com>2021-04-24 16:42:52 -0400
commit6d27dbaab3b32ccebb076895fac3cc6aa3240d6c (patch)
tree601c6ab5bef2f93b6d6ef4ba5506eb04dfb59c9f /ZAPD/ZAnimation.cpp
parentee8bdea252db4c764f4a2567c32754118fdce10b (diff)
Fix most -Wall warnings (#115)
* started on basic type errors * Done. For now * remove libgfxd binary * Most warnings fixed * Fix conflicts and new warnings * Makefile * Sig * Clang format * destructor * Add a bunch of destructors * clear the scalars vector after freeing the elements * PR fixes (Anghelo Alf) * Fix most clang -Wall warnings
Diffstat (limited to 'ZAPD/ZAnimation.cpp')
-rw-r--r--ZAPD/ZAnimation.cpp20
1 files changed, 10 insertions, 10 deletions
diff --git a/ZAPD/ZAnimation.cpp b/ZAPD/ZAnimation.cpp
index 81f769c..346e5d8 100644
--- a/ZAPD/ZAnimation.cpp
+++ b/ZAPD/ZAnimation.cpp
@@ -76,8 +76,8 @@ std::string ZNormalAnimation::GetSourceOutputCode(const std::string& prefix)
string indicesStr = "";
string valuesStr = " ";
- const int lineLength = 14;
- const int offset = 0;
+ const uint8_t lineLength = 14;
+ const uint8_t offset = 0;
for (size_t i = 0; i < rotationValues.size(); i++)
{
@@ -98,12 +98,12 @@ std::string ZNormalAnimation::GetSourceOutputCode(const std::string& prefix)
}
parent->AddDeclarationArray(rotationValuesSeg, DeclarationAlignment::Align16,
- (int)rotationValues.size() * 2, "static s16",
+ rotationValues.size() * 2, "static s16",
StringHelper::Sprintf("%sFrameData", defaultPrefix.c_str()),
rotationValues.size(), valuesStr);
parent->AddDeclarationArray(rotationIndicesSeg, DeclarationAlignment::Align16,
- (int)rotationIndices.size() * 6, "static JointIndex",
+ rotationIndices.size() * 6, "static JointIndex",
StringHelper::Sprintf("%sJointIndices", defaultPrefix.c_str()),
rotationIndices.size(), indicesStr);
}
@@ -111,7 +111,7 @@ std::string ZNormalAnimation::GetSourceOutputCode(const std::string& prefix)
return "";
}
-int ZNormalAnimation::GetRawDataSize()
+size_t ZNormalAnimation::GetRawDataSize()
{
return 16;
}
@@ -122,7 +122,7 @@ std::string ZNormalAnimation::GetSourceTypeName()
}
void ZNormalAnimation::ExtractFromXML(tinyxml2::XMLElement* reader,
- const std::vector<uint8_t>& nRawData, const int nRawDataIndex,
+ const std::vector<uint8_t>& nRawData, const uint32_t nRawDataIndex,
const std::string& nRelPath)
{
rawData = std::move(nRawData);
@@ -185,7 +185,7 @@ std::string ZLinkAnimation::GetSourceOutputCode(const std::string& prefix)
return "";
}
-int ZLinkAnimation::GetRawDataSize()
+size_t ZLinkAnimation::GetRawDataSize()
{
return 8;
}
@@ -196,7 +196,7 @@ std::string ZLinkAnimation::GetSourceTypeName()
}
void ZLinkAnimation::ExtractFromXML(tinyxml2::XMLElement* reader,
- const std::vector<uint8_t>& nRawData, const int nRawDataIndex,
+ const std::vector<uint8_t>& nRawData, const uint32_t nRawDataIndex,
const std::string& nRelPath)
{
rawData = std::move(nRawData);
@@ -284,7 +284,7 @@ void ZCurveAnimation::ParseRawData()
}
void ZCurveAnimation::ExtractFromXML(tinyxml2::XMLElement* reader,
- const std::vector<uint8_t>& nRawData, const int nRawDataIndex,
+ const std::vector<uint8_t>& nRawData, const uint32_t nRawDataIndex,
const std::string& nRelPath)
{
ZResource::ExtractFromXML(reader, nRawData, nRawDataIndex, nRelPath);
@@ -425,7 +425,7 @@ void ZCurveAnimation::PreGenValues(const std::string& prefix)
}
}
-int ZCurveAnimation::GetRawDataSize()
+size_t ZCurveAnimation::GetRawDataSize()
{
return 0x10;
}