summaryrefslogtreecommitdiff
path: root/constants
diff options
context:
space:
mode:
authorRangi <remy.oukaour+rangi42@gmail.com>2021-04-20 21:17:09 -0400
committerRangi <remy.oukaour+rangi42@gmail.com>2021-04-20 21:17:09 -0400
commit40dbe0df049a51bd2f0553c51579b80009072ea6 (patch)
treee029d3b7f8da22868b85dc5d349be3e7c50a6123 /constants
parent2449cd915436fd204a4096620db99fb5f9dde8fd (diff)
Use rgbds 0.5.0
Diffstat (limited to 'constants')
-rw-r--r--constants/item_constants.asm29
-rw-r--r--constants/map_constants.asm2
2 files changed, 6 insertions, 25 deletions
diff --git a/constants/item_constants.asm b/constants/item_constants.asm
index 519104f8..d618b96f 100644
--- a/constants/item_constants.asm
+++ b/constants/item_constants.asm
@@ -210,22 +210,13 @@ add_tm: MACRO
; - TM_\1: the item id, starting at $bf
; - \1_TMNUM: the learnable TM/HM flag, starting at 1
; - TM##_MOVE: alias for the move id, equal to the value of \1
-; The first usage also defines TM01 as the first TM item id.
-if !DEF(TM01)
-TM01 EQU const_value
-endc
-if __tmhm_value__ < 10
-MOVE_FOR_TM EQUS "TM0{d:__tmhm_value__}_MOVE"
-else
-MOVE_FOR_TM EQUS "TM{d:__tmhm_value__}_MOVE"
-endc
-MOVE_FOR_TM = \1
-PURGE MOVE_FOR_TM
const TM_\1
+TM{02d:__tmhm_value__}_MOVE = \1
add_tmnum \1
ENDM
; see data/moves/tmhm_moves.asm for moves
+TM01 EQU const_value
add_tm DYNAMICPUNCH ; bf
add_tm HEADBUTT ; c0
add_tm CURSE ; c1
@@ -285,23 +276,13 @@ add_hm: MACRO
; - HM_\1: the item id, starting at $f3
; - \1_TMNUM: the learnable TM/HM flag, starting at 51
; - HM##_MOVE: alias for the move id, equal to the value of \1
-; The first usage also defines HM01 as the first TM item id.
-if !DEF(HM01)
-HM01 EQU const_value
-endc
-HM_VALUE EQU __tmhm_value__ - NUM_TMS
-if HM_VALUE < 10
-MOVE_FOR_HM EQUS "HM0{d:HM_VALUE}_MOVE"
-else
-MOVE_FOR_HM EQUS "HM{d:HM_VALUE}_MOVE"
-endc
-MOVE_FOR_HM = \1
-PURGE MOVE_FOR_HM
-PURGE HM_VALUE
const HM_\1
+HM_VALUE = __tmhm_value__ - NUM_TMS
+HM{02d:HM_VALUE}_MOVE = \1
add_tmnum \1
ENDM
+HM01 EQU const_value
add_hm CUT ; f3
add_hm FLY ; f4
add_hm SURF ; f5
diff --git a/constants/map_constants.asm b/constants/map_constants.asm
index 4869b070..d5ae2fd2 100644
--- a/constants/map_constants.asm
+++ b/constants/map_constants.asm
@@ -18,7 +18,7 @@ __map_value__ = __map_value__ + 1
ENDM
endgroup: MACRO
-CURRENT_NUM_MAPGROUP_MAPS EQU __map_value__ - 1
+{CURRENT_NUM_MAPGROUP_MAPS} EQU __map_value__ - 1
PURGE CURRENT_NUM_MAPGROUP_MAPS
ENDM