2015-12-25 03:58:42 +00:00
|
|
|
RefreshScreen:: ; 2dba
|
2015-12-19 19:48:30 +00:00
|
|
|
call ClearWindowData
|
2013-09-19 01:40:48 +00:00
|
|
|
ld a, [hROMBank]
|
|
|
|
push af
|
2016-05-05 02:34:09 +00:00
|
|
|
ld a, BANK(ReanchorBGMap_NoOAMUpdate) ; and BANK(LoadFonts_NoOAMUpdate)
|
2013-09-19 01:40:48 +00:00
|
|
|
rst Bankswitch
|
|
|
|
|
2016-05-05 02:34:09 +00:00
|
|
|
call ReanchorBGMap_NoOAMUpdate
|
|
|
|
call _OpenAndCloseMenu_HDMATransferTileMapAndAttrMap
|
|
|
|
call LoadFonts_NoOAMUpdate
|
2013-09-19 01:40:48 +00:00
|
|
|
|
|
|
|
pop af
|
|
|
|
rst Bankswitch
|
|
|
|
ret
|
|
|
|
; 2dcf
|
|
|
|
|
|
|
|
|
2015-11-25 15:16:29 +00:00
|
|
|
CloseText:: ; 2dcf
|
2013-09-19 01:40:48 +00:00
|
|
|
ld a, [hOAMUpdate]
|
|
|
|
push af
|
|
|
|
ld a, $1
|
|
|
|
ld [hOAMUpdate], a
|
2015-10-24 14:34:19 +00:00
|
|
|
|
2015-12-09 23:25:44 +00:00
|
|
|
call .CloseText
|
2015-10-24 14:34:19 +00:00
|
|
|
|
2013-09-19 01:40:48 +00:00
|
|
|
pop af
|
|
|
|
ld [hOAMUpdate], a
|
2018-01-23 22:39:09 +00:00
|
|
|
ld hl, wVramState
|
2013-09-19 01:40:48 +00:00
|
|
|
res 6, [hl]
|
|
|
|
ret
|
|
|
|
; 2de2
|
|
|
|
|
2016-04-10 18:42:14 +00:00
|
|
|
.CloseText: ; 2de2
|
2015-12-19 19:48:30 +00:00
|
|
|
call ClearWindowData
|
2013-09-19 01:40:48 +00:00
|
|
|
xor a
|
|
|
|
ld [hBGMapMode], a
|
2015-11-11 19:12:46 +00:00
|
|
|
call OverworldTextModeSwitch
|
2016-05-05 02:34:09 +00:00
|
|
|
call _OpenAndCloseMenu_HDMATransferTileMapAndAttrMap
|
2013-09-19 01:40:48 +00:00
|
|
|
xor a
|
|
|
|
ld [hBGMapMode], a
|
2016-05-10 16:31:49 +00:00
|
|
|
call SafeUpdateSprites
|
2013-09-19 01:40:48 +00:00
|
|
|
ld a, $90
|
|
|
|
ld [hWY], a
|
2015-11-04 21:14:27 +00:00
|
|
|
call ReplaceKrisSprite
|
2017-12-24 17:47:30 +00:00
|
|
|
farcall ReturnFromMapSetupScript
|
|
|
|
farcall LoadOverworldFont
|
2013-09-19 01:40:48 +00:00
|
|
|
ret
|
|
|
|
; 2e08
|
|
|
|
|
2015-12-09 23:25:44 +00:00
|
|
|
OpenText:: ; 2e08
|
2015-12-19 19:48:30 +00:00
|
|
|
call ClearWindowData
|
2013-09-19 01:40:48 +00:00
|
|
|
ld a, [hROMBank]
|
|
|
|
push af
|
2016-05-05 02:34:09 +00:00
|
|
|
ld a, BANK(ReanchorBGMap_NoOAMUpdate) ; and BANK(LoadFonts_NoOAMUpdate)
|
2013-09-19 01:40:48 +00:00
|
|
|
rst Bankswitch
|
|
|
|
|
2016-05-05 02:34:09 +00:00
|
|
|
call ReanchorBGMap_NoOAMUpdate ; clear bgmap
|
2013-09-19 01:40:48 +00:00
|
|
|
call SpeechTextBox
|
2016-05-05 02:34:09 +00:00
|
|
|
call _OpenAndCloseMenu_HDMATransferTileMapAndAttrMap ; anchor bgmap
|
|
|
|
call LoadFonts_NoOAMUpdate ; load font
|
2013-09-19 01:40:48 +00:00
|
|
|
pop af
|
|
|
|
rst Bankswitch
|
|
|
|
|
|
|
|
ret
|
|
|
|
; 2e20
|
|
|
|
|
2016-05-05 02:34:09 +00:00
|
|
|
_OpenAndCloseMenu_HDMATransferTileMapAndAttrMap:: ; 2e20
|
2013-09-19 01:40:48 +00:00
|
|
|
ld a, [hOAMUpdate]
|
|
|
|
push af
|
|
|
|
ld a, $1
|
|
|
|
ld [hOAMUpdate], a
|
2015-10-18 00:49:34 +00:00
|
|
|
|
2017-12-24 17:47:30 +00:00
|
|
|
farcall OpenAndCloseMenu_HDMATransferTileMapAndAttrMap
|
2015-10-18 00:49:34 +00:00
|
|
|
|
2013-09-19 01:40:48 +00:00
|
|
|
pop af
|
|
|
|
ld [hOAMUpdate], a
|
|
|
|
ret
|
|
|
|
; 2e31
|
|
|
|
|
2016-05-10 16:31:49 +00:00
|
|
|
SafeUpdateSprites:: ; 2e31
|
2013-09-19 01:40:48 +00:00
|
|
|
ld a, [hOAMUpdate]
|
|
|
|
push af
|
|
|
|
ld a, [hBGMapMode]
|
|
|
|
push af
|
|
|
|
xor a
|
|
|
|
ld [hBGMapMode], a
|
|
|
|
ld a, $1
|
|
|
|
ld [hOAMUpdate], a
|
2016-05-10 16:31:49 +00:00
|
|
|
|
2015-07-22 19:57:02 +00:00
|
|
|
call UpdateSprites
|
2016-05-10 16:31:49 +00:00
|
|
|
|
2013-09-19 01:40:48 +00:00
|
|
|
xor a
|
|
|
|
ld [hOAMUpdate], a
|
|
|
|
call DelayFrame
|
|
|
|
pop af
|
|
|
|
ld [hBGMapMode], a
|
|
|
|
pop af
|
|
|
|
ld [hOAMUpdate], a
|
|
|
|
ret
|
2016-05-10 16:59:34 +00:00
|
|
|
|
2018-01-02 12:24:05 +00:00
|
|
|
; unused
|
2016-05-10 16:59:34 +00:00
|
|
|
scf
|
|
|
|
ret
|
|
|
|
; 2e50
|