aboutsummaryrefslogtreecommitdiffstats
path: root/home/predef_text.asm
blob: 61e22fce1d1fa8d78bccb7e7b6c03b52d9659244 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
PrintPredefTextID::
	ldh [hTextID], a
	ld hl, TextPredefs
	call SetMapTextPointer
	ld hl, wTextPredefFlag
	set BIT_TEXT_PREDEF, [hl]
	call DisplayTextID

RestoreMapTextPointer::
	ld hl, wCurMapTextPtr
	ldh a, [hSavedMapTextPtr]
	ld [hli], a
	ldh a, [hSavedMapTextPtr + 1]
	ld [hl], a
	ret

SetMapTextPointer::
	ld a, [wCurMapTextPtr]
	ldh [hSavedMapTextPtr], a
	ld a, [wCurMapTextPtr + 1]
	ldh [hSavedMapTextPtr + 1], a
	ld a, l
	ld [wCurMapTextPtr], a
	ld a, h
	ld [wCurMapTextPtr + 1], a
	ret

INCLUDE "data/text_predef_pointers.asm"