z_skin_matrix OK (#81)

* Set up file

* Rename

* z_skin_matrix OK

* Cleanup

* /n nits
This commit is contained in:
Rozelette
2021-04-12 00:41:35 -05:00
committed by GitHub
parent 75f1d51940
commit 84040f6ba6
13 changed files with 902 additions and 95 deletions
+6 -6
View File
@@ -6,15 +6,15 @@
// The functions will use the BgCheck2 prefix for now.
void BgCheck2_UpdateActorPosition(CollisionContext* bgCtxt, s32 index, Actor* actor) {
z_Matrix prevMatrix;
z_Matrix prevMatrixInv;
z_Matrix currMatrix;
MtxF prevMatrix;
MtxF prevMatrixInv;
MtxF currMatrix;
Vec3f newPos;
Vec3f posWithInv;
if (BgCheck_IsActorMeshIndexValid(index) == 0) return;
Matrix_MakeTranslationRotationYXZScale(&prevMatrix,
SkinMatrix_SetScaleRotateYRPTranslate(&prevMatrix,
bgCtxt->dyna.actorMeshArr[index].prevParams.scale.x,
bgCtxt->dyna.actorMeshArr[index].prevParams.scale.y,
bgCtxt->dyna.actorMeshArr[index].prevParams.scale.z,
@@ -25,9 +25,9 @@ void BgCheck2_UpdateActorPosition(CollisionContext* bgCtxt, s32 index, Actor* ac
bgCtxt->dyna.actorMeshArr[index].prevParams.pos.y,
bgCtxt->dyna.actorMeshArr[index].prevParams.pos.z);
if (Matrix_Invert(&prevMatrix, &prevMatrixInv) == 2) return;
if (SkinMatrix_Invert(&prevMatrix, &prevMatrixInv) == 2) return;
Matrix_MakeTranslationRotationYXZScale(&currMatrix,
SkinMatrix_SetScaleRotateYRPTranslate(&currMatrix,
bgCtxt->dyna.actorMeshArr[index].currParams.scale.x,
bgCtxt->dyna.actorMeshArr[index].currParams.scale.y,
bgCtxt->dyna.actorMeshArr[index].currParams.scale.z,
+1 -1
View File
@@ -17,7 +17,7 @@ void EffFootmark_Init(GlobalContext* ctxt) {
}
}
void EffFootmark_Add(GlobalContext* ctxt, z_Matrix* displayMatrix, Actor* actor, u8 id, Vec3f* location, u16 size, u8 red, u8 green, u8 blue, u16 alpha, u16 alphaChange, u16 fadeoutDelay) {
void EffFootmark_Add(GlobalContext* ctxt, MtxF* displayMatrix, Actor* actor, u8 id, Vec3f* location, u16 size, u8 red, u8 green, u8 blue, u16 alpha, u16 alphaChange, u16 fadeoutDelay) {
s32 i;
EffFootmark* footmark;
EffFootmark* destination = NULL;
+2 -2
View File
@@ -16,8 +16,8 @@ void EffectSs_DrawGEffect(GlobalContext* globalCtx, EffectSs* this, void* textur
scale = this->rgScale * D_801DC100;
SkinMatrix_SetTranslate(&mfTrans, this->pos.x, this->pos.y, this->pos.z);
Matrix_MakeScale(&mfScale, scale, scale, scale);
SkinMatrix_MtxFMtxFMult(&mfTrans, &globalCtx->mf_187FC, &mfTrans11DA0);
SkinMatrix_SetScale(&mfScale, scale, scale, scale);
SkinMatrix_MtxFMtxFMult(&mfTrans, &globalCtx->unk187FC, &mfTrans11DA0);
SkinMatrix_MtxFMtxFMult(&mfTrans11DA0, &mfScale, &mfResult);
gSegments[6] = PHYSICAL_TO_VIRTUAL(object);
gSPSegment(POLY_XLU_DISP++, 0x06, object);
File diff suppressed because it is too large Load Diff
+1 -1
View File
@@ -237,7 +237,7 @@ s32 View_SetQuake(View* view, Vec3f rot, Vec3f scale, f32 speed) {
}
s32 View_StepQuake(View* view, RSPMatrix* matrix) {
z_Matrix mf;
MtxF mf;
if (view->quakeSpeed == 0.0f) {
return 0;