Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
pret
GitHub Repository: pret/pokered
Path: blob/master/macros/scripts/text.asm
1271 views
1
MACRO text
2
db TX_START, \# ; Start writing text
3
ENDM
4
5
MACRO next
6
db "<NEXT>", \# ; Move a line down
7
ENDM
8
9
MACRO line
10
db "<LINE>", \# ; Start writing at the bottom line
11
ENDM
12
13
MACRO para
14
db "<PARA>", \# ; Start a new paragraph
15
ENDM
16
17
MACRO cont
18
db "<CONT>", \# ; Scroll to the next line
19
ENDM
20
21
MACRO done
22
db "<DONE>" ; End a text box
23
ENDM
24
25
MACRO prompt
26
db "<PROMPT>" ; Prompt the player to end a text box (initiating some other event)
27
ENDM
28
29
MACRO page
30
db "<PAGE>", \# ; Start a new Pokédex page
31
ENDM
32
33
MACRO dex
34
db "<DEXEND>@" ; End a Pokédex entry
35
ENDM
36
37
38
; TextCommandJumpTable indexes (see home/text.asm)
39
const_def
40
41
const TX_START ; $00
42
MACRO text_start
43
db TX_START
44
ENDM
45
46
const TX_RAM ; $01
47
MACRO text_ram
48
db TX_RAM
49
dw \1 ; address to read from
50
ENDM
51
52
const TX_BCD ; $02
53
MACRO text_bcd
54
db TX_BCD
55
dw \1 ; address to read from
56
db \2 ; number of bytes + print flags
57
ENDM
58
59
const TX_MOVE ; $03
60
MACRO text_move
61
db TX_MOVE
62
dw \1 ; address of the new location
63
ENDM
64
65
const TX_BOX ; $04
66
MACRO text_box
67
; draw box
68
db TX_BOX
69
dw \1 ; address of upper left corner
70
db \2, \3 ; height, width
71
ENDM
72
73
const TX_LOW ; $05
74
MACRO text_low
75
db TX_LOW
76
ENDM
77
78
const TX_PROMPT_BUTTON ; $06
79
MACRO text_promptbutton
80
db TX_PROMPT_BUTTON
81
ENDM
82
83
const TX_SCROLL ; $07
84
MACRO text_scroll
85
db TX_SCROLL
86
ENDM
87
88
const TX_START_ASM ; $08
89
MACRO text_asm
90
db TX_START_ASM
91
ENDM
92
93
const TX_NUM ; $09
94
MACRO text_decimal
95
; print a big-endian decimal number.
96
db TX_NUM
97
dw \1 ; address to read from
98
dn \2, \3 ; number of bytes to read, number of digits to display
99
ENDM
100
101
const TX_PAUSE ; $0a
102
MACRO text_pause
103
db TX_PAUSE
104
ENDM
105
106
const TX_SOUND_GET_ITEM_1 ; $0b
107
MACRO sound_get_item_1
108
db TX_SOUND_GET_ITEM_1
109
ENDM
110
111
DEF TX_SOUND_LEVEL_UP EQU TX_SOUND_GET_ITEM_1
112
DEF sound_level_up EQUS "sound_get_item_1"
113
114
const TX_DOTS ; $0c
115
MACRO text_dots
116
db TX_DOTS
117
db \1 ; number of ellipses to draw
118
ENDM
119
120
const TX_WAIT_BUTTON ; $0d
121
MACRO text_waitbutton
122
db TX_WAIT_BUTTON
123
ENDM
124
125
const TX_SOUND_POKEDEX_RATING ; $0e
126
MACRO sound_pokedex_rating
127
db TX_SOUND_POKEDEX_RATING
128
ENDM
129
130
const TX_SOUND_GET_ITEM_1_DUPLICATE ; $0f
131
MACRO sound_get_item_1_duplicate
132
db TX_SOUND_GET_ITEM_1_DUPLICATE
133
ENDM
134
135
const TX_SOUND_GET_ITEM_2 ; $10
136
MACRO sound_get_item_2
137
db TX_SOUND_GET_ITEM_2
138
ENDM
139
140
const TX_SOUND_GET_KEY_ITEM ; $11
141
MACRO sound_get_key_item
142
db TX_SOUND_GET_KEY_ITEM
143
ENDM
144
145
const TX_SOUND_CAUGHT_MON ; $12
146
MACRO sound_caught_mon
147
db TX_SOUND_CAUGHT_MON
148
ENDM
149
150
const TX_SOUND_DEX_PAGE_ADDED ; $13
151
MACRO sound_dex_page_added
152
db TX_SOUND_DEX_PAGE_ADDED
153
ENDM
154
155
const TX_SOUND_CRY_NIDORINA ; $14
156
MACRO sound_cry_nidorina
157
db TX_SOUND_CRY_NIDORINA
158
ENDM
159
160
const TX_SOUND_CRY_PIDGEOT ; $15
161
MACRO sound_cry_pidgeot
162
db TX_SOUND_CRY_PIDGEOT
163
ENDM
164
165
const TX_SOUND_CRY_DEWGONG ; $16
166
MACRO sound_cry_dewgong
167
db TX_SOUND_CRY_DEWGONG
168
ENDM
169
170
const TX_FAR ; $17
171
MACRO text_far
172
db TX_FAR
173
dab \1 ; address of text commands
174
ENDM
175
176
177
const_next $50
178
179
const TX_END ; $50
180
MACRO text_end
181
db TX_END
182
ENDM
183
184
185
; Text script IDs (see home/text_script.asm)
186
const_def -1, -1
187
188
const TX_SCRIPT_POKECENTER_NURSE ; $ff
189
MACRO script_pokecenter_nurse
190
db TX_SCRIPT_POKECENTER_NURSE
191
ENDM
192
193
const TX_SCRIPT_MART ; $fe
194
MACRO script_mart
195
db TX_SCRIPT_MART
196
db _NARG ; number of items
197
IF _NARG
198
db \# ; all item ids
199
ENDC
200
db -1 ; end
201
ENDM
202
203
const TX_SCRIPT_BILLS_PC ; $fd
204
MACRO script_bills_pc
205
db TX_SCRIPT_BILLS_PC
206
ENDM
207
208
const TX_SCRIPT_PLAYERS_PC ; $fc
209
MACRO script_players_pc
210
db TX_SCRIPT_PLAYERS_PC
211
ENDM
212
213
const_skip ; $fb
214
215
const_skip ; $fa
216
217
const TX_SCRIPT_POKECENTER_PC ; $f9
218
MACRO script_pokecenter_pc
219
db TX_SCRIPT_POKECENTER_PC
220
ENDM
221
222
const_skip ; $f8
223
224
const TX_SCRIPT_PRIZE_VENDOR ; $f7
225
MACRO script_prize_vendor
226
db TX_SCRIPT_PRIZE_VENDOR
227
ENDM
228
229
const TX_SCRIPT_CABLE_CLUB_RECEPTIONIST ; $f6
230
MACRO script_cable_club_receptionist
231
db TX_SCRIPT_CABLE_CLUB_RECEPTIONIST
232
ENDM
233
234
const TX_SCRIPT_VENDING_MACHINE ; $f5
235
MACRO script_vending_machine
236
db TX_SCRIPT_VENDING_MACHINE
237
ENDM
238
239