summaryrefslogtreecommitdiff
path: root/constants
diff options
context:
space:
mode:
Diffstat (limited to 'constants')
-rw-r--r--constants/battle_constants.asm87
-rw-r--r--constants/deco_constants.asm10
-rw-r--r--constants/item_constants.asm23
-rw-r--r--constants/map_constants.asm5
-rw-r--r--constants/trainer_constants.asm10
5 files changed, 72 insertions, 63 deletions
diff --git a/constants/battle_constants.asm b/constants/battle_constants.asm
index 63128b34..c049a9d3 100644
--- a/constants/battle_constants.asm
+++ b/constants/battle_constants.asm
@@ -160,59 +160,60 @@ SLP EQU %111 ; 0-7 turns
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 SUBSTATUS_UNKNOWN_1
+ 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 SUBSTATUS_UNKNOWN_2
+ const SUBSTATUS_UNKNOWN_3
+ 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 SCREENS_UNUSED
+ const SCREENS_SAFEGUARD
+ const SCREENS_LIGHT_SCREEN
+ const SCREENS_REFLECT
; values in wBattleWeather
const_def
diff --git a/constants/deco_constants.asm b/constants/deco_constants.asm
index 09d292d5..4aab559d 100644
--- a/constants/deco_constants.asm
+++ b/constants/deco_constants.asm
@@ -54,16 +54,18 @@ const_value = 1
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:
; - 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 @@ ENDM
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__
diff --git a/constants/item_constants.asm b/constants/item_constants.asm
index 7061b86c..4763454e 100644
--- 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 @@ add_tm: MACRO
; 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 @@ ENDM
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 @@ add_hm: MACRO
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 @@ MOVE_FOR_HM = \1
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,9 +305,9 @@ ENDM
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
-NUM_TM_HM EQU __enum__ - 1
+NUM_TM_HM EQU __tmhm_value__ - 1
const ITEM_FA ; fa
diff --git a/constants/map_constants.asm b/constants/map_constants.asm
index 9bd588b9..33b1e25b 100644
--- 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 @@ map_const: MACRO
;\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
diff --git a/constants/trainer_constants.asm b/constants/trainer_constants.asm
index e3952834..deb8791a 100644
--- 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
@@ -13,8 +16,7 @@ ENDM
; - TrainerPicPointers (see data/trainers/pic_pointers.asm)
; - TrainerPalettes (see data/trainers/palettes.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
@@ -654,4 +656,4 @@ CHRIS EQU __enum__
const GRUNTF_4
const GRUNTF_5
-NUM_TRAINER_CLASSES EQU __enum__
+NUM_TRAINER_CLASSES EQU __trainer_class__