shithub: pokecrystal

Download patch

ref: f739f8b1acd3d381015192636600bd3b38bdf28f
parent: 4387298b2c71c0379dd1b4c2a4a2e911f822b9cc
author: vulcandth <[email protected]>
date: Fri Dec 23 13:48:14 EST 2022

Add table assert `DoBattleAnimFrame.Jumptable`

--- a/engine/battle_anims/functions.asm
+++ b/engine/battle_anims/functions.asm
@@ -13,6 +13,7 @@
 
 .Jumptable:
 ; entries correspond to BATTLEANIMFUNC_* constants
+	table_width 2, DoBattleAnimFrame.Jumptable
 	dw BattleAnimFunction_Null
 	dw BattleAnimFunction_MoveFromUserToTarget
 	dw BattleAnimFunction_MoveFromUserToTargetAndDisappear
@@ -93,6 +94,7 @@
 	dw BattleAnimFunction_AncientPower
 	dw BattleAnimFunction_RockSmash
 	dw BattleAnimFunction_Cotton
+	assert_table_length NUM_BATTLEANIMFUNCS
 
 BattleAnimFunction_Null:
 	call BattleAnim_AnonJumptable