Verify the battle BG effect pointer table length
This commit is contained in:
@@ -719,7 +719,8 @@ assert NUM_BATTLE_ANIM_OAMSETS <= FIRST_OAM_CMD, \
|
|||||||
"BATTLE_ANIM_OAMSET_* constants overlap oam*_command constants"
|
"BATTLE_ANIM_OAMSET_* constants overlap oam*_command constants"
|
||||||
|
|
||||||
; BattleBGEffects indexes (see engine/battle_anims/bg_effects.asm)
|
; BattleBGEffects indexes (see engine/battle_anims/bg_effects.asm)
|
||||||
const_def 1
|
const_def
|
||||||
|
const BATTLE_BG_EFFECT_END ; 00
|
||||||
const BATTLE_BG_EFFECT_FLASH_INVERTED ; 01
|
const BATTLE_BG_EFFECT_FLASH_INVERTED ; 01
|
||||||
const BATTLE_BG_EFFECT_FLASH_WHITE ; 02
|
const BATTLE_BG_EFFECT_FLASH_WHITE ; 02
|
||||||
const BATTLE_BG_EFFECT_WHITE_HUES ; 03
|
const BATTLE_BG_EFFECT_WHITE_HUES ; 03
|
||||||
@@ -773,7 +774,7 @@ assert NUM_BATTLE_ANIM_OAMSETS <= FIRST_OAM_CMD, \
|
|||||||
const BATTLE_BG_EFFECT_VIBRATE_MON ; 33
|
const BATTLE_BG_EFFECT_VIBRATE_MON ; 33
|
||||||
const BATTLE_BG_EFFECT_WOBBLE_PLAYER ; 34
|
const BATTLE_BG_EFFECT_WOBBLE_PLAYER ; 34
|
||||||
const BATTLE_BG_EFFECT_WOBBLE_SCREEN ; 35
|
const BATTLE_BG_EFFECT_WOBBLE_SCREEN ; 35
|
||||||
DEF NUM_BATTLE_BG_EFFECTS EQU const_value - 1
|
DEF NUM_BATTLE_BG_EFFECTS EQU const_value
|
||||||
|
|
||||||
; wBattleAnimTileDict keys (see wram.asm)
|
; wBattleAnimTileDict keys (see wram.asm)
|
||||||
; AnimObjGFX indexes (see data/battle_anims/object_gfx.asm)
|
; AnimObjGFX indexes (see data/battle_anims/object_gfx.asm)
|
||||||
|
@@ -79,6 +79,7 @@ DoBattleBGEffectFunction:
|
|||||||
|
|
||||||
BattleBGEffects:
|
BattleBGEffects:
|
||||||
; entries correspond to BATTLE_BG_EFFECT_* constants
|
; entries correspond to BATTLE_BG_EFFECT_* constants
|
||||||
|
table_width 2
|
||||||
dw BattleBGEffect_End
|
dw BattleBGEffect_End
|
||||||
dw BattleBGEffect_FlashInverted
|
dw BattleBGEffect_FlashInverted
|
||||||
dw BattleBGEffect_FlashWhite
|
dw BattleBGEffect_FlashWhite
|
||||||
@@ -133,6 +134,7 @@ BattleBGEffects:
|
|||||||
dw BattleBGEffect_VibrateMon
|
dw BattleBGEffect_VibrateMon
|
||||||
dw BattleBGEffect_WobblePlayer
|
dw BattleBGEffect_WobblePlayer
|
||||||
dw BattleBGEffect_WobbleScreen
|
dw BattleBGEffect_WobbleScreen
|
||||||
|
assert_table_length NUM_BATTLE_BG_EFFECTS
|
||||||
|
|
||||||
BattleBGEffect_End:
|
BattleBGEffect_End:
|
||||||
call EndBattleBGEffect
|
call EndBattleBGEffect
|
||||||
|
Reference in New Issue
Block a user