Fix song of time frustum (#204)

This commit is contained in:
Archez
2024-05-22 09:05:01 -05:00
committed by Garrett Cox
parent 0a08986176
commit d8c2361986
2 changed files with 5 additions and 4 deletions
+1 -1
View File
@@ -1,7 +1,7 @@
<Root>
<File Name="ovl_Oceff_Wipe" BaseAddress="0x809764B0" RangeStart="0x4F0" RangeEnd="0xCB0">
<Texture Name="sSongOfTimeEffectTex" OutName="song_of_time_effect" Format="i8" Width="32" Height="32" Offset="0x4F0"/>
<Array Name="sSongOfTimeFrustumVtx" Count="32" Offset="0x8F0">
<Array Name="sSongOfTimeFrustumVtx" Count="40" Offset="0x8F0">
<Vtx/>
</Array>
<DList Name="sSongOfTimeFrustumMaterialDL" Offset="0xB70"/>
@@ -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];
}