WIP
| 316 | |
| 317 | if (pCurrentFrame != NULL) |
| 318 | { |
| 319 | // float/sda scheduling |
| 320 | pMatrixStackTop = &matrixStack[0]; |
| 321 | pMatrixStackTop->at.z = 1.0f; |
| 322 | |
| 323 | matrixStack[0].up.y = 1.0f; |
| 324 | matrixStack[0].right.x = 1.0f; |
| 325 | matrixStack[0].up.x = 0.0f; |
| 326 | matrixStack[0].right.z = 0.0f; |
| 327 | matrixStack[0].right.y = 0.0f; |
| 328 | matrixStack[0].at.y = 0.0f; |
| 329 | matrixStack[0].at.x = 0.0f; |
| 330 | matrixStack[0].up.z = 0.0f; |
| 331 | matrixStack[0].pos.z = 0.0f; |
| 332 | matrixStack[0].pos.y = 0.0f; |
| 333 | matrixStack[0].pos.x = 0.0f; |
| 334 | matrixStack[0].flags |= 0x20003; |
| 335 | |
| 336 | // non-volatile registers are acting up and their instructions |
| 337 | // are being scheduled weirdly |
| 338 | matrixStack[1] = matrixStack[0]; |
| 339 | numFrames = pCurrentFrame->nodeIndex; |
| 340 | pMatrixArray = (&matrixStack[1]); |
| 341 | iVar1 = (RpHAnimNodeInfo*)pCurrentFrame[1].nodeID; |
| 342 | |
| 343 | pMatrixArray++; |
| 344 | for (S32 i = 0; i < numFrames; i++) |
| 345 | { |
| 346 | pCurrentFrameFlags = iVar1->flags; |
| 347 | if ((pCurrentFrameFlags & 2) != 0) |
| 348 | { |
| 349 | *pMatrixArray++ = matrixStack[0]; |
| 350 | } |
| 351 | |
| 352 | RwMatrixTag afStack_8e8; |
| 353 | iModelQuatToMat(quat, tran, &afStack_8e8); |
| 354 | |
| 355 | RwMatrixTag auStack_8a8; |
| 356 | xMat4x3Mul((xMat4x3*)&auStack_8a8, (xMat4x3*)&afStack_8e8, (xMat4x3*)&matrixStack[0]); |
| 357 | |
| 358 | *mat = auStack_8a8; |
| 359 | if ((pCurrentFrameFlags & 1) != 0) |
| 360 | { |
| 361 | pMatrixArray = &pMatrixArray[-1]; |
| 362 | pMatrixStackTop = pMatrixArray; |
| 363 | } |
| 364 | else |
| 365 | { |
| 366 | pMatrixStackTop = (RwMatrixTag*)&auStack_8a8; |
| 367 | } |
| 368 | matrixStack[0] = *pMatrixStackTop; |
| 369 | mat++; |
| 370 | quat++; |
| 371 | tran++; |
| 372 | iVar1++; |
| 373 | // r27 and r28 swap |
| 374 | } |
| 375 | } |
no test coverage detected