mirror of
https://github.com/HarbourMasters/Shipwright.git
synced 2025-08-22 14:23:44 -07:00
Fixed memory leak and fog issue on pause screen.
This commit is contained in:
parent
c203bf5a3f
commit
f146101d17
3 changed files with 4 additions and 35 deletions
|
@ -1601,7 +1601,8 @@ void func_80091A24(GlobalContext* globalCtx, void* seg04, void* seg06, SkelAnime
|
||||||
|
|
||||||
func_80093C80(globalCtx);
|
func_80093C80(globalCtx);
|
||||||
|
|
||||||
POLY_OPA_DISP = Gfx_SetFog2(POLY_OPA_DISP++, 0, 0, 0, 0, 997, 1000);
|
// OTRTODO: Commenting out this line fixes the fog issue... but at what cost?
|
||||||
|
//POLY_OPA_DISP = Gfx_SetFog2(POLY_OPA_DISP++, 0, 0, 0, 0, 997, 1000);
|
||||||
|
|
||||||
func_8002EABC(pos, &globalCtx->view.eye, &lightDir, globalCtx->state.gfxCtx);
|
func_8002EABC(pos, &globalCtx->view.eye, &lightDir, globalCtx->state.gfxCtx);
|
||||||
|
|
||||||
|
|
|
@ -1001,9 +1001,8 @@ void Skybox_Setup(GlobalContext* globalCtx, SkyboxContext* skyboxCtx, s16 skybox
|
||||||
LoadSkyboxPalette(globalCtx, skyboxCtx, 2, gBackAlleyHouseBg3Tlut, 16, 16);
|
LoadSkyboxPalette(globalCtx, skyboxCtx, 2, gBackAlleyHouseBg3Tlut, 16, 16);
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
skyboxCtx->staticSegments[0] = GameState_Alloc(&globalCtx->state, 0x10000 * 8, "../z_vr_box.c", 1226);
|
skyboxCtx->staticSegments[0] = GameState_Alloc(&globalCtx->state, 0x10000 * 4, "../z_vr_box.c", 1226);
|
||||||
//skyboxCtx->staticSegments[1] = GameState_Alloc(&globalCtx->state, 0x10000 * 8, "../z_vr_box.c", 1226);
|
skyboxCtx->staticSegments[1] = GameState_Alloc(&globalCtx->state, 0x10000 * 4, "../z_vr_box.c", 1226);
|
||||||
skyboxCtx->staticSegments[1] = malloc(0x10000 * 8); // OTRTODO
|
|
||||||
skyboxCtx->palettes = GameState_Alloc(&globalCtx->state, 0x1000, "../z_vr_box.c", 1226);
|
skyboxCtx->palettes = GameState_Alloc(&globalCtx->state, 0x1000, "../z_vr_box.c", 1226);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
|
@ -789,40 +789,10 @@ static PreRender sPlayerPreRender;
|
||||||
static void* sPreRenderCvg;
|
static void* sPreRenderCvg;
|
||||||
extern int fbTest;
|
extern int fbTest;
|
||||||
|
|
||||||
// OTRTODO: This function is no longer used. We could probably remove it.
|
|
||||||
void KaleidoScope_SetupPlayerPreRender(GlobalContext* globalCtx) {
|
|
||||||
Gfx* gfx;
|
|
||||||
Gfx* gfxRef;
|
|
||||||
void* fbuf;
|
|
||||||
static Gfx testBuffer[2048];
|
|
||||||
|
|
||||||
//return;
|
|
||||||
|
|
||||||
fbuf = globalCtx->state.gfxCtx->curFrameBuffer;
|
|
||||||
|
|
||||||
OPEN_DISPS(globalCtx->state.gfxCtx, "../z_kaleido_scope_PAL.c", 496);
|
|
||||||
|
|
||||||
gfx = &testBuffer[0];
|
|
||||||
|
|
||||||
PreRender_SetValues(&sPlayerPreRender, 64, 112, fbuf, NULL);
|
|
||||||
func_800C1F20(&sPlayerPreRender, &gfx);
|
|
||||||
func_800C20B4(&sPlayerPreRender, &gfx);
|
|
||||||
|
|
||||||
gSPEndDisplayList(gfx++);
|
|
||||||
gSPDisplayList(POLY_KAL_DISP++, &testBuffer[0]);
|
|
||||||
|
|
||||||
SREG(33) |= 1;
|
|
||||||
|
|
||||||
CLOSE_DISPS(globalCtx->state.gfxCtx, "../z_kaleido_scope_PAL.c", 509);
|
|
||||||
}
|
|
||||||
//OTRTODO - Player on pause
|
|
||||||
#if 1
|
|
||||||
void KaleidoScope_ProcessPlayerPreRender(void) {
|
void KaleidoScope_ProcessPlayerPreRender(void) {
|
||||||
//Sleep_Msec(50);
|
|
||||||
PreRender_Calc(&sPlayerPreRender);
|
PreRender_Calc(&sPlayerPreRender);
|
||||||
PreRender_Destroy(&sPlayerPreRender);
|
PreRender_Destroy(&sPlayerPreRender);
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
|
|
||||||
Gfx* KaleidoScope_QuadTextureIA4(Gfx* gfx, void* texture, s16 width, s16 height, u16 point) {
|
Gfx* KaleidoScope_QuadTextureIA4(Gfx* gfx, void* texture, s16 width, s16 height, u16 point) {
|
||||||
gDPLoadTextureBlock_4b(gfx++, texture, G_IM_FMT_IA, width, height, 0, G_TX_NOMIRROR | G_TX_WRAP,
|
gDPLoadTextureBlock_4b(gfx++, texture, G_IM_FMT_IA, width, height, 0, G_TX_NOMIRROR | G_TX_WRAP,
|
||||||
|
@ -4026,7 +3996,6 @@ void KaleidoScope_Update(GlobalContext* globalCtx)
|
||||||
ResourceMgr_DirtyDirectory("textures/icon_item_24_static*");
|
ResourceMgr_DirtyDirectory("textures/icon_item_24_static*");
|
||||||
ResourceMgr_DirtyDirectory("textures/icon_item_static*");
|
ResourceMgr_DirtyDirectory("textures/icon_item_static*");
|
||||||
CVar_SetS32("gPauseTriforce", 0);
|
CVar_SetS32("gPauseTriforce", 0);
|
||||||
//ResourceMgr_InvalidateCache();
|
|
||||||
|
|
||||||
func_800981B8(&globalCtx->objectCtx);
|
func_800981B8(&globalCtx->objectCtx);
|
||||||
func_800418D0(&globalCtx->colCtx, globalCtx);
|
func_800418D0(&globalCtx->colCtx, globalCtx);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue