diff options
author | Rangi <remy.oukaour+rangi42@gmail.com> | 2021-03-03 22:22:41 -0500 |
---|---|---|
committer | Rangi <remy.oukaour+rangi42@gmail.com> | 2021-03-05 16:10:25 -0500 |
commit | 5454e1e0deefc6b4fc8c4de0e63314052fceebc0 (patch) | |
tree | 565805b252fa596aab3f80b3128ebc91b1fae540 /constants/battle_anim_constants.asm | |
parent | b423e94be700cc6434465cf1dcccf0b677489192 (diff) |
Verify data table sizes with table_width and assert_table_length macros
It also uncovered some off-by-one issues with defining some constants.
A few structs now use rsreset/_RS to define their offset constants.
Diffstat (limited to 'constants/battle_anim_constants.asm')
-rw-r--r-- | constants/battle_anim_constants.asm | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/constants/battle_anim_constants.asm b/constants/battle_anim_constants.asm index fa34f3ad..8c013829 100644 --- a/constants/battle_anim_constants.asm +++ b/constants/battle_anim_constants.asm @@ -7,6 +7,7 @@ const BATTLEANIMSTRUCT_FUNCTION const BATTLEANIMSTRUCT_PALETTE const BATTLEANIMSTRUCT_TILEID +BATTLEANIMOBJ_LENGTH EQU const_value - 1 ; discount BATTLEANIMSTRUCT_INDEX const BATTLEANIMSTRUCT_XCOORD const BATTLEANIMSTRUCT_YCOORD const BATTLEANIMSTRUCT_XOFFSET @@ -217,6 +218,7 @@ BATTLEANIM_BASE_TILE EQU 7 * 7 ; Maximum size of a pokemon picture const ANIM_OBJ_PLAYERHEAD_1ROW const ANIM_OBJ_ENEMYFEET_2ROW const ANIM_OBJ_PLAYERHEAD_2ROW +NUM_ANIM_OBJS EQU const_value ; DoBattleAnimFrame arguments (see engine/battle_anims/functions.asm) const_def @@ -300,6 +302,7 @@ BATTLEANIM_BASE_TILE EQU 7 * 7 ; Maximum size of a pokemon picture const BATTLEANIMFUNC_ANCIENT_POWER const BATTLEANIMFUNC_ROCK_SMASH const BATTLEANIMFUNC_COTTON +NUM_BATTLEANIMFUNCS EQU const_value ; BattleAnimFrameData indexes (see data/battle_anims/framesets.asm) const_def @@ -488,6 +491,7 @@ BATTLEANIM_BASE_TILE EQU 7 * 7 ; Maximum size of a pokemon picture const BATTLEANIMFRAMESET_B6 const BATTLEANIMFRAMESET_B7 const BATTLEANIMFRAMESET_B8 +NUM_BATTLEANIMFRAMESETS EQU const_value ; BattleAnimOAMData indexes (see data/battle_anims/oam.asm) const_def @@ -707,6 +711,7 @@ BATTLEANIM_BASE_TILE EQU 7 * 7 ; Maximum size of a pokemon picture const BATTLEANIMOAMSET_D5 const BATTLEANIMOAMSET_D6 const BATTLEANIMOAMSET_D7 +NUM_BATTLEANIMOAMSETS EQU const_value ; BattleBGEffects indexes (see engine/battle_anims/bg_effects.asm) const_def 1 @@ -762,6 +767,7 @@ BATTLEANIM_BASE_TILE EQU 7 * 7 ; Maximum size of a pokemon picture const ANIM_BG_VIBRATE_MON const ANIM_BG_WOBBLE_PLAYER const ANIM_BG_WOBBLE_SCREEN +NUM_ANIM_BGS EQU const_value - 1 ; wBattleAnimTileDict keys (see wram.asm) ; AnimObjGFX indexes (see data/battle_anims/object_gfx.asm) @@ -807,6 +813,7 @@ BATTLEANIM_BASE_TILE EQU 7 * 7 ; Maximum size of a pokemon picture const ANIM_GFX_AEROBLAST const ANIM_GFX_PLAYERHEAD const ANIM_GFX_ENEMYFEET +NUM_ANIM_GFX EQU const_value - 1 ; battle_bg_effect struct members (see macros/wram.asm) const_def |