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
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
|
; prints $ff-terminated list of text to text box
; given 2 bytes for text alignment and 2 bytes for text ID
PrintLabels:
ldh a, [hffb0]
push af
ld a, $02
ldh [hffb0], a
push hl
.loop_text_print_1
ld d, [hl]
inc hl
bit 7, d
jr nz, .next
inc hl
ld a, [hli]
push hl
ld h, [hl]
ld l, a
call PrintTextNoDelay
pop hl
inc hl
jr .loop_text_print_1
.next
pop hl
pop af
ldh [hffb0], a
.loop_text_print_2
ld d, [hl]
inc hl
bit 7, d
ret nz
ld e, [hl]
inc hl
call AdjustCoordinatesForBGScroll
call InitTextPrinting
ld a, [hli]
push hl
ld h, [hl]
ld l, a
call PrintTextNoDelay
pop hl
inc hl
jr .loop_text_print_2
InitAndPrintMenu:
push hl
push bc
push de
push af
ld d, [hl]
inc hl
ld e, [hl]
inc hl
ld b, [hl]
inc hl
ld c, [hl]
inc hl
push hl
call AdjustCoordinatesForBGScroll
farcall Func_c3ca
call DrawRegularTextBox
call DoFrameIfLCDEnabled
pop hl
call PrintLabels
pop af
call InitializeMenuParameters
pop de
pop bc
pop hl
ret
|