| 13 | static f32 J2DGetKeyFrameInterpolation(f32, J3DAnmKeyTableBase *, T *); |
| 14 | |
| 15 | void J2DAnmTransformFull::getTransform(u16 p1, J3DTransformInfo *transformInfo) const |
| 16 | { |
| 17 | u16 idx = (p1 * 3); |
| 18 | J3DAnmTransformFullTable *xPart = &mTable[idx]; |
| 19 | J3DAnmTransformFullTable *yPart = &mTable[idx + 1]; |
| 20 | J3DAnmTransformFullTable *zPart = &mTable[idx + 2]; |
| 21 | u16 xMaxFrame = xPart->mScaleMaxFrame; |
| 22 | if (getFrame() < 0) |
| 23 | { |
| 24 | transformInfo->mScale.x = mScaleVals[xPart->mScaleOffset]; |
| 25 | } |
| 26 | else if (getFrame() >= xMaxFrame) |
| 27 | { |
| 28 | transformInfo->mScale.x = mScaleVals[(xPart->mScaleOffset + (xMaxFrame - 1))]; |
| 29 | } |
| 30 | else |
| 31 | { |
| 32 | transformInfo->mScale.x = mScaleVals[(xPart->mScaleOffset + (int)getFrame())]; |
| 33 | } |
| 34 | u16 yMaxFrame = yPart->mScaleMaxFrame; |
| 35 | if (getFrame() < 0) |
| 36 | { |
| 37 | transformInfo->mScale.y = mScaleVals[yPart->mScaleOffset]; |
| 38 | } |
| 39 | else if (getFrame() >= yMaxFrame) |
| 40 | { |
| 41 | transformInfo->mScale.y = mScaleVals[(yPart->mScaleOffset + (yMaxFrame - 1))]; |
| 42 | } |
| 43 | else |
| 44 | { |
| 45 | transformInfo->mScale.y = mScaleVals[(yPart->mScaleOffset + (int)getFrame())]; |
| 46 | } |
| 47 | u16 zMaxFrame = zPart->mScaleMaxFrame; |
| 48 | if (getFrame() < 0) |
| 49 | { |
| 50 | transformInfo->mScale.z = mScaleVals[zPart->mScaleOffset]; |
| 51 | } |
| 52 | else if (getFrame() >= zMaxFrame) |
| 53 | { |
| 54 | transformInfo->mScale.z = mScaleVals[(zPart->mScaleOffset + (zMaxFrame - 1))]; |
| 55 | } |
| 56 | else |
| 57 | { |
| 58 | transformInfo->mScale.z = mScaleVals[(zPart->mScaleOffset + (int)getFrame())]; |
| 59 | } |
| 60 | xMaxFrame = xPart->mRotationMaxFrame; |
| 61 | if (getFrame() < 0) |
| 62 | { |
| 63 | transformInfo->mRotation.x = mRotationVals[xPart->mRotationOffset]; |
| 64 | } |
| 65 | else if (getFrame() >= xMaxFrame) |
| 66 | { |
| 67 | transformInfo->mRotation.x = mRotationVals[(xPart->mRotationOffset + (xMaxFrame - 1))]; |
| 68 | } |
| 69 | else |
| 70 | { |
| 71 | transformInfo->mRotation.x = mRotationVals[(xPart->mRotationOffset + (int)getFrame())]; |
| 72 | } |
no outgoing calls
no test coverage detected