setup dolphin VEC/MTX function defines (#1903)

* setup VEC function defines

* setup MTX function defines
This commit is contained in:
TakaRikka
2023-09-02 16:38:08 +03:00
committed by GitHub
parent 2d45b68231
commit 6432e1541e
102 changed files with 479 additions and 404 deletions
@@ -534,8 +534,8 @@ void J3DSkinDeform::transformVtxPosNrm(J3DModelData* param_0) {
u16 drawMtxIndex = param_0->getDrawMtxIndex(posIndex);
Vec* pos = ((Vec*)param_0->getVtxPosArray()) + i;
Mtx invMtx;
PSMTXInverse(param_0->getInvJointMtx(drawMtxIndex), invMtx);
PSMTXMultVec(invMtx, pos, pos);
MTXInverse(param_0->getInvJointMtx(drawMtxIndex), invMtx);
MTXMultVec(invMtx, pos, pos);
}
}
for (int i = 0; i < nrmNum; i++) {
@@ -544,8 +544,8 @@ void J3DSkinDeform::transformVtxPosNrm(J3DModelData* param_0) {
u16 drawMtxIndex = param_0->getDrawMtxIndex(nrmIndex);
Vec* nrm = ((Vec*)param_0->getVtxNrmArray()) + i;
Mtx invMtx;
PSMTXInverse(param_0->getInvJointMtx(drawMtxIndex), invMtx);
PSMTXMultVecSR(invMtx, nrm, nrm);
MTXInverse(param_0->getInvJointMtx(drawMtxIndex), invMtx);
MTXMultVecSR(invMtx, nrm, nrm);
}
}
field_0x19 = 1;
@@ -561,7 +561,7 @@ void J3DSkinDeform::calcAnmInvJointMtx(J3DMtxBuffer* param_0) {
Mtx* invJointMtx = &param_0->getJointTree()->getInvJointMtx(0);
Mtx* posMtx = mPosMtx;
for (int i = 0; i < jointNum; i++) {
PSMTXConcat(anmMtx[i], invJointMtx[i], posMtx[i]);
MTXConcat(anmMtx[i], invJointMtx[i], posMtx[i]);
}
}
}