diff options
| author | briaguya <70942617+briaguya-ai@users.noreply.github.com> | 2023-10-18 00:09:24 -0400 |
|---|---|---|
| committer | briaguya <70942617+briaguya-ai@users.noreply.github.com> | 2023-10-18 00:09:24 -0400 |
| commit | 3f878d401fdcff6e7f898524f3bcf5cf4c2b2532 (patch) | |
| tree | 2f0a7e29ec2dd17d0cbe70e8ee52c96f88608bfa /ZAPD/ZPlayerAnimationData.cpp | |
| parent | e9f4fc638ed904cc0dcdac24ea7708c9a220a702 (diff) | |
| parent | 094e797349c86d0baef4a624962f4287aefdfef2 (diff) | |
Merge branch 'JackMaster' into mergeJackOntoSquash
Conflicts:
ZAPD/Declaration.h
ZAPD/Globals.cpp
ZAPD/Globals.h
ZAPD/Main.cpp
ZAPD/OtherStructs/SkinLimbStructs.cpp
ZAPD/OtherStructs/SkinLimbStructs.h
ZAPD/ZAnimation.cpp
ZAPD/ZCollision.cpp
ZAPD/ZCollision.h
ZAPD/ZDisplayList.cpp
ZAPD/ZFile.cpp
ZAPD/ZLimb.cpp
ZAPD/ZLimb.h
ZAPD/ZPath.cpp
ZAPD/ZResource.h
ZAPD/ZRoom/Commands/SetCsCamera.cpp
ZAPD/ZRoom/Commands/SetCutsceneEntryList.cpp
ZAPD/ZRoom/Commands/SetCutscenes.cpp
ZAPD/ZRoom/Commands/SetCutscenes.h
ZAPD/ZRoom/Commands/SetEntranceList.cpp
ZAPD/ZRoom/Commands/SetLightingSettings.cpp
ZAPD/ZRoom/Commands/SetMesh.cpp
ZAPD/ZRoom/Commands/SetMinimapList.cpp
ZAPD/ZTexture.cpp
ZAPDUtils/Makefile
ZAPDUtils/Utils/BitConverter.h
ZAPDUtils/Utils/Directory.h
ZAPDUtils/Utils/File.h
ZAPDUtils/Utils/Path.h
ZAPDUtils/Utils/StringHelper.h
ZAPDUtils/ZAPDUtils.vcxproj
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) { |
