summaryrefslogtreecommitdiff
path: root/macros/scripts/text.asm
blob: c446c6c7e82e4d63f075547229df2a9eb5eac2b6 (plain)
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
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
text   EQUS "db TX_START,"    ; Start writing text.
next   EQUS "db \"<NEXT>\","  ; Move a line down.
line   EQUS "db \"<LINE>\","  ; Start writing at the bottom line.
para   EQUS "db \"<PARA>\","  ; Start a new paragraph.
cont   EQUS "db \"<CONT>\","  ; Scroll to the next line.
done   EQUS "db \"<DONE>\""   ; End a text box.
prompt EQUS "db \"<PROMPT>\"" ; Prompt the player to end a text box (initiating some other event).

page   EQUS "db \"<PAGE>\","         ; Start a new Pokédex page.
dex    EQUS "db \"<DEXEND>\", \"@\"" ; End a Pokédex entry.


; TextCommandJumpTable indexes (see home/text.asm)
	const_def

	const TX_START ; $00
text_start: MACRO
	db TX_START
ENDM

	const TX_RAM ; $01
text_ram: MACRO
	db TX_RAM
	dw \1 ; address to read from
ENDM

	const TX_BCD ; $02
text_bcd: MACRO
	db TX_BCD
	dw \1 ; address to read from
	db \2 ; number of bytes + print flags
ENDM

	const TX_MOVE ; $03
text_move: MACRO
	db TX_MOVE
	dw \1 ; address of the new location
ENDM

	const TX_BOX ; $04
text_box: MACRO
; draw box
	db TX_BOX
	dw \1 ; address of upper left corner
	db \2, \3 ; height, width
ENDM

	const TX_LOW ; $05
text_low: MACRO
	db TX_LOW
ENDM

	const TX_PROMPT_BUTTON ; $06
text_promptbutton: MACRO
	db TX_PROMPT_BUTTON
ENDM

	const TX_SCROLL ; $07
text_scroll: MACRO
	db TX_SCROLL
ENDM

	const TX_START_ASM ; $08
text_asm: MACRO
	db TX_START_ASM
ENDM

	const TX_NUM ; $09
text_decimal: MACRO
; print a big-endian decimal number.
	db TX_NUM
	dw \1 ; address to read from
	dn \2, \3 ; number of bytes to read, number of digits to display
ENDM

	const TX_PAUSE ; $0a
text_pause: MACRO
	db TX_PAUSE
ENDM

	const TX_SOUND_GET_ITEM_1 ; $0b
sound_get_item_1: MACRO
	db TX_SOUND_GET_ITEM_1
ENDM

TX_SOUND_LEVEL_UP EQU TX_SOUND_GET_ITEM_1
sound_level_up EQUS "sound_get_item_1"

	const TX_DOTS ; $0c
text_dots: MACRO
	db TX_DOTS
	db \1 ; number of ellipses to draw
ENDM

	const TX_WAIT_BUTTON ; $0d
text_waitbutton: MACRO
	db TX_WAIT_BUTTON
ENDM

	const TX_SOUND_POKEDEX_RATING ; $0e
sound_pokedex_rating: MACRO
	db TX_SOUND_POKEDEX_RATING
ENDM

	const TX_SOUND_GET_ITEM_1_DUPLICATE ; $0f
sound_get_item_1_duplicate: MACRO
	db TX_SOUND_GET_ITEM_1_DUPLICATE
ENDM

	const TX_SOUND_GET_ITEM_2 ; $10
sound_get_item_2: MACRO
	db TX_SOUND_GET_ITEM_2
ENDM

	const TX_SOUND_GET_KEY_ITEM ; $11
sound_get_key_item: MACRO
	db TX_SOUND_GET_KEY_ITEM
ENDM

	const TX_SOUND_CAUGHT_MON ; $12
sound_caught_mon: MACRO
	db TX_SOUND_CAUGHT_MON
ENDM

	const TX_SOUND_DEX_PAGE_ADDED ; $13
sound_dex_page_added: MACRO
	db TX_SOUND_DEX_PAGE_ADDED
ENDM

	const TX_SOUND_CRY_NIDORINA ; $14
sound_cry_nidorina: MACRO
	db TX_SOUND_CRY_NIDORINA
ENDM

	const TX_SOUND_CRY_PIDGEOT ; $15
sound_cry_pidgeot: MACRO
	db TX_SOUND_CRY_PIDGEOT
ENDM

	const TX_SOUND_CRY_DEWGONG ; $16
sound_cry_dewgong: MACRO
	db TX_SOUND_CRY_DEWGONG
ENDM

	const TX_FAR ; $17
text_far: MACRO
	db TX_FAR
	dab \1 ; address of text commands
ENDM


	const_next $50

	const TX_END ; $50
text_end: MACRO
	db TX_END
ENDM


; Text script IDs (see home/text_script.asm)
	const_def -1, -1

	const TX_SCRIPT_POKECENTER_NURSE ; $ff
script_pokecenter_nurse: MACRO
	db TX_SCRIPT_POKECENTER_NURSE
ENDM

	const TX_SCRIPT_MART ; $fe
script_mart: MACRO
	db TX_SCRIPT_MART
	db _NARG ; number of items
	IF _NARG
		db \# ; all item ids
	ENDC
	db -1 ; end
ENDM

	const TX_SCRIPT_BILLS_PC ; $fd
script_bills_pc: MACRO
	db TX_SCRIPT_BILLS_PC
ENDM

	const TX_SCRIPT_PLAYERS_PC ; $fc
script_players_pc: MACRO
	db TX_SCRIPT_PLAYERS_PC
ENDM

	const_skip ; $fb

	const_skip ; $fa

	const TX_SCRIPT_POKECENTER_PC ; $f9
script_pokecenter_pc: MACRO
	db TX_SCRIPT_POKECENTER_PC
ENDM

	const_skip ; $f8

	const TX_SCRIPT_PRIZE_VENDOR ; $f7
script_prize_vendor: MACRO
	db TX_SCRIPT_PRIZE_VENDOR
ENDM

	const TX_SCRIPT_CABLE_CLUB_RECEPTIONIST ; $f6
script_cable_club_receptionist: MACRO
	db TX_SCRIPT_CABLE_CLUB_RECEPTIONIST
ENDM

	const TX_SCRIPT_VENDING_MACHINE ; $f5
script_vending_machine: MACRO
	db TX_SCRIPT_VENDING_MACHINE
ENDM