mirror of
https://github.com/zeldaret/oot.git
synced 2025-07-02 22:14:33 +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:
parent
9ca6bfdac3
commit
03636166b3
53 changed files with 373 additions and 357 deletions
|
@ -165,14 +165,14 @@ void EnBa_Idle(EnBa* this, GlobalContext* globalCtx) {
|
|||
for (i = 12; i >= 0; i--) {
|
||||
func_80035844(&this->unk158[i + 1], &this->unk158[i], &sp5C, 0);
|
||||
Matrix_Translate(this->unk158[i + 1].x, this->unk158[i + 1].y, this->unk158[i + 1].z, MTXMODE_NEW);
|
||||
Matrix_RotateRPY(sp5C.x, sp5C.y, 0, MTXMODE_APPLY);
|
||||
Matrix_RotateZYX(sp5C.x, sp5C.y, 0, MTXMODE_APPLY);
|
||||
Matrix_MultVec3f(&D_809B8080, &this->unk158[i]);
|
||||
}
|
||||
func_80035844(&this->unk158[0], &this->unk2FC, &sp5C, 0);
|
||||
Matrix_Translate(this->actor.world.pos.x, this->actor.world.pos.y, this->actor.world.pos.z, MTXMODE_NEW);
|
||||
Math_SmoothStepToS(&this->actor.shape.rot.y, this->unk2A8[0].y, 3, this->unk31C, 182);
|
||||
Math_SmoothStepToS(&this->actor.shape.rot.x, this->unk2A8[0].x, 3, this->unk31C, 182);
|
||||
Matrix_RotateRPY(this->actor.shape.rot.x - 0x8000, this->actor.shape.rot.y, 0, MTXMODE_APPLY);
|
||||
Matrix_RotateZYX(this->actor.shape.rot.x - 0x8000, this->actor.shape.rot.y, 0, MTXMODE_APPLY);
|
||||
Matrix_MultVec3f(&D_809B8080, &this->unk158[0]);
|
||||
this->unk2A8[13].y = sp5C.y;
|
||||
this->unk2A8[13].x = sp5C.x + 0x8000;
|
||||
|
@ -181,7 +181,7 @@ void EnBa_Idle(EnBa* this, GlobalContext* globalCtx) {
|
|||
Matrix_Translate(this->unk158[i].x, this->unk158[i].y, this->unk158[i].z, MTXMODE_NEW);
|
||||
Math_SmoothStepToS(&this->unk2A8[i].y, this->unk2A8[i + 1].y, 3, this->unk31C, 182);
|
||||
Math_SmoothStepToS(&this->unk2A8[i].x, this->unk2A8[i + 1].x, 3, this->unk31C, 182);
|
||||
Matrix_RotateRPY(this->unk2A8[i].x - 0x8000, this->unk2A8[i].y, 0, MTXMODE_APPLY);
|
||||
Matrix_RotateZYX(this->unk2A8[i].x - 0x8000, this->unk2A8[i].y, 0, MTXMODE_APPLY);
|
||||
Matrix_MultVec3f(&D_809B8080, &this->unk158[i + 1]);
|
||||
}
|
||||
this->unk2A8[13].x = this->unk2A8[12].x;
|
||||
|
@ -257,14 +257,14 @@ void EnBa_SwingAtPlayer(EnBa* this, GlobalContext* globalCtx) {
|
|||
Math_SmoothStepToS(&this->actor.shape.rot.y, sp58.y, 1, this->unk31C, 0);
|
||||
Math_SmoothStepToS(&this->actor.shape.rot.x, (sp58.x + 0x8000), 1, this->unk31C, 0);
|
||||
Matrix_Translate(this->actor.world.pos.x, this->actor.world.pos.y, this->actor.world.pos.z, MTXMODE_NEW);
|
||||
Matrix_RotateRPY((this->actor.shape.rot.x - 0x8000), this->actor.shape.rot.y, 0, MTXMODE_APPLY);
|
||||
Matrix_RotateZYX((this->actor.shape.rot.x - 0x8000), this->actor.shape.rot.y, 0, MTXMODE_APPLY);
|
||||
Matrix_MultVec3f(&D_809B8080, &this->unk158[0]);
|
||||
|
||||
for (i = 0; i < 13; i++) {
|
||||
Math_SmoothStepToS(&this->unk2A8[i].x, (i * 1200) - 0x4000, 1, this->unk31C, 0);
|
||||
Math_SmoothStepToS(&this->unk2A8[i].y, phi_fp, 1, this->unk31C, 0);
|
||||
Matrix_Translate(this->unk158[i].x, this->unk158[i].y, this->unk158[i].z, MTXMODE_NEW);
|
||||
Matrix_RotateRPY((this->unk2A8[i].x - 0x8000), this->unk2A8[i].y, 0, MTXMODE_APPLY);
|
||||
Matrix_RotateZYX((this->unk2A8[i].x - 0x8000), this->unk2A8[i].y, 0, MTXMODE_APPLY);
|
||||
Matrix_MultVec3f(&D_809B8080, &this->unk158[i + 1]);
|
||||
}
|
||||
} else {
|
||||
|
@ -280,7 +280,7 @@ void EnBa_SwingAtPlayer(EnBa* this, GlobalContext* globalCtx) {
|
|||
Math_SmoothStepToS(&this->actor.shape.rot.x, temp, 1, this->unk31C, 0);
|
||||
Matrix_Translate(this->actor.world.pos.x, this->actor.world.pos.y, this->actor.world.pos.z,
|
||||
MTXMODE_NEW);
|
||||
Matrix_RotateRPY(this->actor.shape.rot.x - 0x8000, this->actor.shape.rot.y, 0, MTXMODE_APPLY);
|
||||
Matrix_RotateZYX(this->actor.shape.rot.x - 0x8000, this->actor.shape.rot.y, 0, MTXMODE_APPLY);
|
||||
Matrix_MultVec3f(&D_809B8080, this->unk158);
|
||||
|
||||
for (i = 0; i < 13; i++) {
|
||||
|
@ -288,7 +288,7 @@ void EnBa_SwingAtPlayer(EnBa* this, GlobalContext* globalCtx) {
|
|||
Math_SmoothStepToS(&this->unk2A8[i].x, temp - 0x4000, 1, this->unk31C, 0);
|
||||
Math_SmoothStepToS(&this->unk2A8[i].y, phi_fp, 1, this->unk31C, 0);
|
||||
Matrix_Translate(this->unk158[i].x, this->unk158[i].y, this->unk158[i].z, MTXMODE_NEW);
|
||||
Matrix_RotateRPY(this->unk2A8[i].x - 0x8000, this->unk2A8[i].y, 0, MTXMODE_APPLY);
|
||||
Matrix_RotateZYX(this->unk2A8[i].x - 0x8000, this->unk2A8[i].y, 0, MTXMODE_APPLY);
|
||||
Matrix_MultVec3f(&D_809B8080, &this->unk158[i + 1]);
|
||||
}
|
||||
this->unk31A--;
|
||||
|
@ -350,14 +350,14 @@ void EnBa_RecoilFromDamage(EnBa* this, GlobalContext* globalCtx) {
|
|||
for (i = 12; i >= 0; i--) {
|
||||
func_80035844(&this->unk158[i + 1], &this->unk158[i], &sp6C, 0);
|
||||
Matrix_Translate(this->unk158[i + 1].x, this->unk158[i + 1].y, this->unk158[i + 1].z, MTXMODE_NEW);
|
||||
Matrix_RotateRPY(sp6C.x, sp6C.y, 0, MTXMODE_APPLY);
|
||||
Matrix_RotateZYX(sp6C.x, sp6C.y, 0, MTXMODE_APPLY);
|
||||
Matrix_MultVec3f(&D_809B8080, &this->unk158[i]);
|
||||
}
|
||||
func_80035844(&this->actor.world.pos, &this->unk158[0], &sp6C, 0);
|
||||
Matrix_Translate(this->actor.world.pos.x, this->actor.world.pos.y, this->actor.world.pos.z, MTXMODE_NEW);
|
||||
Math_SmoothStepToS(&this->actor.shape.rot.y, sp6C.y, 3, this->unk31C, 182);
|
||||
Math_SmoothStepToS(&this->actor.shape.rot.x, sp6C.x + 0x8000, 3, this->unk31C, 182);
|
||||
Matrix_RotateRPY(this->actor.shape.rot.x - 0x8000, this->actor.shape.rot.y, 0, MTXMODE_APPLY);
|
||||
Matrix_RotateZYX(this->actor.shape.rot.x - 0x8000, this->actor.shape.rot.y, 0, MTXMODE_APPLY);
|
||||
Matrix_MultVec3f(&D_809B8080, &this->unk158[0]);
|
||||
|
||||
for (i = 0; i < 13; i++) {
|
||||
|
@ -365,7 +365,7 @@ void EnBa_RecoilFromDamage(EnBa* this, GlobalContext* globalCtx) {
|
|||
Matrix_Translate(this->unk158[i].x, this->unk158[i].y, this->unk158[i].z, MTXMODE_NEW);
|
||||
Math_SmoothStepToS(&this->unk2A8[i].y, sp6C.y, 3, this->unk31C, 182);
|
||||
Math_SmoothStepToS(&this->unk2A8[i].x, sp6C.x + 0x8000, 3, this->unk31C, 182);
|
||||
Matrix_RotateRPY(this->unk2A8[i].x - 0x8000, this->unk2A8[i].y, 0, MTXMODE_APPLY);
|
||||
Matrix_RotateZYX(this->unk2A8[i].x - 0x8000, this->unk2A8[i].y, 0, MTXMODE_APPLY);
|
||||
Matrix_MultVec3f(&D_809B8080, &this->unk158[i + 1]);
|
||||
}
|
||||
|
||||
|
@ -395,14 +395,14 @@ void func_809B75A0(EnBa* this, GlobalContext* globalCtx2) {
|
|||
Math_SmoothStepToS(&this->actor.shape.rot.y, this->actor.yawTowardsPlayer, 1, this->unk31C, 0);
|
||||
Math_SmoothStepToS(&this->actor.shape.rot.x, unk_temp, 1, this->unk31C, 0);
|
||||
Matrix_Translate(this->actor.world.pos.x, this->actor.world.pos.y, this->actor.world.pos.z, MTXMODE_NEW);
|
||||
Matrix_RotateRPY(this->actor.shape.rot.x - 0x8000, this->actor.shape.rot.y, 0, MTXMODE_APPLY);
|
||||
Matrix_RotateZYX(this->actor.shape.rot.x - 0x8000, this->actor.shape.rot.y, 0, MTXMODE_APPLY);
|
||||
Matrix_MultVec3f(&D_809B8080, &this->unk158[0]);
|
||||
this->actor.flags &= ~1;
|
||||
for (i = 5; i < 13; i++) {
|
||||
Math_SmoothStepToS(&this->unk2A8[i].x, this->unk2A8[5].x, 1, this->unk31C, 0);
|
||||
Math_SmoothStepToS(&this->unk2A8[i].y, this->unk2A8[5].y, 1, this->unk31C, 0);
|
||||
Matrix_Translate(this->unk158[i].x, this->unk158[i].y, this->unk158[i].z, MTXMODE_NEW);
|
||||
Matrix_RotateRPY(this->unk2A8[i].x - 0x8000, this->unk2A8[i].y, 0, MTXMODE_APPLY);
|
||||
Matrix_RotateZYX(this->unk2A8[i].x - 0x8000, this->unk2A8[i].y, 0, MTXMODE_APPLY);
|
||||
Matrix_MultVec3f(&sp74, &this->unk158[i + 1]);
|
||||
}
|
||||
this->unk31A = 15;
|
||||
|
@ -422,21 +422,21 @@ void EnBa_Die(EnBa* this, GlobalContext* globalCtx) {
|
|||
Math_SmoothStepToS(&this->actor.shape.rot.y, this->actor.yawTowardsPlayer, 1, this->unk31C, 0);
|
||||
Math_SmoothStepToS(&this->actor.shape.rot.x, temp, 1, this->unk31C, 0);
|
||||
Matrix_Translate(this->actor.world.pos.x, this->actor.world.pos.y, this->actor.world.pos.z, MTXMODE_NEW);
|
||||
Matrix_RotateRPY(this->actor.shape.rot.x - 0x8000, this->actor.shape.rot.y, 0, MTXMODE_APPLY);
|
||||
Matrix_RotateZYX(this->actor.shape.rot.x - 0x8000, this->actor.shape.rot.y, 0, MTXMODE_APPLY);
|
||||
Matrix_MultVec3f(&D_809B8080, &this->unk158[0]);
|
||||
for (i = 0; i < 5; i++) {
|
||||
temp = -Math_CosS(this->unk31A * 0x444) * (i * 400);
|
||||
Math_SmoothStepToS(&this->unk2A8[i].x, temp - 0x4000, 1, this->unk31C, 0);
|
||||
Math_SmoothStepToS(&this->unk2A8[i].y, this->actor.yawTowardsPlayer, 1, this->unk31C, 0);
|
||||
Matrix_Translate(this->unk158[i].x, this->unk158[i].y, this->unk158[i].z, MTXMODE_NEW);
|
||||
Matrix_RotateRPY(this->unk2A8[i].x - 0x8000, this->unk2A8[i].y, 0, MTXMODE_APPLY);
|
||||
Matrix_RotateZYX(this->unk2A8[i].x - 0x8000, this->unk2A8[i].y, 0, MTXMODE_APPLY);
|
||||
Matrix_MultVec3f(&D_809B8080, &this->unk158[i + 1]);
|
||||
}
|
||||
for (i = 5; i < 13; i++) {
|
||||
Math_SmoothStepToS(&this->unk2A8[i].x, this->unk2A8[5].x, 1, this->unk31C, 0);
|
||||
Math_SmoothStepToS(&this->unk2A8[i].y, this->unk2A8[5].y, 1, this->unk31C, 0);
|
||||
Matrix_Translate(this->unk158[i].x, this->unk158[i].y, this->unk158[i].z, MTXMODE_NEW);
|
||||
Matrix_RotateRPY(this->unk2A8[i].x - 0x8000, this->unk2A8[i].y, 0, MTXMODE_APPLY);
|
||||
Matrix_RotateZYX(this->unk2A8[i].x - 0x8000, this->unk2A8[i].y, 0, MTXMODE_APPLY);
|
||||
Matrix_MultVec3f(&sp6C, &this->unk158[i + 1]);
|
||||
}
|
||||
this->unk31A--;
|
||||
|
@ -487,7 +487,7 @@ void EnBa_Draw(Actor* thisx, GlobalContext* globalCtx) {
|
|||
(globalCtx->gameplayFrames * -10) % 128, 32, 32));
|
||||
for (i = 0; i < 14; i++, mtx++) {
|
||||
Matrix_Translate(this->unk158[i].x, this->unk158[i].y, this->unk158[i].z, MTXMODE_NEW);
|
||||
Matrix_RotateRPY(this->unk2A8[i].x, this->unk2A8[i].y, this->unk2A8[i].z, MTXMODE_APPLY);
|
||||
Matrix_RotateZYX(this->unk2A8[i].x, this->unk2A8[i].y, this->unk2A8[i].z, MTXMODE_APPLY);
|
||||
Matrix_Scale(this->unk200[i].x, this->unk200[i].y, this->unk200[i].z, MTXMODE_APPLY);
|
||||
if ((i == 6) || (i == 13)) {
|
||||
switch (i) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue