summaryrefslogtreecommitdiff
path: root/constants
diff options
context:
space:
mode:
authorRangi <35663410+Rangi42@users.noreply.github.com>2021-04-27 12:11:39 -0400
committerGitHub <noreply@github.com>2021-04-27 12:11:39 -0400
commitefd1006917b438ff683e8f702adbe6b4d0733a0f (patch)
treef16f9860af61e855d90db4c9641af84034be4644 /constants
parentc5f9e25cc493ecc0e49ffd437dad73893b5529d0 (diff)
Use {interpolation} to generate sequences of RAM labels
This makes the table_width/assert_table_length usages unnecessary, and also keeps the labels automatically up to date if the length constants change.
Diffstat (limited to 'constants')
-rw-r--r--constants/battle_tower_constants.asm4
-rw-r--r--constants/pokemon_data_constants.asm8
2 files changed, 8 insertions, 4 deletions
diff --git a/constants/battle_tower_constants.asm b/constants/battle_tower_constants.asm
index 82d5bf448..844a38bbf 100644
--- a/constants/battle_tower_constants.asm
+++ b/constants/battle_tower_constants.asm
@@ -4,8 +4,8 @@ BATTLETOWER_STREAK_LENGTH EQU 7
BATTLETOWER_NUM_UNIQUE_MON EQU 21
BATTLETOWER_NUM_UNIQUE_TRAINERS EQU 70
-BATTLETOWER_TRAINERDATALENGTH EQU $24
-BATTLE_TOWER_STRUCT_LENGTH EQU NAME_LENGTH + BATTLETOWER_PARTY_LENGTH * NICKNAMED_MON_STRUCT_LENGTH + BATTLETOWER_TRAINERDATALENGTH
+BATTLETOWER_TRAINERDATALENGTH EQU 18 * 2 ; $24
+BATTLE_TOWER_STRUCT_LENGTH EQU NAME_LENGTH + BATTLETOWER_PARTY_LENGTH * NICKNAMED_MON_STRUCT_LENGTH + BATTLETOWER_TRAINERDATALENGTH ; $e0
; BattleTowerAction setval arguments (see engine/events/battle_tower/battle_tower.asm)
const_def
diff --git a/constants/pokemon_data_constants.asm b/constants/pokemon_data_constants.asm
index f4d02327e..0279d47e6 100644
--- a/constants/pokemon_data_constants.asm
+++ b/constants/pokemon_data_constants.asm
@@ -136,11 +136,15 @@ PARTY_LENGTH EQU 6
; boxes
MONS_PER_BOX EQU 20
+; box: count, species, mons, OTs, nicknames, padding
+BOX_LENGTH EQU 1 + MONS_PER_BOX + 1 + (BOXMON_STRUCT_LENGTH + NAME_LENGTH + MON_NAME_LENGTH) * MONS_PER_BOX + 2 ; $450
NUM_BOXES EQU 14
; hall of fame
-HOF_MON_LENGTH EQU 1 + 2 + 2 + 1 + (MON_NAME_LENGTH - 1) ; species, id, dvs, level, nick
-HOF_LENGTH EQU 1 + HOF_MON_LENGTH * PARTY_LENGTH + 1 ; win count, party, terminator
+; hof_mon: species, id, dvs, level, nicknames
+HOF_MON_LENGTH EQU 1 + 2 + 2 + 1 + (MON_NAME_LENGTH - 1) ; $10
+; hall_of_fame: win count, party, terminator
+HOF_LENGTH EQU 1 + HOF_MON_LENGTH * PARTY_LENGTH + 1 ; $62
NUM_HOF_TEAMS EQU 30
; evolution types (used in data/pokemon/evos_attacks.asm)