fix: no longer leak memory, invalidate textures properly (#2223)
* Revert "Fix Ganondorf boss battle ending (MQ only) (#2072)"
This reverts commit 52b896271c.
* yolo this should work
* finish comment
* see if this doesn't lag switches!
* formatting
* formatting
Co-authored-by: briaguya <briaguya@alice>
This commit is contained in:
@@ -1703,10 +1703,7 @@ void BossDodongo_DrawEffects(PlayState* play) {
|
||||
Gfx_SetupDL_25Xlu(play->state.gfxCtx);
|
||||
unkMtx = &play->billboardMtxF;
|
||||
|
||||
// OTRTODO: This call causes the whole texture cache to be cleaned up, which causes an important slowdown on switch so we need to find a way to avoid it.
|
||||
#if !defined(__SWITCH__) && !defined(__WIIU__)
|
||||
gSPInvalidateTexCache(POLY_XLU_DISP++, 0);
|
||||
#endif
|
||||
gSPInvalidateTexCache(POLY_XLU_DISP++, gDodongosCavernBossLavaFloorTex);
|
||||
|
||||
for (i = 0; i < 80; i++, eff++) {
|
||||
FrameInterpolation_RecordOpenChild(eff, eff->epoch);
|
||||
|
||||
@@ -1197,8 +1197,10 @@ void BossGanon_SetupTowerCutscene(BossGanon* this, PlayState* play) {
|
||||
|
||||
void BossGanon_ShatterWindows(u8 windowShatterState) {
|
||||
s16 i;
|
||||
u8* tex1 = ResourceMgr_LoadTexByName(SEGMENTED_TO_VIRTUAL(ResourceMgr_GetName(ganon_boss_sceneTex_006C18)));
|
||||
u8* tex2 = ResourceMgr_LoadTexByName(SEGMENTED_TO_VIRTUAL(ResourceMgr_GetName(ganon_boss_sceneTex_007418)));
|
||||
// Temporary solution: using LoadTexOrDList to ensure we actually have the texture available
|
||||
// based on mq/nonmq. This will be handled properly with LUS 1.0
|
||||
u8* tex1 = ResourceMgr_LoadTexOrDListByName(SEGMENTED_TO_VIRTUAL(ganon_boss_sceneTex_006C18));
|
||||
u8* tex2 = ResourceMgr_LoadTexOrDListByName(SEGMENTED_TO_VIRTUAL(ganon_boss_sceneTex_007418));
|
||||
u8* templateTex = ResourceMgr_LoadTexByName(SEGMENTED_TO_VIRTUAL(gGanondorfWindowShatterTemplateTex));
|
||||
|
||||
for (i = 0; i < 2048; i++) {
|
||||
@@ -3820,8 +3822,8 @@ void BossGanon_Draw(Actor* thisx, PlayState* play) {
|
||||
|
||||
// Invalidate textures if they have changed
|
||||
if (this->windowShatterState != GDF_WINDOW_SHATTER_OFF) {
|
||||
gSPInvalidateTexCache(POLY_OPA_DISP++, ResourceMgr_GetName(ganon_boss_sceneTex_006C18));
|
||||
gSPInvalidateTexCache(POLY_OPA_DISP++, ResourceMgr_GetName(ganon_boss_sceneTex_007418));
|
||||
gSPInvalidateTexCache(POLY_OPA_DISP++, ganon_boss_sceneTex_006C18);
|
||||
gSPInvalidateTexCache(POLY_OPA_DISP++, ganon_boss_sceneTex_007418);
|
||||
}
|
||||
|
||||
Gfx_SetupDL_25Opa(play->state.gfxCtx);
|
||||
|
||||
Reference in New Issue
Block a user