Match MarioActor::scaleMtx

This commit is contained in:
Headpenguin 2023-07-09 11:33:26 -04:00
parent 99961c80e8
commit c012856bd5
2 changed files with 31 additions and 1 deletions

View File

@ -212,7 +212,7 @@ changeMaxLife__10MarioActorFl,MarioActor.o,Player.a,true
doPressing__10MarioActorFv,MarioActor.o,Player.a,true
careMovingObject__10MarioActorFv,MarioActor.o,Player.a,true
doStun__10MarioActorFv,MarioActor.o,Player.a,true
scaleMtx__10MarioActorFPA4_f,MarioActor.o,Player.a,false
scaleMtx__10MarioActorFPA4_f,MarioActor.o,Player.a,true
updateBaseScaleMtx__10MarioActorFv,MarioActor.o,Player.a,false
getRealMtx__10MarioActorCFPA4_fPCc,MarioActor.o,Player.a,false
getRealPos__10MarioActorCFPCcPQ29JGeometry8TVec3<f>,MarioActor.o,Player.a,false

1 Symbol Name Object File Library Archive Matching
212 doPressing__10MarioActorFv MarioActor.o Player.a true
213 careMovingObject__10MarioActorFv MarioActor.o Player.a true
214 doStun__10MarioActorFv MarioActor.o Player.a true
215 scaleMtx__10MarioActorFPA4_f MarioActor.o Player.a false true
216 updateBaseScaleMtx__10MarioActorFv MarioActor.o Player.a false
217 getRealMtx__10MarioActorCFPA4_fPCc MarioActor.o Player.a false
218 getRealPos__10MarioActorCFPCcPQ29JGeometry8TVec3<f> MarioActor.o Player.a false

View File

@ -976,3 +976,33 @@ bool MarioActor::doStun() {
}
else return false;
}
void MarioActor::scaleMtx(MtxPtr rawMtx) {
TVec3f stack_44, stack_38, stack_2c;
const TRot3f *mtx = (TRot3f *)rawMtx;
f32 fr29 = 0.35f * (1f - _3b0) + 1f;
mtx -> getXDir(stack_44);
mtx -> getYDir(stack_38);
mtx -> getZDir(stack_2c);
f32 fr30 = MR::vecKillElement(stack_44, _3b4, &stack_44);
f32 fr31 = MR::vecKillElement(stack_38, _3b4, &stack_38);
f32 tmp = MR::vecKillElement(stack_2c, _3b4, &stack_2c);
tmp *= _3b0;
fr30 *= _3b0;
fr31 *= _3b0;
stack_44.scale(fr29);
stack_38.scale(fr29);
stack_2c.scale(fr29);
stack_44 += _3b4 % fr30;
stack_38 += _3b4 % fr31;
stack_2c += _3b4 % tmp;
rawMtx[0][0] = stack_44.x;
rawMtx[1][0] = stack_44.y;
rawMtx[2][0] = stack_44.z;
rawMtx[0][1] = stack_38.x;
rawMtx[1][1] = stack_38.y;
rawMtx[2][1] = stack_38.z;
rawMtx[0][2] = stack_2c.x;
rawMtx[1][2] = stack_2c.y;
rawMtx[2][2] = stack_2c.z;
}