2018-06-24 16:09:41 +02:00
|
|
|
RefreshScreen::
|
2015-12-19 14:48:30 -05:00
|
|
|
call ClearWindowData
|
2018-08-25 14:28:22 -04:00
|
|
|
ldh a, [hROMBank]
|
2013-09-18 21:40:48 -04:00
|
|
|
push af
|
2019-01-12 15:17:20 -05:00
|
|
|
ld a, BANK(ReanchorBGMap_NoOAMUpdate) ; aka BANK(LoadFonts_NoOAMUpdate)
|
2013-09-18 21:40:48 -04:00
|
|
|
rst Bankswitch
|
|
|
|
|
2016-05-04 22:34:09 -04:00
|
|
|
call ReanchorBGMap_NoOAMUpdate
|
2020-02-13 18:30:13 +01:00
|
|
|
call _OpenAndCloseMenu_HDMATransferTilemapAndAttrmap
|
2016-05-04 22:34:09 -04:00
|
|
|
call LoadFonts_NoOAMUpdate
|
2013-09-18 21:40:48 -04:00
|
|
|
|
|
|
|
pop af
|
|
|
|
rst Bankswitch
|
|
|
|
ret
|
|
|
|
|
2018-06-24 16:09:41 +02:00
|
|
|
CloseText::
|
2018-08-25 14:28:22 -04:00
|
|
|
ldh a, [hOAMUpdate]
|
2013-09-18 21:40:48 -04:00
|
|
|
push af
|
|
|
|
ld a, $1
|
2018-08-25 14:28:22 -04:00
|
|
|
ldh [hOAMUpdate], a
|
2015-10-24 10:34:19 -04:00
|
|
|
|
2015-12-09 18:25:44 -05:00
|
|
|
call .CloseText
|
2015-10-24 10:34:19 -04:00
|
|
|
|
2013-09-18 21:40:48 -04:00
|
|
|
pop af
|
2018-08-25 14:28:22 -04:00
|
|
|
ldh [hOAMUpdate], a
|
2018-01-23 17:39:09 -05:00
|
|
|
ld hl, wVramState
|
2013-09-18 21:40:48 -04:00
|
|
|
res 6, [hl]
|
|
|
|
ret
|
|
|
|
|
2018-06-24 16:09:41 +02:00
|
|
|
.CloseText:
|
2015-12-19 14:48:30 -05:00
|
|
|
call ClearWindowData
|
2013-09-18 21:40:48 -04:00
|
|
|
xor a
|
2018-08-25 14:28:22 -04:00
|
|
|
ldh [hBGMapMode], a
|
2015-11-11 14:12:46 -05:00
|
|
|
call OverworldTextModeSwitch
|
2020-02-13 18:30:13 +01:00
|
|
|
call _OpenAndCloseMenu_HDMATransferTilemapAndAttrmap
|
2013-09-18 21:40:48 -04:00
|
|
|
xor a
|
2018-08-25 14:28:22 -04:00
|
|
|
ldh [hBGMapMode], a
|
2016-05-10 12:31:49 -04:00
|
|
|
call SafeUpdateSprites
|
2013-09-18 21:40:48 -04:00
|
|
|
ld a, $90
|
2018-08-25 14:28:22 -04:00
|
|
|
ldh [hWY], a
|
2020-06-16 19:38:00 -04:00
|
|
|
call UpdatePlayerSprite
|
2019-11-18 18:16:50 +01:00
|
|
|
farcall InitMapNameSign
|
2017-12-24 12:47:30 -05:00
|
|
|
farcall LoadOverworldFont
|
2013-09-18 21:40:48 -04:00
|
|
|
ret
|
|
|
|
|
2018-06-24 16:09:41 +02:00
|
|
|
OpenText::
|
2015-12-19 14:48:30 -05:00
|
|
|
call ClearWindowData
|
2018-08-25 14:28:22 -04:00
|
|
|
ldh a, [hROMBank]
|
2013-09-18 21:40:48 -04:00
|
|
|
push af
|
2019-01-12 15:17:20 -05:00
|
|
|
ld a, BANK(ReanchorBGMap_NoOAMUpdate) ; aka BANK(LoadFonts_NoOAMUpdate)
|
2013-09-18 21:40:48 -04:00
|
|
|
rst Bankswitch
|
|
|
|
|
2016-05-04 22:34:09 -04:00
|
|
|
call ReanchorBGMap_NoOAMUpdate ; clear bgmap
|
2019-04-08 14:15:10 +02:00
|
|
|
call SpeechTextbox
|
2020-02-13 18:30:13 +01:00
|
|
|
call _OpenAndCloseMenu_HDMATransferTilemapAndAttrmap ; anchor bgmap
|
2016-05-04 22:34:09 -04:00
|
|
|
call LoadFonts_NoOAMUpdate ; load font
|
2013-09-18 21:40:48 -04:00
|
|
|
pop af
|
|
|
|
rst Bankswitch
|
|
|
|
|
|
|
|
ret
|
|
|
|
|
2020-02-13 18:30:13 +01:00
|
|
|
_OpenAndCloseMenu_HDMATransferTilemapAndAttrmap::
|
2018-08-25 14:28:22 -04:00
|
|
|
ldh a, [hOAMUpdate]
|
2013-09-18 21:40:48 -04:00
|
|
|
push af
|
|
|
|
ld a, $1
|
2018-08-25 14:28:22 -04:00
|
|
|
ldh [hOAMUpdate], a
|
2015-10-17 20:49:34 -04:00
|
|
|
|
2020-02-13 18:30:13 +01:00
|
|
|
farcall OpenAndCloseMenu_HDMATransferTilemapAndAttrmap
|
2015-10-17 20:49:34 -04:00
|
|
|
|
2013-09-18 21:40:48 -04:00
|
|
|
pop af
|
2018-08-25 14:28:22 -04:00
|
|
|
ldh [hOAMUpdate], a
|
2013-09-18 21:40:48 -04:00
|
|
|
ret
|
|
|
|
|
2018-06-24 16:09:41 +02:00
|
|
|
SafeUpdateSprites::
|
2018-08-25 14:28:22 -04:00
|
|
|
ldh a, [hOAMUpdate]
|
2013-09-18 21:40:48 -04:00
|
|
|
push af
|
2018-08-25 14:28:22 -04:00
|
|
|
ldh a, [hBGMapMode]
|
2013-09-18 21:40:48 -04:00
|
|
|
push af
|
|
|
|
xor a
|
2018-08-25 14:28:22 -04:00
|
|
|
ldh [hBGMapMode], a
|
2013-09-18 21:40:48 -04:00
|
|
|
ld a, $1
|
2018-08-25 14:28:22 -04:00
|
|
|
ldh [hOAMUpdate], a
|
2016-05-10 12:31:49 -04:00
|
|
|
|
2015-07-22 15:57:02 -04:00
|
|
|
call UpdateSprites
|
2016-05-10 12:31:49 -04:00
|
|
|
|
2013-09-18 21:40:48 -04:00
|
|
|
xor a
|
2018-08-25 14:28:22 -04:00
|
|
|
ldh [hOAMUpdate], a
|
2013-09-18 21:40:48 -04:00
|
|
|
call DelayFrame
|
|
|
|
pop af
|
2018-08-25 14:28:22 -04:00
|
|
|
ldh [hBGMapMode], a
|
2013-09-18 21:40:48 -04:00
|
|
|
pop af
|
2018-08-25 14:28:22 -04:00
|
|
|
ldh [hOAMUpdate], a
|
2013-09-18 21:40:48 -04:00
|
|
|
ret
|
2016-05-10 12:59:34 -04:00
|
|
|
|
2020-10-28 10:21:10 -04:00
|
|
|
SetCarryFlag:: ; unreferenced
|
2016-05-10 12:59:34 -04:00
|
|
|
scf
|
|
|
|
ret
|