Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
pret
GitHub Repository: pret/pokered
Path: blob/master/home/predef_text.asm
1270 views
1
PrintPredefTextID::
2
ldh [hTextID], a
3
ld hl, TextPredefs
4
call SetMapTextPointer
5
ld hl, wTextPredefFlag
6
set BIT_TEXT_PREDEF, [hl]
7
call DisplayTextID
8
9
RestoreMapTextPointer::
10
ld hl, wCurMapTextPtr
11
ldh a, [hSavedMapTextPtr]
12
ld [hli], a
13
ldh a, [hSavedMapTextPtr + 1]
14
ld [hl], a
15
ret
16
17
SetMapTextPointer::
18
ld a, [wCurMapTextPtr]
19
ldh [hSavedMapTextPtr], a
20
ld a, [wCurMapTextPtr + 1]
21
ldh [hSavedMapTextPtr + 1], a
22
ld a, l
23
ld [wCurMapTextPtr], a
24
ld a, h
25
ld [wCurMapTextPtr + 1], a
26
ret
27
28
INCLUDE "data/text_predef_pointers.asm"
29
30