diff options
| author | engineer124 <47598039+engineer124@users.noreply.github.com> | 2021-12-07 13:13:18 +1100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-12-07 02:13:18 +0000 |
| commit | 6ae28a789ac6a5a3c4cac69f7ecabc82b0d150e5 (patch) | |
| tree | 1486e7009177d370c67ffb345fe1646c24c786ad /src/code | |
| parent | 93d7fe080b09b54f953f5213f550235b2a593b8a (diff) | |
Macro Clean up (#454)
* Add OS macros
* MTXMODE cleanup
* format
* More matrix mode macros missed
Diffstat (limited to 'src/code')
| -rw-r--r-- | src/code/z_debug_display.c | 10 | ||||
| -rw-r--r-- | src/code/z_view.c | 8 | ||||
| -rw-r--r-- | src/code/z_vr_box.c | 6 |
3 files changed, 12 insertions, 12 deletions
diff --git a/src/code/z_debug_display.c b/src/code/z_debug_display.c index 2fe6b7977..f9c9f60b4 100644 --- a/src/code/z_debug_display.c +++ b/src/code/z_debug_display.c @@ -68,10 +68,10 @@ void DebugDisplay_DrawSpriteI8(DebugDispObject* dispObj, void* texture, GlobalCo func_8012C6FC(globalCtx->state.gfxCtx); gDPSetPrimColor(POLY_XLU_DISP++, 0, 0, dispObj->color.r, dispObj->color.g, dispObj->color.b, dispObj->color.a); - Matrix_InsertTranslation(dispObj->pos.x, dispObj->pos.y, dispObj->pos.z, 0); - Matrix_Scale(dispObj->scale.x, dispObj->scale.y, dispObj->scale.z, 1); - Matrix_InsertMatrix(&globalCtx->mf_187FC, 1); - Matrix_InsertRotation(dispObj->rot.x, dispObj->rot.y, dispObj->rot.z, 1); + Matrix_InsertTranslation(dispObj->pos.x, dispObj->pos.y, dispObj->pos.z, MTXMODE_NEW); + Matrix_Scale(dispObj->scale.x, dispObj->scale.y, dispObj->scale.z, MTXMODE_APPLY); + Matrix_InsertMatrix(&globalCtx->mf_187FC, MTXMODE_APPLY); + Matrix_InsertRotation(dispObj->rot.x, dispObj->rot.y, dispObj->rot.z, MTXMODE_APPLY); gDPLoadTextureBlock(POLY_XLU_DISP++, texture, G_IM_FMT_I, G_IM_SIZ_8b, 16, 16, 0, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMASK, G_TX_NOMASK, G_TX_NOLOD, G_TX_NOLOD); @@ -95,7 +95,7 @@ void DebugDisplay_DrawPolygon(DebugDispObject* dispObj, void* arg1, GlobalContex gSPSetLights1(POLY_XLU_DISP++, sDebugDisplayLight1); Matrix_SetStateRotationAndTranslation(dispObj->pos.x, dispObj->pos.y, dispObj->pos.z, &dispObj->rot); - Matrix_Scale(dispObj->scale.x, dispObj->scale.y, dispObj->scale.z, 1); + Matrix_Scale(dispObj->scale.x, dispObj->scale.y, dispObj->scale.z, MTXMODE_APPLY); gSPMatrix(POLY_XLU_DISP++, Matrix_NewMtx(globalCtx->state.gfxCtx), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); gSPDisplayList(POLY_XLU_DISP++, arg1); diff --git a/src/code/z_view.c b/src/code/z_view.c index c325fd563..da2e3593b 100644 --- a/src/code/z_view.c +++ b/src/code/z_view.c @@ -259,11 +259,11 @@ s32 View_StepQuake(View* view, Mtx* matrix) { Matrix_FromRSPMatrix(matrix, &mf); Matrix_SetCurrentState(&mf); Matrix_RotateStateAroundXAxis(view->currQuakeRot.x); - Matrix_InsertYRotation_f(view->currQuakeRot.y, 1); - Matrix_InsertZRotation_f(view->currQuakeRot.z, 1); + Matrix_InsertYRotation_f(view->currQuakeRot.y, MTXMODE_APPLY); + Matrix_InsertZRotation_f(view->currQuakeRot.z, MTXMODE_APPLY); Matrix_Scale(view->currQuakeScale.x, view->currQuakeScale.y, view->currQuakeScale.z, MTXMODE_APPLY); - Matrix_InsertZRotation_f(-view->currQuakeRot.z, 1); - Matrix_InsertYRotation_f(-view->currQuakeRot.y, 1); + Matrix_InsertZRotation_f(-view->currQuakeRot.z, MTXMODE_APPLY); + Matrix_InsertYRotation_f(-view->currQuakeRot.y, MTXMODE_APPLY); Matrix_RotateStateAroundXAxis(-view->currQuakeRot.x); Matrix_ToMtx(matrix); diff --git a/src/code/z_vr_box.c b/src/code/z_vr_box.c index 9e949beac..724bc5971 100644 --- a/src/code/z_vr_box.c +++ b/src/code/z_vr_box.c @@ -103,7 +103,7 @@ void func_80143324(GlobalContext* globalCtx, SkyboxContext* skyboxCtx, s16 skyTy SEGMENT_ROM_START(d2_cloud_static), size, 0, &skyboxCtx->loadQueue, NULL); } - osRecvMesg(&skyboxCtx->loadQueue, NULL, 1); + osRecvMesg(&skyboxCtx->loadQueue, NULL, OS_MESG_BLOCK); osCreateMesgQueue(&skyboxCtx->loadQueue, &skyboxCtx->loadMsg, 1); if (globalCtx->envCtx.unk_11 == 0) { @@ -120,7 +120,7 @@ void func_80143324(GlobalContext* globalCtx, SkyboxContext* skyboxCtx, s16 skyTy SEGMENT_ROM_START(d2_cloud_static), size, 0, &skyboxCtx->loadQueue, NULL); } - osRecvMesg(&skyboxCtx->loadQueue, NULL, 1); + osRecvMesg(&skyboxCtx->loadQueue, NULL, OS_MESG_BLOCK); osCreateMesgQueue(&skyboxCtx->loadQueue, &skyboxCtx->loadMsg, 1); size = SEGMENT_ROM_SIZE(d2_fine_pal_static); @@ -129,7 +129,7 @@ void func_80143324(GlobalContext* globalCtx, SkyboxContext* skyboxCtx, s16 skyTy DmaMgr_SendRequestImpl(&skyboxCtx->unk1C8, skyboxCtx->skyboxPaletteStaticSegment, SEGMENT_ROM_START(d2_fine_pal_static), size, 0, &skyboxCtx->loadQueue, NULL); - osRecvMesg(&skyboxCtx->loadQueue, NULL, 1); + osRecvMesg(&skyboxCtx->loadQueue, NULL, OS_MESG_BLOCK); } } |
