ref: 4fb008844030283ad34cb0802b088b4dd7c9891c
parent: 9e4a00af4523cdfacbb6b245679e2e60fbc6b375
parent: c086de0c986330b09cd5e9fa384b950107ee4955
author: Rangi <35663410+Rangi42@users.noreply.github.com>
date: Fri Jul 10 16:06:25 EDT 2020
Merge pull request #740 from Rangi42/master Remove enum; add const_skip and const_next
--- a/audio/engine.asm
+++ b/audio/engine.asm
@@ -1364,7 +1364,7 @@
jp hl
MusicCommands:
-; entries correspond to macros/scripts/audio.asm enumeration
+; entries correspond to audio constants (see macros/scripts/audio.asm)
dw Music_Octave8 ; octave 8
dw Music_Octave7 ; octave 7
dw Music_Octave6 ; octave 6
--- a/constants/battle_anim_constants.asm
+++ b/constants/battle_anim_constants.asm
@@ -17,13 +17,7 @@
const BATTLEANIMSTRUCT_ANON_JT_INDEX
const BATTLEANIMSTRUCT_0F
const BATTLEANIMSTRUCT_10
- const BATTLEANIMSTRUCT_11
- const BATTLEANIMSTRUCT_12
- const BATTLEANIMSTRUCT_13
- const BATTLEANIMSTRUCT_14
- const BATTLEANIMSTRUCT_15
- const BATTLEANIMSTRUCT_16
- const BATTLEANIMSTRUCT_17
+ const_skip 7
BATTLEANIMSTRUCT_LENGTH EQU const_value
NUM_ANIM_OBJECTS EQU 10 ; see wActiveAnimObjects
--- a/constants/battle_constants.asm
+++ b/constants/battle_constants.asm
@@ -162,59 +162,60 @@
ALL_STATUS EQU (1 << PSN) | (1 << BRN) | (1 << FRZ) | (1 << PAR) | SLP
; wPlayerSubStatus1 or wEnemySubStatus1 bit flags
- enum_start 7, -1
- enum SUBSTATUS_IN_LOVE
- enum SUBSTATUS_ROLLOUT
- enum SUBSTATUS_ENDURE
- enum SUBSTATUS_PERISH
- enum SUBSTATUS_IDENTIFIED
- enum SUBSTATUS_PROTECT
- enum SUBSTATUS_CURSE
- enum SUBSTATUS_NIGHTMARE
+ const_def
+ const SUBSTATUS_NIGHTMARE
+ const SUBSTATUS_CURSE
+ const SUBSTATUS_PROTECT
+ const SUBSTATUS_IDENTIFIED
+ const SUBSTATUS_PERISH
+ const SUBSTATUS_ENDURE
+ const SUBSTATUS_ROLLOUT
+ const SUBSTATUS_IN_LOVE
; wPlayerSubStatus2 or wEnemySubStatus2 bit flags
-SUBSTATUS_CURLED EQU 0
+ const_def
+ const SUBSTATUS_CURLED
; wPlayerSubStatus3 or wEnemySubStatus3 bit flags
- enum_start 7, -1
- enum SUBSTATUS_CONFUSED
- enum SUBSTATUS_FLYING
- enum SUBSTATUS_UNDERGROUND
- enum SUBSTATUS_CHARGED
- enum SUBSTATUS_FLINCHED
- enum SUBSTATUS_IN_LOOP
- enum SUBSTATUS_RAMPAGE
- enum SUBSTATUS_BIDE
+ const_def
+ const SUBSTATUS_BIDE
+ const SUBSTATUS_RAMPAGE
+ const SUBSTATUS_IN_LOOP
+ const SUBSTATUS_FLINCHED
+ const SUBSTATUS_CHARGED
+ const SUBSTATUS_UNDERGROUND
+ const SUBSTATUS_FLYING
+ const SUBSTATUS_CONFUSED
; wPlayerSubStatus4 or wEnemySubStatus4 bit flags
- enum_start 7, -1
- enum SUBSTATUS_LEECH_SEED
- enum SUBSTATUS_RAGE
- enum SUBSTATUS_RECHARGE
- enum SUBSTATUS_SUBSTITUTE
- enum SUBSTATUS_UNKNOWN_1
- enum SUBSTATUS_FOCUS_ENERGY
- enum SUBSTATUS_MIST
- enum SUBSTATUS_X_ACCURACY
+ const_def
+ const SUBSTATUS_X_ACCURACY
+ const SUBSTATUS_MIST
+ const SUBSTATUS_FOCUS_ENERGY
+ const_skip
+ const SUBSTATUS_SUBSTITUTE
+ const SUBSTATUS_RECHARGE
+ const SUBSTATUS_RAGE
+ const SUBSTATUS_LEECH_SEED
; wPlayerSubStatus5 or wEnemySubStatus5 bit flags
- enum_start 7, -1
- enum SUBSTATUS_CANT_RUN
- enum SUBSTATUS_DESTINY_BOND
- enum SUBSTATUS_LOCK_ON
- enum SUBSTATUS_ENCORED
- enum SUBSTATUS_TRANSFORMED
- enum SUBSTATUS_UNKNOWN_2
- enum SUBSTATUS_UNKNOWN_3
- enum SUBSTATUS_TOXIC
+ const_def
+ const SUBSTATUS_TOXIC
+ const_skip
+ const_skip
+ const SUBSTATUS_TRANSFORMED
+ const SUBSTATUS_ENCORED
+ const SUBSTATUS_LOCK_ON
+ const SUBSTATUS_DESTINY_BOND
+ const SUBSTATUS_CANT_RUN
; wPlayerScreens or wEnemyScreens bit flags
- enum_start 4, -1
- enum SCREENS_REFLECT
- enum SCREENS_LIGHT_SCREEN
- enum SCREENS_SAFEGUARD
- enum SCREENS_UNUSED
- enum SCREENS_SPIKES
+ const_def
+ const SCREENS_SPIKES
+ const_skip
+ const SCREENS_SAFEGUARD
+ const SCREENS_LIGHT_SCREEN
+ const SCREENS_REFLECT
; values in wBattleWeather
const_def
@@ -238,9 +239,9 @@
const BATTLEACTION_SWITCH4
const BATTLEACTION_SWITCH5
const BATTLEACTION_SWITCH6
- const BATTLEACTION_A
- const BATTLEACTION_B
- const BATTLEACTION_C
+ const_skip
+ const_skip
+ const_skip
const BATTLEACTION_SKIPTURN
const BATTLEACTION_STRUGGLE
const BATTLEACTION_FORFEIT
--- a/constants/credits_constants.asm
+++ b/constants/credits_constants.asm
@@ -105,11 +105,11 @@
const PAAD_TESTING
; CreditsScript indexes (see data/credits_script.asm)
- const_def -7
- const CREDITS_THEEND
- const CREDITS_WAIT2
- const CREDITS_MUSIC
- const CREDITS_CLEAR
- const CREDITS_SCENE
- const CREDITS_WAIT
+ const_def -1, -1
const CREDITS_END
+ const CREDITS_WAIT
+ const CREDITS_SCENE
+ const CREDITS_CLEAR
+ const CREDITS_MUSIC
+ const CREDITS_WAIT2
+ const CREDITS_THEEND
--- a/constants/deco_constants.asm
+++ b/constants/deco_constants.asm
@@ -1,5 +1,5 @@
; decoration types
-const_value = 1
+ const_def 1
const DECO_PLANT
const DECO_BED
const DECO_CARPET
@@ -8,7 +8,7 @@
const DECO_BIGDOLL
; DecorationNames indexes (see data/decorations/names.asm)
-const_value = 1
+ const_def 1
const PUT_IT_AWAY
const MAGNAPLANT
const TROPICPLANT
@@ -36,7 +36,7 @@
const GREEN_CARPET
; DoDecorationAction2.DecoActions indexes (see engine/overworld/decorations.asm)
-const_value = 1
+ const_def 1
const SET_UP_BED
const PUT_AWAY_BED
const SET_UP_CARPET
@@ -54,9 +54,12 @@
const SET_UP_ORNAMENT
const PUT_AWAY_ORNAMENT
+__deco_value__ = 0
+
deco: MACRO
const DECO_\1
- enum DECOFLAG_\1
+DECOFLAG_\1 EQU __deco_value__
+__deco_value__ = __deco_value__ + 1
ENDM
; decorations:
@@ -63,7 +66,6 @@
; - DecorationAttributes (see data/decorations/attributes.asm)
; - DecorationIDs (see data/decorations/decorations.asm)
const_def 1
- enum_start
; FindOwnedBeds.beds values (see engine/overworld/decorations.asm)
const BEDS
deco FEATHERY_BED
@@ -121,7 +123,7 @@
deco GEODUDE_DOLL
deco MACHOP_DOLL
deco TENTACOOL_DOLL
-NUM_NON_TROPHY_DECOS EQU __enum__
+NUM_NON_TROPHY_DECOS EQU __deco_value__
deco GOLD_TROPHY_DOLL
deco SILVER_TROPHY_DOLL
-NUM_DECOS EQU __enum__
+NUM_DECOS EQU __deco_value__
--- a/constants/event_flags.asm
+++ b/constants/event_flags.asm
@@ -1,4 +1,5 @@
; wEventFlags bit flags
+
const_def
; The first eight flags are reset upon reloading the map
const EVENT_TEMPORARY_UNTIL_MAP_RELOAD_1
@@ -25,7 +26,7 @@
const EVENT_GOT_HM04_STRENGTH
const EVENT_GOT_HM05_FLASH
const EVENT_GOT_HM06_WHIRLPOOL
- const EVENT_016 ; unused
+ const_skip ; unused
; Rods
const EVENT_GOT_OLD_ROD
const EVENT_GOT_GOOD_ROD
@@ -64,8 +65,8 @@
const EVENT_LAKE_OF_RAGE_EXPLAINED_WEIRD_MAGIKARP
const EVENT_LAKE_OF_RAGE_ASKED_FOR_MAGIKARP
const EVENT_LAKE_OF_RAGE_ELIXIR_ON_STANDBY
- const EVENT_03B ; unused
- const EVENT_03C ; unused
+ const_skip ; unused
+ const_skip ; unused
const EVENT_HEALED_MOOMOO
const EVENT_GOT_TM13_SNORE_FROM_MOOMOO_FARM
const EVENT_TALKED_TO_FARMER_ABOUT_MOOMOO
@@ -135,9 +136,9 @@
const EVENT_TIN_TOWER_5F_HIDDEN_FULL_RESTORE
const EVENT_TIN_TOWER_5F_HIDDEN_CARBOS
const EVENT_BURNED_TOWER_1F_HIDDEN_ETHER
- const EVENT_081 ; unused
- const EVENT_082 ; unused
- const EVENT_083 ; unused
+ const_skip ; unused
+ const_skip ; unused
+ const_skip ; unused
const EVENT_NATIONAL_PARK_HIDDEN_FULL_HEAL
const EVENT_OLIVINE_LIGHTHOUSE_5F_HIDDEN_HYPER_POTION
const EVENT_TEAM_ROCKET_BASE_B1F_HIDDEN_REVIVE
@@ -201,13 +202,9 @@
const EVENT_GAVE_GS_BALL_TO_KURT
const EVENT_FOREST_IS_RESTLESS
const EVENT_ANSWERED_DRAGON_MASTER_QUIZ_WRONG
-; Unused
- const EVENT_0C2
- const EVENT_0C3
- const EVENT_0C4
- const EVENT_0C5
- const EVENT_0C6
- const EVENT_0C7
+; Unused: next 6 events
+
+ const_next 200
; Kanto story events
const EVENT_GOT_NUGGET_FROM_GUY
const EVENT_RETURNED_MACHINE_PART
@@ -271,346 +268,9 @@
const EVENT_DANA_GAVE_THUNDERSTONE
const EVENT_TULLY_GAVE_WATER_STONE
const EVENT_TIFFANY_GAVE_PINK_BOW
-; Unused
- const EVENT_105
- const EVENT_106
- const EVENT_107
- const EVENT_108
- const EVENT_109
- const EVENT_10A
- const EVENT_10B
- const EVENT_10C
- const EVENT_10D
- const EVENT_10E
- const EVENT_10F
- const EVENT_110
- const EVENT_111
- const EVENT_112
- const EVENT_113
- const EVENT_114
- const EVENT_115
- const EVENT_116
- const EVENT_117
- const EVENT_118
- const EVENT_119
- const EVENT_11A
- const EVENT_11B
- const EVENT_11C
- const EVENT_11D
- const EVENT_11E
- const EVENT_11F
- const EVENT_120
- const EVENT_121
- const EVENT_122
- const EVENT_123
- const EVENT_124
- const EVENT_125
- const EVENT_126
- const EVENT_127
- const EVENT_128
- const EVENT_129
- const EVENT_12A
- const EVENT_12B
- const EVENT_12C
- const EVENT_12D
- const EVENT_12E
- const EVENT_12F
- const EVENT_130
- const EVENT_131
- const EVENT_132
- const EVENT_133
- const EVENT_134
- const EVENT_135
- const EVENT_136
- const EVENT_137
- const EVENT_138
- const EVENT_139
- const EVENT_13A
- const EVENT_13B
- const EVENT_13C
- const EVENT_13D
- const EVENT_13E
- const EVENT_13F
- const EVENT_140
- const EVENT_141
- const EVENT_142
- const EVENT_143
- const EVENT_144
- const EVENT_145
- const EVENT_146
- const EVENT_147
- const EVENT_148
- const EVENT_149
- const EVENT_14A
- const EVENT_14B
- const EVENT_14C
- const EVENT_14D
- const EVENT_14E
- const EVENT_14F
- const EVENT_150
- const EVENT_151
- const EVENT_152
- const EVENT_153
- const EVENT_154
- const EVENT_155
- const EVENT_156
- const EVENT_157
- const EVENT_158
- const EVENT_159
- const EVENT_15A
- const EVENT_15B
- const EVENT_15C
- const EVENT_15D
- const EVENT_15E
- const EVENT_15F
- const EVENT_160
- const EVENT_161
- const EVENT_162
- const EVENT_163
- const EVENT_164
- const EVENT_165
- const EVENT_166
- const EVENT_167
- const EVENT_168
- const EVENT_169
- const EVENT_16A
- const EVENT_16B
- const EVENT_16C
- const EVENT_16D
- const EVENT_16E
- const EVENT_16F
- const EVENT_170
- const EVENT_171
- const EVENT_172
- const EVENT_173
- const EVENT_174
- const EVENT_175
- const EVENT_176
- const EVENT_177
- const EVENT_178
- const EVENT_179
- const EVENT_17A
- const EVENT_17B
- const EVENT_17C
- const EVENT_17D
- const EVENT_17E
- const EVENT_17F
- const EVENT_180
- const EVENT_181
- const EVENT_182
- const EVENT_183
- const EVENT_184
- const EVENT_185
- const EVENT_186
- const EVENT_187
- const EVENT_188
- const EVENT_189
- const EVENT_18A
- const EVENT_18B
- const EVENT_18C
- const EVENT_18D
- const EVENT_18E
- const EVENT_18F
- const EVENT_190
- const EVENT_191
- const EVENT_192
- const EVENT_193
- const EVENT_194
- const EVENT_195
- const EVENT_196
- const EVENT_197
- const EVENT_198
- const EVENT_199
- const EVENT_19A
- const EVENT_19B
- const EVENT_19C
- const EVENT_19D
- const EVENT_19E
- const EVENT_19F
- const EVENT_1A0
- const EVENT_1A1
- const EVENT_1A2
- const EVENT_1A3
- const EVENT_1A4
- const EVENT_1A5
- const EVENT_1A6
- const EVENT_1A7
- const EVENT_1A8
- const EVENT_1A9
- const EVENT_1AA
- const EVENT_1AB
- const EVENT_1AC
- const EVENT_1AD
- const EVENT_1AE
- const EVENT_1AF
- const EVENT_1B0
- const EVENT_1B1
- const EVENT_1B2
- const EVENT_1B3
- const EVENT_1B4
- const EVENT_1B5
- const EVENT_1B6
- const EVENT_1B7
- const EVENT_1B8
- const EVENT_1B9
- const EVENT_1BA
- const EVENT_1BB
- const EVENT_1BC
- const EVENT_1BD
- const EVENT_1BE
- const EVENT_1BF
- const EVENT_1C0
- const EVENT_1C1
- const EVENT_1C2
- const EVENT_1C3
- const EVENT_1C4
- const EVENT_1C5
- const EVENT_1C6
- const EVENT_1C7
- const EVENT_1C8
- const EVENT_1C9
- const EVENT_1CA
- const EVENT_1CB
- const EVENT_1CC
- const EVENT_1CD
- const EVENT_1CE
- const EVENT_1CF
- const EVENT_1D0
- const EVENT_1D1
- const EVENT_1D2
- const EVENT_1D3
- const EVENT_1D4
- const EVENT_1D5
- const EVENT_1D6
- const EVENT_1D7
- const EVENT_1D8
- const EVENT_1D9
- const EVENT_1DA
- const EVENT_1DB
- const EVENT_1DC
- const EVENT_1DD
- const EVENT_1DE
- const EVENT_1DF
- const EVENT_1E0
- const EVENT_1E1
- const EVENT_1E2
- const EVENT_1E3
- const EVENT_1E4
- const EVENT_1E5
- const EVENT_1E6
- const EVENT_1E7
- const EVENT_1E8
- const EVENT_1E9
- const EVENT_1EA
- const EVENT_1EB
- const EVENT_1EC
- const EVENT_1ED
- const EVENT_1EE
- const EVENT_1EF
- const EVENT_1F0
- const EVENT_1F1
- const EVENT_1F2
- const EVENT_1F3
- const EVENT_1F4
- const EVENT_1F5
- const EVENT_1F6
- const EVENT_1F7
- const EVENT_1F8
- const EVENT_1F9
- const EVENT_1FA
- const EVENT_1FB
- const EVENT_1FC
- const EVENT_1FD
- const EVENT_1FE
- const EVENT_1FF
- const EVENT_200
- const EVENT_201
- const EVENT_202
- const EVENT_203
- const EVENT_204
- const EVENT_205
- const EVENT_206
- const EVENT_207
- const EVENT_208
- const EVENT_209
- const EVENT_20A
- const EVENT_20B
- const EVENT_20C
- const EVENT_20D
- const EVENT_20E
- const EVENT_20F
- const EVENT_210
- const EVENT_211
- const EVENT_212
- const EVENT_213
- const EVENT_214
- const EVENT_215
- const EVENT_216
- const EVENT_217
- const EVENT_218
- const EVENT_219
- const EVENT_21A
- const EVENT_21B
- const EVENT_21C
- const EVENT_21D
- const EVENT_21E
- const EVENT_21F
- const EVENT_220
- const EVENT_221
- const EVENT_222
- const EVENT_223
- const EVENT_224
- const EVENT_225
- const EVENT_226
- const EVENT_227
- const EVENT_228
- const EVENT_229
- const EVENT_22A
- const EVENT_22B
- const EVENT_22C
- const EVENT_22D
- const EVENT_22E
- const EVENT_22F
- const EVENT_230
- const EVENT_231
- const EVENT_232
- const EVENT_233
- const EVENT_234
- const EVENT_235
- const EVENT_236
- const EVENT_237
- const EVENT_238
- const EVENT_239
- const EVENT_23A
- const EVENT_23B
- const EVENT_23C
- const EVENT_23D
- const EVENT_23E
- const EVENT_23F
- const EVENT_240
- const EVENT_241
- const EVENT_242
- const EVENT_243
- const EVENT_244
- const EVENT_245
- const EVENT_246
- const EVENT_247
- const EVENT_248
- const EVENT_249
- const EVENT_24A
- const EVENT_24B
- const EVENT_24C
- const EVENT_24D
- const EVENT_24E
- const EVENT_24F
- const EVENT_250
- const EVENT_251
- const EVENT_252
- const EVENT_253
- const EVENT_254
- const EVENT_255
- const EVENT_256
- const EVENT_257
+; Unused: next 339 events
+
+ const_next 600
; Kurt Apricorn events
const EVENT_GAVE_KURT_RED_APRICORN
const EVENT_GAVE_KURT_BLU_APRICORN
@@ -621,11 +281,11 @@
const EVENT_GAVE_KURT_PNK_APRICORN
; Phone events
const EVENT_JACK_ASKED_FOR_PHONE_NUMBER
- const EVENT_260 ; unused
+ const_skip ; unused
const EVENT_BEVERLY_ASKED_FOR_PHONE_NUMBER
- const EVENT_262 ; unused
+ const_skip ; unused
const EVENT_HUEY_ASKED_FOR_PHONE_NUMBER
- const EVENT_264 ; unused
+ const_skip ; unused
const EVENT_GOT_PROTEIN_FROM_HUEY
const EVENT_GOT_HP_UP_FROM_JOEY
const EVENT_GOT_CARBOS_FROM_VANCE
@@ -633,58 +293,58 @@
const EVENT_GOT_CALCIUM_FROM_ERIN
const EVENT_KENJI_ON_BREAK
const EVENT_GAVEN_ASKED_FOR_PHONE_NUMBER
- const EVENT_26C ; unused
+ const_skip ; unused
const EVENT_BETH_ASKED_FOR_PHONE_NUMBER
- const EVENT_26E ; unused
+ const_skip ; unused
const EVENT_JOSE_ASKED_FOR_PHONE_NUMBER
- const EVENT_270 ; unused
+ const_skip ; unused
const EVENT_REENA_ASKED_FOR_PHONE_NUMBER
- const EVENT_272 ; unused
+ const_skip ; unused
const EVENT_JOEY_ASKED_FOR_PHONE_NUMBER
- const EVENT_274 ; unused
+ const_skip ; unused
const EVENT_WADE_ASKED_FOR_PHONE_NUMBER
- const EVENT_276 ; unused
+ const_skip ; unused
const EVENT_RALPH_ASKED_FOR_PHONE_NUMBER
- const EVENT_278 ; unused
+ const_skip ; unused
const EVENT_LIZ_ASKED_FOR_PHONE_NUMBER
- const EVENT_27A ; unused
+ const_skip ; unused
const EVENT_ANTHONY_ASKED_FOR_PHONE_NUMBER
- const EVENT_27C ; unused
+ const_skip ; unused
const EVENT_TODD_ASKED_FOR_PHONE_NUMBER
- const EVENT_27E ; unused
+ const_skip ; unused
const EVENT_GINA_ASKED_FOR_PHONE_NUMBER
- const EVENT_280 ; 280 ; unused
+ const_skip ; unused
const EVENT_IRWIN_ASKED_FOR_PHONE_NUMBER
- const EVENT_282 ; unused
+ const_skip ; unused
const EVENT_ARNIE_ASKED_FOR_PHONE_NUMBER
- const EVENT_284 ; unused
+ const_skip ; unused
const EVENT_ALAN_ASKED_FOR_PHONE_NUMBER
- const EVENT_286 ; unused
- const EVENT_287 ; unused
- const EVENT_288 ; unused
+ const_skip ; unused
+ const_skip ; unused
+ const_skip ; unused
const EVENT_DANA_ASKED_FOR_PHONE_NUMBER
- const EVENT_28A ; unused
+ const_skip ; unused
const EVENT_CHAD_ASKED_FOR_PHONE_NUMBER
- const EVENT_28C ; unused
+ const_skip ; unused
const EVENT_DEREK_ASKED_FOR_PHONE_NUMBER
- const EVENT_28E ; unused
+ const_skip ; unused
const EVENT_TULLY_ASKED_FOR_PHONE_NUMBER
- const EVENT_290 ; 290 ; unused
+ const_skip ; unused
const EVENT_BRENT_ASKED_FOR_PHONE_NUMBER
- const EVENT_292 ; unused
+ const_skip ; unused
const EVENT_TIFFANY_ASKED_FOR_PHONE_NUMBER
- const EVENT_294 ; unused
+ const_skip ; unused
const EVENT_VANCE_ASKED_FOR_PHONE_NUMBER
- const EVENT_296 ; unused
+ const_skip ; unused
const EVENT_WILTON_ASKED_FOR_PHONE_NUMBER
- const EVENT_298 ; unused
+ const_skip ; unused
const EVENT_KENJI_ASKED_FOR_PHONE_NUMBER
- const EVENT_29A ; unused
+ const_skip ; unused
const EVENT_PARRY_ASKED_FOR_PHONE_NUMBER
- const EVENT_29C ; unused
+ const_skip ; unused
const EVENT_ERIN_ASKED_FOR_PHONE_NUMBER
const EVENT_BUENA_OFFERED_HER_PHONE_NUMBER_NO_BLUE_CARD
- const EVENT_29F ; unused
+ const_skip ; unused
; Ruins of Alph puzzles
const EVENT_SOLVED_HO_OH_PUZZLE
const EVENT_SOLVED_KABUTO_PUZZLE
@@ -848,176 +508,11 @@
const EVENT_BUENA_OFFERED_HER_PHONE_NUMBER
const EVENT_MET_BUENA
const EVENT_GOT_ODD_EGG
- const EVENT_33F ; unused
+ const_skip ; unused
const EVENT_GOT_GS_BALL_FROM_POKECOM_CENTER
-; Unused
- const EVENT_341
- const EVENT_342
- const EVENT_343
- const EVENT_344
- const EVENT_345
- const EVENT_346
- const EVENT_347
- const EVENT_348
- const EVENT_349
- const EVENT_34A
- const EVENT_34B
- const EVENT_34C
- const EVENT_34D
- const EVENT_34E
- const EVENT_34F
- const EVENT_350
- const EVENT_351
- const EVENT_352
- const EVENT_353
- const EVENT_354
- const EVENT_355
- const EVENT_356
- const EVENT_357
- const EVENT_358
- const EVENT_359
- const EVENT_35A
- const EVENT_35B
- const EVENT_35C
- const EVENT_35D
- const EVENT_35E
- const EVENT_35F
- const EVENT_360
- const EVENT_361
- const EVENT_362
- const EVENT_363
- const EVENT_364
- const EVENT_365
- const EVENT_366
- const EVENT_367
- const EVENT_368
- const EVENT_369
- const EVENT_36A
- const EVENT_36B
- const EVENT_36C
- const EVENT_36D
- const EVENT_36E
- const EVENT_36F
- const EVENT_370
- const EVENT_371
- const EVENT_372
- const EVENT_373
- const EVENT_374
- const EVENT_375
- const EVENT_376
- const EVENT_377
- const EVENT_378
- const EVENT_379
- const EVENT_37A
- const EVENT_37B
- const EVENT_37C
- const EVENT_37D
- const EVENT_37E
- const EVENT_37F
- const EVENT_380
- const EVENT_381
- const EVENT_382
- const EVENT_383
- const EVENT_384
- const EVENT_385
- const EVENT_386
- const EVENT_387
- const EVENT_388
- const EVENT_389
- const EVENT_38A
- const EVENT_38B
- const EVENT_38C
- const EVENT_38D
- const EVENT_38E
- const EVENT_38F
- const EVENT_390
- const EVENT_391
- const EVENT_392
- const EVENT_393
- const EVENT_394
- const EVENT_395
- const EVENT_396
- const EVENT_397
- const EVENT_398
- const EVENT_399
- const EVENT_39A
- const EVENT_39B
- const EVENT_39C
- const EVENT_39D
- const EVENT_39E
- const EVENT_39F
- const EVENT_3A0
- const EVENT_3A1
- const EVENT_3A2
- const EVENT_3A3
- const EVENT_3A4
- const EVENT_3A5
- const EVENT_3A6
- const EVENT_3A7
- const EVENT_3A8
- const EVENT_3A9
- const EVENT_3AA
- const EVENT_3AB
- const EVENT_3AC
- const EVENT_3AD
- const EVENT_3AE
- const EVENT_3AF
- const EVENT_3B0
- const EVENT_3B1
- const EVENT_3B2
- const EVENT_3B3
- const EVENT_3B4
- const EVENT_3B5
- const EVENT_3B6
- const EVENT_3B7
- const EVENT_3B8
- const EVENT_3B9
- const EVENT_3BA
- const EVENT_3BB
- const EVENT_3BC
- const EVENT_3BD
- const EVENT_3BE
- const EVENT_3BF
- const EVENT_3C0
- const EVENT_3C1
- const EVENT_3C2
- const EVENT_3C3
- const EVENT_3C4
- const EVENT_3C5
- const EVENT_3C6
- const EVENT_3C7
- const EVENT_3C8
- const EVENT_3C9
- const EVENT_3CA
- const EVENT_3CB
- const EVENT_3CC
- const EVENT_3CD
- const EVENT_3CE
- const EVENT_3CF
- const EVENT_3D0
- const EVENT_3D1
- const EVENT_3D2
- const EVENT_3D3
- const EVENT_3D4
- const EVENT_3D5
- const EVENT_3D6
- const EVENT_3D7
- const EVENT_3D8
- const EVENT_3D9
- const EVENT_3DA
- const EVENT_3DB
- const EVENT_3DC
- const EVENT_3DD
- const EVENT_3DE
- const EVENT_3DF
- const EVENT_3E0
- const EVENT_3E1
- const EVENT_3E2
- const EVENT_3E3
- const EVENT_3E4
- const EVENT_3E5
- const EVENT_3E6
- const EVENT_3E7
+; Unused: next 167 events
+
+ const_next 1000
; Trainer flags
; Swimmer F
const EVENT_BEAT_SWIMMERF_ELAINE
@@ -1097,7 +592,7 @@
const EVENT_BEAT_BURGLAR_DUNCAN
const EVENT_BEAT_BURGLAR_EDDIE
const EVENT_BEAT_BURGLAR_COREY
- const EVENT_430 ; unused
+ const_skip ; unused
; Biker
const EVENT_BEAT_BIKER_BENNY
const EVENT_BEAT_BIKER_KAZU
@@ -1289,7 +784,7 @@
const EVENT_BEAT_POKEFANF_BEVERLY3
const EVENT_BEAT_POKEFANF_GEORGIA
; Kimono Girl
- const EVENT_4DE ; unused
+ const_skip ; unused
const EVENT_BEAT_KIMONO_GIRL_NAOKO
const EVENT_BEAT_KIMONO_GIRL_SAYO
const EVENT_BEAT_KIMONO_GIRL_ZUKI
@@ -1547,123 +1042,9 @@
const EVENT_BEAT_SAGE_GAKU
const EVENT_BEAT_SAGE_MASA
const EVENT_BEAT_SAGE_KOJI
-; Unused
- const EVENT_5CC
- const EVENT_5CD
- const EVENT_5CE
- const EVENT_5CF
- const EVENT_5D0
- const EVENT_5D1
- const EVENT_5D2
- const EVENT_5D3
- const EVENT_5D4
- const EVENT_5D5
- const EVENT_5D6
- const EVENT_5D7
- const EVENT_5D8
- const EVENT_5D9
- const EVENT_5DA
- const EVENT_5DB
- const EVENT_5DC
- const EVENT_5DD
- const EVENT_5DE
- const EVENT_5DF
- const EVENT_5E0
- const EVENT_5E1
- const EVENT_5E2
- const EVENT_5E3
- const EVENT_5E4
- const EVENT_5E5
- const EVENT_5E6
- const EVENT_5E7
- const EVENT_5E8
- const EVENT_5E9
- const EVENT_5EA
- const EVENT_5EB
- const EVENT_5EC
- const EVENT_5ED
- const EVENT_5EE
- const EVENT_5EF
- const EVENT_5F0
- const EVENT_5F1
- const EVENT_5F2
- const EVENT_5F3
- const EVENT_5F4
- const EVENT_5F5
- const EVENT_5F6
- const EVENT_5F7
- const EVENT_5F8
- const EVENT_5F9
- const EVENT_5FA
- const EVENT_5FB
- const EVENT_5FC
- const EVENT_5FD
- const EVENT_5FE
- const EVENT_5FF
- const EVENT_600
- const EVENT_601
- const EVENT_602
- const EVENT_603
- const EVENT_604
- const EVENT_605
- const EVENT_606
- const EVENT_607
- const EVENT_608
- const EVENT_609
- const EVENT_60A
- const EVENT_60B
- const EVENT_60C
- const EVENT_60D
- const EVENT_60E
- const EVENT_60F
- const EVENT_610
- const EVENT_611
- const EVENT_612
- const EVENT_613
- const EVENT_614
- const EVENT_615
- const EVENT_616
- const EVENT_617
- const EVENT_618
- const EVENT_619
- const EVENT_61A
- const EVENT_61B
- const EVENT_61C
- const EVENT_61D
- const EVENT_61E
- const EVENT_61F
- const EVENT_620
- const EVENT_621
- const EVENT_622
- const EVENT_623
- const EVENT_624
- const EVENT_625
- const EVENT_626
- const EVENT_627
- const EVENT_628
- const EVENT_629
- const EVENT_62A
- const EVENT_62B
- const EVENT_62C
- const EVENT_62D
- const EVENT_62E
- const EVENT_62F
- const EVENT_630
- const EVENT_631
- const EVENT_632
- const EVENT_633
- const EVENT_634
- const EVENT_635
- const EVENT_636
- const EVENT_637
- const EVENT_638
- const EVENT_639
- const EVENT_63A
- const EVENT_63B
- const EVENT_63C
- const EVENT_63D
- const EVENT_63E
- const EVENT_63F
+; Unused: next 116 events
+
+ const_next 1600
; Sprite visibility flags
; When these events are cleared, the sprite becomes visible; when set, the sprite is hidden.
; The map script command macros `disappear` and `appear` set/clear these flags and immediately apply the effect on visibility.
@@ -1676,8 +1057,8 @@
const EVENT_VIOLET_CITY_RARE_CANDY
const EVENT_LAKE_OF_RAGE_ELIXER
const EVENT_LAKE_OF_RAGE_TM_DETECT
- const EVENT_SPROUT_TOWER1F_PARLYZ_HEAL
- const EVENT_SPROUT_TOWER2F_X_ACCURACY
+ const EVENT_SPROUT_TOWER_1F_PARLYZ_HEAL
+ const EVENT_SPROUT_TOWER_2F_X_ACCURACY
const EVENT_SPROUT_TOWER_3F_POTION
const EVENT_SPROUT_TOWER_3F_ESCAPE_ROPE
const EVENT_TIN_TOWER_3F_FULL_HEAL
@@ -1848,7 +1229,7 @@
const EVENT_COPYCAT_2
const EVENT_GOLDENROD_SALE_OFF
const EVENT_GOLDENROD_SALE_ON
- const EVENT_6F2 ; unused
+ const_skip ; unused
const EVENT_ILEX_FOREST_APPRENTICE
const EVENT_ILEX_FOREST_CHARCOAL_MASTER
const EVENT_CHARCOAL_KILN_FARFETCH_D
@@ -1970,6 +1351,8 @@
const EVENT_FLORIA_AT_SUDOWOODO
const EVENT_GOLDENROD_CITY_MOVE_TUTOR
const EVENT_GOLDENROD_GAME_CORNER_MOVE_TUTOR
+
+ const_next 1900
; Kanto people
const EVENT_ROUTE_24_ROCKET
const EVENT_CERULEAN_GYM_ROCKET
@@ -2073,4 +1456,7 @@
const EVENT_RADIO_TOWER_5F_ULTRA_BALL
const EVENT_DARK_CAVE_VIOLET_ENTRANCE_DIRE_HIT
const EVENT_BATTLE_TOWER_OUTSIDE_SAILOR
-NUM_EVENTS EQU const_value ; 7d0
+; Unused: next 48 events
+
+ const_next 2048
+NUM_EVENTS EQU const_value ; 800
--- a/constants/item_constants.asm
+++ b/constants/item_constants.asm
@@ -197,6 +197,8 @@
const MIRAGE_MAIL ; bd
const ITEM_BE ; be
+__tmhm_value__ = 1
+
add_tm: MACRO
; Defines three constants:
; - TM_\1: the item id, starting at $bf
@@ -205,17 +207,17 @@
; The first usage also defines TM01 as the first TM item id.
if !DEF(TM01)
TM01 EQU const_value
- enum_start 1
endc
-if __enum__ < 10
-MOVE_FOR_TM EQUS "TM0{d:__enum__}_MOVE"
+if __tmhm_value__ < 10
+MOVE_FOR_TM EQUS "TM0{d:__tmhm_value__}_MOVE"
else
-MOVE_FOR_TM EQUS "TM{d:__enum__}_MOVE"
+MOVE_FOR_TM EQUS "TM{d:__tmhm_value__}_MOVE"
endc
MOVE_FOR_TM = \1
PURGE MOVE_FOR_TM
const TM_\1
- enum \1_TMNUM
+\1_TMNUM EQU __tmhm_value__
+__tmhm_value__ = __tmhm_value__ + 1
ENDM
; see data/moves/tmhm_moves.asm for moves
@@ -271,7 +273,7 @@
add_tm FIRE_PUNCH ; f0
add_tm FURY_CUTTER ; f1
add_tm NIGHTMARE ; f2
-NUM_TMS EQU __enum__ - 1
+NUM_TMS EQU __tmhm_value__ - 1
add_hm: MACRO
; Defines three constants:
@@ -282,7 +284,7 @@
if !DEF(HM01)
HM01 EQU const_value
endc
-HM_VALUE EQU __enum__ - NUM_TMS
+HM_VALUE EQU __tmhm_value__ - NUM_TMS
if HM_VALUE < 10
MOVE_FOR_HM EQUS "HM0{d:HM_VALUE}_MOVE"
else
@@ -292,7 +294,8 @@
PURGE MOVE_FOR_HM
PURGE HM_VALUE
const HM_\1
- enum \1_TMNUM
+\1_TMNUM EQU __tmhm_value__
+__tmhm_value__ = __tmhm_value__ + 1
ENDM
add_hm CUT ; f3
@@ -302,13 +305,13 @@
add_hm FLASH ; f7
add_hm WHIRLPOOL ; f8
add_hm WATERFALL ; f9
-NUM_HMS EQU __enum__ - NUM_TMS - 1
+NUM_HMS EQU __tmhm_value__ - NUM_TMS - 1
add_mt: MACRO
; Defines two constants:
; - \1_TMNUM: the learnable TM/HM flag, starting at 58
; - MT##_MOVE: alias for the move id, equal to the value of \1
-MT_VALUE EQU __enum__ - NUM_TMS - NUM_HMS
+MT_VALUE EQU __tmhm_value__ - NUM_TMS - NUM_HMS
if MT_VALUE < 10
MOVE_FOR_MT EQUS "MT0{d:MT_VALUE}_MOVE"
else
@@ -317,15 +320,16 @@
MOVE_FOR_MT = \1
PURGE MOVE_FOR_MT
PURGE MT_VALUE
- enum \1_TMNUM
+\1_TMNUM EQU __tmhm_value__
+__tmhm_value__ = __tmhm_value__ + 1
ENDM
add_mt FLAMETHROWER
add_mt THUNDERBOLT
add_mt ICE_BEAM
-NUM_TUTORS = __enum__ - NUM_TMS - NUM_HMS - 1
+NUM_TUTORS = __tmhm_value__ - NUM_TMS - NUM_HMS - 1
-NUM_TM_HM_TUTOR EQU __enum__ - 1
+NUM_TM_HM_TUTOR EQU __tmhm_value__ - 1
const ITEM_FA ; fa
--- a/constants/item_data_constants.asm
+++ b/constants/item_data_constants.asm
@@ -1,6 +1,6 @@
; item_attributes struct members (see data/items/attributes.asm)
const_def
- const ITEMATTR_PRICE
+ const ITEMATTR_PRICE_LO
const ITEMATTR_PRICE_HI
const ITEMATTR_EFFECT
const ITEMATTR_PARAM
@@ -19,10 +19,12 @@
; item menu types
; UseItem.dw indexes (see engine/items/pack.asm)
; UseRegisteredItem.SwitchTo indexes (see engine/overworld/select_menu.asm)
-ITEMMENU_NOUSE EQU 0
-ITEMMENU_CURRENT EQU 4
-ITEMMENU_PARTY EQU 5
-ITEMMENU_CLOSE EQU 6
+ const_def
+ const ITEMMENU_NOUSE ; 0
+ const_skip 3
+ const ITEMMENU_CURRENT ; 4
+ const ITEMMENU_PARTY ; 5
+ const ITEMMENU_CLOSE ; 6
; item actions
CANT_SELECT_F EQU 6
@@ -57,13 +59,13 @@
const HELD_BERRY
const HELD_2
const HELD_LEFTOVERS
- const HELD_4
+ const_skip
const HELD_5
const HELD_RESTORE_PP
- const HELD_7
+ const_skip
const HELD_CLEANSE_TAG
- const_def 10
+ const_next 10
const HELD_HEAL_POISON
const HELD_HEAL_FREEZE
const HELD_HEAL_BURN
@@ -72,7 +74,7 @@
const HELD_HEAL_STATUS
const HELD_HEAL_CONFUSION
- const_def 20
+ const_next 20
const HELD_PREVENT_POISON
const HELD_PREVENT_BURN
const HELD_PREVENT_FREEZE
@@ -80,7 +82,7 @@
const HELD_PREVENT_PARALYZE
const HELD_PREVENT_CONFUSE
- const_def 30
+ const_next 30
const HELD_30
const HELD_ATTACK_UP
const HELD_DEFENSE_UP
@@ -91,12 +93,12 @@
const HELD_EVASION_UP
const HELD_38
- const_def 40
- const HELD_40
- const HELD_41
+ const_next 40
+ const_skip
+ const_skip
const HELD_METAL_POWDER
- const_def 50
+ const_next 50
const HELD_NORMAL_BOOST
const HELD_FIGHTING_BOOST
const HELD_FLYING_BOOST
@@ -115,7 +117,7 @@
const HELD_DARK_BOOST
const HELD_STEEL_BOOST
- const_def 70
+ const_next 70
const HELD_CATCH_CHANCE
const HELD_71
const HELD_ESCAPE
@@ -124,5 +126,5 @@
const HELD_FLINCH
const HELD_AMULET_COIN
const HELD_BRIGHTPOWDER
- const HELD_78
+ const_skip
const HELD_FOCUS_BAND
--- a/constants/map_constants.asm
+++ b/constants/map_constants.asm
@@ -1,6 +1,6 @@
newgroup: MACRO
const_value = const_value + 1
- enum_start 1
+__map_value__ = 1
ENDM
map_const: MACRO
@@ -8,7 +8,8 @@
;\2: width: in blocks
;\3: height: in blocks
GROUP_\1 EQU const_value
- enum MAP_\1
+MAP_\1 EQU __map_value__
+__map_value__ = __map_value__ + 1
\1_WIDTH EQU \2
\1_HEIGHT EQU \3
ENDM
--- a/constants/map_object_constants.asm
+++ b/constants/map_object_constants.asm
@@ -33,8 +33,8 @@
const OBJECT_1E ; 1e
const OBJECT_1F ; 1f
const OBJECT_RANGE ; 20
- ; 21-27 are not used
-OBJECT_LENGTH EQU 40
+ const_skip 7
+OBJECT_LENGTH EQU const_value
NUM_OBJECT_STRUCTS EQU 13 ; see wObjectStructs
; object_struct OBJECT_FACING values
@@ -99,21 +99,20 @@
; map_object struct members (see macros/wram.asm)
const_def
const MAPOBJECT_OBJECT_STRUCT_ID ; 0
- const MAPOBJECT_SPRITE ; 1
- const MAPOBJECT_Y_COORD ; 2
- const MAPOBJECT_X_COORD ; 3
- const MAPOBJECT_MOVEMENT ; 4
- const MAPOBJECT_RADIUS ; 5
- const MAPOBJECT_HOUR ; 6
- const MAPOBJECT_TIMEOFDAY ; 7
- const MAPOBJECT_COLOR ; 8
- const MAPOBJECT_RANGE ; 9
- const MAPOBJECT_SCRIPT_POINTER ; a
- const MAPOBJECT_POINTER_HI ; b
- const MAPOBJECT_EVENT_FLAG ; c
- const MAPOBJECT_FLAG_HI ; d
- const MAPOBJECT_E ; unused
- const MAPOBJECT_F ; unused
+ const MAPOBJECT_SPRITE ; 1
+ const MAPOBJECT_Y_COORD ; 2
+ const MAPOBJECT_X_COORD ; 3
+ const MAPOBJECT_MOVEMENT ; 4
+ const MAPOBJECT_RADIUS ; 5
+ const MAPOBJECT_HOUR ; 6
+ const MAPOBJECT_TIMEOFDAY ; 7
+ const MAPOBJECT_COLOR ; 8
+ const MAPOBJECT_RANGE ; 9
+ const MAPOBJECT_SCRIPT_POINTER ; a
+ const_skip ; high MAPOBJECT_SCRIPT_POINTER byte
+ const MAPOBJECT_EVENT_FLAG ; c
+ const_skip ; high MAPOBJECT_EVENT_FLAG byte
+ const_skip 2 ; unused
MAPOBJECT_LENGTH EQU const_value
; SpriteMovementData struct members (see data/sprites/map_objects.asm)
--- a/constants/menu_constants.asm
+++ b/constants/menu_constants.asm
@@ -87,7 +87,7 @@
const PARTYMENUACTION_GIVE_ITEM
const PARTYMENUACTION_MOBILE ; mobile
; PrintPartyMenuActionText arguments (see engine/pokemon/party_menu.asm)
- const_def $f0
+ const_next $f0
const PARTYMENUTEXT_HEAL_PSN
const PARTYMENUTEXT_HEAL_BRN
const PARTYMENUTEXT_HEAL_FRZ
--- a/constants/move_constants.asm
+++ b/constants/move_constants.asm
@@ -259,11 +259,8 @@
const BEAT_UP ; fb
NUM_ATTACKS EQU const_value - 1
- const MOVE_OR_ANIM_FC ; fc
- const MOVE_OR_ANIM_FD ; fd
- const MOVE_OR_ANIM_FE ; fe
-
; Battle animations use the same constants as the moves up to this point
+ const_next $ff
const ANIM_SWEET_SCENT_2 ; ff
const ANIM_THROW_POKE_BALL ; 100
const ANIM_SEND_OUT_MON ; 101
--- a/constants/phone_constants.asm
+++ b/constants/phone_constants.asm
@@ -8,9 +8,9 @@
const PHONE_SCHOOLBOY_JACK
const PHONE_POKEFAN_BEVERLY
const PHONE_SAILOR_HUEY
- const PHONE_08
- const PHONE_09
- const PHONE_0A
+ const_skip
+ const_skip
+ const_skip
const PHONE_COOLTRAINERM_GAVEN
const PHONE_COOLTRAINERF_BETH
const PHONE_BIRDKEEPER_JOSE
@@ -25,7 +25,7 @@
const PHONE_JUGGLER_IRWIN
const PHONE_BUG_CATCHER_ARNIE
const PHONE_SCHOOLBOY_ALAN
- const PHONE_19
+ const_skip
const PHONE_LASS_DANA
const PHONE_SCHOOLBOY_CHAD
const PHONE_POKEFANM_DEREK
@@ -59,12 +59,12 @@
const PHONE_CONTACT_MAP_NUMBER
const PHONE_CONTACT_SCRIPT1_TIME
const PHONE_CONTACT_SCRIPT1_BANK
- const PHONE_CONTACT_SCRIPT1_ADDR_LO
- const PHONE_CONTACT_SCRIPT1_ADDR_HI
+ const PHONE_CONTACT_SCRIPT1_ADDR
+ const_skip ; high PHONE_CONTACT_SCRIPT1_ADDR byte
const PHONE_CONTACT_SCRIPT2_TIME
const PHONE_CONTACT_SCRIPT2_BANK
- const PHONE_CONTACT_SCRIPT2_ADDR_LO
- const PHONE_CONTACT_SCRIPT2_ADDR_HI
+ const PHONE_CONTACT_SCRIPT2_ADDR
+ const_skip ; high PHONE_CONTACT_SCRIPT2_ADDR byte
PHONE_CONTACT_SIZE EQU const_value
; maximum number of pokegear contacts
--- a/constants/pokemon_constants.asm
+++ b/constants/pokemon_constants.asm
@@ -272,9 +272,8 @@
const HO_OH ; fa
const CELEBI ; fb
NUM_POKEMON EQU const_value - 1
- const MON_FC ; fc
+ const_skip ; fc
const EGG ; fd
- const MON_FE ; fe
; Unown forms
; indexes for:
--- a/constants/sprite_constants.asm
+++ b/constants/sprite_constants.asm
@@ -106,7 +106,7 @@
const SPRITE_STANDING_YOUNGSTER ; 66
; SpriteMons indexes (see data/sprites/sprite_mons.asm)
- const_def $80
+ const_next $80
SPRITE_POKEMON EQU const_value
const SPRITE_UNOWN ; 80
const SPRITE_GEODUDE ; 81
@@ -145,12 +145,12 @@
const SPRITE_HO_OH ; a2
; special GetMonSprite values (see engine/overworld/overworld.asm)
- const_def $e0
+ const_next $e0
const SPRITE_DAY_CARE_MON_1 ; e0
const SPRITE_DAY_CARE_MON_2 ; e1
; wVariableSprites indexes (see wram.asm)
- const_def $f0
+ const_next $f0
SPRITE_VARS EQU const_value
const SPRITE_CONSOLE ; f0
const SPRITE_DOLL_1 ; f1
--- a/constants/sprite_data_constants.asm
+++ b/constants/sprite_data_constants.asm
@@ -1,7 +1,7 @@
; overworld_sprite struct members (see data/sprites.asm)
const_def
const SPRITEDATA_ADDR ; 0
- const SPRITEDATA_ADDR_HI ; 1
+ const_skip ; high SPRITEDATA_ADDR byte
const SPRITEDATA_SIZE ; 2
const SPRITEDATA_BANK ; 3
const SPRITEDATA_TYPE ; 4
--- a/constants/trainer_constants.asm
+++ b/constants/trainer_constants.asm
@@ -1,5 +1,8 @@
+__trainer_class__ = 0
+
trainerclass: MACRO
- enum \1
+\1 EQU __trainer_class__
+__trainer_class__ = __trainer_class__ + 1
const_value = 1
ENDM
@@ -15,8 +18,7 @@
; - BTTrainerClassSprites (see data/trainers/sprites.asm)
; - BTTrainerClassGenders (see data/trainers/genders.asm)
; trainer constants are Trainers indexes, for the sub-tables of TrainerGroups (see data/trainers/parties.asm)
- enum_start
-CHRIS EQU __enum__
+CHRIS EQU __trainer_class__
trainerclass TRAINER_NONE ; 0
const PHONECONTACT_MOM
const PHONECONTACT_BIKESHOP
@@ -24,7 +26,7 @@
const PHONECONTACT_ELM
const PHONECONTACT_BUENA
-KRIS EQU __enum__
+KRIS EQU __trainer_class__
trainerclass FALKNER ; 1
const FALKNER1
@@ -700,4 +702,4 @@
trainerclass MYSTICALMAN ; 43
const EUSINE
-NUM_TRAINER_CLASSES EQU __enum__
+NUM_TRAINER_CLASSES EQU __trainer_class__
--- a/constants/trainer_data_constants.asm
+++ b/constants/trainer_data_constants.asm
@@ -4,16 +4,14 @@
const TRNATTR_ITEM2 ; 1
const TRNATTR_BASEMONEY ; 2
const TRNATTR_AI_MOVE_WEIGHTS ; 3
- const TRNATTR_AI2 ; 4
+ const_skip ; high TRNATTR_AI_MOVE_WEIGHTS byte
const TRNATTR_AI_ITEM_SWITCH ; 5
- const TRNATTR_AI4 ; 6
+ const_skip ; high TRNATTR_AI_ITEM_SWITCH byte
NUM_TRAINER_ATTRIBUTES EQU const_value
; TRNATTR_AI_MOVE_WEIGHTS bit flags (wEnemyTrainerAIFlags)
; AIScoringPointers indexes (see engine/battle/ai/move.asm)
const_def
- const NO_AI
-const_value = 0
shift_const AI_BASIC
shift_const AI_SETUP
shift_const AI_TYPES
@@ -24,27 +22,24 @@
shift_const AI_CAUTIOUS
shift_const AI_STATUS
shift_const AI_RISKY
- shift_const AI_10
- shift_const AI_11
- shift_const AI_12
- shift_const AI_13
- shift_const AI_14
- shift_const AI_15
+NO_AI EQU 0
; TRNATTR_AI_ITEM_SWITCH bit flags
-CONTEXT_USE_F EQU 6
-UNKNOWN_USE_F EQU 5
-ALWAYS_USE_F EQU 4
-SWITCH_SOMETIMES_F EQU 2
-SWITCH_RARELY_F EQU 1
-SWITCH_OFTEN_F EQU 0
+ const_def
+ const SWITCH_OFTEN_F ; 0
+ const SWITCH_RARELY_F ; 1
+ const SWITCH_SOMETIMES_F ; 2
+ const_skip ; 3
+ const ALWAYS_USE_F ; 4
+ const UNKNOWN_USE_F ; 5
+ const CONTEXT_USE_F ; 6
-CONTEXT_USE EQU 1 << CONTEXT_USE_F
-UNKNOWN_USE EQU 1 << UNKNOWN_USE_F
-ALWAYS_USE EQU 1 << ALWAYS_USE_F
-SWITCH_SOMETIMES EQU 1 << SWITCH_SOMETIMES_F
-SWITCH_RARELY EQU 1 << SWITCH_RARELY_F
SWITCH_OFTEN EQU 1 << SWITCH_OFTEN_F
+SWITCH_RARELY EQU 1 << SWITCH_RARELY_F
+SWITCH_SOMETIMES EQU 1 << SWITCH_SOMETIMES_F
+ALWAYS_USE EQU 1 << ALWAYS_USE_F
+UNKNOWN_USE EQU 1 << UNKNOWN_USE_F
+CONTEXT_USE EQU 1 << CONTEXT_USE_F
; TrainerTypes indexes (see engine/battle/read_trainer_party.asm)
const_def
--- a/constants/type_constants.asm
+++ b/constants/type_constants.asm
@@ -19,15 +19,7 @@
const STEEL
UNUSED_TYPES EQU const_value
- const TYPE_10
- const TYPE_11
- const TYPE_12
- const TYPE_13
- const TYPE_14
- const TYPE_15
- const TYPE_16
- const TYPE_17
- const TYPE_18
+ const_next 19
const CURSE_TYPE
UNUSED_TYPES_END EQU const_value
--- a/data/moves/tmhm_moves.asm
+++ b/data/moves/tmhm_moves.asm
@@ -2,7 +2,7 @@
; define constants for the item IDs and for the corresponding move values.
TMHMMoves:
-; entries correspond to *_TMNUM enums (see constants/item_constants.asm)
+; entries correspond to *_TMNUM constants (see constants/item_constants.asm)
; TMs
n = 1
--- a/engine/battle_anims/anim_commands.asm
+++ b/engine/battle_anims/anim_commands.asm
@@ -326,7 +326,7 @@
jp hl
BattleAnimCommands::
-; entries correspond to macros/scripts/battle_anims.asm enumeration
+; entries correspond to anim_* constants (see macros/scripts/battle_anims.asm)
dw BattleAnimCmd_Obj
dw BattleAnimCmd_1GFX
dw BattleAnimCmd_2GFX
--- a/engine/items/items.asm
+++ b/engine/items/items.asm
@@ -570,7 +570,7 @@
; Return the price of wCurItem in de.
push hl
push bc
- ld a, ITEMATTR_PRICE
+ ld a, ITEMATTR_PRICE_LO
call GetItemAttr
ld e, a
ld a, ITEMATTR_PRICE_HI
--- a/engine/movie/trade_animation.asm
+++ b/engine/movie/trade_animation.asm
@@ -231,7 +231,7 @@
jumptable .JumpTable, wJumptableIndex
.JumpTable:
-; entries correspond to macros/scripts/trade_anims.asm enumeration
+; entries correspond to tradeanim_* constants (see macros/scripts/trade_anims.asm)
dw TradeAnim_AdvanceScriptPointer ; 00
dw TradeAnim_ShowGivemonData ; 01
dw TradeAnim_ShowGetmonData ; 02
--- a/engine/overworld/movement.asm
+++ b/engine/overworld/movement.asm
@@ -1,5 +1,5 @@
MovementPointers:
-; entries correspond to macros/scripts/movement.asm enumeration
+; entries correspond to movement_* constants (see macros/scripts/movement.asm)
dw Movement_turn_head_down ; 00
dw Movement_turn_head_up ; 01
dw Movement_turn_head_left ; 02
--- a/engine/overworld/scripting.asm
+++ b/engine/overworld/scripting.asm
@@ -62,7 +62,7 @@
ret
ScriptCommandTable:
-; entries correspond to macros/scripts/events.asm enumeration
+; entries correspond to *_command constants (see macros/scripts/events.asm)
dw Script_scall ; 00
dw Script_farscall ; 01
dw Script_memcall ; 02
--- a/engine/phone/phone.asm
+++ b/engine/phone/phone.asm
@@ -353,7 +353,7 @@
ld hl, PHONE_CONTACT_SCRIPT1_BANK
add hl, de
ld b, [hl]
- ld hl, PHONE_CONTACT_SCRIPT1_ADDR_LO
+ ld hl, PHONE_CONTACT_SCRIPT1_ADDR
add hl, de
ld a, [hli]
ld h, [hl]
--- a/lib/mobile/main.asm
+++ b/lib/mobile/main.asm
@@ -1,6 +1,6 @@
; A library included as part of the Mobile Adapter GB SDK.
-INCLUDE "macros/enum.asm"
+INCLUDE "macros/const.asm"
INCLUDE "constants/hardware_constants.asm"
INCLUDE "constants/mobile_constants.asm"
--- a/macros.asm
+++ b/macros.asm
@@ -1,4 +1,4 @@
-INCLUDE "macros/enum.asm"
+INCLUDE "macros/const.asm"
INCLUDE "macros/predef.asm"
INCLUDE "macros/rst.asm"
INCLUDE "macros/data.asm"
--- /dev/null
+++ b/macros/const.asm
@@ -1,0 +1,40 @@
+; Enumerate constants
+
+const_def: MACRO
+if _NARG >= 1
+const_value = \1
+else
+const_value = 0
+endc
+if _NARG >= 2
+const_inc = \2
+else
+const_inc = 1
+endc
+ENDM
+
+const: MACRO
+\1 EQU const_value
+const_value = const_value + const_inc
+ENDM
+
+shift_const: MACRO
+\1 EQU (1 << const_value)
+const_value = const_value + const_inc
+ENDM
+
+const_skip: MACRO
+if _NARG >= 1
+const_value = const_value + const_inc * (\1)
+else
+const_value = const_value + const_inc
+endc
+ENDM
+
+const_next: MACRO
+if (const_value > 0 && \1 < const_value) || (const_value < 0 && \1 > const_value)
+fail "const_next cannot go backwards from {const_value} to \1"
+else
+const_value = \1
+endc
+ENDM
--- a/macros/enum.asm
+++ /dev/null
@@ -1,43 +1,0 @@
-; Enumerate variables
-
-enum_start: MACRO
-if _NARG >= 1
-__enum__ = \1
-else
-__enum__ = 0
-endc
-if _NARG >= 2
-__enumdir__ = \2
-else
-__enumdir__ = 1
-endc
-ENDM
-
-enum: MACRO
-\1 EQU __enum__
-__enum__ = __enum__ + __enumdir__
-ENDM
-
-enum_set: MACRO
-__enum__ = \1
-ENDM
-
-; Enumerate constants
-
-const_def: MACRO
-if _NARG >= 1
-const_value = \1
-else
-const_value = 0
-endc
-ENDM
-
-const: MACRO
-\1 EQU const_value
-const_value = const_value + 1
-ENDM
-
-shift_const: MACRO
-\1 EQU (1 << const_value)
-const_value = const_value + 1
-ENDM
--- a/macros/scripts/audio.asm
+++ b/macros/scripts/audio.asm
@@ -41,17 +41,17 @@
ENDM
; MusicCommands indexes (see audio/engine.asm)
- enum_start $d0, 8
-FIRST_MUSIC_CMD EQU __enum__
+ const_def $d0
+FIRST_MUSIC_CMD EQU const_value
- enum octave_cmd ; $d0
+ const octave_cmd ; $d0
octave: MACRO
db octave_cmd | 8 - (\1) ; octave
ENDM
-__enumdir__ = 1
+ const_skip 7 ; all octave values
- enum note_type_cmd ; $d8
+ const note_type_cmd ; $d8
note_type: MACRO
db note_type_cmd
db \1 ; note length
@@ -69,25 +69,25 @@
note_type \1 ; note length
ENDM
- enum transpose_cmd ; $d9
+ const transpose_cmd ; $d9
transpose: MACRO
db transpose_cmd
dn \1, \2 ; num octaves, num pitches
ENDM
- enum tempo_cmd ; $da
+ const tempo_cmd ; $da
tempo: MACRO
db tempo_cmd
bigdw \1 ; tempo
ENDM
- enum duty_cycle_cmd ; $db
+ const duty_cycle_cmd ; $db
duty_cycle: MACRO
db duty_cycle_cmd
db \1 ; duty cycle
ENDM
- enum volume_envelope_cmd ; $dc
+ const volume_envelope_cmd ; $dc
volume_envelope: MACRO
db volume_envelope_cmd
IF \2 < 0
@@ -97,7 +97,7 @@
ENDC
ENDM
- enum pitch_sweep_cmd ; $dd
+ const pitch_sweep_cmd ; $dd
pitch_sweep: MACRO
db pitch_sweep_cmd
IF \2 < 0
@@ -107,18 +107,18 @@
ENDC
ENDM
- enum duty_cycle_pattern_cmd ; $de
+ const duty_cycle_pattern_cmd ; $de
duty_cycle_pattern: MACRO
db duty_cycle_pattern_cmd
db (\1 << 6) | (\2 << 4) | (\3 << 2) | (\4 << 0) ; duty cycle pattern
ENDM
- enum toggle_sfx_cmd ; $df
+ const toggle_sfx_cmd ; $df
toggle_sfx: MACRO
db toggle_sfx_cmd
ENDM
- enum pitch_slide_cmd ; $e0
+ const pitch_slide_cmd ; $e0
pitch_slide: MACRO
db pitch_slide_cmd
db \1 - 1 ; duration
@@ -125,7 +125,7 @@
dn 8 - \2, \3 % 12 ; octave, pitch
ENDM
- enum vibrato_cmd ; $e1
+ const vibrato_cmd ; $e1
vibrato: MACRO
db vibrato_cmd
db \1 ; delay
@@ -136,13 +136,13 @@
ENDC
ENDM
- enum unknownmusic0xe2_cmd ; $e2
+ const unknownmusic0xe2_cmd ; $e2
unknownmusic0xe2: MACRO
db unknownmusic0xe2_cmd
db \1 ; unknown
ENDM
- enum toggle_noise_cmd ; $e3
+ const toggle_noise_cmd ; $e3
toggle_noise: MACRO
db toggle_noise_cmd
IF _NARG > 0
@@ -150,13 +150,13 @@
ENDC
ENDM
- enum force_stereo_panning_cmd ; $e4
+ const force_stereo_panning_cmd ; $e4
force_stereo_panning: MACRO
db force_stereo_panning_cmd
dn %1111 * (1 && \1), %1111 * (1 && \2) ; left enable, right enable
ENDM
- enum volume_cmd ; $e5
+ const volume_cmd ; $e5
volume: MACRO
db volume_cmd
IF _NARG > 1
@@ -166,65 +166,65 @@
ENDC
ENDM
- enum pitch_offset_cmd ; $e6
+ const pitch_offset_cmd ; $e6
pitch_offset: MACRO
db pitch_offset_cmd
bigdw \1 ; pitch offset
ENDM
- enum unknownmusic0xe7_cmd ; $e7
+ const unknownmusic0xe7_cmd ; $e7
unknownmusic0xe7: MACRO
db unknownmusic0xe7_cmd
db \1 ; unknown
ENDM
- enum unknownmusic0xe8_cmd ; $e8
+ const unknownmusic0xe8_cmd ; $e8
unknownmusic0xe8: MACRO
db unknownmusic0xe8_cmd
db \1 ; unknown
ENDM
- enum tempo_relative_cmd ; $e9
+ const tempo_relative_cmd ; $e9
tempo_relative: MACRO
db tempo_relative_cmd
bigdw \1 ; tempo adjustment
ENDM
- enum restart_channel_cmd ; $ea
+ const restart_channel_cmd ; $ea
restart_channel: MACRO
db restart_channel_cmd
dw \1 ; address
ENDM
- enum new_song_cmd ; $eb
+ const new_song_cmd ; $eb
new_song: MACRO
db new_song_cmd
bigdw \1 ; id
ENDM
- enum sfx_priority_on_cmd ; $ec
+ const sfx_priority_on_cmd ; $ec
sfx_priority_on: MACRO
db sfx_priority_on_cmd
ENDM
- enum sfx_priority_off_cmd ; $ed
+ const sfx_priority_off_cmd ; $ed
sfx_priority_off: MACRO
db sfx_priority_off_cmd
ENDM
- enum unknownmusic0xee_cmd ; $ee
+ const unknownmusic0xee_cmd ; $ee
unknownmusic0xee: MACRO
db unknownmusic0xee_cmd
dw \1 ; address
ENDM
- enum stereo_panning_cmd ; $ef
+ const stereo_panning_cmd ; $ef
stereo_panning: MACRO
db stereo_panning_cmd
dn %1111 * (1 && \1), %1111 * (1 && \2) ; left enable, right enable
ENDM
- enum sfx_toggle_noise_cmd ; $f0
+ const sfx_toggle_noise_cmd ; $f0
sfx_toggle_noise: MACRO
db sfx_toggle_noise_cmd
IF _NARG > 0
@@ -232,58 +232,58 @@
ENDC
ENDM
- enum music0xf1_cmd ; $f1
+ const music0xf1_cmd ; $f1
music0xf1: MACRO
db music0xf1_cmd
ENDM
- enum music0xf2_cmd ; $f2
+ const music0xf2_cmd ; $f2
music0xf2: MACRO
db music0xf2_cmd
ENDM
- enum music0xf3_cmd ; $f3
+ const music0xf3_cmd ; $f3
music0xf3: MACRO
db music0xf3_cmd
ENDM
- enum music0xf4_cmd ; $f4
+ const music0xf4_cmd ; $f4
music0xf4: MACRO
db music0xf4_cmd
ENDM
- enum music0xf5_cmd ; $f5
+ const music0xf5_cmd ; $f5
music0xf5: MACRO
db music0xf5_cmd
ENDM
- enum music0xf6_cmd ; $f6
+ const music0xf6_cmd ; $f6
music0xf6: MACRO
db music0xf6_cmd
ENDM
- enum music0xf7_cmd ; $f7
+ const music0xf7_cmd ; $f7
music0xf7: MACRO
db music0xf7_cmd
ENDM
- enum music0xf8_cmd ; $f8
+ const music0xf8_cmd ; $f8
music0xf8: MACRO
db music0xf8_cmd
ENDM
- enum unknownmusic0xf9_cmd ; $f9
+ const unknownmusic0xf9_cmd ; $f9
unknownmusic0xf9: MACRO
db unknownmusic0xf9_cmd
ENDM
- enum set_condition_cmd ; $fa
+ const set_condition_cmd ; $fa
set_condition: MACRO
db set_condition_cmd
db \1 ; condition
ENDM
- enum sound_jump_if_cmd ; $fb
+ const sound_jump_if_cmd ; $fb
sound_jump_if: MACRO
db sound_jump_if_cmd
db \1 ; condition
@@ -290,13 +290,13 @@
dw \2 ; address
ENDM
- enum sound_jump_cmd ; $fc
+ const sound_jump_cmd ; $fc
sound_jump: MACRO
db sound_jump_cmd
dw \1 ; address
ENDM
- enum sound_loop_cmd ; $fd
+ const sound_loop_cmd ; $fd
sound_loop: MACRO
db sound_loop_cmd
db \1 ; count
@@ -303,13 +303,13 @@
dw \2 ; address
ENDM
- enum sound_call_cmd ; $fe
+ const sound_call_cmd ; $fe
sound_call: MACRO
db sound_call_cmd
dw \1 ; address
ENDM
- enum sound_ret_cmd ; $ff
+ const sound_ret_cmd ; $ff
sound_ret: MACRO
db sound_ret_cmd
ENDM
--- a/macros/scripts/battle_anims.asm
+++ b/macros/scripts/battle_anims.asm
@@ -6,9 +6,9 @@
ENDM
; BattleAnimCommands indexes (see engine/battle_anims/anim_commands.asm)
- enum_start $d0
+ const_def $d0
- enum anim_obj_command ; $d0
+ const anim_obj_command ; $d0
anim_obj: MACRO
db anim_obj_command
if _NARG <= 4
@@ -25,13 +25,13 @@
endc
ENDM
- enum anim_1gfx_command ; $d1
+ const anim_1gfx_command ; $d1
anim_1gfx: MACRO
db anim_1gfx_command
db \1 ; gfx1
ENDM
- enum anim_2gfx_command ; $d2
+ const anim_2gfx_command ; $d2
anim_2gfx: MACRO
db anim_2gfx_command
db \1 ; gfx1
@@ -38,7 +38,7 @@
db \2 ; gfx2
ENDM
- enum anim_3gfx_command ; $d3
+ const anim_3gfx_command ; $d3
anim_3gfx: MACRO
db anim_3gfx_command
db \1 ; gfx1
@@ -46,7 +46,7 @@
db \3 ; gfx3
ENDM
- enum anim_4gfx_command ; $d4
+ const anim_4gfx_command ; $d4
anim_4gfx: MACRO
db anim_4gfx_command
db \1 ; gfx1
@@ -55,7 +55,7 @@
db \4 ; gfx4
ENDM
- enum anim_5gfx_command ; $d5
+ const anim_5gfx_command ; $d5
anim_5gfx: MACRO
db anim_5gfx_command
db \1 ; gfx1
@@ -65,13 +65,13 @@
db \5 ; gfx5
ENDM
- enum anim_incobj_command ; $d6
+ const anim_incobj_command ; $d6
anim_incobj: MACRO
db anim_incobj_command
db \1 ; object_id
ENDM
- enum anim_setobj_command ; $d7
+ const anim_setobj_command ; $d7
anim_setobj: MACRO
db anim_setobj_command
db \1 ; object_id
@@ -78,48 +78,48 @@
db \2 ; value
ENDM
- enum anim_incbgeffect_command ; $d8
+ const anim_incbgeffect_command ; $d8
anim_incbgeffect: MACRO
db anim_incbgeffect_command
db \1 ; effect
ENDM
- enum anim_battlergfx_2row_command ; $d9
+ const anim_battlergfx_2row_command ; $d9
anim_battlergfx_2row: MACRO
db anim_battlergfx_2row_command
ENDM
- enum anim_battlergfx_1row_command ; $da
+ const anim_battlergfx_1row_command ; $da
anim_battlergfx_1row: MACRO
db anim_battlergfx_1row_command
ENDM
- enum anim_checkpokeball_command ; $db
+ const anim_checkpokeball_command ; $db
anim_checkpokeball: MACRO
db anim_checkpokeball_command
ENDM
- enum anim_transform_command ; $dc
+ const anim_transform_command ; $dc
anim_transform: MACRO
db anim_transform_command
ENDM
- enum anim_raisesub_command ; $dd
+ const anim_raisesub_command ; $dd
anim_raisesub: MACRO
db anim_raisesub_command
ENDM
- enum anim_dropsub_command ; $de
+ const anim_dropsub_command ; $de
anim_dropsub: MACRO
db anim_dropsub_command
ENDM
- enum anim_resetobp0_command ; $df
+ const anim_resetobp0_command ; $df
anim_resetobp0: MACRO
db anim_resetobp0_command
ENDM
- enum anim_sound_command ; $e0
+ const anim_sound_command ; $e0
anim_sound: MACRO
db anim_sound_command
db (\1 << 2) | \2 ; duration, tracks
@@ -126,73 +126,73 @@
db \3 ; sound_id
ENDM
- enum anim_cry_command ; $e1
+ const anim_cry_command ; $e1
anim_cry: MACRO
db anim_cry_command
db \1 ; pitch
ENDM
- enum anim_minimizeopp_command ; $e2
+ const anim_minimizeopp_command ; $e2
anim_minimizeopp: MACRO
db anim_minimizeopp_command
ENDM
- enum anim_oamon_command ; $e3
+ const anim_oamon_command ; $e3
anim_oamon: MACRO
db anim_oamon_command
ENDM
- enum anim_oamoff_command ; $e4
+ const anim_oamoff_command ; $e4
anim_oamoff: MACRO
db anim_oamoff_command
ENDM
- enum anim_clearobjs_command ; $e5
+ const anim_clearobjs_command ; $e5
anim_clearobjs: MACRO
db anim_clearobjs_command
ENDM
- enum anim_beatup_command ; $e6
+ const anim_beatup_command ; $e6
anim_beatup: MACRO
db anim_beatup_command
ENDM
- enum anim_0xe7_command ; $e7
+ const anim_0xe7_command ; $e7
anim_0xe7: MACRO
db anim_0xe7_command
ENDM
- enum anim_updateactorpic_command ; $e8
+ const anim_updateactorpic_command ; $e8
anim_updateactorpic: MACRO
db anim_updateactorpic_command
ENDM
- enum anim_minimize_command ; $e9
+ const anim_minimize_command ; $e9
anim_minimize: MACRO
db anim_minimize_command
ENDM
- enum anim_0xea_command ; $ea
+ const anim_0xea_command ; $ea
anim_0xea: MACRO
db anim_0xea_command
ENDM
- enum anim_0xeb_command ; $eb
+ const anim_0xeb_command ; $eb
anim_0xeb: MACRO
db anim_0xeb_command
ENDM
- enum anim_0xec_command ; $ec
+ const anim_0xec_command ; $ec
anim_0xec: MACRO
db anim_0xec_command
ENDM
- enum anim_0xed_command ; $ed
+ const anim_0xed_command ; $ed
anim_0xed: MACRO
db anim_0xed_command
ENDM
- enum anim_if_param_and_command ; $ee
+ const anim_if_param_and_command ; $ee
anim_if_param_and: MACRO
db anim_if_param_and_command
db \1 ; value
@@ -199,13 +199,13 @@
dw \2 ; address
ENDM
- enum anim_jumpuntil_command ; $ef
+ const anim_jumpuntil_command ; $ef
anim_jumpuntil: MACRO
db anim_jumpuntil_command
dw \1 ; address
ENDM
- enum anim_bgeffect_command ; $f0
+ const anim_bgeffect_command ; $f0
anim_bgeffect: MACRO
db anim_bgeffect_command
db \1 ; effect
@@ -214,45 +214,45 @@
db \4 ; unknown
ENDM
- enum anim_bgp_command ; $f1
+ const anim_bgp_command ; $f1
anim_bgp: MACRO
db anim_bgp_command
db \1 ; colors
ENDM
- enum anim_obp0_command ; $f2
+ const anim_obp0_command ; $f2
anim_obp0: MACRO
db anim_obp0_command
db \1 ; colors
ENDM
- enum anim_obp1_command ; $f3
+ const anim_obp1_command ; $f3
anim_obp1: MACRO
db anim_obp1_command
db \1 ; colors
ENDM
- enum anim_keepsprites_command ; $f4
+ const anim_keepsprites_command ; $f4
anim_keepsprites: MACRO
db anim_keepsprites_command
ENDM
- enum anim_0xf5_command ; $f5
+ const anim_0xf5_command ; $f5
anim_0xf5: MACRO
db anim_0xf5_command
ENDM
- enum anim_0xf6_command ; $f6
+ const anim_0xf6_command ; $f6
anim_0xf6: MACRO
db anim_0xf6_command
ENDM
- enum anim_0xf7_command ; $f7
+ const anim_0xf7_command ; $f7
anim_0xf7: MACRO
db anim_0xf7_command
ENDM
- enum anim_if_param_equal_command ; $f8
+ const anim_if_param_equal_command ; $f8
anim_if_param_equal: MACRO
db anim_if_param_equal_command
db \1 ; value
@@ -259,18 +259,18 @@
dw \2 ; address
ENDM
- enum anim_setvar_command ; $f9
+ const anim_setvar_command ; $f9
anim_setvar: MACRO
db anim_setvar_command
db \1 ; value
ENDM
- enum anim_incvar_command ; $fa
+ const anim_incvar_command ; $fa
anim_incvar: MACRO
db anim_incvar_command
ENDM
- enum anim_if_var_equal_command ; $fb
+ const anim_if_var_equal_command ; $fb
anim_if_var_equal: MACRO
db anim_if_var_equal_command
db \1 ; value
@@ -277,13 +277,13 @@
dw \2 ; address
ENDM
- enum anim_jump_command ; $fc
+ const anim_jump_command ; $fc
anim_jump: MACRO
db anim_jump_command
dw \1 ; address
ENDM
- enum anim_loop_command ; $fd
+ const anim_loop_command ; $fd
anim_loop: MACRO
db anim_loop_command
db \1 ; count
@@ -290,13 +290,13 @@
dw \2 ; address
ENDM
- enum anim_call_command ; $fe
+ const anim_call_command ; $fe
anim_call: MACRO
db anim_call_command
dw \1 ; address
ENDM
- enum anim_ret_command ; $ff
+ const anim_ret_command ; $ff
anim_ret: MACRO
db anim_ret_command
ENDM
--- a/macros/scripts/battle_commands.asm
+++ b/macros/scripts/battle_commands.asm
@@ -1,10 +1,10 @@
command: MACRO
- enum \1_command
+ const \1_command
\1 EQUS "db \1_command"
ENDM
; BattleCommandPointers indexes (see data/battle/effect_command_pointers.asm)
- enum_start 1
+ const_def 1
command checkturn ; 01
command checkobedience ; 02
command usedmovetext ; 03
@@ -181,6 +181,6 @@
command startloop ; ae
command curl ; af
- enum_start $fe
- command endturn ; fe
+ const_def -1, -1
command endmove ; ff
+ command endturn ; fe
--- a/macros/scripts/events.asm
+++ b/macros/scripts/events.asm
@@ -1,43 +1,43 @@
; ScriptCommandTable indexes (see engine/overworld/scripting.asm)
- enum_start
+ const_def
- enum scall_command ; $00
+ const scall_command ; $00
scall: MACRO
db scall_command
dw \1 ; pointer
ENDM
- enum farscall_command ; $01
+ const farscall_command ; $01
farscall: MACRO
db farscall_command
dba \1
ENDM
- enum memcall_command ; $02
+ const memcall_command ; $02
memcall: MACRO
db memcall_command
dw \1 ; pointer
ENDM
- enum sjump_command ; $03
+ const sjump_command ; $03
sjump: MACRO
db sjump_command
dw \1 ; pointer
ENDM
- enum farsjump_command ; $04
+ const farsjump_command ; $04
farsjump: MACRO
db farsjump_command
dba \1
ENDM
- enum memjump_command ; $05
+ const memjump_command ; $05
memjump: MACRO
db memjump_command
dw \1 ; pointer
ENDM
- enum ifequal_command ; $06
+ const ifequal_command ; $06
ifequal: MACRO
db ifequal_command
db \1 ; byte
@@ -44,7 +44,7 @@
dw \2 ; pointer
ENDM
- enum ifnotequal_command ; $07
+ const ifnotequal_command ; $07
ifnotequal: MACRO
db ifnotequal_command
db \1 ; byte
@@ -51,19 +51,19 @@
dw \2 ; pointer
ENDM
- enum iffalse_command ; $08
+ const iffalse_command ; $08
iffalse: MACRO
db iffalse_command
dw \1 ; pointer
ENDM
- enum iftrue_command ; $09
+ const iftrue_command ; $09
iftrue: MACRO
db iftrue_command
dw \1 ; pointer
ENDM
- enum ifgreater_command ; $0a
+ const ifgreater_command ; $0a
ifgreater: MACRO
db ifgreater_command
db \1 ; byte
@@ -70,7 +70,7 @@
dw \2 ; pointer
ENDM
- enum ifless_command ; $0b
+ const ifless_command ; $0b
ifless: MACRO
db ifless_command
db \1 ; byte
@@ -77,43 +77,43 @@
dw \2 ; pointer
ENDM
- enum jumpstd_command ; $0c
+ const jumpstd_command ; $0c
jumpstd: MACRO
db jumpstd_command
dw (\1StdScript - StdScripts) / 3
ENDM
- enum callstd_command ; $0d
+ const callstd_command ; $0d
callstd: MACRO
db callstd_command
dw (\1StdScript - StdScripts) / 3
ENDM
- enum callasm_command ; $0e
+ const callasm_command ; $0e
callasm: MACRO
db callasm_command
dba \1
ENDM
- enum special_command ; $0f
+ const special_command ; $0f
special: MACRO
db special_command
dw (\1Special - SpecialsPointers) / 3
ENDM
- enum memcallasm_command ; $10
+ const memcallasm_command ; $10
memcallasm: MACRO
db memcallasm_command
dw \1 ; asm
ENDM
- enum checkmapscene_command ; $11
+ const checkmapscene_command ; $11
checkmapscene: MACRO
db checkmapscene_command
map_id \1 ; map
ENDM
- enum setmapscene_command ; $12
+ const setmapscene_command ; $12
setmapscene: MACRO
db setmapscene_command
map_id \1 ; map
@@ -120,53 +120,53 @@
db \2 ; scene_id
ENDM
- enum checkscene_command ; $13
+ const checkscene_command ; $13
checkscene: MACRO
db checkscene_command
ENDM
- enum setscene_command ; $14
+ const setscene_command ; $14
setscene: MACRO
db setscene_command
db \1 ; scene_id
ENDM
- enum setval_command ; $15
+ const setval_command ; $15
setval: MACRO
db setval_command
db \1 ; value
ENDM
- enum addval_command ; $16
+ const addval_command ; $16
addval: MACRO
db addval_command
db \1 ; value
ENDM
- enum random_command ; $17
+ const random_command ; $17
random: MACRO
db random_command
db \1 ; input
ENDM
- enum checkver_command ; $18
+ const checkver_command ; $18
checkver: MACRO
db checkver_command
ENDM
- enum readmem_command ; $19
+ const readmem_command ; $19
readmem: MACRO
db readmem_command
dw \1 ; address
ENDM
- enum writemem_command ; $1a
+ const writemem_command ; $1a
writemem: MACRO
db writemem_command
dw \1 ; address
ENDM
- enum loadmem_command ; $1b
+ const loadmem_command ; $1b
loadmem: MACRO
db loadmem_command
dw \1 ; address
@@ -173,19 +173,19 @@
db \2 ; value
ENDM
- enum readvar_command ; $1c
+ const readvar_command ; $1c
readvar: MACRO
db readvar_command
db \1 ; variable_id
ENDM
- enum writevar_command ; $1d
+ const writevar_command ; $1d
writevar: MACRO
db writevar_command
db \1 ; variable_id
ENDM
- enum loadvar_command ; $1e
+ const loadvar_command ; $1e
loadvar: MACRO
if STRIN("\1", "VAR_") != 1
; LEGACY: Support for the old name of "loadmem"
@@ -197,7 +197,7 @@
endc
ENDM
- enum giveitem_command ; $1f
+ const giveitem_command ; $1f
giveitem: MACRO
if _NARG == 1
giveitem \1, 1
@@ -208,7 +208,7 @@
endc
ENDM
- enum takeitem_command ; $20
+ const takeitem_command ; $20
takeitem: MACRO
if _NARG == 1
takeitem \1, 1
@@ -219,13 +219,13 @@
endc
ENDM
- enum checkitem_command ; $21
+ const checkitem_command ; $21
checkitem: MACRO
db checkitem_command
db \1 ; item
ENDM
- enum givemoney_command ; $22
+ const givemoney_command ; $22
givemoney: MACRO
db givemoney_command
db \1 ; account
@@ -232,7 +232,7 @@
dt \2 ; money
ENDM
- enum takemoney_command ; $23
+ const takemoney_command ; $23
takemoney: MACRO
db takemoney_command
db \1 ; account
@@ -239,7 +239,7 @@
dt \2 ; money
ENDM
- enum checkmoney_command ; $24
+ const checkmoney_command ; $24
checkmoney: MACRO
db checkmoney_command
db \1 ; account
@@ -246,55 +246,55 @@
dt \2 ; money
ENDM
- enum givecoins_command ; $25
+ const givecoins_command ; $25
givecoins: MACRO
db givecoins_command
dw \1 ; coins
ENDM
- enum takecoins_command ; $26
+ const takecoins_command ; $26
takecoins: MACRO
db takecoins_command
dw \1 ; coins
ENDM
- enum checkcoins_command ; $27
+ const checkcoins_command ; $27
checkcoins: MACRO
db checkcoins_command
dw \1 ; coins
ENDM
- enum addcellnum_command ; $28
+ const addcellnum_command ; $28
addcellnum: MACRO
db addcellnum_command
db \1 ; person
ENDM
- enum delcellnum_command ; $29
+ const delcellnum_command ; $29
delcellnum: MACRO
db delcellnum_command
db \1 ; person
ENDM
- enum checkcellnum_command ; $2a
+ const checkcellnum_command ; $2a
checkcellnum: MACRO
db checkcellnum_command
db \1 ; person
ENDM
- enum checktime_command ; $2b
+ const checktime_command ; $2b
checktime: MACRO
db checktime_command
db \1 ; time
ENDM
- enum checkpoke_command ; $2c
+ const checkpoke_command ; $2c
checkpoke: MACRO
db checkpoke_command
db \1 ; pkmn
ENDM
- enum givepoke_command ; $2d
+ const givepoke_command ; $2d
givepoke: MACRO
if _NARG == 2
givepoke \1, \2, NO_ITEM, FALSE
@@ -313,7 +313,7 @@
endc
ENDM
- enum giveegg_command ; $2e
+ const giveegg_command ; $2e
giveegg: MACRO
db giveegg_command
db \1 ; pkmn
@@ -320,71 +320,71 @@
db \2 ; level
ENDM
- enum givepokemail_command ; $2f
+ const givepokemail_command ; $2f
givepokemail: MACRO
db givepokemail_command
dw \1 ; pointer
ENDM
- enum checkpokemail_command ; $30
+ const checkpokemail_command ; $30
checkpokemail: MACRO
db checkpokemail_command
dw \1 ; pointer
ENDM
- enum checkevent_command ; $31
+ const checkevent_command ; $31
checkevent: MACRO
db checkevent_command
dw \1 ; event_flag
ENDM
- enum clearevent_command ; $32
+ const clearevent_command ; $32
clearevent: MACRO
db clearevent_command
dw \1 ; event_flag
ENDM
- enum setevent_command ; $33
+ const setevent_command ; $33
setevent: MACRO
db setevent_command
dw \1 ; event_flag
ENDM
- enum checkflag_command ; $34
+ const checkflag_command ; $34
checkflag: MACRO
db checkflag_command
dw \1 ; engine_flag
ENDM
- enum clearflag_command ; $35
+ const clearflag_command ; $35
clearflag: MACRO
db clearflag_command
dw \1 ; engine_flag
ENDM
- enum setflag_command ; $36
+ const setflag_command ; $36
setflag: MACRO
db setflag_command
dw \1 ; engine_flag
ENDM
- enum wildon_command ; $37
+ const wildon_command ; $37
wildon: MACRO
db wildon_command
ENDM
- enum wildoff_command ; $38
+ const wildoff_command ; $38
wildoff: MACRO
db wildoff_command
ENDM
- enum xycompare_command ; $39
+ const xycompare_command ; $39
xycompare: MACRO
db xycompare_command
dw \1 ; pointer
ENDM
- enum warpmod_command ; $3a
+ const warpmod_command ; $3a
warpmod: MACRO
db warpmod_command
db \1 ; warp_id
@@ -391,13 +391,13 @@
map_id \2 ; map
ENDM
- enum blackoutmod_command ; $3b
+ const blackoutmod_command ; $3b
blackoutmod: MACRO
db blackoutmod_command
map_id \1 ; map
ENDM
- enum warp_command ; $3c
+ const warp_command ; $3c
warp: MACRO
db warp_command
map_id \1 ; map
@@ -405,7 +405,7 @@
db \3 ; y
ENDM
- enum getmoney_command ; $3d
+ const getmoney_command ; $3d
getmoney: MACRO
db getmoney_command
db \2 ; account
@@ -412,19 +412,19 @@
db \1 ; string_buffer
ENDM
- enum getcoins_command ; $3e
+ const getcoins_command ; $3e
getcoins: MACRO
db getcoins_command
db \1 ; string_buffer
ENDM
- enum getnum_command ; $3f
+ const getnum_command ; $3f
getnum: MACRO
db getnum_command
db \1 ; string_buffer
ENDM
- enum getmonname_command ; $40
+ const getmonname_command ; $40
getmonname: MACRO
db getmonname_command
db \2 ; pokemon
@@ -431,7 +431,7 @@
db \1 ; string_buffer
ENDM
- enum getitemname_command ; $41
+ const getitemname_command ; $41
getitemname: MACRO
db getitemname_command
db \2 ; item
@@ -438,13 +438,13 @@
db \1 ; string_buffer
ENDM
- enum getcurlandmarkname_command ; $42
+ const getcurlandmarkname_command ; $42
getcurlandmarkname: MACRO
db getcurlandmarkname_command
db \1 ; string_buffer
ENDM
- enum gettrainername_command ; $43
+ const gettrainername_command ; $43
gettrainername: MACRO
db gettrainername_command
db \2 ; trainer_group
@@ -452,7 +452,7 @@
db \1 ; string_buffer
ENDM
- enum getstring_command ; $44
+ const getstring_command ; $44
getstring: MACRO
db getstring_command
dw \2 ; text_pointer
@@ -459,22 +459,22 @@
db \1 ; string_buffer
ENDM
- enum itemnotify_command ; $45
+ const itemnotify_command ; $45
itemnotify: MACRO
db itemnotify_command
ENDM
- enum pocketisfull_command ; $46
+ const pocketisfull_command ; $46
pocketisfull: MACRO
db pocketisfull_command
ENDM
- enum opentext_command ; $47
+ const opentext_command ; $47
opentext: MACRO
db opentext_command
ENDM
- enum refreshscreen_command ; $48
+ const refreshscreen_command ; $48
refreshscreen: MACRO
if _NARG == 0
refreshscreen 0
@@ -484,30 +484,30 @@
endc
ENDM
- enum closetext_command ; $49
+ const closetext_command ; $49
closetext: MACRO
db closetext_command
ENDM
- enum writeunusedbytebuffer_command ; $4a
+ const writeunusedbytebuffer_command ; $4a
writeunusedbytebuffer: MACRO
db writeunusedbytebuffer_command
db \1 ; byte
ENDM
- enum farwritetext_command ; $4b
+ const farwritetext_command ; $4b
farwritetext: MACRO
db farwritetext_command
dba \1
ENDM
- enum writetext_command ; $4c
+ const writetext_command ; $4c
writetext: MACRO
db writetext_command
dw \1 ; text_pointer
ENDM
- enum repeattext_command ; $4d
+ const repeattext_command ; $4d
repeattext: MACRO
db repeattext_command
db \1 ; byte
@@ -514,87 +514,87 @@
db \2 ; byte
ENDM
- enum yesorno_command ; $4e
+ const yesorno_command ; $4e
yesorno: MACRO
db yesorno_command
ENDM
- enum loadmenu_command ; $4f
+ const loadmenu_command ; $4f
loadmenu: MACRO
db loadmenu_command
dw \1 ; menu_header
ENDM
- enum closewindow_command ; $50
+ const closewindow_command ; $50
closewindow: MACRO
db closewindow_command
ENDM
- enum jumptextfaceplayer_command ; $51
+ const jumptextfaceplayer_command ; $51
jumptextfaceplayer: MACRO
db jumptextfaceplayer_command
dw \1 ; text_pointer
ENDM
- enum farjumptext_command ; $52
+ const farjumptext_command ; $52
farjumptext: MACRO
db farjumptext_command
dba \1
ENDM
- enum jumptext_command ; $53
+ const jumptext_command ; $53
jumptext: MACRO
db jumptext_command
dw \1 ; text_pointer
ENDM
- enum waitbutton_command ; $54
+ const waitbutton_command ; $54
waitbutton: MACRO
db waitbutton_command
ENDM
- enum promptbutton_command ; $55
+ const promptbutton_command ; $55
promptbutton: MACRO
db promptbutton_command
ENDM
- enum pokepic_command ; $56
+ const pokepic_command ; $56
pokepic: MACRO
db pokepic_command
db \1 ; pokemon
ENDM
- enum closepokepic_command ; $57
+ const closepokepic_command ; $57
closepokepic: MACRO
db closepokepic_command
ENDM
- enum _2dmenu_command ; $58
+ const _2dmenu_command ; $58
_2dmenu: MACRO
db _2dmenu_command
ENDM
- enum verticalmenu_command ; $59
+ const verticalmenu_command ; $59
verticalmenu: MACRO
db verticalmenu_command
ENDM
- enum loadpikachudata_command ; $5a
+ const loadpikachudata_command ; $5a
loadpikachudata: MACRO
db loadpikachudata_command
ENDM
- enum randomwildmon_command ; $5b
+ const randomwildmon_command ; $5b
randomwildmon: MACRO
db randomwildmon_command
ENDM
- enum loadtemptrainer_command ; $5c
+ const loadtemptrainer_command ; $5c
loadtemptrainer: MACRO
db loadtemptrainer_command
ENDM
- enum loadwildmon_command ; $5d
+ const loadwildmon_command ; $5d
loadwildmon: MACRO
db loadwildmon_command
db \1 ; pokemon
@@ -601,7 +601,7 @@
db \2 ; level
ENDM
- enum loadtrainer_command ; $5e
+ const loadtrainer_command ; $5e
loadtrainer: MACRO
db loadtrainer_command
db \1 ; trainer_group
@@ -608,35 +608,35 @@
db \2 ; trainer_id
ENDM
- enum startbattle_command ; $5f
+ const startbattle_command ; $5f
startbattle: MACRO
db startbattle_command
ENDM
- enum reloadmapafterbattle_command ; $60
+ const reloadmapafterbattle_command ; $60
reloadmapafterbattle: MACRO
db reloadmapafterbattle_command
ENDM
- enum catchtutorial_command ; $61
+ const catchtutorial_command ; $61
catchtutorial: MACRO
db catchtutorial_command
db \1 ; byte
ENDM
- enum trainertext_command ; $62
+ const trainertext_command ; $62
trainertext: MACRO
db trainertext_command
db \1 ; text_id
ENDM
- enum trainerflagaction_command ; $63
+ const trainerflagaction_command ; $63
trainerflagaction: MACRO
db trainerflagaction_command
db \1 ; action
ENDM
- enum winlosstext_command ; $64
+ const winlosstext_command ; $64
winlosstext: MACRO
db winlosstext_command
dw \1 ; win_text_pointer
@@ -643,28 +643,28 @@
dw \2 ; loss_text_pointer
ENDM
- enum scripttalkafter_command ; $65
+ const scripttalkafter_command ; $65
scripttalkafter: MACRO
db scripttalkafter_command
ENDM
- enum endifjustbattled_command ; $66
+ const endifjustbattled_command ; $66
endifjustbattled: MACRO
db endifjustbattled_command
ENDM
- enum checkjustbattled_command ; $67
+ const checkjustbattled_command ; $67
checkjustbattled: MACRO
db checkjustbattled_command
ENDM
- enum setlasttalked_command ; $68
+ const setlasttalked_command ; $68
setlasttalked: MACRO
db setlasttalked_command
db \1 ; object id
ENDM
- enum applymovement_command ; $69
+ const applymovement_command ; $69
applymovement: MACRO
db applymovement_command
db \1 ; object id
@@ -671,18 +671,18 @@
dw \2 ; data
ENDM
- enum applymovementlasttalked_command ; $6a
+ const applymovementlasttalked_command ; $6a
applymovementlasttalked: MACRO
db applymovementlasttalked_command
dw \1 ; data
ENDM
- enum faceplayer_command ; $6b
+ const faceplayer_command ; $6b
faceplayer: MACRO
db faceplayer_command
ENDM
- enum faceobject_command ; $6c
+ const faceobject_command ; $6c
faceobject: MACRO
db faceobject_command
db \1 ; object1
@@ -689,7 +689,7 @@
db \2 ; object2
ENDM
- enum variablesprite_command ; $6d
+ const variablesprite_command ; $6d
variablesprite: MACRO
db variablesprite_command
db \1 - SPRITE_VARS ; byte
@@ -696,19 +696,19 @@
db \2 ; sprite
ENDM
- enum disappear_command ; $6e
+ const disappear_command ; $6e
disappear: MACRO
db disappear_command
db \1 ; object id
ENDM
- enum appear_command ; $6f
+ const appear_command ; $6f
appear: MACRO
db appear_command
db \1 ; object id
ENDM
- enum follow_command ; $70
+ const follow_command ; $70
follow: MACRO
db follow_command
db \1 ; object2
@@ -715,12 +715,12 @@
db \2 ; object1
ENDM
- enum stopfollow_command ; $71
+ const stopfollow_command ; $71
stopfollow: MACRO
db stopfollow_command
ENDM
- enum moveobject_command ; $72
+ const moveobject_command ; $72
moveobject: MACRO
db moveobject_command
db \1 ; object id
@@ -728,19 +728,19 @@
db \3 ; y
ENDM
- enum writeobjectxy_command ; $73
+ const writeobjectxy_command ; $73
writeobjectxy: MACRO
db writeobjectxy_command
db \1 ; object id
ENDM
- enum loademote_command ; $74
+ const loademote_command ; $74
loademote: MACRO
db loademote_command
db \1 ; bubble
ENDM
- enum showemote_command ; $75
+ const showemote_command ; $75
showemote: MACRO
db showemote_command
db \1 ; bubble
@@ -748,7 +748,7 @@
db \3 ; time
ENDM
- enum turnobject_command ; $76
+ const turnobject_command ; $76
turnobject: MACRO
db turnobject_command
db \1 ; object id
@@ -755,7 +755,7 @@
db \2 ; facing
ENDM
- enum follownotexact_command ; $77
+ const follownotexact_command ; $77
follownotexact: MACRO
db follownotexact_command
db \1 ; object2
@@ -762,19 +762,19 @@
db \2 ; object1
ENDM
- enum earthquake_command ; $78
+ const earthquake_command ; $78
earthquake: MACRO
db earthquake_command
db \1 ; param
ENDM
- enum changemapblocks_command ; $79
+ const changemapblocks_command ; $79
changemapblocks: MACRO
db changemapblocks_command
dba \1 ; map_data_pointer
ENDM
- enum changeblock_command ; $7a
+ const changeblock_command ; $7a
changeblock: MACRO
db changeblock_command
db \1 ; x
@@ -782,40 +782,40 @@
db \3 ; block
ENDM
- enum reloadmap_command ; $7b
+ const reloadmap_command ; $7b
reloadmap: MACRO
db reloadmap_command
ENDM
- enum reloadmappart_command ; $7c
+ const reloadmappart_command ; $7c
reloadmappart: MACRO
db reloadmappart_command
ENDM
- enum writecmdqueue_command ; $7d
+ const writecmdqueue_command ; $7d
writecmdqueue: MACRO
db writecmdqueue_command
dw \1 ; queue_pointer
ENDM
- enum delcmdqueue_command ; $7e
+ const delcmdqueue_command ; $7e
delcmdqueue: MACRO
db delcmdqueue_command
db \1 ; byte
ENDM
- enum playmusic_command ; $7f
+ const playmusic_command ; $7f
playmusic: MACRO
db playmusic_command
dw \1 ; music_pointer
ENDM
- enum encountermusic_command ; $80
+ const encountermusic_command ; $80
encountermusic: MACRO
db encountermusic_command
ENDM
- enum musicfadeout_command ; $81
+ const musicfadeout_command ; $81
musicfadeout: MACRO
db musicfadeout_command
dw \1 ; music
@@ -822,106 +822,106 @@
db \2 ; fadetime
ENDM
- enum playmapmusic_command ; $82
+ const playmapmusic_command ; $82
playmapmusic: MACRO
db playmapmusic_command
ENDM
- enum dontrestartmapmusic_command ; $83
+ const dontrestartmapmusic_command ; $83
dontrestartmapmusic: MACRO
db dontrestartmapmusic_command
ENDM
- enum cry_command ; $84
+ const cry_command ; $84
cry: MACRO
db cry_command
dw \1 ; cry_id
ENDM
- enum playsound_command ; $85
+ const playsound_command ; $85
playsound: MACRO
db playsound_command
dw \1 ; sound_pointer
ENDM
- enum waitsfx_command ; $86
+ const waitsfx_command ; $86
waitsfx: MACRO
db waitsfx_command
ENDM
- enum warpsound_command ; $87
+ const warpsound_command ; $87
warpsound: MACRO
db warpsound_command
ENDM
- enum specialsound_command ; $88
+ const specialsound_command ; $88
specialsound: MACRO
db specialsound_command
ENDM
- enum autoinput_command ; $89
+ const autoinput_command ; $89
autoinput: MACRO
db autoinput_command
dba \1
ENDM
- enum newloadmap_command ; $8a
+ const newloadmap_command ; $8a
newloadmap: MACRO
db newloadmap_command
db \1 ; which_method
ENDM
- enum pause_command ; $8b
+ const pause_command ; $8b
pause: MACRO
db pause_command
db \1 ; length
ENDM
- enum deactivatefacing_command ; $8c
+ const deactivatefacing_command ; $8c
deactivatefacing: MACRO
db deactivatefacing_command
db \1 ; time
ENDM
- enum prioritysjump_command ; $8d
+ const prioritysjump_command ; $8d
prioritysjump: MACRO
db prioritysjump_command
dw \1 ; pointer
ENDM
- enum warpcheck_command ; $8e
+ const warpcheck_command ; $8e
warpcheck: MACRO
db warpcheck_command
ENDM
- enum stopandsjump_command ; $8f
+ const stopandsjump_command ; $8f
stopandsjump: MACRO
db stopandsjump_command
dw \1 ; pointer
ENDM
- enum return_command ; $90
+ const return_command ; $90
return: MACRO
db return_command
ENDM
- enum end_command ; $91
+ const end_command ; $91
end: MACRO
db end_command
ENDM
- enum reloadandreturn_command ; $92
+ const reloadandreturn_command ; $92
reloadandreturn: MACRO
db reloadandreturn_command
db \1 ; which_method
ENDM
- enum endall_command ; $93
+ const endall_command ; $93
endall: MACRO
db endall_command
ENDM
- enum pokemart_command ; $94
+ const pokemart_command ; $94
pokemart: MACRO
db pokemart_command
db \1 ; dialog_id
@@ -928,59 +928,59 @@
dw \2 ; mart_id
ENDM
- enum elevator_command ; $95
+ const elevator_command ; $95
elevator: MACRO
db elevator_command
dw \1 ; floor_list_pointer
ENDM
- enum trade_command ; $96
+ const trade_command ; $96
trade: MACRO
db trade_command
db \1 ; trade_id
ENDM
- enum askforphonenumber_command ; $97
+ const askforphonenumber_command ; $97
askforphonenumber: MACRO
db askforphonenumber_command
db \1 ; number
ENDM
- enum phonecall_command ; $98
+ const phonecall_command ; $98
phonecall: MACRO
db phonecall_command
dw \1 ; caller_name
ENDM
- enum hangup_command ; $99
+ const hangup_command ; $99
hangup: MACRO
db hangup_command
ENDM
- enum describedecoration_command ; $9a
+ const describedecoration_command ; $9a
describedecoration: MACRO
db describedecoration_command
db \1 ; byte
ENDM
- enum fruittree_command ; $9b
+ const fruittree_command ; $9b
fruittree: MACRO
db fruittree_command
db \1 ; tree_id
ENDM
- enum specialphonecall_command ; $9c
+ const specialphonecall_command ; $9c
specialphonecall: MACRO
db specialphonecall_command
dw \1 ; call_id
ENDM
- enum checkphonecall_command ; $9d
+ const checkphonecall_command ; $9d
checkphonecall: MACRO
db checkphonecall_command
ENDM
- enum verbosegiveitem_command ; $9e
+ const verbosegiveitem_command ; $9e
verbosegiveitem: MACRO
if _NARG == 1
verbosegiveitem \1, 1
@@ -991,7 +991,7 @@
endc
ENDM
- enum verbosegiveitemvar_command ; $9f
+ const verbosegiveitemvar_command ; $9f
verbosegiveitemvar: MACRO
db verbosegiveitemvar_command
db \1 ; item
@@ -998,7 +998,7 @@
db \2 ; var
ENDM
- enum swarm_command ; $a0
+ const swarm_command ; $a0
swarm: MACRO
db swarm_command
db \1 ; flag
@@ -1005,17 +1005,17 @@
map_id \2 ; map
ENDM
- enum halloffame_command ; $a1
+ const halloffame_command ; $a1
halloffame: MACRO
db halloffame_command
ENDM
- enum credits_command ; $a2
+ const credits_command ; $a2
credits: MACRO
db credits_command
ENDM
- enum warpfacing_command ; $a3
+ const warpfacing_command ; $a3
warpfacing: MACRO
db warpfacing_command
db \1 ; facing
@@ -1024,13 +1024,13 @@
db \4 ; y
ENDM
- enum battletowertext_command ; $a4
+ const battletowertext_command ; $a4
battletowertext: MACRO
db battletowertext_command
db \1 ; bttext_id
ENDM
- enum getlandmarkname_command ; $a5
+ const getlandmarkname_command ; $a5
getlandmarkname: MACRO
db getlandmarkname_command
db \2 ; landmark_id
@@ -1037,7 +1037,7 @@
db \1 ; string_buffer
ENDM
- enum gettrainerclassname_command ; $a6
+ const gettrainerclassname_command ; $a6
gettrainerclassname: MACRO
db gettrainerclassname_command
db \2 ; trainer_group
@@ -1044,7 +1044,7 @@
db \1 ; string_buffer
ENDM
- enum getname_command ; $a7
+ const getname_command ; $a7
getname: MACRO
db getname_command
db \2 ; type
@@ -1052,13 +1052,13 @@
db \1 ; memory
ENDM
- enum wait_command ; $a8
+ const wait_command ; $a8
wait: MACRO
db wait_command
db \1 ; duration
ENDM
- enum checksave_command ; $a9
+ const checksave_command ; $a9
checksave: MACRO
db checksave_command
ENDM
--- a/macros/scripts/gfx_anims.asm
+++ b/macros/scripts/gfx_anims.asm
@@ -12,42 +12,42 @@
db x
ENDM
- enum_start $fc
+ const_def -1, -1
- enum delanim_command ; $fc
-delanim: MACRO
-; Removes the object from the screen, as opposed to `endanim` which just stops all motion
- db delanim_command
+ const endanim_command ; $ff
+endanim: MACRO
+ db endanim_command
ENDM
- enum dowait_command ; $fd
+ const dorestart_command ; $fe
+dorestart: MACRO
+ db dorestart_command
+ENDM
+
+ const dowait_command ; $fd
dowait: MACRO
db dowait_command
db \1 ; frames
ENDM
- enum dorestart_command ; $fe
-dorestart: MACRO
- db dorestart_command
+ const delanim_command ; $fc
+delanim: MACRO
+; Removes the object from the screen, as opposed to `endanim` which just stops all motion
+ db delanim_command
ENDM
- enum endanim_command ; $ff
-endanim: MACRO
- db endanim_command
-ENDM
-
; Used for pic animations
-__enum__ = $fd
+ const_def -2, -1
- enum dorepeat_command ; $fd
-dorepeat: MACRO
- db dorepeat_command
- db \1 ; command offset to jump to
-ENDM
-
- enum setrepeat_command ; $fe
+ const setrepeat_command ; $fe
setrepeat: MACRO
db setrepeat_command
db \1 ; amount of times to repeat
+ENDM
+
+ const dorepeat_command ; $fd
+dorepeat: MACRO
+ db dorepeat_command
+ db \1 ; command offset to jump to
ENDM
--- a/macros/scripts/movement.asm
+++ b/macros/scripts/movement.asm
@@ -1,107 +1,107 @@
; MovementPointers indexes (see engine/overworld/movement.asm)
- enum_start 0, 4
+ const_def 0, 4
; Directional movements
- enum movement_turn_head ; $00
+ const movement_turn_head ; $00
turn_head: MACRO
db movement_turn_head | \1
ENDM
- enum movement_turn_step ; $04
+ const movement_turn_step ; $04
turn_step: MACRO
db movement_turn_step | \1
ENDM
- enum movement_slow_step ; $08
+ const movement_slow_step ; $08
slow_step: MACRO
db movement_slow_step | \1
ENDM
- enum movement_step ; $0c
+ const movement_step ; $0c
step: MACRO
db movement_step | \1
ENDM
- enum movement_big_step ; $10
+ const movement_big_step ; $10
big_step: MACRO
db movement_big_step | \1
ENDM
- enum movement_slow_slide_step ; $14
+ const movement_slow_slide_step ; $14
slow_slide_step: MACRO
db movement_slow_slide_step | \1
ENDM
- enum movement_slide_step ; $18
+ const movement_slide_step ; $18
slide_step: MACRO
db movement_slide_step | \1
ENDM
- enum movement_fast_slide_step ; $1c
+ const movement_fast_slide_step ; $1c
fast_slide_step: MACRO
db movement_fast_slide_step | \1
ENDM
- enum movement_turn_away ; $20
+ const movement_turn_away ; $20
turn_away: MACRO
db movement_turn_away | \1
ENDM
- enum movement_turn_in ; $24
+ const movement_turn_in ; $24
turn_in: MACRO
db movement_turn_in | \1
ENDM
- enum movement_turn_waterfall ; $28
+ const movement_turn_waterfall ; $28
turn_waterfall: MACRO
db movement_turn_waterfall | \1
ENDM
- enum movement_slow_jump_step ; $2c
+ const movement_slow_jump_step ; $2c
slow_jump_step: MACRO
db movement_slow_jump_step | \1
ENDM
- enum movement_jump_step ; $30
+ const movement_jump_step ; $30
jump_step: MACRO
db movement_jump_step | \1
ENDM
- enum movement_fast_jump_step ; $34
+ const movement_fast_jump_step ; $34
fast_jump_step: MACRO
db movement_fast_jump_step | \1
ENDM
-__enumdir__ = 1
+const_inc = 1
; Control
- enum movement_remove_sliding ; $38
+ const movement_remove_sliding ; $38
remove_sliding: MACRO
db movement_remove_sliding
ENDM
- enum movement_set_sliding ; $39
+ const movement_set_sliding ; $39
set_sliding: MACRO
db movement_set_sliding
ENDM
- enum movement_remove_fixed_facing ; $3a
+ const movement_remove_fixed_facing ; $3a
remove_fixed_facing: MACRO
db movement_remove_fixed_facing
ENDM
- enum movement_fix_facing ; $3b
+ const movement_fix_facing ; $3b
fix_facing: MACRO
db movement_fix_facing
ENDM
- enum movement_show_object ; $3c
+ const movement_show_object ; $3c
show_object: MACRO
db movement_show_object
ENDM
- enum movement_hide_object ; $3d
+ const movement_hide_object ; $3d
hide_object: MACRO
db movement_hide_object
ENDM
@@ -108,7 +108,7 @@
; Sleep
- enum movement_step_sleep ; $3e
+ const movement_step_sleep ; $3e
step_sleep: MACRO
if \1 <= 8
db movement_step_sleep + \1 - 1
@@ -117,104 +117,104 @@
endc
ENDM
-__enum__ = __enum__ + 8
+ const_skip 8 ; all step_sleep values
- enum movement_step_end ; $47
+ const movement_step_end ; $47
step_end: MACRO
db movement_step_end
ENDM
- enum movement_step_48 ; $48
+ const movement_step_48 ; $48
step_48: MACRO
db movement_step_48
db \1 ; ???
ENDM
- enum movement_remove_object ; $49
+ const movement_remove_object ; $49
remove_object: MACRO
db movement_remove_object
ENDM
- enum movement_step_loop ; $4a
+ const movement_step_loop ; $4a
step_loop: MACRO
db movement_step_loop
ENDM
- enum movement_step_4b ; $4b
+ const movement_step_4b ; $4b
step_4b: MACRO
db movement_step_4b
ENDM
- enum movement_teleport_from ; $4c
+ const movement_teleport_from ; $4c
teleport_from: MACRO
db movement_teleport_from
ENDM
- enum movement_teleport_to ; $4d
+ const movement_teleport_to ; $4d
teleport_to: MACRO
db movement_teleport_to
ENDM
- enum movement_skyfall ; $4e
+ const movement_skyfall ; $4e
skyfall: MACRO
db movement_skyfall
ENDM
- enum movement_step_dig ; $4f
+ const movement_step_dig ; $4f
step_dig: MACRO
db movement_step_dig
db \1 ; length
ENDM
- enum movement_step_bump ; $50
+ const movement_step_bump ; $50
step_bump: MACRO
db movement_step_bump
ENDM
- enum movement_fish_got_bite ; $51
+ const movement_fish_got_bite ; $51
fish_got_bite: MACRO
db movement_fish_got_bite
ENDM
- enum movement_fish_cast_rod ; $52
+ const movement_fish_cast_rod ; $52
fish_cast_rod: MACRO
db movement_fish_cast_rod
ENDM
- enum movement_hide_emote ; $53
+ const movement_hide_emote ; $53
hide_emote: MACRO
db movement_hide_emote
ENDM
- enum movement_show_emote ; $54
+ const movement_show_emote ; $54
show_emote: MACRO
db movement_show_emote
ENDM
- enum movement_step_shake ; $55
+ const movement_step_shake ; $55
step_shake: MACRO
db movement_step_shake
db \1 ; displacement
ENDM
- enum movement_tree_shake ; $56
+ const movement_tree_shake ; $56
tree_shake: MACRO
db movement_tree_shake
ENDM
- enum movement_rock_smash ; $57
+ const movement_rock_smash ; $57
rock_smash: MACRO
db movement_rock_smash
db \1 ; length
ENDM
- enum movement_return_dig ; $58
+ const movement_return_dig ; $58
return_dig: MACRO
db movement_return_dig
db \1 ; length
ENDM
- enum movement_skyfall_top ; $59
+ const movement_skyfall_top ; $59
skyfall_top: MACRO
db movement_skyfall_top
ENDM
--- a/macros/scripts/text.asm
+++ b/macros/scripts/text.asm
@@ -8,20 +8,20 @@
prompt EQUS "db \"<PROMPT>\"" ; Prompt the player to end a text box (initiating some other event).
; TextCommands indexes (see home/text.asm)
- enum_start
+ const_def
- enum TX_START ; $00
+ const TX_START ; $00
text_start: MACRO
db TX_START
ENDM
- enum TX_RAM ; $01
+ const TX_RAM ; $01
text_ram: MACRO
db TX_RAM
dw \1
ENDM
- enum TX_BCD ; $02
+ const TX_BCD ; $02
text_bcd: MACRO
db TX_BCD
dw \1
@@ -28,13 +28,13 @@
db \2
ENDM
- enum TX_MOVE ; $03
+ const TX_MOVE ; $03
text_move: MACRO
db TX_MOVE
dw \1
ENDM
- enum TX_BOX ; $04
+ const TX_BOX ; $04
text_box: MACRO
db TX_BOX
dw \1
@@ -41,27 +41,27 @@
db \2, \3
ENDM
- enum TX_LOW ; $05
+ const TX_LOW ; $05
text_low: MACRO
db TX_LOW
ENDM
- enum TX_PROMPT_BUTTON ; $06
+ const TX_PROMPT_BUTTON ; $06
text_promptbutton: MACRO
db TX_PROMPT_BUTTON
ENDM
- enum TX_SCROLL ; $07
+ const TX_SCROLL ; $07
text_scroll: MACRO
db TX_SCROLL
ENDM
- enum TX_START_ASM ; $08
+ const TX_START_ASM ; $08
text_asm: MACRO
db TX_START_ASM
ENDM
- enum TX_NUM ; $09
+ const TX_NUM ; $09
text_decimal: MACRO
db TX_NUM
dw \1 ; address
@@ -68,69 +68,69 @@
dn \2, \3 ; bytes, digits
ENDM
- enum TX_PAUSE ; $0a
+ const TX_PAUSE ; $0a
text_pause: MACRO
db TX_PAUSE
ENDM
- enum TX_SOUND_DEX_FANFARE_50_79 ; $0b
+ const TX_SOUND_DEX_FANFARE_50_79 ; $0b
sound_dex_fanfare_50_79: MACRO
db TX_SOUND_DEX_FANFARE_50_79
ENDM
- enum TX_DOTS ; $0c
+ const TX_DOTS ; $0c
text_dots: MACRO
db TX_DOTS
db \1
ENDM
- enum TX_WAIT_BUTTON ; $0d
+ const TX_WAIT_BUTTON ; $0d
text_waitbutton: MACRO
db TX_WAIT_BUTTON
ENDM
- enum TX_SOUND_DEX_FANFARE_20_49 ; $0e
+ const TX_SOUND_DEX_FANFARE_20_49 ; $0e
sound_dex_fanfare_20_49: MACRO
db TX_SOUND_DEX_FANFARE_20_49
ENDM
- enum TX_SOUND_ITEM ; $0f
+ const TX_SOUND_ITEM ; $0f
sound_item: MACRO
db TX_SOUND_ITEM
ENDM
- enum TX_SOUND_CAUGHT_MON ; $10
+ const TX_SOUND_CAUGHT_MON ; $10
sound_caught_mon: MACRO
db TX_SOUND_CAUGHT_MON
ENDM
- enum TX_SOUND_DEX_FANFARE_80_109 ; $11
+ const TX_SOUND_DEX_FANFARE_80_109 ; $11
sound_dex_fanfare_80_109: MACRO
db TX_SOUND_DEX_FANFARE_80_109
ENDM
- enum TX_SOUND_FANFARE ; $12
+ const TX_SOUND_FANFARE ; $12
sound_fanfare: MACRO
db TX_SOUND_FANFARE
ENDM
- enum TX_SOUND_SLOT_MACHINE_START ; $13
+ const TX_SOUND_SLOT_MACHINE_START ; $13
sound_slot_machine_start: MACRO
db TX_SOUND_SLOT_MACHINE_START
ENDM
- enum TX_STRINGBUFFER ; $14
+ const TX_STRINGBUFFER ; $14
text_buffer: MACRO
db TX_STRINGBUFFER
db \1
ENDM
- enum TX_DAY ; $15
+ const TX_DAY ; $15
text_today: MACRO
db TX_DAY
ENDM
- enum TX_FAR ; $16
+ const TX_FAR ; $16
text_far: MACRO
db TX_FAR
dw \1
@@ -137,9 +137,9 @@
db BANK(\1)
ENDM
- enum_set $50
+ const_next $50
- enum TX_END ; $50
+ const TX_END ; $50
text_end: MACRO
db TX_END
ENDM
--- a/macros/scripts/trade_anims.asm
+++ b/macros/scripts/trade_anims.asm
@@ -1,254 +1,254 @@
; DoTradeAnimation.JumpTable indexes (see engine/movies/trade_animation.asm)
- enum_start
+ const_def
- enum tradeanim_next_command ; $00
+ const tradeanim_next_command ; $00
tradeanim_next: MACRO
db tradeanim_next_command
ENDM
- enum tradeanim_show_givemon_data_command ; $01
+ const tradeanim_show_givemon_data_command ; $01
tradeanim_show_givemon_data: MACRO
db tradeanim_show_givemon_data_command
ENDM
- enum tradeanim_show_getmon_data_command ; $02
+ const tradeanim_show_getmon_data_command ; $02
tradeanim_show_getmon_data: MACRO
db tradeanim_show_getmon_data_command
ENDM
- enum tradeanim_enter_link_tube_command ; $03
+ const tradeanim_enter_link_tube_command ; $03
tradeanim_enter_link_tube: MACRO
db tradeanim_enter_link_tube_command
ENDM
- enum_start $05
+ const_skip ; continues tradeanim_enter_link_tube_command
- enum tradeanim_exit_link_tube_command ; $05
+ const tradeanim_exit_link_tube_command ; $05
tradeanim_exit_link_tube: MACRO
db tradeanim_exit_link_tube_command
ENDM
- enum tradeanim_tube_to_ot_command ; $06
+ const tradeanim_tube_to_ot_command ; $06
tradeanim_tube_to_ot: MACRO
db tradeanim_tube_to_ot_command
ENDM
- enum_start $0e
+ const_skip 7 ; continues tradeanim_tube_to_ot_command
- enum tradeanim_tube_to_player_command ; $0e
+ const tradeanim_tube_to_player_command ; $0e
tradeanim_tube_to_player: MACRO
db tradeanim_tube_to_player_command
ENDM
- enum_start $16
+ const_skip 7 ; continues tradeanim_tube_to_player_command
- enum tradeanim_sent_to_ot_text_command ; $16
+ const tradeanim_sent_to_ot_text_command ; $16
tradeanim_sent_to_ot_text: MACRO
db tradeanim_sent_to_ot_text_command
ENDM
- enum tradeanim_ot_bids_farewell_command ; $17
+ const tradeanim_ot_bids_farewell_command ; $17
tradeanim_ot_bids_farewell: MACRO
db tradeanim_ot_bids_farewell_command
ENDM
- enum tradeanim_take_care_of_text_command ; $18
+ const tradeanim_take_care_of_text_command ; $18
tradeanim_take_care_of_text: MACRO
db tradeanim_take_care_of_text_command
ENDM
- enum tradeanim_ot_sends_text_1_command ; $19
+ const tradeanim_ot_sends_text_1_command ; $19
tradeanim_ot_sends_text_1: MACRO
db tradeanim_ot_sends_text_1_command
ENDM
- enum tradeanim_ot_sends_text_2_command ; $1a
+ const tradeanim_ot_sends_text_2_command ; $1a
tradeanim_ot_sends_text_2: MACRO
db tradeanim_ot_sends_text_2_command
ENDM
- enum tradeanim_setup_givemon_scroll_command ; $1b
+ const tradeanim_setup_givemon_scroll_command ; $1b
tradeanim_setup_givemon_scroll: MACRO
db tradeanim_setup_givemon_scroll_command
ENDM
- enum tradeanim_do_givemon_scroll_command ; $1c
+ const tradeanim_do_givemon_scroll_command ; $1c
tradeanim_do_givemon_scroll: MACRO
db tradeanim_do_givemon_scroll_command
ENDM
- enum tradeanim_frontpic_scroll_command ; $1d
+ const tradeanim_frontpic_scroll_command ; $1d
tradeanim_frontpic_scroll: MACRO
db tradeanim_frontpic_scroll_command
ENDM
- enum tradeanim_textbox_scroll_command ; $1e
+ const tradeanim_textbox_scroll_command ; $1e
tradeanim_textbox_scroll: MACRO
db tradeanim_textbox_scroll_command
ENDM
- enum tradeanim_scroll_out_right_command ; $1f
+ const tradeanim_scroll_out_right_command ; $1f
tradeanim_scroll_out_right: MACRO
db tradeanim_scroll_out_right_command
ENDM
- enum_start $21
+ const_skip ; continues tradeanim_scroll_out_right_command
- enum tradeanim_wait_80_command ; $21
+ const tradeanim_wait_80_command ; $21
tradeanim_wait_80: MACRO
db tradeanim_wait_80_command
ENDM
- enum tradeanim_wait_40_command ; $22
+ const tradeanim_wait_40_command ; $22
tradeanim_wait_40: MACRO
db tradeanim_wait_40_command
ENDM
- enum tradeanim_rocking_ball_command ; $23
+ const tradeanim_rocking_ball_command ; $23
tradeanim_rocking_ball: MACRO
db tradeanim_rocking_ball_command
ENDM
- enum tradeanim_drop_ball_command ; $24
+ const tradeanim_drop_ball_command ; $24
tradeanim_drop_ball: MACRO
db tradeanim_drop_ball_command
ENDM
- enum tradeanim_wait_anim_command ; $25
+ const tradeanim_wait_anim_command ; $25
tradeanim_wait_anim: MACRO
db tradeanim_wait_anim_command
ENDM
- enum_start $27
+ const_skip ; continues tradeanim_wait_anim_command
- enum tradeanim_poof_command ; $27
+ const tradeanim_poof_command ; $27
tradeanim_poof: MACRO
db tradeanim_poof_command
ENDM
- enum tradeanim_bulge_through_tube_command ; $28
+ const tradeanim_bulge_through_tube_command ; $28
tradeanim_bulge_through_tube: MACRO
db tradeanim_bulge_through_tube_command
ENDM
- enum tradeanim_give_trademon_sfx_command ; $29
+ const tradeanim_give_trademon_sfx_command ; $29
tradeanim_give_trademon_sfx: MACRO
db tradeanim_give_trademon_sfx_command
ENDM
- enum tradeanim_get_trademon_sfx_command ; $2a
+ const tradeanim_get_trademon_sfx_command ; $2a
tradeanim_get_trademon_sfx: MACRO
db tradeanim_get_trademon_sfx_command
ENDM
- enum tradeanim_end_command ; $2b
+ const tradeanim_end_command ; $2b
tradeanim_end: MACRO
db tradeanim_end_command
ENDM
- enum tradeanim_animate_frontpic_command ; $2c
+ const tradeanim_animate_frontpic_command ; $2c
tradeanim_animate_frontpic: MACRO
db tradeanim_animate_frontpic_command
ENDM
- enum tradeanim_wait_96_command ; $2d
+ const tradeanim_wait_96_command ; $2d
tradeanim_wait_96: MACRO
db tradeanim_wait_96_command
ENDM
- enum tradeanim_wait_80_if_ot_egg_command ; $2e
+ const tradeanim_wait_80_if_ot_egg_command ; $2e
tradeanim_wait_80_if_ot_egg: MACRO
db tradeanim_wait_80_if_ot_egg_command
ENDM
- enum tradeanim_wait_180_if_ot_egg_command ; $2f
+ const tradeanim_wait_180_if_ot_egg_command ; $2f
tradeanim_wait_180_if_ot_egg: MACRO
db tradeanim_wait_180_if_ot_egg_command
ENDM
; Mobile
- enum_start $01
+ const_def $01
- enum mobiletradeanim_showgivemon_command ; $01
+ const mobiletradeanim_showgivemon_command ; $01
mobiletradeanim_showgivemon: MACRO
db mobiletradeanim_showgivemon_command
ENDM
- enum mobiletradeanim_02_command ; $02
+ const mobiletradeanim_02_command ; $02
mobiletradeanim_02: MACRO
db mobiletradeanim_02_command
ENDM
- enum mobiletradeanim_sendmon_command ; $03
+ const mobiletradeanim_sendmon_command ; $03
mobiletradeanim_sendmon: MACRO
db mobiletradeanim_sendmon_command
ENDM
- enum_start $05
+ const_skip ; continues mobiletradeanim_sendmon_command
- enum mobiletradeanim_05_command ; $05
+ const mobiletradeanim_05_command ; $05
mobiletradeanim_05: MACRO
db mobiletradeanim_05_command
ENDM
- enum mobiletradeanim_06_command ; $06
+ const mobiletradeanim_06_command ; $06
mobiletradeanim_06: MACRO
db mobiletradeanim_06_command
ENDM
- enum mobiletradeanim_07_command ; $07
+ const mobiletradeanim_07_command ; $07
mobiletradeanim_07: MACRO
db mobiletradeanim_07_command
ENDM
- enum mobiletradeanim_receivemon_command ; $08
+ const mobiletradeanim_receivemon_command ; $08
mobiletradeanim_receivemon: MACRO
db mobiletradeanim_receivemon_command
ENDM
- enum_start $0b
+ const_skip 2 ; continues mobiletradeanim_receivemon_command
- enum mobiletradeanim_showgetmon_command ; $0b
+ const mobiletradeanim_showgetmon_command ; $0b
mobiletradeanim_showgetmon: MACRO
db mobiletradeanim_showgetmon_command
ENDM
- enum mobiletradeanim_end_command ; $0c
+ const mobiletradeanim_end_command ; $0c
mobiletradeanim_end: MACRO
db mobiletradeanim_end_command
ENDM
- enum mobiletradeanim_showgtsgivemon_command ; $0d
+ const mobiletradeanim_showgtsgivemon_command ; $0d
mobiletradeanim_showgtsgivemon: MACRO
db mobiletradeanim_showgtsgivemon_command
ENDM
- enum mobiletradeanim_showgtsgetmon_command ; $0e
+ const mobiletradeanim_showgtsgetmon_command ; $0e
mobiletradeanim_showgtsgetmon: MACRO
db mobiletradeanim_showgtsgetmon_command
ENDM
- enum mobiletradeanim_0f_command ; $0f
+ const mobiletradeanim_0f_command ; $0f
mobiletradeanim_0f: MACRO
db mobiletradeanim_0f_command
ENDM
- enum mobiletradeanim_10_command ; $10
+ const mobiletradeanim_10_command ; $10
mobiletradeanim_10: MACRO
db mobiletradeanim_10_command
ENDM
- enum mobiletradeanim_11_command ; $11
+ const mobiletradeanim_11_command ; $11
mobiletradeanim_11: MACRO
db mobiletradeanim_11_command
ENDM
- enum mobiletradeanim_12_command ; $12
+ const mobiletradeanim_12_command ; $12
mobiletradeanim_12: MACRO
db mobiletradeanim_12_command
ENDM
- enum mobiletradeanim_showoddegg_command ; $13
+ const mobiletradeanim_showoddegg_command ; $13
mobiletradeanim_showoddegg: MACRO
db mobiletradeanim_showoddegg_command
ENDM
--- a/maps/SproutTower1F.asm
+++ b/maps/SproutTower1F.asm
@@ -122,4 +122,4 @@
object_event 11, 12, SPRITE_GRANNY, SPRITEMOVEDATA_STANDING_LEFT, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, SproutTower1FGrannyScript, -1
object_event 9, 9, SPRITE_TEACHER, SPRITEMOVEDATA_STANDING_UP, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, SproutTower1FTeacherScript, -1
object_event 3, 5, SPRITE_SAGE, SPRITEMOVEDATA_STANDING_UP, 0, 0, -1, -1, PAL_NPC_BLUE, OBJECTTYPE_TRAINER, 4, TrainerSageChow, -1
- object_event 16, 7, SPRITE_POKE_BALL, SPRITEMOVEDATA_STILL, 0, 0, -1, -1, 0, OBJECTTYPE_ITEMBALL, 0, SproutTower1FParlyzHeal, EVENT_SPROUT_TOWER1F_PARLYZ_HEAL
+ object_event 16, 7, SPRITE_POKE_BALL, SPRITEMOVEDATA_STILL, 0, 0, -1, -1, 0, OBJECTTYPE_ITEMBALL, 0, SproutTower1FParlyzHeal, EVENT_SPROUT_TOWER_1F_PARLYZ_HEAL
--- a/maps/SproutTower2F.asm
+++ b/maps/SproutTower2F.asm
@@ -99,4 +99,4 @@
db 3 ; object events
object_event 12, 3, SPRITE_SAGE, SPRITEMOVEDATA_SPINRANDOM_FAST, 0, 0, -1, -1, PAL_NPC_BLUE, OBJECTTYPE_TRAINER, 4, TrainerSageNico, -1
object_event 9, 14, SPRITE_SAGE, SPRITEMOVEDATA_STANDING_LEFT, 0, 0, -1, -1, PAL_NPC_BLUE, OBJECTTYPE_TRAINER, 5, TrainerSageEdmond, -1
- object_event 3, 1, SPRITE_POKE_BALL, SPRITEMOVEDATA_STILL, 0, 0, -1, -1, 0, OBJECTTYPE_ITEMBALL, 0, SproutTower2FXAccuracy, EVENT_SPROUT_TOWER2F_X_ACCURACY
+ object_event 3, 1, SPRITE_POKE_BALL, SPRITEMOVEDATA_STILL, 0, 0, -1, -1, 0, OBJECTTYPE_ITEMBALL, 0, SproutTower2FXAccuracy, EVENT_SPROUT_TOWER_2F_X_ACCURACY
--- a/wram.asm
+++ b/wram.asm
@@ -445,58 +445,52 @@
wPlayerSubStatus1::
; bit
-; 7 in love
-; 6 rollout
-; 5 endure
-; 4 perish song
-; 3 identified
-; 2 protect
-; 1 curse
; 0 nightmare
+; 1 curse
+; 2 protect
+; 3 identified
+; 4 perish song
+; 5 endure
+; 6 rollout
+; 7 in love
db
wPlayerSubStatus2::
; bit
-; 7
-; 6
-; 5
-; 4
-; 3
-; 2
-; 1
; 0 curled
+; 1-7 unused
db
wPlayerSubStatus3::
; bit
-; 7 confused
-; 6 flying
-; 5 underground
-; 4 charged
-; 3 flinched
-; 2 in loop
-; 1 rampage
; 0 bide
+; 1 rampage
+; 2 in loop
+; 3 flinched
+; 4 charged
+; 5 underground
+; 6 flying
+; 7 confused
db
wPlayerSubStatus4::
; bit
-; 7 leech seed
-; 6 rage
-; 5 recharge
-; 4 substitute
-; 3
-; 2 focus energy
-; 1 mist
; 0 x accuracy
+; 1 mist
+; 2 focus energy
+; 3
+; 4 substitute
+; 5 recharge
+; 6 rage
+; 7 leech seed
db
wPlayerSubStatus5::
; bit
-; 7 can't run
-; 6 destiny bond
-; 5 lock-on
-; 4 encored
-; 3 transformed
-; 2
-; 1
; 0 toxic
+; 1
+; 2
+; 3 transformed
+; 4 encored
+; 5 lock-on
+; 6 destiny bond
+; 7 can't run
db
wEnemySubStatus1::
@@ -635,14 +629,12 @@
wPlayerMinimized:: db
wPlayerScreens::
; bit
-; 7
-; 6
-; 5
-; 4 reflect
-; 3 light screen
-; 2 safeguard
-; 1
; 0 spikes
+; 1
+; 2 safeguard
+; 3 light screen
+; 4 reflect
+; 5-7 unused
db
wEnemyScreens::
@@ -2759,8 +2751,6 @@
ds 100
wEventFlags:: flag_array NUM_EVENTS
-
- ds 6
wCurBox:: db