Invalidate texture cache when loading dungeon maps (fixes #21) (#168)

* Invalidate texture cache when loading dungeon maps (fixes #21)

* Adjust point of dungeon map invalidation to account for constant updates each frame
This commit is contained in:
Rozelette 2022-04-21 17:36:21 -05:00 committed by GitHub
parent f66178772d
commit f5a3d3c4bf
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 1 deletions

View File

@ -595,7 +595,6 @@ void KaleidoScope_DrawEquipment(GlobalContext* globalCtx) {
gSPInvalidateTexCache(POLY_KAL_DISP++, pauseCtx->iconItemSegment);
//gSPInvalidateTexCache(POLY_KAL_DISP++, pauseCtx->iconItem24Segment);
gSPInvalidateTexCache(POLY_KAL_DISP++, pauseCtx->nameSegment);
gSPInvalidateTexCache(POLY_KAL_DISP++, globalCtx->interfaceCtx.mapSegment);
//gSPSegment(POLY_KAL_DISP++, 0x07, pauseCtx->playerSegment);
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);
// 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,
G_TX_WRAP | G_TX_NOMIRROR, G_TX_NOMASK, G_TX_NOMASK, G_TX_NOLOD, G_TX_NOLOD);