Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
pret
GitHub Repository: pret/pokered
Path: blob/master/home/reload_tiles.asm
1270 views
1
; reloads text box tile patterns, current map view, and tileset tile patterns
2
ReloadMapData::
3
ldh a, [hLoadedROMBank]
4
push af
5
ld a, [wCurMap]
6
call SwitchToMapRomBank
7
call DisableLCD
8
call LoadTextBoxTilePatterns
9
call LoadCurrentMapView
10
call LoadTilesetTilePatternData
11
call EnableLCD
12
pop af
13
ldh [hLoadedROMBank], a
14
ld [rROMB], a
15
ret
16
17
; reloads tileset tile patterns
18
ReloadTilesetTilePatterns::
19
ldh a, [hLoadedROMBank]
20
push af
21
ld a, [wCurMap]
22
call SwitchToMapRomBank
23
call DisableLCD
24
call LoadTilesetTilePatternData
25
call EnableLCD
26
pop af
27
ldh [hLoadedROMBank], a
28
ld [rROMB], a
29
ret
30
31
; shows the town map and lets the player choose a destination to fly to
32
ChooseFlyDestination::
33
ld hl, wStatusFlags4
34
res BIT_NO_BATTLES, [hl]
35
farjp LoadTownMap_Fly
36
37
; causes the text box to close without waiting for a button press after displaying text
38
DisableWaitingAfterTextDisplay::
39
ld a, $01
40
ld [wDoNotWaitForButtonPressAfterDisplayingText], a
41
ret
42
43