diff options
Diffstat (limited to 'ZAPD/ZPlayerAnimationData.cpp')
| -rw-r--r-- | ZAPD/ZPlayerAnimationData.cpp | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/ZAPD/ZPlayerAnimationData.cpp b/ZAPD/ZPlayerAnimationData.cpp index ab633c1..d3bcb10 100644 --- a/ZAPD/ZPlayerAnimationData.cpp +++ b/ZAPD/ZPlayerAnimationData.cpp @@ -33,7 +33,7 @@ void ZPlayerAnimationData::ParseRawData() for (size_t i = 0; i < totalSize; i += 2) { - limbRotData.push_back(BitConverter::ToUInt16BE(rawData, rawDataIndex + i)); + limbRotData.push_back(BitConverter::ToInt16BE(rawData, rawDataIndex + i)); } } @@ -59,14 +59,21 @@ std::string ZPlayerAnimationData::GetBodySourceCode() const return ""; size_t index = 0; - for (const auto& entry : limbRotData) + for (const auto entry : limbRotData) { if (index % 8 == 0) { declaration += "\t"; } - declaration += StringHelper::Sprintf("0x%04X, ", entry); + if (entry < 0) + { + declaration += StringHelper::Sprintf("-0x%04X, ", -entry); + } + else + { + declaration += StringHelper::Sprintf("0x%04X, ", entry); + } if ((index + 1) % 8 == 0) { |
