1
0
Fork 0
mirror of https://github.com/zeldaret/oot.git synced 2025-07-12 10:54:44 +00:00

Fix matrices documentation (#952)

* Update names and doc of `Matrix_RotateRPY` and `SkinMatrix_SetRotateRPY` to ZYX Tait-Bryan angles

* Update name and doc of `Matrix_JointPosition` to `Matrix_TranslateRotateZYX`

* `Euler ***` -> `Tait-Bryan *** angles`

* Update docs of `SkinMatrix_Vec3fMtxFMultXYZW` and `SkinMatrix_Vec3fMtxFMultXYZ`

* Fix doc of `SkinMatrix_MtxFMtxFMult`

* Update docs of `SkinMatrix_Invert`

* Change name and docs of `SkinMatrix_SetRotateYRP` to `SkinMatrix_SetRotateYXZ`

* Change name and docs of `SkinMatrix_SetScaleRotateRPYTranslate` to `SkinMatrix_SetScaleRotateZYXTranslate`

* Change name and docs of `SkinMatrix_SetScaleRotateYRPTranslate` to `SkinMatrix_SetScaleRotateYXZTranslate`

* Change name and docs of `SkinMatrix_SetRotateRPYTranslate` to `SkinMatrix_SetRotateZYXTranslate`

* Add renamed functions to `namefixer.py`

* Run formatter

* Consistent function names (`ABC()` if equivalent to `A() B() C()`)
This commit is contained in:
Dragorn421 2021-11-17 11:52:26 +01:00 committed by GitHub
parent 9ca6bfdac3
commit 03636166b3
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
53 changed files with 373 additions and 357 deletions

View file

@ -758,9 +758,9 @@ void func_8008F87C(GlobalContext* globalCtx, Player* this, SkelAnime* skelAnime,
sp74 = D_80126068[(void)0, gSaveContext.linkAge] - this->unk_6C4;
Matrix_Push();
Matrix_JointPosition(pos, rot);
Matrix_TranslateRotateZYX(pos, rot);
Matrix_MultVec3f(&D_8012602C, &spA4);
Matrix_JointPosition(&D_80126038[(void)0, gSaveContext.linkAge], &skelAnime->jointTable[shinLimbIndex]);
Matrix_TranslateRotateZYX(&D_80126038[(void)0, gSaveContext.linkAge], &skelAnime->jointTable[shinLimbIndex]);
Matrix_Translate(D_80126050[(void)0, gSaveContext.linkAge], 0.0f, 0.0f, MTXMODE_APPLY);
Matrix_MultVec3f(&D_8012602C, &sp98);
Matrix_MultVec3f(&D_80126070, &footprintPos);
@ -842,7 +842,7 @@ s32 func_8008FCC8(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, Vec3f* p
if (this->unk_6C2 != 0) {
Matrix_Translate(pos->x, ((Math_CosS(this->unk_6C2) - 1.0f) * 200.0f) + pos->y, pos->z, MTXMODE_APPLY);
Matrix_RotateX(this->unk_6C2 * (M_PI / 0x8000), MTXMODE_APPLY);
Matrix_RotateRPY(rot->x, rot->y, rot->z, MTXMODE_APPLY);
Matrix_RotateZYX(rot->x, rot->y, rot->z, MTXMODE_APPLY);
pos->x = pos->y = pos->z = 0.0f;
rot->x = rot->y = rot->z = 0;
}
@ -1062,7 +1062,7 @@ void Player_DrawGetItemImpl(GlobalContext* globalCtx, Player* this, Vec3f* refPo
Matrix_Translate(refPos->x + (3.3f * Math_SinS(this->actor.shape.rot.y)), refPos->y + height,
refPos->z + ((3.3f + (IREG(90) / 10.0f)) * Math_CosS(this->actor.shape.rot.y)), MTXMODE_NEW);
Matrix_RotateRPY(0, globalCtx->gameplayFrames * 1000, 0, MTXMODE_APPLY);
Matrix_RotateZYX(0, globalCtx->gameplayFrames * 1000, 0, MTXMODE_APPLY);
Matrix_Scale(0.2f, 0.2f, 0.2f, MTXMODE_APPLY);
GetItem_Draw(globalCtx, drawIdPlusOne - 1);
@ -1207,7 +1207,7 @@ void func_80090D20(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, Vec3s*
}
Matrix_Translate(-428.26f, 267.2f, -33.82f, MTXMODE_APPLY);
Matrix_RotateRPY(-0x8000, 0, 0x4000, MTXMODE_APPLY);
Matrix_RotateZYX(-0x8000, 0, 0x4000, MTXMODE_APPLY);
Matrix_Scale(1.0f, this->unk_85C, 1.0f, MTXMODE_APPLY);
gSPMatrix(POLY_OPA_DISP++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_player_lib.c", 2653),
@ -1243,7 +1243,7 @@ void func_80090D20(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, Vec3s*
if (!Player_HoldsHookshot(this) && ((hookedActor = this->heldActor) != NULL)) {
if (this->stateFlags1 & 0x200) {
Matrix_MultVec3f(&D_80126128, &hookedActor->world.pos);
Matrix_RotateRPY(0x69E8, -0x5708, 0x458E, MTXMODE_APPLY);
Matrix_RotateZYX(0x69E8, -0x5708, 0x458E, MTXMODE_APPLY);
Matrix_Get(&sp14C);
Matrix_MtxFToYXZRotS(&sp14C, &hookedActor->world.rot, 0);
hookedActor->shape.rot = hookedActor->world.rot;
@ -1325,7 +1325,7 @@ void func_80090D20(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, Vec3s*
s32 pad;
Matrix_MultVec3f(&D_80126190, &heldActor->world.pos);
Matrix_RotateRPY(0, -0x4000, -0x4000, MTXMODE_APPLY);
Matrix_RotateZYX(0, -0x4000, -0x4000, MTXMODE_APPLY);
Matrix_Get(&sp44);
Matrix_MtxFToYXZRotS(&sp44, &heldActor->world.rot, 0);
heldActor->shape.rot = heldActor->world.rot;
@ -1359,7 +1359,7 @@ void func_80090D20(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, Vec3s*
func_80090604(globalCtx, this, &this->shieldQuad, D_8012619C);
}
Matrix_JointPosition(&D_801261CC, &D_801261D8);
Matrix_TranslateRotateZYX(&D_801261CC, &D_801261D8);
Matrix_Get(&this->shieldMf);
}
} else if (limbIndex == PLAYER_LIMB_HEAD) {