diff options
| author | Jcw87 <Jcw87@users.noreply.github.com> | 2026-01-13 07:49:09 -0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2026-01-13 17:49:09 +0200 |
| commit | 1a65a6bbbd263538bd04faae2d9e899d59ec0d5d (patch) | |
| tree | 806aabed4c624787252b37072c36629c1a559bca /src/JSystem/J3DGraphAnimator/J3DAnimation.cpp | |
| parent | dd03bf861fdc92109c57d58cc7436066a8a02430 (diff) | |
J3D debug (#3037)
* J3DGraphBase debug
* J3DGraphAnimator debug
* J3DGraphLoader debug
Diffstat (limited to 'src/JSystem/J3DGraphAnimator/J3DAnimation.cpp')
| -rw-r--r-- | src/JSystem/J3DGraphAnimator/J3DAnimation.cpp | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/src/JSystem/J3DGraphAnimator/J3DAnimation.cpp b/src/JSystem/J3DGraphAnimator/J3DAnimation.cpp index 8cfa46ff23..6b9a2d2250 100644 --- a/src/JSystem/J3DGraphAnimator/J3DAnimation.cpp +++ b/src/JSystem/J3DGraphAnimator/J3DAnimation.cpp @@ -565,9 +565,8 @@ f32 J3DGetKeyFrameInterpolation(f32 frame, J3DAnmKeyTableBase* pKeyTable, T* pDa } if (pKeyTable->mType == 0) { - u32 idx = pKeyTable->mMaxFrame - 1; - if (pData[idx * 3] <= frame) { - return pData[idx * 3 + 1]; + if (pData[(pKeyTable->mMaxFrame - 1) * 3] <= frame) { + return pData[(pKeyTable->mMaxFrame - 1) * 3 + 1]; } u32 uVar7 = pKeyTable->mMaxFrame; @@ -585,9 +584,8 @@ f32 J3DGetKeyFrameInterpolation(f32 frame, J3DAnmKeyTableBase* pKeyTable, T* pDa f32 interpolated = J3DHermiteInterpolation(frame, &pData[0], &pData[1], &pData[2], &pData[3], &pData[4], &pData[5]); return interpolated; } else { - u32 idx = pKeyTable->mMaxFrame - 1; - if (pData[idx * 4] <= frame) { - return pData[idx * 4 + 1]; + if (pData[(pKeyTable->mMaxFrame - 1) * 4] <= frame) { + return pData[(pKeyTable->mMaxFrame - 1) * 4 + 1]; } u32 var_r27 = pKeyTable->mMaxFrame; |
