mirror of
https://github.com/TwilitRealm/dusklight
synced 2026-08-18 20:57:46 -04:00
setup dolphin VEC/MTX function defines (#1903)
* setup VEC function defines * setup MTX function defines
This commit is contained in:
@@ -83,8 +83,8 @@ void J3DMtxCalcCalcTransformBasic::calcTransform(J3DTransformInfo const& transIn
|
||||
mtxBuf->setScaleFlag(jntNo, 1);
|
||||
}
|
||||
|
||||
PSMTXConcat(J3DSys::mCurrentMtx, anmMtx, J3DSys::mCurrentMtx);
|
||||
PSMTXCopy(J3DSys::mCurrentMtx, anmMtx);
|
||||
MTXConcat(J3DSys::mCurrentMtx, anmMtx, J3DSys::mCurrentMtx);
|
||||
MTXCopy(J3DSys::mCurrentMtx, anmMtx);
|
||||
}
|
||||
|
||||
/* 8032EE50-8032EFBC 329790 016C+00 0/0 1/1 0/0 .text
|
||||
@@ -99,7 +99,7 @@ void J3DMtxCalcCalcTransformSoftimage::calcTransform(J3DTransformInfo const& tra
|
||||
transInfo.mTranslate.x * J3DSys::mCurrentS.x,
|
||||
transInfo.mTranslate.y * J3DSys::mCurrentS.y,
|
||||
transInfo.mTranslate.z * J3DSys::mCurrentS.z, anmMtx);
|
||||
PSMTXConcat(J3DSys::mCurrentMtx, anmMtx, J3DSys::mCurrentMtx);
|
||||
MTXConcat(J3DSys::mCurrentMtx, anmMtx, J3DSys::mCurrentMtx);
|
||||
|
||||
J3DSys::mCurrentS.x *= transInfo.mScale.x;
|
||||
J3DSys::mCurrentS.y *= transInfo.mScale.y;
|
||||
@@ -114,7 +114,7 @@ void J3DMtxCalcCalcTransformSoftimage::calcTransform(J3DTransformInfo const& tra
|
||||
anmMtx[2][3] = J3DSys::mCurrentMtx[2][3];
|
||||
} else {
|
||||
mtxBuf->setScaleFlag(jntNo, 1);
|
||||
PSMTXCopy(J3DSys::mCurrentMtx, anmMtx);
|
||||
MTXCopy(J3DSys::mCurrentMtx, anmMtx);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -154,8 +154,8 @@ void J3DMtxCalcCalcTransformMaya::calcTransform(J3DTransformInfo const& transInf
|
||||
anmMtx[2][2] *= invZ;
|
||||
}
|
||||
|
||||
PSMTXConcat(J3DSys::mCurrentMtx, anmMtx, J3DSys::mCurrentMtx);
|
||||
PSMTXCopy(J3DSys::mCurrentMtx, anmMtx);
|
||||
MTXConcat(J3DSys::mCurrentMtx, anmMtx, J3DSys::mCurrentMtx);
|
||||
MTXCopy(J3DSys::mCurrentMtx, anmMtx);
|
||||
|
||||
J3DSys::mParentS.x = transInfo.mScale.x;
|
||||
J3DSys::mParentS.y = transInfo.mScale.y;
|
||||
|
||||
@@ -119,8 +119,8 @@ void J3DModel::initialize() {
|
||||
mBaseScale.y = 1.0f;
|
||||
mBaseScale.z = 1.0f;
|
||||
|
||||
PSMTXIdentity(mBaseTransformMtx);
|
||||
PSMTXIdentity(mInternalView);
|
||||
MTXIdentity(mBaseTransformMtx);
|
||||
MTXIdentity(mInternalView);
|
||||
|
||||
mMtxBuffer = NULL;
|
||||
mMatPacket = NULL;
|
||||
@@ -406,7 +406,7 @@ void J3DModel::calcDiffTexMtx() {
|
||||
J3DTexMtx* texMtxNode = texGenBlock->getTexMtx(j);
|
||||
J3DTexMtxObj* texMtxObj = shapePacket->getTexMtxObj();
|
||||
if (texMtxNode != NULL && texMtxObj != NULL) {
|
||||
PSMTXCopy(texMtxNode->getMtx(), texMtxObj->getMtx(j));
|
||||
MTXCopy(texMtxNode->getMtx(), texMtxObj->getMtx(j));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -317,5 +317,5 @@ void J3DCalcViewBaseMtx(Mtx view, Vec const& scale, const Mtx& base, Mtx dst) {
|
||||
m[2][2] = base[2][2] * scale.z;
|
||||
m[2][3] = base[2][3];
|
||||
|
||||
PSMTXConcat(view, m, dst);
|
||||
MTXConcat(view, m, dst);
|
||||
}
|
||||
|
||||
@@ -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 = ¶m_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]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user