From d8c2361986fdaa0451e2d82c12b449b5f0b7251b Mon Sep 17 00:00:00 2001 From: Archez Date: Mon, 15 Apr 2024 23:23:57 -0400 Subject: [PATCH] Fix song of time frustum (#204) --- mm/assets/xml/overlays/ovl_Oceff_Wipe.xml | 2 +- mm/src/overlays/actors/ovl_Oceff_Wipe/z_oceff_wipe.c | 7 ++++--- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/mm/assets/xml/overlays/ovl_Oceff_Wipe.xml b/mm/assets/xml/overlays/ovl_Oceff_Wipe.xml index 17a056175..883de8970 100644 --- a/mm/assets/xml/overlays/ovl_Oceff_Wipe.xml +++ b/mm/assets/xml/overlays/ovl_Oceff_Wipe.xml @@ -1,7 +1,7 @@ - + diff --git a/mm/src/overlays/actors/ovl_Oceff_Wipe/z_oceff_wipe.c b/mm/src/overlays/actors/ovl_Oceff_Wipe/z_oceff_wipe.c index 1870a5ca8..bd843f589 100644 --- a/mm/src/overlays/actors/ovl_Oceff_Wipe/z_oceff_wipe.c +++ b/mm/src/overlays/actors/ovl_Oceff_Wipe/z_oceff_wipe.c @@ -93,10 +93,11 @@ void OceffWipe_Draw(Actor* thisx, PlayState* play) { alphaTable[2] = 255; } + // 2S2H [Port] Originally this was just a pointer to the vertices, now it's the OTR path so we need to grab it's actual address + // and move out of loop as we don't need to load the resource each iteration + vtxPtr = ResourceMgr_LoadVtxByName(sSongOfTimeFrustumVtx); + for (i = 0; i < 20; i++) { - // #region 2S2H [Port] Originally this was just a pointer to the vertices, now it's the OTR path so we need to grab it's actual address - vtxPtr = ResourceMgr_LoadVtxByName(sSongOfTimeFrustumVtx); - // #endregion vtxPtr[i * 2 + 0].v.cn[3] = alphaTable[(sAlphaIndices[i] & 0xF0) >> 4]; vtxPtr[i * 2 + 1].v.cn[3] = alphaTable[sAlphaIndices[i] & 0xF]; }