2015-12-24 22:58:42 -05:00
|
|
|
RefreshScreen:: ; 2dba
|
2013-09-18 21:40:48 -04:00
|
|
|
|
2015-12-19 14:48:30 -05:00
|
|
|
call ClearWindowData
|
2013-09-18 21:40:48 -04:00
|
|
|
ld a, [hROMBank]
|
|
|
|
push af
|
|
|
|
ld a, BANK(Function6454) ; and BANK(Function64bf)
|
|
|
|
rst Bankswitch
|
|
|
|
|
|
|
|
call Function6454
|
|
|
|
call Function2e20
|
|
|
|
call Function64bf
|
|
|
|
|
|
|
|
pop af
|
|
|
|
rst Bankswitch
|
|
|
|
ret
|
|
|
|
; 2dcf
|
|
|
|
|
|
|
|
|
2015-11-25 10:16:29 -05:00
|
|
|
CloseText:: ; 2dcf
|
2013-09-18 21:40:48 -04:00
|
|
|
ld a, [hOAMUpdate]
|
|
|
|
push af
|
|
|
|
ld a, $1
|
|
|
|
ld [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
|
|
|
|
ld [hOAMUpdate], a
|
|
|
|
ld hl, VramState
|
|
|
|
res 6, [hl]
|
|
|
|
ret
|
|
|
|
; 2de2
|
|
|
|
|
2015-12-09 18:25:44 -05:00
|
|
|
.CloseText ; 2de2
|
2015-12-19 14:48:30 -05:00
|
|
|
call ClearWindowData
|
2013-09-18 21:40:48 -04:00
|
|
|
xor a
|
|
|
|
ld [hBGMapMode], a
|
2015-11-11 14:12:46 -05:00
|
|
|
call OverworldTextModeSwitch
|
2013-09-18 21:40:48 -04:00
|
|
|
call Function2e20
|
|
|
|
xor a
|
|
|
|
ld [hBGMapMode], a
|
|
|
|
call Function2e31
|
|
|
|
ld a, $90
|
|
|
|
ld [hWY], a
|
2015-11-04 16:14:27 -05:00
|
|
|
call ReplaceKrisSprite
|
2015-07-20 03:51:52 -04:00
|
|
|
callba ReturnFromMapSetupScript
|
2015-12-22 18:03:00 -05:00
|
|
|
callba LoadOverworldFont
|
2013-09-18 21:40:48 -04:00
|
|
|
ret
|
|
|
|
; 2e08
|
|
|
|
|
2015-12-09 18:25:44 -05:00
|
|
|
OpenText:: ; 2e08
|
2015-12-19 14:48:30 -05:00
|
|
|
call ClearWindowData
|
2013-09-18 21:40:48 -04:00
|
|
|
ld a, [hROMBank]
|
|
|
|
push af
|
|
|
|
ld a, BANK(Function6454) ; and BANK(Function64bf)
|
|
|
|
rst Bankswitch
|
|
|
|
|
2015-12-09 18:25:44 -05:00
|
|
|
call Function6454 ; clear bgmap
|
2013-09-18 21:40:48 -04:00
|
|
|
call SpeechTextBox
|
2015-12-09 18:25:44 -05:00
|
|
|
call Function2e20 ; anchor bgmap
|
|
|
|
call Function64bf ; load font
|
2013-09-18 21:40:48 -04:00
|
|
|
pop af
|
|
|
|
rst Bankswitch
|
|
|
|
|
|
|
|
ret
|
|
|
|
; 2e20
|
|
|
|
|
2014-02-01 20:26:39 -05:00
|
|
|
Function2e20:: ; 2e20
|
2013-09-18 21:40:48 -04:00
|
|
|
ld a, [hOAMUpdate]
|
|
|
|
push af
|
|
|
|
ld a, $1
|
|
|
|
ld [hOAMUpdate], a
|
2015-10-17 20:49:34 -04:00
|
|
|
|
2013-09-18 21:40:48 -04:00
|
|
|
callba Function104110
|
2015-10-17 20:49:34 -04:00
|
|
|
|
2013-09-18 21:40:48 -04:00
|
|
|
pop af
|
|
|
|
ld [hOAMUpdate], a
|
|
|
|
ret
|
|
|
|
; 2e31
|
|
|
|
|
2014-02-01 20:26:39 -05:00
|
|
|
Function2e31:: ; 2e31
|
2013-09-18 21:40:48 -04:00
|
|
|
ld a, [hOAMUpdate]
|
|
|
|
push af
|
|
|
|
ld a, [hBGMapMode]
|
|
|
|
push af
|
|
|
|
xor a
|
|
|
|
ld [hBGMapMode], a
|
|
|
|
ld a, $1
|
|
|
|
ld [hOAMUpdate], a
|
2015-07-22 15:57:02 -04:00
|
|
|
call UpdateSprites
|
2013-09-18 21:40:48 -04:00
|
|
|
xor a
|
|
|
|
ld [hOAMUpdate], a
|
|
|
|
call DelayFrame
|
|
|
|
pop af
|
|
|
|
ld [hBGMapMode], a
|
|
|
|
pop af
|
|
|
|
ld [hOAMUpdate], a
|
|
|
|
ret
|
|
|
|
; 2e4e
|