From 94daf57156f34cf95885ba8e6f32ee0f69436bb1 Mon Sep 17 00:00:00 2001 From: Rangi Date: Wed, 6 Jan 2021 10:20:37 -0500 Subject: The 'tmhm' macro adjusts to the number of TMs/HMs --- constants/item_constants.asm | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'constants') diff --git a/constants/item_constants.asm b/constants/item_constants.asm index 67416600..d0c25202 100644 --- a/constants/item_constants.asm +++ b/constants/item_constants.asm @@ -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__ -- cgit v1.3.1-sl0p