Adjust point of dungeon map invalidation to account for constant updates each frame

This commit is contained in:
rozlette 2022-04-14 11:33:05 -05:00
commit 33a75b2458
3 changed files with 4 additions and 4 deletions

View file

@ -595,7 +595,6 @@ void KaleidoScope_DrawEquipment(GlobalContext* globalCtx) {
gSPInvalidateTexCache(POLY_KAL_DISP++, pauseCtx->iconItemSegment); gSPInvalidateTexCache(POLY_KAL_DISP++, pauseCtx->iconItemSegment);
//gSPInvalidateTexCache(POLY_KAL_DISP++, pauseCtx->iconItem24Segment); //gSPInvalidateTexCache(POLY_KAL_DISP++, pauseCtx->iconItem24Segment);
gSPInvalidateTexCache(POLY_KAL_DISP++, pauseCtx->nameSegment); gSPInvalidateTexCache(POLY_KAL_DISP++, pauseCtx->nameSegment);
gSPInvalidateTexCache(POLY_KAL_DISP++, globalCtx->interfaceCtx.mapSegment);
//gSPSegment(POLY_KAL_DISP++, 0x07, pauseCtx->playerSegment); //gSPSegment(POLY_KAL_DISP++, 0x07, pauseCtx->playerSegment);
gSPSegment(POLY_KAL_DISP++, 0x08, pauseCtx->iconItemSegment); gSPSegment(POLY_KAL_DISP++, 0x08, pauseCtx->iconItemSegment);

View file

@ -332,6 +332,10 @@ void KaleidoScope_DrawDungeonMap(GlobalContext* globalCtx, GraphicsContext* gfxC
gSPVertex(POLY_KAL_DISP++, &pauseCtx->mapPageVtx[60], 8, 0); gSPVertex(POLY_KAL_DISP++, &pauseCtx->mapPageVtx[60], 8, 0);
// The dungeon map textures are recreated each frame, so always invalidate them
gSPInvalidateTexCache(POLY_KAL_DISP++, interfaceCtx->mapSegment);
gSPInvalidateTexCache(POLY_KAL_DISP++, interfaceCtx->mapSegment + 0x800);
gDPLoadTextureBlock_4b(POLY_KAL_DISP++, interfaceCtx->mapSegment, G_IM_FMT_CI, 48, 85, 0, G_TX_WRAP | G_TX_NOMIRROR, gDPLoadTextureBlock_4b(POLY_KAL_DISP++, interfaceCtx->mapSegment, G_IM_FMT_CI, 48, 85, 0, G_TX_WRAP | G_TX_NOMIRROR,
G_TX_WRAP | G_TX_NOMIRROR, G_TX_NOMASK, G_TX_NOMASK, G_TX_NOLOD, G_TX_NOLOD); G_TX_WRAP | G_TX_NOMIRROR, G_TX_NOMASK, G_TX_NOMASK, G_TX_NOLOD, G_TX_NOLOD);

View file

@ -2988,9 +2988,6 @@ void KaleidoScope_LoadDungeonMap(GlobalContext* globalCtx) {
memcpy(interfaceCtx->mapSegment, ResourceMgr_LoadTexByName(sDungeonMapTexs[R_MAP_TEX_INDEX]), 0x800); memcpy(interfaceCtx->mapSegment, ResourceMgr_LoadTexByName(sDungeonMapTexs[R_MAP_TEX_INDEX]), 0x800);
memcpy(interfaceCtx->mapSegment + 0x800, ResourceMgr_LoadTexByName(sDungeonMapTexs[R_MAP_TEX_INDEX + 1]), 0x800); memcpy(interfaceCtx->mapSegment + 0x800, ResourceMgr_LoadTexByName(sDungeonMapTexs[R_MAP_TEX_INDEX + 1]), 0x800);
gSPInvalidateTexCache(globalCtx->state.gfxCtx->polyKal.p++, interfaceCtx->mapSegment);
gSPInvalidateTexCache(globalCtx->state.gfxCtx->polyKal.p++, interfaceCtx->mapSegment + 0x800);
} }
void KaleidoScope_UpdateDungeonMap(GlobalContext* globalCtx) { void KaleidoScope_UpdateDungeonMap(GlobalContext* globalCtx) {