mirror of
https://gitlab.com/xCrystal/pokecrystal-board.git
synced 2024-11-16 11:27:33 -08:00
40902ffe24
This was discussed in #706 It also uncovered some off-by-one issues with defining some constants. A few structs now use rsreset/_RS to define their offset constants, as discussed in #739
50 lines
818 B
NASM
50 lines
818 B
NASM
; The add_tm, add_hm, and add_mt macros in constants/item_constants.asm simultaneously
|
|
; define constants for the item IDs and for the corresponding move values.
|
|
|
|
TMHMMoves:
|
|
; entries correspond to *_TMNUM constants (see constants/item_constants.asm)
|
|
table_width 1, TMHMMoves
|
|
|
|
; TMs
|
|
n = 1
|
|
rept NUM_TMS
|
|
if n < 10
|
|
MOVE_FOR_TM EQUS "TM0{d:n}_MOVE"
|
|
else
|
|
MOVE_FOR_TM EQUS "TM{d:n}_MOVE"
|
|
endc
|
|
db MOVE_FOR_TM
|
|
PURGE MOVE_FOR_TM
|
|
n = n + 1
|
|
endr
|
|
|
|
; HMs
|
|
n = 1
|
|
rept NUM_HMS
|
|
if n < 10
|
|
MOVE_FOR_HM EQUS "HM0{d:n}_MOVE"
|
|
else
|
|
MOVE_FOR_HM EQUS "HM{d:n}_MOVE"
|
|
endc
|
|
db MOVE_FOR_HM
|
|
PURGE MOVE_FOR_HM
|
|
n = n + 1
|
|
endr
|
|
|
|
; Move tutor
|
|
n = 1
|
|
rept NUM_TUTORS
|
|
if n < 10
|
|
MOVE_FOR_MT EQUS "MT0{d:n}_MOVE"
|
|
else
|
|
MOVE_FOR_MT EQUS "MT{d:n}_MOVE"
|
|
endc
|
|
db MOVE_FOR_MT
|
|
PURGE MOVE_FOR_MT
|
|
n = n + 1
|
|
endr
|
|
|
|
assert_table_length NUM_TM_HM_TUTOR
|
|
|
|
db 0 ; end
|