The 'tmhm' macro adjusts to the number of TMs/HMs

This commit is contained in:
Rangi 2021-01-06 10:20:37 -05:00
parent 21908ba30a
commit 94daf57156
2 changed files with 28 additions and 26 deletions

View file

@ -219,7 +219,9 @@ ENDM
add_tm SUBSTITUTE ; $FA
assert NUM_TMS == const_value - TM01, "NUM_TMS ({d:NUM_TMS}) does not match the number of add_tm definitions"
NUM_TM_HM EQU NUM_TMS + NUM_HMS
; 50 TMs + 5 HMs = 55 learnable TM/HM flags per Pokémon.
; These fit in 7 bytes, with one unused bit left over.
__tmhm_value__ = NUM_TMS + NUM_HMS + 1
__tmhm_value__ = NUM_TM_HM + 1
UNUSED_TMNUM EQU __tmhm_value__