aboutsummaryrefslogtreecommitdiffstats
path: root/home/predef_text.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/predef_text.asm
parentMerge pull request #262 from Rangi42/master (diff)
parentMove all code out of home.asm into home/ (diff)
downloadpokeyellow-9571c550b6a0dcb3a4f54513c881661a87271024.tar.gz
pokeyellow-9571c550b6a0dcb3a4f54513c881661a87271024.tar.xz
pokeyellow-9571c550b6a0dcb3a4f54513c881661a87271024.zip
Merge pull request #263 from Rangi42/master
Syncing style with pokecrystal
Diffstat (limited to 'home/predef_text.asm')
-rw-r--r--home/predef_text.asm28
1 files changed, 28 insertions, 0 deletions
diff --git a/home/predef_text.asm b/home/predef_text.asm
new file mode 100644
index 00000000..b494a2c8
--- /dev/null
+++ b/home/predef_text.asm
@@ -0,0 +1,28 @@
+PrintPredefTextID::
+ ldh [hSpriteIndexOrTextID], a
+ ld hl, TextPredefs
+ call SetMapTextPointer
+ ld hl, wTextPredefFlag
+ set 0, [hl]
+ call DisplayTextID
+
+RestoreMapTextPointer::
+ ld hl, wMapTextPtr
+ ldh a, [hSavedMapTextPtr]
+ ld [hli], a
+ ldh a, [hSavedMapTextPtr + 1]
+ ld [hl], a
+ ret
+
+SetMapTextPointer::
+ ld a, [wMapTextPtr]
+ ldh [hSavedMapTextPtr], a
+ ld a, [wMapTextPtr + 1]
+ ldh [hSavedMapTextPtr + 1], a
+ ld a, l
+ ld [wMapTextPtr], a
+ ld a, h
+ ld [wMapTextPtr + 1], a
+ ret
+
+INCLUDE "data/text_predef_pointers.asm"