ref: 2e41368ac4a4c409cd97a1afe166a7f9a363eb1e
parent: 690442e31dd868383ce3a798748733f720247f81
author: Remy Oukaour <remy.oukaour@gmail.com>
date: Mon Dec 11 12:11:30 EST 2017
Factor out one more data table
--- a/battle/objects/functions.asm
+++ b/battle/objects/functions.asm
@@ -424,7 +424,7 @@
ret
GetBallAnimPal: ; cd249 (33:5249)
- ld hl, .balls
+ ld hl, BallColors
ld a, [rSVBK]
push af
ld a, $1
@@ -448,22 +448,12 @@
add hl, bc
ld [hl], a
ret
-
; cd26c (33:526c)
-.balls
- db MASTER_BALL, PAL_BATTLE_OB_GREEN
- db ULTRA_BALL, PAL_BATTLE_OB_YELLOW
- db GREAT_BALL, PAL_BATTLE_OB_BLUE
- db POKE_BALL, PAL_BATTLE_OB_RED
- db HEAVY_BALL, PAL_BATTLE_OB_GRAY
- db LEVEL_BALL, PAL_BATTLE_OB_BROWN
- db LURE_BALL, PAL_BATTLE_OB_BLUE
- db FAST_BALL, PAL_BATTLE_OB_BLUE
- db FRIEND_BALL, PAL_BATTLE_OB_YELLOW
- db MOON_BALL, PAL_BATTLE_OB_GRAY
- db LOVE_BALL, PAL_BATTLE_OB_RED
- db -1, PAL_BATTLE_OB_GRAY
+
+BallColors:
+INCLUDE "data/ball_colors.asm"
; cd284
+
BattleAnimFunction_10: ; cd284 (33:5284)
call BattleAnim_AnonJumptable
.anon_dw
--- /dev/null
+++ b/data/ball_colors.asm
@@ -1,0 +1,13 @@
+; colors of balls thrown in battle
+ db MASTER_BALL, PAL_BATTLE_OB_GREEN
+ db ULTRA_BALL, PAL_BATTLE_OB_YELLOW
+ db GREAT_BALL, PAL_BATTLE_OB_BLUE
+ db POKE_BALL, PAL_BATTLE_OB_RED
+ db HEAVY_BALL, PAL_BATTLE_OB_GRAY
+ db LEVEL_BALL, PAL_BATTLE_OB_BROWN
+ db LURE_BALL, PAL_BATTLE_OB_BLUE
+ db FAST_BALL, PAL_BATTLE_OB_BLUE
+ db FRIEND_BALL, PAL_BATTLE_OB_YELLOW
+ db MOON_BALL, PAL_BATTLE_OB_GRAY
+ db LOVE_BALL, PAL_BATTLE_OB_RED
+ db -1, PAL_BATTLE_OB_GRAY