mirror of
https://github.com/zeldaret/oot.git
synced 2025-08-17 20:42:23 +00:00
Document undocumented matrix functions (#955)
* Document `func_800D1694` as `Matrix_TranslateRotateYXZ` * Document `func_800D1FD4` as `Matrix_ReplaceRotation` * Cleanup `Matrix_RotateAxis` * Document `func_800A7EC0` as `SkinMatrix_SetRotateAxis` * Document `func_800D2A34` and `func_800D2A98` as `Matrix_SetTranslateScaleMtx`(`F`) * Document mostly unused functions at the end of `sys_matrix.c` * Add in-use renamed functions to `namefixer.py` * Add `Matrix_SetTranslateScaleMtx2` to `namefixer.py` * Run formatter * Fix namefixer.py mistake from #952 * Format clang-11.1 * Fix `Matrix_TranslateRotateYXZ` wrongly documented, it actually is `Matrix_SetTranslateRotateYXZ` * VS Code is stellar at refactoring (no) * Run formatter * Come on VS Code * Improve `Matrix_ReplaceRotation` docs * Fix typo * Fix namefixer.py
This commit is contained in:
parent
0b8edc21c0
commit
b1d3844325
63 changed files with 403 additions and 374 deletions
|
@ -93,8 +93,9 @@ void ObjLightswitch_InitCollider(ObjLightswitch* this, GlobalContext* globalCtx)
|
|||
|
||||
Collider_InitJntSph(globalCtx, &this->collider);
|
||||
Collider_SetJntSph(globalCtx, &this->collider, &this->actor, &sColliderJntSphInit, this->colliderItems);
|
||||
func_800D1694(this->actor.world.pos.x, this->actor.world.pos.y + (this->actor.shape.yOffset * this->actor.scale.y),
|
||||
this->actor.world.pos.z, &this->actor.shape.rot);
|
||||
Matrix_SetTranslateRotateYXZ(this->actor.world.pos.x,
|
||||
this->actor.world.pos.y + (this->actor.shape.yOffset * this->actor.scale.y),
|
||||
this->actor.world.pos.z, &this->actor.shape.rot);
|
||||
Matrix_Scale(this->actor.scale.x, this->actor.scale.y, this->actor.scale.z, MTXMODE_APPLY);
|
||||
Collider_UpdateSpheres(0, &this->collider);
|
||||
}
|
||||
|
@ -411,7 +412,7 @@ void ObjLightswitch_DrawOpa(ObjLightswitch* this, GlobalContext* globalCtx) {
|
|||
this->actor.world.pos.y = child->world.pos.y + 60.0f;
|
||||
this->actor.world.pos.z = child->world.pos.z;
|
||||
Math_Vec3f_Copy(&pos, &this->actor.world.pos);
|
||||
func_800D1694(pos.x, pos.y, pos.z, &this->actor.shape.rot);
|
||||
Matrix_SetTranslateRotateYXZ(pos.x, pos.y, pos.z, &this->actor.shape.rot);
|
||||
Matrix_Scale(this->actor.scale.x, this->actor.scale.y, this->actor.scale.z, MTXMODE_APPLY);
|
||||
} else {
|
||||
pos.x = this->actor.world.pos.x;
|
||||
|
@ -427,14 +428,14 @@ void ObjLightswitch_DrawOpa(ObjLightswitch* this, GlobalContext* globalCtx) {
|
|||
rot.x = this->actor.shape.rot.x;
|
||||
rot.y = this->actor.shape.rot.y;
|
||||
rot.z = this->actor.shape.rot.z + this->flameRingRot;
|
||||
func_800D1694(pos.x, pos.y, pos.z, &rot);
|
||||
Matrix_SetTranslateRotateYXZ(pos.x, pos.y, pos.z, &rot);
|
||||
Matrix_Scale(this->actor.scale.x, this->actor.scale.y, this->actor.scale.z, MTXMODE_APPLY);
|
||||
gSPMatrix(POLY_OPA_DISP++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_obj_lightswitch.c", 859),
|
||||
G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
|
||||
gSPDisplayList(POLY_OPA_DISP++, object_lightswitch_DL_000398);
|
||||
|
||||
rot.z = this->actor.shape.rot.z - this->flameRingRot;
|
||||
func_800D1694(pos.x, pos.y, pos.z, &rot);
|
||||
Matrix_SetTranslateRotateYXZ(pos.x, pos.y, pos.z, &rot);
|
||||
Matrix_Scale(this->actor.scale.x, this->actor.scale.y, this->actor.scale.z, MTXMODE_APPLY);
|
||||
gSPMatrix(POLY_OPA_DISP++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_obj_lightswitch.c", 873),
|
||||
G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
|
||||
|
@ -468,14 +469,14 @@ void ObjLightswitch_DrawXlu(ObjLightswitch* this, GlobalContext* globalCtx) {
|
|||
sp60.y = this->actor.shape.rot.y;
|
||||
sp60.z = this->actor.shape.rot.z + this->flameRingRot;
|
||||
|
||||
func_800D1694(sp68.x, sp68.y, sp68.z, &sp60);
|
||||
Matrix_SetTranslateRotateYXZ(sp68.x, sp68.y, sp68.z, &sp60);
|
||||
Matrix_Scale(this->actor.scale.x, this->actor.scale.y, this->actor.scale.z, MTXMODE_APPLY);
|
||||
gSPMatrix(POLY_XLU_DISP++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_obj_lightswitch.c", 930),
|
||||
G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
|
||||
gSPDisplayList(POLY_XLU_DISP++, object_lightswitch_DL_000398);
|
||||
|
||||
sp60.z = this->actor.shape.rot.z - this->flameRingRot;
|
||||
func_800D1694(sp68.x, sp68.y, sp68.z, &sp60);
|
||||
Matrix_SetTranslateRotateYXZ(sp68.x, sp68.y, sp68.z, &sp60);
|
||||
Matrix_Scale(this->actor.scale.x, this->actor.scale.y, this->actor.scale.z, MTXMODE_APPLY);
|
||||
gSPMatrix(POLY_XLU_DISP++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_obj_lightswitch.c", 944),
|
||||
G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue