pokecrystal
pokecrystal copied to clipboard
Bug: Closing textboxes overlapping tiles $80+ glitches out for a frame
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.
Can this even be fixed without a significant refactor to the way tiles are updated?
"Fix: Refactor how tiles are updated to avoid this." or "No fix exists yet" are still valid ways to document that the bug exists.
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).