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.
This commit is contained in:
Rangi
2021-04-27 12:11:39 -04:00
committed by GitHub
parent c5f9e25cc4
commit efd1006917
9 changed files with 183 additions and 364 deletions

View File

@@ -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)