pokecrystal icon indicating copy to clipboard operation
pokecrystal copied to clipboard

Bug: Closing textboxes overlapping tiles $80+ glitches out for a frame

Open Rangi42 opened this issue 1 year ago • 3 comments

The overworld engine puts tiles $80-$FF in VRAM bank 1. When a textbox is overlapping them and it closes, there can be a one-frame flash of glitches tiles as the VRAM is updated. Setting a breakpoint on call _OpenAndCloseMenu_HDMATransferTilemapAndAttrmap can help notice it, as reported by NickJam.

image

image

Rangi42 avatar Jan 01 '24 21:01 Rangi42

Can this even be fixed without a significant refactor to the way tiles are updated?

mid-kid avatar Jan 03 '24 14:01 mid-kid

"Fix: Refactor how tiles are updated to avoid this." or "No fix exists yet" are still valid ways to document that the bug exists.

Rangi42 avatar Jan 03 '24 15:01 Rangi42

You can avoid this by overlaying the window (which is using the tilemap with no text tiles) during the transition, by writing $00 to hWY either just before or just after the call to OverworldTextModeSwitch (depending on if you want the text to last an extra frame or not).

xCrystal avatar Jan 10 '24 20:01 xCrystal