summaryrefslogtreecommitdiff
path: root/home/reload_tiles.asm
diff options
context:
space:
mode:
authorRangi <35663410+Rangi42@users.noreply.github.com>2020-07-07 19:48:22 -0400
committerGitHub <noreply@github.com>2020-07-07 19:48:22 -0400
commit9571c550b6a0dcb3a4f54513c881661a87271024 (patch)
treed73507228a57e4f3cece2fb93fe7df3a9439553f /home/reload_tiles.asm
parentc480632d5494d04f7f5f0298a31877a2293b564e (diff)
parentbbf2f51a02b2544f1bef32a5868503b474ae2fef (diff)
Merge pull request #263 from Rangi42/master
Syncing style with pokecrystal
Diffstat (limited to 'home/reload_tiles.asm')
-rw-r--r--home/reload_tiles.asm41
1 files changed, 41 insertions, 0 deletions
diff --git a/home/reload_tiles.asm b/home/reload_tiles.asm
new file mode 100644
index 00000000..6228395c
--- /dev/null
+++ b/home/reload_tiles.asm
@@ -0,0 +1,41 @@
+; reloads text box tile patterns, current map view, and tileset tile patterns
+ReloadMapData::
+ ldh a, [hLoadedROMBank]
+ push af
+ ld a, [wCurMap]
+ call SwitchToMapRomBank
+ call DisableLCD
+ call LoadTextBoxTilePatterns
+ call LoadCurrentMapView
+ call LoadTilesetTilePatternData
+ call EnableLCD
+ pop af
+ ldh [hLoadedROMBank], a
+ ld [MBC1RomBank], a
+ ret
+
+; reloads tileset tile patterns
+ReloadTilesetTilePatterns::
+ ldh a, [hLoadedROMBank]
+ push af
+ ld a, [wCurMap]
+ call SwitchToMapRomBank
+ call DisableLCD
+ call LoadTilesetTilePatternData
+ call EnableLCD
+ pop af
+ ldh [hLoadedROMBank], a
+ ld [MBC1RomBank], a
+ ret
+
+; shows the town map and lets the player choose a destination to fly to
+ChooseFlyDestination::
+ ld hl, wd72e
+ res 4, [hl]
+ farjp LoadTownMap_Fly
+
+; causes the text box to close without waiting for a button press after displaying text
+DisableWaitingAfterTextDisplay::
+ ld a, $01
+ ld [wDoNotWaitForButtonPressAfterDisplayingText], a
+ ret