1
0
Fork 0
mirror of https://github.com/zeldaret/oot.git synced 2025-08-10 17:00:19 +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:
Dragorn421 2022-01-11 00:28:01 +01:00 committed by GitHub
parent 0b8edc21c0
commit b1d3844325
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
63 changed files with 403 additions and 374 deletions

View file

@ -70,7 +70,7 @@ void EffectSsExtra_Draw(GlobalContext* globalCtx, u32 index, EffectSs* this) {
Matrix_Translate(this->pos.x, this->pos.y, this->pos.z, MTXMODE_NEW);
Matrix_Scale(scale, scale, scale, MTXMODE_APPLY);
func_80093D84(globalCtx->state.gfxCtx);
func_800D1FD4(&globalCtx->billboardMtxF);
Matrix_ReplaceRotation(&globalCtx->billboardMtxF);
gSPMatrix(POLY_XLU_DISP++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_eff_ss_extra.c", 186),
G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
gSPSegment(POLY_XLU_DISP++, 0x08, SEGMENTED_TO_VIRTUAL(sTextures[this->rScoreIdx]));

View file

@ -103,7 +103,7 @@ void EffectSsFhgFlash_DrawLightBall(GlobalContext* globalCtx, u32 index, EffectS
gDPSetPrimColor(POLY_XLU_DISP++, 0, 0, 255, 255, 255, this->rAlpha);
gDPSetEnvColor(POLY_XLU_DISP++, sColors[this->rParam].r, sColors[this->rParam].g, sColors[this->rParam].b, 0);
gDPPipeSync(POLY_XLU_DISP++);
func_800D1FD4(&globalCtx->billboardMtxF);
Matrix_ReplaceRotation(&globalCtx->billboardMtxF);
Matrix_RotateZ((this->rXZRot / 32768.0f) * 3.1416f, MTXMODE_APPLY);
gSPMatrix(POLY_XLU_DISP++, Matrix_NewMtx(gfxCtx, "../z_eff_fhg_flash.c", 326),
G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
@ -130,7 +130,7 @@ void EffectSsFhgFlash_DrawShock(GlobalContext* globalCtx, u32 index, EffectSs* t
gDPSetRenderMode(POLY_XLU_DISP++, G_RM_PASS, G_RM_AA_ZB_XLU_DECAL2);
} else {
func_80093D84(globalCtx->state.gfxCtx);
func_800D1FD4(&globalCtx->billboardMtxF);
Matrix_ReplaceRotation(&globalCtx->billboardMtxF);
gDPSetRenderMode(POLY_XLU_DISP++, G_RM_PASS, G_RM_AA_ZB_XLU_SURF2);
}

View file

@ -75,7 +75,7 @@ void EffectSsIceSmoke_Draw(GlobalContext* globalCtx, u32 index, EffectSs* this)
POLY_XLU_DISP++, 0x08,
Gfx_TwoTexScroll(globalCtx->state.gfxCtx, 0, this->life * 3, this->life * 15, 32, 64, 1, 0, 0, 32, 32));
Matrix_Translate(this->pos.x, this->pos.y, this->pos.z, MTXMODE_NEW);
func_800D1FD4(&globalCtx->billboardMtxF);
Matrix_ReplaceRotation(&globalCtx->billboardMtxF);
scale = this->rScale * 0.0001f;
Matrix_Scale(scale, scale, 1.0f, MTXMODE_APPLY);

View file

@ -69,7 +69,7 @@ void EffectSsKFire_Draw(GlobalContext* globalCtx, u32 index, EffectSs* this) {
if (1) {}
gDPPipeSync(POLY_XLU_DISP++);
func_800D1FD4(&globalCtx->billboardMtxF);
Matrix_ReplaceRotation(&globalCtx->billboardMtxF);
if ((index & 1) != 0) {
Matrix_RotateY(M_PI, MTXMODE_APPLY);