Mobile and more battle anims

This commit is contained in:
pikalaxalt 2016-05-05 15:07:37 -04:00
parent a613ed915c
commit 8c26547645
28 changed files with 901 additions and 856 deletions

View File

@ -382,7 +382,7 @@ BattleAnimCommands:: ; cc2a4 (33:42a4)
dw BattleAnimCmd_EB ; dummy dw BattleAnimCmd_EB ; dummy
dw BattleAnimCmd_EC ; dummy dw BattleAnimCmd_EC ; dummy
dw BattleAnimCmd_ED ; dummy dw BattleAnimCmd_ED ; dummy
dw BattleAnimCmd_JumpAnd dw BattleAnimCmd_IfParamAnd
dw BattleAnimCmd_JumpUntil dw BattleAnimCmd_JumpUntil
dw BattleAnimCmd_BGEffect dw BattleAnimCmd_BGEffect
dw BattleAnimCmd_BGP dw BattleAnimCmd_BGP
@ -392,10 +392,10 @@ BattleAnimCommands:: ; cc2a4 (33:42a4)
dw BattleAnimCmd_F5 dw BattleAnimCmd_F5
dw BattleAnimCmd_F6 dw BattleAnimCmd_F6
dw BattleAnimCmd_F7 dw BattleAnimCmd_F7
dw BattleAnimCmd_JumpIf dw BattleAnimCmd_IfParamEqual
dw BattleAnimCmd_SetVar dw BattleAnimCmd_SetVar
dw BattleAnimCmd_IncVar dw BattleAnimCmd_IncVar
dw BattleAnimCmd_JumpVar dw BattleAnimCmd_IfVarEqual
dw BattleAnimCmd_Jump dw BattleAnimCmd_Jump
dw BattleAnimCmd_Loop dw BattleAnimCmd_Loop
dw BattleAnimCmd_Call dw BattleAnimCmd_Call
@ -535,7 +535,7 @@ BattleAnimCmd_IncVar: ; cc3ad (33:43ad)
inc [hl] inc [hl]
ret ret
BattleAnimCmd_JumpVar: ; cc3b2 (33:43b2) BattleAnimCmd_IfVarEqual: ; cc3b2 (33:43b2)
call GetBattleAnimByte call GetBattleAnimByte
ld hl, BattleAnimVar ld hl, BattleAnimVar
cp [hl] cp [hl]
@ -563,7 +563,7 @@ BattleAnimCmd_JumpVar: ; cc3b2 (33:43b2)
ld [hl], d ld [hl], d
ret ret
BattleAnimCmd_JumpIf: ; cc3d6 (33:43d6) BattleAnimCmd_IfParamEqual: ; cc3d6 (33:43d6)
call GetBattleAnimByte call GetBattleAnimByte
ld hl, wBattleAnimParam ld hl, wBattleAnimParam
cp [hl] cp [hl]
@ -591,7 +591,7 @@ BattleAnimCmd_JumpIf: ; cc3d6 (33:43d6)
ld [hl], d ld [hl], d
ret ret
BattleAnimCmd_JumpAnd: ; cc3fa (33:43fa) BattleAnimCmd_IfParamAnd: ; cc3fa (33:43fa)
call GetBattleAnimByte call GetBattleAnimByte
ld e, a ld e, a
ld a, [wBattleAnimParam] ld a, [wBattleAnimParam]
@ -608,6 +608,7 @@ BattleAnimCmd_JumpAnd: ; cc3fa (33:43fa)
dec hl dec hl
ld [hl], e ld [hl], e
ret ret
.jump .jump
call GetBattleAnimByte call GetBattleAnimByte
ld e, a ld e, a

View File

@ -303,10 +303,10 @@ BattleAnim_SweetScent2: ; c929c
; c92c1 ; c92c1
BattleAnim_ThrowPokeBall BattleAnim_ThrowPokeBall
anim_jumpif NO_ITEM, .TheTrainerBlockedTheBall anim_if_param_equal NO_ITEM, .TheTrainerBlockedTheBall
anim_jumpif MASTER_BALL, .MasterBall anim_if_param_equal MASTER_BALL, .MasterBall
anim_jumpif ULTRA_BALL, .UltraBall anim_if_param_equal ULTRA_BALL, .UltraBall
anim_jumpif GREAT_BALL, .GreatBall anim_if_param_equal GREAT_BALL, .GreatBall
; any other ball ; any other ball
anim_2gfx ANIM_GFX_POKE_BALL, ANIM_GFX_SMOKE anim_2gfx ANIM_GFX_POKE_BALL, ANIM_GFX_SMOKE
anim_sound 6, 2, SFX_THROW_BALL anim_sound 6, 2, SFX_THROW_BALL
@ -316,7 +316,7 @@ BattleAnim_ThrowPokeBall
anim_setobj $2, $7 anim_setobj $2, $7
anim_wait 16 anim_wait 16
anim_sound 0, 1, SFX_BALL_POOF anim_sound 0, 1, SFX_BALL_POOF
anim_obj ANIM_OBJ_1C, -15, 0, 8, 0, $10 anim_obj ANIM_OBJ_BALL_POOF, -15, 0, 8, 0, $10
anim_wait 16 anim_wait 16
anim_jump .Shake anim_jump .Shake
; c92f2 ; c92f2
@ -324,7 +324,7 @@ BattleAnim_ThrowPokeBall
.TheTrainerBlockedTheBall: .TheTrainerBlockedTheBall:
anim_2gfx ANIM_GFX_POKE_BALL, ANIM_GFX_HIT anim_2gfx ANIM_GFX_POKE_BALL, ANIM_GFX_HIT
anim_sound 6, 2, SFX_THROW_BALL anim_sound 6, 2, SFX_THROW_BALL
anim_obj ANIM_OBJ_16, 8, 0, 11, 4, $20 anim_obj ANIM_OBJ_POKE_BALL_BLOCKED, 8, 0, 11, 4, $20
anim_wait 20 anim_wait 20
anim_obj ANIM_OBJ_01, 14, 0, 5, 0, $0 anim_obj ANIM_OBJ_01, 14, 0, 5, 0, $0
anim_wait 32 anim_wait 32
@ -340,7 +340,7 @@ BattleAnim_ThrowPokeBall
anim_setobj $2, $7 anim_setobj $2, $7
anim_wait 16 anim_wait 16
anim_sound 0, 1, SFX_BALL_POOF anim_sound 0, 1, SFX_BALL_POOF
anim_obj ANIM_OBJ_1C, -15, 0, 8, 0, $10 anim_obj ANIM_OBJ_BALL_POOF, -15, 0, 8, 0, $10
anim_wait 16 anim_wait 16
anim_jump .Shake anim_jump .Shake
; c9326 ; c9326
@ -354,7 +354,7 @@ BattleAnim_ThrowPokeBall
anim_setobj $2, $7 anim_setobj $2, $7
anim_wait 16 anim_wait 16
anim_sound 0, 1, SFX_BALL_POOF anim_sound 0, 1, SFX_BALL_POOF
anim_obj ANIM_OBJ_1C, -15, 0, 8, 0, $10 anim_obj ANIM_OBJ_BALL_POOF, -15, 0, 8, 0, $10
anim_wait 16 anim_wait 16
anim_jump .Shake anim_jump .Shake
; c9347 ; c9347
@ -368,17 +368,17 @@ BattleAnim_ThrowPokeBall
anim_setobj $2, $7 anim_setobj $2, $7
anim_wait 16 anim_wait 16
anim_sound 0, 1, SFX_BALL_POOF anim_sound 0, 1, SFX_BALL_POOF
anim_obj ANIM_OBJ_1C, -15, 0, 8, 0, $10 anim_obj ANIM_OBJ_BALL_POOF, -15, 0, 8, 0, $10
anim_wait 24 anim_wait 24
anim_sound 0, 1, SFX_MASTER_BALL anim_sound 0, 1, SFX_MASTER_BALL
anim_obj ANIM_OBJ_2B, -15, 0, 7, 0, $30 anim_obj ANIM_OBJ_MASTER_BALL_SPARKLE, -15, 0, 7, 0, $30
anim_obj ANIM_OBJ_2B, -15, 0, 7, 0, $31 anim_obj ANIM_OBJ_MASTER_BALL_SPARKLE, -15, 0, 7, 0, $31
anim_obj ANIM_OBJ_2B, -15, 0, 7, 0, $32 anim_obj ANIM_OBJ_MASTER_BALL_SPARKLE, -15, 0, 7, 0, $32
anim_obj ANIM_OBJ_2B, -15, 0, 7, 0, $33 anim_obj ANIM_OBJ_MASTER_BALL_SPARKLE, -15, 0, 7, 0, $33
anim_obj ANIM_OBJ_2B, -15, 0, 7, 0, $34 anim_obj ANIM_OBJ_MASTER_BALL_SPARKLE, -15, 0, 7, 0, $34
anim_obj ANIM_OBJ_2B, -15, 0, 7, 0, $35 anim_obj ANIM_OBJ_MASTER_BALL_SPARKLE, -15, 0, 7, 0, $35
anim_obj ANIM_OBJ_2B, -15, 0, 7, 0, $36 anim_obj ANIM_OBJ_MASTER_BALL_SPARKLE, -15, 0, 7, 0, $36
anim_obj ANIM_OBJ_2B, -15, 0, 7, 0, $37 anim_obj ANIM_OBJ_MASTER_BALL_SPARKLE, -15, 0, 7, 0, $37
anim_wait 64 anim_wait 64
.Shake: .Shake:
anim_bgeffect ANIM_BG_RETURN_MON, $0, $0, $0 anim_bgeffect ANIM_BG_RETURN_MON, $0, $0, $0
@ -397,8 +397,8 @@ BattleAnim_ThrowPokeBall
.Loop: .Loop:
anim_wait 48 anim_wait 48
anim_checkpokeball anim_checkpokeball
anim_jumpvar $1, .Click anim_if_var_equal $1, .Click
anim_jumpvar $2, .BreakFree anim_if_var_equal $2, .BreakFree
anim_incobj 1 anim_incobj 1
anim_sound 0, 1, SFX_BALL_WIGGLE anim_sound 0, 1, SFX_BALL_WIGGLE
anim_jump .Loop anim_jump .Loop
@ -412,7 +412,7 @@ BattleAnim_ThrowPokeBall
.BreakFree: .BreakFree:
anim_setobj $1, $b anim_setobj $1, $b
anim_sound 0, 1, SFX_BALL_POOF anim_sound 0, 1, SFX_BALL_POOF
anim_obj ANIM_OBJ_1C, -15, 0, 8, 0, $10 anim_obj ANIM_OBJ_BALL_POOF, -15, 0, 8, 0, $10
anim_wait 2 anim_wait 2
anim_bgeffect ANIM_BG_ENTER_MON, $0, $0, $0 anim_bgeffect ANIM_BG_ENTER_MON, $0, $0, $0
anim_wait 32 anim_wait 32
@ -420,9 +420,9 @@ BattleAnim_ThrowPokeBall
; c93d1 ; c93d1
BattleAnim_SendOutMon: ; c93d1 BattleAnim_SendOutMon: ; c93d1
anim_jumpif $0, .Normal anim_if_param_equal $0, .Normal
anim_jumpif $1, .Shiny anim_if_param_equal $1, .Shiny
anim_jumpif $2, .Unknown anim_if_param_equal $2, .Unknown
anim_1gfx ANIM_GFX_SMOKE anim_1gfx ANIM_GFX_SMOKE
anim_call BattleAnim_FollowEnemyFeet_0 anim_call BattleAnim_FollowEnemyFeet_0
anim_bgeffect ANIM_BG_2B, $0, $1, $0 anim_bgeffect ANIM_BG_2B, $0, $1, $0
@ -482,7 +482,7 @@ BattleAnim_SendOutMon: ; c93d1
.Normal: .Normal:
anim_1gfx ANIM_GFX_SMOKE anim_1gfx ANIM_GFX_SMOKE
anim_sound 0, 0, SFX_BALL_POOF anim_sound 0, 0, SFX_BALL_POOF
anim_obj ANIM_OBJ_1C, 5, 4, 12, 0, $0 anim_obj ANIM_OBJ_BALL_POOF, 5, 4, 12, 0, $0
anim_wait 4 anim_wait 4
anim_bgeffect ANIM_BG_ENTER_MON, $0, $1, $0 anim_bgeffect ANIM_BG_ENTER_MON, $0, $1, $0
anim_wait 32 anim_wait 32
@ -543,13 +543,13 @@ BattleAnim_Psn: ; c94c5
BattleAnim_Sap: ; c94da BattleAnim_Sap: ; c94da
anim_1gfx ANIM_GFX_CHARGE anim_1gfx ANIM_GFX_CHARGE
anim_sound 6, 3, SFX_WATER_GUN anim_sound 6, 3, SFX_WATER_GUN
anim_obj ANIM_OBJ_45, 16, 0, 6, 0, $2 anim_obj ANIM_OBJ_ABSORB, 16, 0, 6, 0, $2
anim_wait 6 anim_wait 6
anim_sound 6, 3, SFX_WATER_GUN anim_sound 6, 3, SFX_WATER_GUN
anim_obj ANIM_OBJ_45, -15, 0, 8, 0, $3 anim_obj ANIM_OBJ_ABSORB, -15, 0, 8, 0, $3
anim_wait 6 anim_wait 6
anim_sound 6, 3, SFX_WATER_GUN anim_sound 6, 3, SFX_WATER_GUN
anim_obj ANIM_OBJ_45, -15, 0, 4, 0, $4 anim_obj ANIM_OBJ_ABSORB, -15, 0, 4, 0, $4
anim_wait 16 anim_wait 16
anim_ret anim_ret
; c94f8 ; c94f8
@ -711,7 +711,7 @@ BattleAnim_KarateChop: ; c95d5
BattleAnim_Doubleslap: ; c9605 BattleAnim_Doubleslap: ; c9605
anim_1gfx ANIM_GFX_HIT anim_1gfx ANIM_GFX_HIT
anim_jumpif $1, BattleAnim_Doubleslap_branch_c961b anim_if_param_equal $1, BattleAnim_Doubleslap_branch_c961b
anim_sound 0, 1, SFX_DOUBLESLAP anim_sound 0, 1, SFX_DOUBLESLAP
anim_obj ANIM_OBJ_08, -14, 0, 6, 0, $0 anim_obj ANIM_OBJ_08, -14, 0, 6, 0, $0
anim_wait 6 anim_wait 6
@ -731,7 +731,7 @@ BattleAnim_Doubleslap_branch_c961b: ; c961b
BattleAnim_CometPunch: ; c962b BattleAnim_CometPunch: ; c962b
anim_1gfx ANIM_GFX_HIT anim_1gfx ANIM_GFX_HIT
anim_jumpif $1, BattleAnim_CometPunch_branch_c9641 anim_if_param_equal $1, BattleAnim_CometPunch_branch_c9641
anim_sound 0, 1, SFX_COMET_PUNCH anim_sound 0, 1, SFX_COMET_PUNCH
anim_obj ANIM_OBJ_06, -14, 0, 6, 0, $0 anim_obj ANIM_OBJ_06, -14, 0, 6, 0, $0
anim_wait 6 anim_wait 6
@ -788,7 +788,7 @@ BattleAnim_Stomp: ; c9677
BattleAnim_DoubleKick: ; c96a7 BattleAnim_DoubleKick: ; c96a7
anim_1gfx ANIM_GFX_HIT anim_1gfx ANIM_GFX_HIT
anim_jumpif $1, BattleAnim_DoubleKick_branch_c96bd anim_if_param_equal $1, BattleAnim_DoubleKick_branch_c96bd
anim_sound 0, 1, SFX_DOUBLE_KICK anim_sound 0, 1, SFX_DOUBLE_KICK
anim_obj ANIM_OBJ_07, -14, 0, 6, 0, $0 anim_obj ANIM_OBJ_07, -14, 0, 6, 0, $0
anim_wait 6 anim_wait 6
@ -808,7 +808,7 @@ BattleAnim_DoubleKick_branch_c96bd: ; c96bd
BattleAnim_JumpKick: ; c96cd BattleAnim_JumpKick: ; c96cd
anim_1gfx ANIM_GFX_HIT anim_1gfx ANIM_GFX_HIT
anim_jumpif $1, BattleAnim_JumpKick_branch_c96f1 anim_if_param_equal $1, BattleAnim_JumpKick_branch_c96f1
anim_sound 0, 1, SFX_JUMP_KICK anim_sound 0, 1, SFX_JUMP_KICK
anim_obj ANIM_OBJ_07, 14, 0, 9, 0, $0 anim_obj ANIM_OBJ_07, 14, 0, 9, 0, $0
anim_obj ANIM_OBJ_07, 12, 4, 7, 4, $0 anim_obj ANIM_OBJ_07, 12, 4, 7, 4, $0
@ -832,7 +832,7 @@ BattleAnim_JumpKick_branch_c96f1: ; c96f1
BattleAnim_HiJumpKick: ; c96fc BattleAnim_HiJumpKick: ; c96fc
anim_1gfx ANIM_GFX_HIT anim_1gfx ANIM_GFX_HIT
anim_bgeffect ANIM_BG_1F, $40, $2, $0 anim_bgeffect ANIM_BG_1F, $40, $2, $0
anim_jumpif $1, BattleAnim_HiJumpKick_branch_c971e anim_if_param_equal $1, BattleAnim_HiJumpKick_branch_c971e
anim_wait 32 anim_wait 32
anim_sound 0, 1, SFX_JUMP_KICK anim_sound 0, 1, SFX_JUMP_KICK
anim_obj ANIM_OBJ_07, 14, 0, 9, 0, $0 anim_obj ANIM_OBJ_07, 14, 0, 9, 0, $0
@ -1041,13 +1041,13 @@ BattleAnim_IceBeam: ; c98bd
anim_1gfx ANIM_GFX_ICE anim_1gfx ANIM_GFX_ICE
.loop .loop
anim_sound 6, 2, SFX_SHINE anim_sound 6, 2, SFX_SHINE
anim_obj ANIM_OBJ_13, 8, 0, 11, 4, $4 anim_obj ANIM_OBJ_ICE_BEAM, 8, 0, 11, 4, $4
anim_wait 4 anim_wait 4
anim_loop 5, .loop anim_loop 5, .loop
anim_obj ANIM_OBJ_29, -15, 0, 9, 2, $10 anim_obj ANIM_OBJ_ICE_BUILDUP, -15, 0, 9, 2, $10
.loop2 .loop2
anim_sound 6, 2, SFX_SHINE anim_sound 6, 2, SFX_SHINE
anim_obj ANIM_OBJ_13, 8, 0, 11, 4, $4 anim_obj ANIM_OBJ_ICE_BEAM, 8, 0, 11, 4, $4
anim_wait 4 anim_wait 4
anim_loop 15, .loop2 anim_loop 15, .loop2
anim_wait 48 anim_wait 48
@ -1062,18 +1062,18 @@ BattleAnim_Blizzard: ; c98e8
anim_1gfx ANIM_GFX_ICE anim_1gfx ANIM_GFX_ICE
.loop .loop
anim_sound 6, 2, SFX_SHINE anim_sound 6, 2, SFX_SHINE
anim_obj ANIM_OBJ_11, 8, 0, 11, 0, $63 anim_obj ANIM_OBJ_BLIZZARD, 8, 0, 11, 0, $63
anim_wait 2 anim_wait 2
anim_sound 6, 2, SFX_SHINE anim_sound 6, 2, SFX_SHINE
anim_obj ANIM_OBJ_11, 8, 0, 10, 0, $64 anim_obj ANIM_OBJ_BLIZZARD, 8, 0, 10, 0, $64
anim_wait 2 anim_wait 2
anim_sound 6, 2, SFX_SHINE anim_sound 6, 2, SFX_SHINE
anim_obj ANIM_OBJ_11, 8, 0, 12, 0, $63 anim_obj ANIM_OBJ_BLIZZARD, 8, 0, 12, 0, $63
anim_wait 2 anim_wait 2
anim_loop 3, .loop anim_loop 3, .loop
anim_bgeffect ANIM_BG_WHITE_HUES, $0, $8, $0 anim_bgeffect ANIM_BG_WHITE_HUES, $0, $8, $0
anim_wait 32 anim_wait 32
anim_obj ANIM_OBJ_29, -15, 0, 9, 2, $10 anim_obj ANIM_OBJ_ICE_BUILDUP, -15, 0, 9, 2, $10
anim_wait 128 anim_wait 128
anim_sound 0, 1, SFX_SHINE anim_sound 0, 1, SFX_SHINE
anim_wait 8 anim_wait 8
@ -1085,13 +1085,13 @@ BattleAnim_Blizzard: ; c98e8
BattleAnim_Bubble: ; c991e BattleAnim_Bubble: ; c991e
anim_1gfx ANIM_GFX_BUBBLE anim_1gfx ANIM_GFX_BUBBLE
anim_sound 32, 2, SFX_WATER_GUN anim_sound 32, 2, SFX_WATER_GUN
anim_obj ANIM_OBJ_21, 8, 0, 11, 4, $c1 anim_obj ANIM_OBJ_BUBBLE, 8, 0, 11, 4, $c1
anim_wait 6 anim_wait 6
anim_sound 32, 2, SFX_WATER_GUN anim_sound 32, 2, SFX_WATER_GUN
anim_obj ANIM_OBJ_21, 8, 0, 11, 4, $e1 anim_obj ANIM_OBJ_BUBBLE, 8, 0, 11, 4, $e1
anim_wait 6 anim_wait 6
anim_sound 32, 2, SFX_WATER_GUN anim_sound 32, 2, SFX_WATER_GUN
anim_obj ANIM_OBJ_21, 8, 0, 11, 4, $d1 anim_obj ANIM_OBJ_BUBBLE, 8, 0, 11, 4, $d1
anim_wait 128 anim_wait 128
anim_wait 32 anim_wait 32
anim_ret anim_ret
@ -1101,13 +1101,13 @@ BattleAnim_Bubblebeam: ; c993d
anim_1gfx ANIM_GFX_BUBBLE anim_1gfx ANIM_GFX_BUBBLE
.loop .loop
anim_sound 16, 2, SFX_BUBBLEBEAM anim_sound 16, 2, SFX_BUBBLEBEAM
anim_obj ANIM_OBJ_21, 8, 0, 11, 4, $92 anim_obj ANIM_OBJ_BUBBLE, 8, 0, 11, 4, $92
anim_wait 6 anim_wait 6
anim_sound 16, 2, SFX_BUBBLEBEAM anim_sound 16, 2, SFX_BUBBLEBEAM
anim_obj ANIM_OBJ_21, 8, 0, 11, 4, $b3 anim_obj ANIM_OBJ_BUBBLE, 8, 0, 11, 4, $b3
anim_wait 6 anim_wait 6
anim_sound 16, 2, SFX_BUBBLEBEAM anim_sound 16, 2, SFX_BUBBLEBEAM
anim_obj ANIM_OBJ_21, 8, 0, 11, 4, $f4 anim_obj ANIM_OBJ_BUBBLE, 8, 0, 11, 4, $f4
anim_wait 8 anim_wait 8
anim_loop 3, .loop anim_loop 3, .loop
anim_wait 64 anim_wait 64
@ -1213,13 +1213,13 @@ BattleAnim_VineWhip: ; c9a42
BattleAnim_LeechSeed: ; c9a5a BattleAnim_LeechSeed: ; c9a5a
anim_1gfx ANIM_GFX_PLANT anim_1gfx ANIM_GFX_PLANT
anim_sound 16, 2, SFX_VINE_WHIP anim_sound 16, 2, SFX_VINE_WHIP
anim_obj ANIM_OBJ_4A, 6, 0, 10, 0, $20 anim_obj ANIM_OBJ_LEECH_SEED, 6, 0, 10, 0, $20
anim_wait 8 anim_wait 8
anim_sound 16, 2, SFX_VINE_WHIP anim_sound 16, 2, SFX_VINE_WHIP
anim_obj ANIM_OBJ_4A, 6, 0, 10, 0, $30 anim_obj ANIM_OBJ_LEECH_SEED, 6, 0, 10, 0, $30
anim_wait 8 anim_wait 8
anim_sound 16, 2, SFX_VINE_WHIP anim_sound 16, 2, SFX_VINE_WHIP
anim_obj ANIM_OBJ_4A, 6, 0, 10, 0, $28 anim_obj ANIM_OBJ_LEECH_SEED, 6, 0, 10, 0, $28
anim_wait 32 anim_wait 32
anim_sound 0, 1, SFX_CHARGE anim_sound 0, 1, SFX_CHARGE
anim_wait 128 anim_wait 128
@ -1229,17 +1229,17 @@ BattleAnim_LeechSeed: ; c9a5a
BattleAnim_RazorLeaf: ; c9a7c BattleAnim_RazorLeaf: ; c9a7c
anim_1gfx ANIM_GFX_PLANT anim_1gfx ANIM_GFX_PLANT
anim_sound 0, 0, SFX_VINE_WHIP anim_sound 0, 0, SFX_VINE_WHIP
anim_obj ANIM_OBJ_14, 6, 0, 10, 0, $28 anim_obj ANIM_OBJ_RAZOR_LEAF, 6, 0, 10, 0, $28
anim_obj ANIM_OBJ_14, 6, 0, 10, 0, $5c anim_obj ANIM_OBJ_RAZOR_LEAF, 6, 0, 10, 0, $5c
anim_obj ANIM_OBJ_14, 6, 0, 10, 0, $10 anim_obj ANIM_OBJ_RAZOR_LEAF, 6, 0, 10, 0, $10
anim_obj ANIM_OBJ_14, 6, 0, 10, 0, $e8 anim_obj ANIM_OBJ_RAZOR_LEAF, 6, 0, 10, 0, $e8
anim_obj ANIM_OBJ_14, 6, 0, 10, 0, $9c anim_obj ANIM_OBJ_RAZOR_LEAF, 6, 0, 10, 0, $9c
anim_obj ANIM_OBJ_14, 6, 0, 10, 0, $d0 anim_obj ANIM_OBJ_RAZOR_LEAF, 6, 0, 10, 0, $d0
anim_wait 6 anim_wait 6
anim_obj ANIM_OBJ_14, 6, 0, 10, 0, $1c anim_obj ANIM_OBJ_RAZOR_LEAF, 6, 0, 10, 0, $1c
anim_obj ANIM_OBJ_14, 6, 0, 10, 0, $50 anim_obj ANIM_OBJ_RAZOR_LEAF, 6, 0, 10, 0, $50
anim_obj ANIM_OBJ_14, 6, 0, 10, 0, $dc anim_obj ANIM_OBJ_RAZOR_LEAF, 6, 0, 10, 0, $dc
anim_obj ANIM_OBJ_14, 6, 0, 10, 0, $90 anim_obj ANIM_OBJ_RAZOR_LEAF, 6, 0, 10, 0, $90
anim_wait 80 anim_wait 80
anim_sound 16, 2, SFX_VINE_WHIP anim_sound 16, 2, SFX_VINE_WHIP
anim_incobj 3 anim_incobj 3
@ -1275,7 +1275,8 @@ BattleAnim_RazorLeaf: ; c9a7c
; c9af2 ; c9af2
BattleAnim_Solarbeam: ; c9af2 BattleAnim_Solarbeam: ; c9af2
anim_jumpif $0, BattleAnim_Solarbeam_branch_c9b30 anim_if_param_equal $0, .FireSolarBeam
; charge turn
anim_1gfx ANIM_GFX_CHARGE anim_1gfx ANIM_GFX_CHARGE
anim_sound 0, 0, SFX_CHARGE anim_sound 0, 0, SFX_CHARGE
anim_obj ANIM_OBJ_3D, 6, 0, 10, 4, $0 anim_obj ANIM_OBJ_3D, 6, 0, 10, 4, $0
@ -1293,7 +1294,7 @@ BattleAnim_Solarbeam: ; c9af2
anim_ret anim_ret
; c9b30 ; c9b30
BattleAnim_Solarbeam_branch_c9b30: ; c9b30 .FireSolarBeam
anim_1gfx ANIM_GFX_BEAM anim_1gfx ANIM_GFX_BEAM
anim_bgeffect ANIM_BG_06, $0, $2, $0 anim_bgeffect ANIM_BG_06, $0, $2, $0
anim_call BattleAnim_Solarbeam_branch_cbb39 anim_call BattleAnim_Solarbeam_branch_cbb39
@ -1362,7 +1363,7 @@ BattleAnim_Thunder: ; c9b9a
; c9bbd ; c9bbd
BattleAnim_RazorWind: ; c9bbd BattleAnim_RazorWind: ; c9bbd
anim_jumpif $1, BattleAnim_RazorWind_branch_c9fb5 anim_if_param_equal $1, BattleAnim_RazorWind_branch_c9fb5
anim_1gfx ANIM_GFX_WHIP anim_1gfx ANIM_GFX_WHIP
anim_bgeffect ANIM_BG_06, $0, $1, $0 anim_bgeffect ANIM_BG_06, $0, $1, $0
.loop .loop
@ -1430,7 +1431,7 @@ BattleAnim_Sonicboom: ; c9c36
BattleAnim_Selfdestruct: ; c9c53 BattleAnim_Selfdestruct: ; c9c53
anim_1gfx ANIM_GFX_EXPLOSION anim_1gfx ANIM_GFX_EXPLOSION
anim_bgeffect ANIM_BG_FLASH_INVERTED, $0, $8, $24 anim_bgeffect ANIM_BG_FLASH_INVERTED, $0, $8, $24
anim_jumpif $1, .loop anim_if_param_equal $1, .loop
anim_call BattleAnim_Selfdestruct_branch_cbb8f anim_call BattleAnim_Selfdestruct_branch_cbb8f
anim_wait 16 anim_wait 16
anim_ret anim_ret
@ -1449,7 +1450,7 @@ BattleAnim_Explosion: ; c9c72
anim_1gfx ANIM_GFX_EXPLOSION anim_1gfx ANIM_GFX_EXPLOSION
anim_bgeffect ANIM_BG_1F, $60, $4, $10 anim_bgeffect ANIM_BG_1F, $60, $4, $10
anim_bgeffect ANIM_BG_FLASH_INVERTED, $0, $8, $24 anim_bgeffect ANIM_BG_FLASH_INVERTED, $0, $8, $24
anim_jumpif $1, .loop anim_if_param_equal $1, .loop
anim_call BattleAnim_Explosion_branch_cbb8f anim_call BattleAnim_Explosion_branch_cbb8f
anim_wait 16 anim_wait 16
anim_ret anim_ret
@ -1604,7 +1605,7 @@ BattleAnim_Scratch: ; c9da6
BattleAnim_FurySwipes: ; c9dbc BattleAnim_FurySwipes: ; c9dbc
anim_1gfx ANIM_GFX_CUT anim_1gfx ANIM_GFX_CUT
anim_jumpif $1, BattleAnim_FurySwipes_branch_c9dd9 anim_if_param_equal $1, BattleAnim_FurySwipes_branch_c9dd9
anim_sound 0, 1, SFX_SCRATCH anim_sound 0, 1, SFX_SCRATCH
anim_obj ANIM_OBJ_37, -14, 0, 6, 0, $0 anim_obj ANIM_OBJ_37, -14, 0, 6, 0, $0
anim_obj ANIM_OBJ_37, -15, 4, 5, 4, $0 anim_obj ANIM_OBJ_37, -15, 4, 5, 4, $0
@ -1685,8 +1686,8 @@ BattleAnim_Teleport: ; c9e4f
; c9e6f ; c9e6f
BattleAnim_Fly: ; c9e6f BattleAnim_Fly: ; c9e6f
anim_jumpif $1, BattleAnim_Fly_branch_c9e89 anim_if_param_equal $1, BattleAnim_Fly_branch_c9e89
anim_jumpif $2, BattleAnim_Fly_branch_c9e82 anim_if_param_equal $2, BattleAnim_Fly_branch_c9e82
anim_1gfx ANIM_GFX_HIT anim_1gfx ANIM_GFX_HIT
anim_sound 0, 1, SFX_WING_ATTACK anim_sound 0, 1, SFX_WING_ATTACK
anim_obj ANIM_OBJ_01, -15, 0, 7, 0, $0 anim_obj ANIM_OBJ_01, -15, 0, 7, 0, $0
@ -1742,13 +1743,13 @@ BattleAnim_Absorb: ; c9eeb
anim_obj ANIM_OBJ_3D, 5, 4, 11, 0, $0 anim_obj ANIM_OBJ_3D, 5, 4, 11, 0, $0
.loop .loop
anim_sound 6, 3, SFX_WATER_GUN anim_sound 6, 3, SFX_WATER_GUN
anim_obj ANIM_OBJ_45, 16, 0, 6, 0, $2 anim_obj ANIM_OBJ_ABSORB, 16, 0, 6, 0, $2
anim_wait 6 anim_wait 6
anim_sound 6, 3, SFX_WATER_GUN anim_sound 6, 3, SFX_WATER_GUN
anim_obj ANIM_OBJ_45, -15, 0, 8, 0, $3 anim_obj ANIM_OBJ_ABSORB, -15, 0, 8, 0, $3
anim_wait 6 anim_wait 6
anim_sound 6, 3, SFX_WATER_GUN anim_sound 6, 3, SFX_WATER_GUN
anim_obj ANIM_OBJ_45, -15, 0, 4, 0, $4 anim_obj ANIM_OBJ_ABSORB, -15, 0, 4, 0, $4
anim_wait 6 anim_wait 6
anim_loop 5, .loop anim_loop 5, .loop
anim_wait 32 anim_wait 32
@ -1762,17 +1763,17 @@ BattleAnim_MegaDrain: ; c9f13
anim_setvar $0 anim_setvar $0
.loop .loop
anim_sound 6, 3, SFX_WATER_GUN anim_sound 6, 3, SFX_WATER_GUN
anim_obj ANIM_OBJ_45, 16, 0, 6, 0, $2 anim_obj ANIM_OBJ_ABSORB, 16, 0, 6, 0, $2
anim_wait 6 anim_wait 6
anim_sound 6, 3, SFX_WATER_GUN anim_sound 6, 3, SFX_WATER_GUN
anim_obj ANIM_OBJ_45, -15, 0, 8, 0, $3 anim_obj ANIM_OBJ_ABSORB, -15, 0, 8, 0, $3
anim_wait 6 anim_wait 6
anim_sound 6, 3, SFX_WATER_GUN anim_sound 6, 3, SFX_WATER_GUN
anim_obj ANIM_OBJ_45, -15, 0, 4, 0, $4 anim_obj ANIM_OBJ_ABSORB, -15, 0, 4, 0, $4
anim_wait 6 anim_wait 6
anim_incvar anim_incvar
anim_jumpvar $7, .done anim_if_var_equal $7, .done
anim_jumpvar $2, .spawn anim_if_var_equal $2, .spawn
anim_jump .loop anim_jump .loop
; c9f46 ; c9f46
@ -1861,7 +1862,7 @@ BattleAnim_SkyAttack_branch_c9fb5: ; c9fb5
; c9ffc ; c9ffc
BattleAnim_Bide: ; c9ffc BattleAnim_Bide: ; c9ffc
anim_jumpif $0, BattleAnim_Bide_branch_c9651 anim_if_param_equal $0, BattleAnim_Bide_branch_c9651
anim_1gfx ANIM_GFX_HIT anim_1gfx ANIM_GFX_HIT
anim_call BattleAnim_FollowEnemyFeet_0 anim_call BattleAnim_FollowEnemyFeet_0
anim_sound 0, 0, SFX_ESCAPE_ROPE anim_sound 0, 0, SFX_ESCAPE_ROPE
@ -1982,7 +1983,7 @@ BattleAnim_Roar: ; ca0d7
anim_wait 16 anim_wait 16
anim_loop 3, .loop anim_loop 3, .loop
anim_wait 16 anim_wait 16
anim_jumpif $0, .done anim_if_param_equal $0, .done
anim_bgeffect ANIM_BG_27, $0, $0, $0 anim_bgeffect ANIM_BG_27, $0, $0, $0
anim_wait 64 anim_wait 64
.done .done
@ -2142,8 +2143,8 @@ BattleAnim_Splash: ; ca237
BattleAnim_Dig: ; ca24b BattleAnim_Dig: ; ca24b
anim_2gfx ANIM_GFX_SAND, ANIM_GFX_HIT anim_2gfx ANIM_GFX_SAND, ANIM_GFX_HIT
anim_jumpif $0, .hit anim_if_param_equal $0, .hit
anim_jumpif $2, .fail anim_if_param_equal $2, .fail
anim_call BattleAnim_FollowPlayerHead_0 anim_call BattleAnim_FollowPlayerHead_0
anim_bgeffect ANIM_BG_DIG, $0, $1, $1 anim_bgeffect ANIM_BG_DIG, $0, $1, $1
anim_obj ANIM_OBJ_57, 9, 0, 13, 0, $0 anim_obj ANIM_OBJ_57, 9, 0, 13, 0, $0
@ -2312,7 +2313,7 @@ BattleAnim_Whirlwind: ; ca3a8
anim_incobj 9 anim_incobj 9
anim_sound 16, 2, SFX_WHIRLWIND anim_sound 16, 2, SFX_WHIRLWIND
anim_wait 128 anim_wait 128
anim_jumpif $0, .done anim_if_param_equal $0, .done
anim_bgeffect ANIM_BG_27, $0, $0, $0 anim_bgeffect ANIM_BG_27, $0, $0, $0
anim_wait 64 anim_wait 64
.done .done
@ -2335,8 +2336,8 @@ BattleAnim_Haze: ; ca3ee
anim_1gfx ANIM_GFX_HAZE anim_1gfx ANIM_GFX_HAZE
anim_sound 0, 1, SFX_SURF anim_sound 0, 1, SFX_SURF
.loop .loop
anim_obj ANIM_OBJ_5B, 6, 0, 7, 0, $0 anim_obj ANIM_OBJ_HAZE, 6, 0, 7, 0, $0
anim_obj ANIM_OBJ_5B, -16, 4, 2, 0, $0 anim_obj ANIM_OBJ_HAZE, -16, 4, 2, 0, $0
anim_wait 12 anim_wait 12
anim_loop 5, .loop anim_loop 5, .loop
anim_wait 96 anim_wait 96
@ -2348,7 +2349,7 @@ BattleAnim_Mist: ; ca404
anim_1gfx ANIM_GFX_HAZE anim_1gfx ANIM_GFX_HAZE
anim_sound 0, 0, SFX_SURF anim_sound 0, 0, SFX_SURF
.loop .loop
anim_obj ANIM_OBJ_5C, 6, 0, 7, 0, $0 anim_obj ANIM_OBJ_MIST, 6, 0, 7, 0, $0
anim_wait 8 anim_wait 8
anim_loop 10, .loop anim_loop 10, .loop
anim_wait 96 anim_wait 96
@ -2359,7 +2360,7 @@ BattleAnim_Smog: ; ca417
anim_1gfx ANIM_GFX_HAZE anim_1gfx ANIM_GFX_HAZE
anim_sound 0, 1, SFX_BUBBLEBEAM anim_sound 0, 1, SFX_BUBBLEBEAM
.loop .loop
anim_obj ANIM_OBJ_5D, -16, 4, 2, 0, $0 anim_obj ANIM_OBJ_SMOG, -16, 4, 2, 0, $0
anim_wait 8 anim_wait 8
anim_loop 10, .loop anim_loop 10, .loop
anim_wait 96 anim_wait 96
@ -2370,7 +2371,7 @@ BattleAnim_PoisonGas: ; ca428
anim_1gfx ANIM_GFX_HAZE anim_1gfx ANIM_GFX_HAZE
anim_sound 16, 2, SFX_BUBBLEBEAM anim_sound 16, 2, SFX_BUBBLEBEAM
.loop .loop
anim_obj ANIM_OBJ_5E, 5, 4, 10, 0, $2 anim_obj ANIM_OBJ_POISON_GAS, 5, 4, 10, 0, $2
anim_wait 8 anim_wait 8
anim_loop 10, .loop anim_loop 10, .loop
anim_wait 128 anim_wait 128
@ -2379,7 +2380,7 @@ BattleAnim_PoisonGas: ; ca428
BattleAnim_HornAttack: ; ca439 BattleAnim_HornAttack: ; ca439
anim_2gfx ANIM_GFX_HORN, ANIM_GFX_HIT anim_2gfx ANIM_GFX_HORN, ANIM_GFX_HIT
anim_obj ANIM_OBJ_5F, 9, 0, 10, 0, $1 anim_obj ANIM_OBJ_HORN, 9, 0, 10, 0, $1
anim_wait 16 anim_wait 16
anim_sound 0, 1, SFX_HORN_ATTACK anim_sound 0, 1, SFX_HORN_ATTACK
anim_obj ANIM_OBJ_01, -15, 0, 7, 0, $0 anim_obj ANIM_OBJ_01, -15, 0, 7, 0, $0
@ -2389,17 +2390,17 @@ BattleAnim_HornAttack: ; ca439
BattleAnim_FuryAttack: ; ca44c BattleAnim_FuryAttack: ; ca44c
anim_2gfx ANIM_GFX_HORN, ANIM_GFX_HIT anim_2gfx ANIM_GFX_HORN, ANIM_GFX_HIT
anim_obj ANIM_OBJ_5F, 9, 0, 9, 0, $2 anim_obj ANIM_OBJ_HORN, 9, 0, 9, 0, $2
anim_wait 8 anim_wait 8
anim_sound 0, 1, SFX_HORN_ATTACK anim_sound 0, 1, SFX_HORN_ATTACK
anim_obj ANIM_OBJ_04, 16, 0, 5, 0, $0 anim_obj ANIM_OBJ_04, 16, 0, 5, 0, $0
anim_wait 8 anim_wait 8
anim_obj ANIM_OBJ_5F, 10, 0, 11, 0, $2 anim_obj ANIM_OBJ_HORN, 10, 0, 11, 0, $2
anim_wait 8 anim_wait 8
anim_sound 0, 1, SFX_HORN_ATTACK anim_sound 0, 1, SFX_HORN_ATTACK
anim_obj ANIM_OBJ_04, -15, 0, 7, 0, $0 anim_obj ANIM_OBJ_04, -15, 0, 7, 0, $0
anim_wait 8 anim_wait 8
anim_obj ANIM_OBJ_5F, 9, 4, 10, 0, $2 anim_obj ANIM_OBJ_HORN, 9, 4, 10, 0, $2
anim_wait 8 anim_wait 8
anim_sound 0, 1, SFX_HORN_ATTACK anim_sound 0, 1, SFX_HORN_ATTACK
anim_obj ANIM_OBJ_04, -16, 4, 6, 0, $0 anim_obj ANIM_OBJ_04, -16, 4, 6, 0, $0
@ -2410,7 +2411,7 @@ BattleAnim_FuryAttack: ; ca44c
BattleAnim_HornDrill: ; ca47d BattleAnim_HornDrill: ; ca47d
anim_2gfx ANIM_GFX_HORN, ANIM_GFX_HIT anim_2gfx ANIM_GFX_HORN, ANIM_GFX_HIT
anim_bgeffect ANIM_BG_FLASH_INVERTED, $0, $8, $40 anim_bgeffect ANIM_BG_FLASH_INVERTED, $0, $8, $40
anim_obj ANIM_OBJ_5F, 9, 0, 10, 0, $3 anim_obj ANIM_OBJ_HORN, 9, 0, 10, 0, $3
anim_wait 8 anim_wait 8
.loop .loop
anim_sound 0, 1, SFX_HORN_ATTACK anim_sound 0, 1, SFX_HORN_ATTACK
@ -2608,7 +2609,7 @@ BattleAnim_Crabhammer: ; ca624
; ca63f ; ca63f
BattleAnim_SkullBash: ; ca63f BattleAnim_SkullBash: ; ca63f
anim_jumpif $1, BattleAnim_SkullBash_branch_c9fb5 anim_if_param_equal $1, BattleAnim_SkullBash_branch_c9fb5
anim_1gfx ANIM_GFX_HIT anim_1gfx ANIM_GFX_HIT
anim_bgeffect ANIM_BG_1F, $14, $2, $0 anim_bgeffect ANIM_BG_1F, $14, $2, $0
anim_wait 32 anim_wait 32
@ -2714,14 +2715,14 @@ BattleAnim_Flash: ; ca700
BattleAnim_Substitute: ; ca73c BattleAnim_Substitute: ; ca73c
anim_sound 0, 0, SFX_SURF anim_sound 0, 0, SFX_SURF
anim_jumpif $3, BattleAnim_Substitute_branch_ca77c anim_if_param_equal $3, BattleAnim_Substitute_branch_ca77c
anim_jumpif $2, BattleAnim_Substitute_branch_ca76e anim_if_param_equal $2, BattleAnim_Substitute_branch_ca76e
anim_jumpif $1, BattleAnim_Substitute_branch_ca760 anim_if_param_equal $1, BattleAnim_Substitute_branch_ca760
anim_1gfx ANIM_GFX_SMOKE anim_1gfx ANIM_GFX_SMOKE
anim_bgeffect ANIM_BG_27, $0, $1, $0 anim_bgeffect ANIM_BG_27, $0, $1, $0
anim_wait 48 anim_wait 48
anim_raisesub anim_raisesub
anim_obj ANIM_OBJ_1C, 6, 0, 12, 0, $0 anim_obj ANIM_OBJ_BALL_POOF, 6, 0, 12, 0, $0
anim_bgeffect ANIM_BG_ENTER_MON, $0, $1, $0 anim_bgeffect ANIM_BG_ENTER_MON, $0, $1, $0
anim_wait 32 anim_wait 32
anim_ret anim_ret
@ -2769,7 +2770,7 @@ BattleAnim_Minimize: ; ca78a
; ca7a1 ; ca7a1
BattleAnim_SkyAttack: ; ca7a1 BattleAnim_SkyAttack: ; ca7a1
anim_jumpif $1, BattleAnim_SkyAttack_branch_c9fb5 anim_if_param_equal $1, BattleAnim_SkyAttack_branch_c9fb5
anim_1gfx ANIM_GFX_SKY_ATTACK anim_1gfx ANIM_GFX_SKY_ATTACK
anim_bgeffect ANIM_BG_27, $0, $1, $0 anim_bgeffect ANIM_BG_27, $0, $1, $0
anim_wait 32 anim_wait 32
@ -2826,14 +2827,14 @@ BattleAnim_TriAttack: ; ca7f1
BattleAnim_Withdraw: ; ca80c BattleAnim_Withdraw: ; ca80c
anim_1gfx ANIM_GFX_REFLECT anim_1gfx ANIM_GFX_REFLECT
anim_call BattleAnim_FollowPlayerHead_0 anim_call BattleAnim_FollowPlayerHead_0
anim_bgeffect ANIM_BG_21, $0, $1, $50 anim_bgeffect ANIM_BG_WITHDRAW, $0, $1, $50
anim_wait 48 anim_wait 48
anim_sound 0, 0, SFX_SHINE anim_sound 0, 0, SFX_SHINE
anim_obj ANIM_OBJ_70, 6, 0, 11, 0, $0 anim_obj ANIM_OBJ_WITHDRAW, 6, 0, 11, 0, $0
anim_wait 64 anim_wait 64
anim_incobj 2 anim_incobj 2
anim_wait 1 anim_wait 1
anim_incbgeffect ANIM_BG_21 anim_incbgeffect ANIM_BG_WITHDRAW
anim_call BattleAnim_ShowMon_0 anim_call BattleAnim_ShowMon_0
anim_ret anim_ret
; ca829 ; ca829
@ -2965,7 +2966,7 @@ BattleAnim_Smokescreen: ; ca939
anim_wait 24 anim_wait 24
anim_incobj 1 anim_incobj 1
anim_sound 0, 1, SFX_BALL_POOF anim_sound 0, 1, SFX_BALL_POOF
anim_obj ANIM_OBJ_1C, 13, 4, 8, 6, $10 anim_obj ANIM_OBJ_BALL_POOF, 13, 4, 8, 6, $10
anim_wait 8 anim_wait 8
.loop .loop
anim_sound 0, 1, SFX_MENU anim_sound 0, 1, SFX_MENU
@ -3324,8 +3325,8 @@ BattleAnim_Sketch: ; cac61
BattleAnim_TripleKick: ; cac7b BattleAnim_TripleKick: ; cac7b
anim_1gfx ANIM_GFX_HIT anim_1gfx ANIM_GFX_HIT
anim_jumpif $1, BattleAnim_TripleKick_branch_cac95 anim_if_param_equal $1, BattleAnim_TripleKick_branch_cac95
anim_jumpif $2, BattleAnim_TripleKick_branch_caca5 anim_if_param_equal $2, BattleAnim_TripleKick_branch_caca5
anim_sound 0, 1, SFX_MEGA_KICK anim_sound 0, 1, SFX_MEGA_KICK
anim_obj ANIM_OBJ_07, -14, 0, 6, 0, $0 anim_obj ANIM_OBJ_07, -14, 0, 6, 0, $0
anim_wait 6 anim_wait 6
@ -3447,7 +3448,7 @@ BattleAnim_Snore: ; cad6b
; cad86 ; cad86
BattleAnim_Curse: ; cad86 BattleAnim_Curse: ; cad86
anim_jumpif $1, .NotGhost anim_if_param_equal $1, .NotGhost
anim_2gfx ANIM_GFX_HIT, ANIM_GFX_OBJECTS anim_2gfx ANIM_GFX_HIT, ANIM_GFX_OBJECTS
anim_obj ANIM_OBJ_A5, 8, 4, 9, 0, $0 anim_obj ANIM_OBJ_A5, 8, 4, 9, 0, $0
anim_sound 0, 0, SFX_CURSE anim_sound 0, 0, SFX_CURSE
@ -3551,7 +3552,7 @@ BattleAnim_CottonSpore: ; cae84
anim_1gfx ANIM_GFX_MISC anim_1gfx ANIM_GFX_MISC
anim_sound 0, 1, SFX_POWDER anim_sound 0, 1, SFX_POWDER
.loop ; cae8b .loop ; cae8b
anim_obj ANIM_OBJ_81, -16, 4, 4, 0, $0 anim_obj ANIM_OBJ_COTTON_SPORE, -16, 4, 4, 0, $0
anim_wait 8 anim_wait 8
anim_loop 5, .loop anim_loop 5, .loop
anim_wait 96 anim_wait 96
@ -3750,9 +3751,9 @@ BattleAnim_Octazooka: ; cb06f
anim_sound 6, 2, SFX_SLUDGE_BOMB anim_sound 6, 2, SFX_SLUDGE_BOMB
anim_obj ANIM_OBJ_8C, 8, 0, 11, 4, $4 anim_obj ANIM_OBJ_8C, 8, 0, 11, 4, $4
anim_wait 16 anim_wait 16
anim_obj ANIM_OBJ_1C, -16, 4, 7, 0, $10 anim_obj ANIM_OBJ_BALL_POOF, -16, 4, 7, 0, $10
anim_wait 8 anim_wait 8
anim_jumpif $0, .done anim_if_param_equal $0, .done
.loop .loop
anim_obj ANIM_OBJ_74, -16, 4, 7, 4, $20 anim_obj ANIM_OBJ_74, -16, 4, 7, 4, $20
anim_wait 8 anim_wait 8
@ -3810,7 +3811,7 @@ BattleAnim_DestinyBond: ; cb0f0
anim_1gfx ANIM_GFX_ANGELS anim_1gfx ANIM_GFX_ANGELS
anim_bgp $1b anim_bgp $1b
anim_obp0 $0 anim_obp0 $0
anim_jumpif $1, BattleAnim_DestinyBond_branch_cb104 anim_if_param_equal $1, BattleAnim_DestinyBond_branch_cb104
anim_sound 6, 2, SFX_WHIRLWIND anim_sound 6, 2, SFX_WHIRLWIND
anim_obj ANIM_OBJ_9B, 5, 4, 15, 0, $2 anim_obj ANIM_OBJ_9B, 5, 4, 15, 0, $2
anim_wait 128 anim_wait 128
@ -4097,7 +4098,7 @@ BattleAnim_FuryCutter: ; cb386
anim_1gfx ANIM_GFX_CUT anim_1gfx ANIM_GFX_CUT
.loop .loop
anim_sound 0, 1, SFX_CUT anim_sound 0, 1, SFX_CUT
anim_jumpand $1, .obj1 anim_if_param_and %00000001, .obj1
anim_obj ANIM_OBJ_3A, -13, 0, 5, 0, $0 anim_obj ANIM_OBJ_3A, -13, 0, 5, 0, $0
anim_jump .okay anim_jump .okay
@ -4223,7 +4224,7 @@ BattleAnim_Present: ; cb488
anim_obj ANIM_OBJ_53, 13, 0, 6, 0, $0 anim_obj ANIM_OBJ_53, 13, 0, 6, 0, $0
anim_wait 48 anim_wait 48
anim_incobj 2 anim_incobj 2
anim_jumpif $3, .heal anim_if_param_equal $3, .heal
anim_incobj 1 anim_incobj 1
anim_wait 1 anim_wait 1
anim_1gfx ANIM_GFX_EXPLOSION anim_1gfx ANIM_GFX_EXPLOSION
@ -4356,7 +4357,7 @@ BattleAnim_Megahorn: ; cb5c0
anim_bgeffect ANIM_BG_1F, $40, $2, $0 anim_bgeffect ANIM_BG_1F, $40, $2, $0
anim_wait 48 anim_wait 48
anim_bgeffect ANIM_BG_FLASH_INVERTED, $0, $8, $3 anim_bgeffect ANIM_BG_FLASH_INVERTED, $0, $8, $3
anim_obj ANIM_OBJ_5F, 9, 0, 10, 0, $1 anim_obj ANIM_OBJ_HORN, 9, 0, 10, 0, $1
anim_sound 0, 1, SFX_HORN_ATTACK anim_sound 0, 1, SFX_HORN_ATTACK
anim_wait 16 anim_wait 16
anim_obj ANIM_OBJ_00, -15, 0, 7, 0, $0 anim_obj ANIM_OBJ_00, -15, 0, 7, 0, $0
@ -4399,7 +4400,7 @@ BattleAnim_Encore: ; cb5fe
BattleAnim_Pursuit: ; cb61b BattleAnim_Pursuit: ; cb61b
anim_1gfx ANIM_GFX_HIT anim_1gfx ANIM_GFX_HIT
anim_jumpif $1, BattleAnim_Pursuit_branch_cb62b anim_if_param_equal $1, BattleAnim_Pursuit_branch_cb62b
anim_sound 0, 1, SFX_COMET_PUNCH anim_sound 0, 1, SFX_COMET_PUNCH
anim_obj ANIM_OBJ_01, -15, 0, 7, 0, $0 anim_obj ANIM_OBJ_01, -15, 0, 7, 0, $0
anim_wait 16 anim_wait 16
@ -4534,7 +4535,7 @@ BattleAnim_MorningSun: ; cb739
anim_wait 6 anim_wait 6
anim_loop 5, .loop anim_loop 5, .loop
anim_wait 32 anim_wait 32
anim_jumpif $0, .zero anim_if_param_equal 0, .zero
anim_call BattleAnim_MorningSun_branch_cbc6a anim_call BattleAnim_MorningSun_branch_cbc6a
anim_ret anim_ret
; cb756 ; cb756
@ -4553,12 +4554,12 @@ BattleAnim_Synthesis: ; cb75a
anim_wait 72 anim_wait 72
anim_incbgeffect ANIM_BG_18 anim_incbgeffect ANIM_BG_18
anim_call BattleAnim_ShowMon_0 anim_call BattleAnim_ShowMon_0
anim_jumpif $1, BattleAnim_Synthesis_branch_cb77a anim_if_param_equal $1, .one
anim_call BattleAnim_Synthesis_branch_cbc6a anim_call BattleAnim_Synthesis_branch_cbc6a
anim_ret anim_ret
; cb77a ; cb77a
BattleAnim_Synthesis_branch_cb77a: ; cb77a .one
anim_call BattleAnim_Synthesis_branch_cbc80 anim_call BattleAnim_Synthesis_branch_cbc80
anim_ret anim_ret
; cb77e ; cb77e
@ -4592,12 +4593,11 @@ BattleAnim_Moonlight: ; cb7a8
anim_wait 1 anim_wait 1
anim_sound 0, 0, SFX_MOONLIGHT anim_sound 0, 0, SFX_MOONLIGHT
anim_wait 63 anim_wait 63
anim_jumpif $3, BattleAnim_Moonlight_branch_cb7d7 anim_if_param_equal $3, .three
anim_call BattleAnim_Moonlight_branch_cbc6a anim_call BattleAnim_Moonlight_branch_cbc6a
anim_ret anim_ret
; cb7d7
BattleAnim_Moonlight_branch_cb7d7: ; cb7d7 .three
anim_call BattleAnim_Moonlight_branch_cbc80 anim_call BattleAnim_Moonlight_branch_cbc80
anim_ret anim_ret
; cb7db ; cb7db
@ -4811,7 +4811,7 @@ BattleAnim_ShadowBall: ; cb9c6
anim_sound 6, 2, SFX_SLUDGE_BOMB anim_sound 6, 2, SFX_SLUDGE_BOMB
anim_obj ANIM_OBJ_B4, 8, 0, 11, 4, $2 anim_obj ANIM_OBJ_B4, 8, 0, 11, 4, $2
anim_wait 32 anim_wait 32
anim_obj ANIM_OBJ_1C, -16, 4, 7, 0, $10 anim_obj ANIM_OBJ_BALL_POOF, -16, 4, 7, 0, $10
anim_wait 24 anim_wait 24
anim_ret anim_ret
; cb9db ; cb9db
@ -4877,7 +4877,7 @@ BattleAnim_Whirlpool: ; cba6a
; cba84 ; cba84
BattleAnim_BeatUp: ; cba84 BattleAnim_BeatUp: ; cba84
anim_jumpif $0, .current_mon anim_if_param_equal $0, .current_mon
anim_sound 0, 0, SFX_BALL_POOF anim_sound 0, 0, SFX_BALL_POOF
anim_bgeffect ANIM_BG_RETURN_MON, $0, $1, $0 anim_bgeffect ANIM_BG_RETURN_MON, $0, $1, $0
anim_wait 16 anim_wait 16

View File

@ -111,7 +111,7 @@ BattleBGEffects: ; c805a (32:405a)
dw BattleBGEffect_1e dw BattleBGEffect_1e
dw BattleBGEffect_1f dw BattleBGEffect_1f
dw BattleBGEffect_20 dw BattleBGEffect_20
dw BattleBGEffect_21 dw BattleBGEffect_Withdraw
dw BattleBGEffect_BounceDown dw BattleBGEffect_BounceDown
dw BattleBGEffect_Dig dw BattleBGEffect_Dig
dw BattleBGEffect_Tackle dw BattleBGEffect_Tackle
@ -963,7 +963,7 @@ BattleBGEffect_Surf: ; c8545 (32:4545)
ld hl, wSurfWaveBGEffect ld hl, wSurfWaveBGEffect
ld bc, $0 ld bc, $0
.loop2 .loop2
ld a, [hFFC7] ld a, [hLYOverrideStart]
cp e cp e
jr nc, .load_zero jr nc, .load_zero
push hl push hl
@ -1000,9 +1000,9 @@ BattleBGEffect_Whirlpool: ; c8599 (32:4599)
ld a, $42 ld a, $42
ld [hFFC6], a ld [hFFC6], a
xor a xor a
ld [hFFC7], a ld [hLYOverrideStart], a
ld a, $5e ld a, $5e
ld [hFFC8], a ld [hLYOverrideEnd], a
lb de, 2, 2 lb de, 2, 2
call Functionc8f2e call Functionc8f2e
ret ret
@ -1074,9 +1074,9 @@ BattleBGEffect_Psychic: ; c8607 (32:4607)
ld a, $43 ld a, $43
ld [hFFC6], a ld [hFFC6], a
xor a xor a
ld [hFFC7], a ld [hLYOverrideStart], a
ld a, $5f ld a, $5f
ld [hFFC8], a ld [hLYOverrideEnd], a
lb de, 6, 5 lb de, 6, 5
call Functionc8f2e call Functionc8f2e
ld hl, BG_EFFECT_STRUCT_03 ld hl, BG_EFFECT_STRUCT_03
@ -1167,9 +1167,9 @@ BattleBGEffect_DoubleTeam: ; c8689 (32:4689)
call BattleBGEffects_ClearLYOverrides call BattleBGEffects_ClearLYOverrides
ld a, $43 ld a, $43
call BattleBGEffect_SetLCDStatCustoms1 call BattleBGEffect_SetLCDStatCustoms1
ld a, [hFFC8] ld a, [hLYOverrideEnd]
inc a inc a
ld [hFFC8], a ld [hLYOverrideEnd], a
ld hl, BG_EFFECT_STRUCT_BATTLE_TURN ld hl, BG_EFFECT_STRUCT_BATTLE_TURN
add hl, bc add hl, bc
ld [hl], $0 ld [hl], $0
@ -1224,9 +1224,9 @@ BattleBGEffect_DoubleTeam: ; c8689 (32:4689)
inc a inc a
ld d, a ld d, a
ld h, LYOverridesBackup / $100 ld h, LYOverridesBackup / $100
ld a, [hFFC7] ld a, [hLYOverrideStart]
ld l, a ld l, a
ld a, [hFFC8] ld a, [hLYOverrideEnd]
sub l sub l
srl a srl a
push af push af
@ -1264,8 +1264,8 @@ BattleBGEffect_AcidArmor: ; c8709 (32:4709)
ld e, [hl] ld e, [hl]
ld d, 2 ld d, 2
call Functionc8f2e call Functionc8f2e
ld h, $d2 ld h, LYOverridesBackup / $100
ld a, [hFFC8] ld a, [hLYOverrideEnd]
ld l, a ld l, a
ld [hl], $0 ld [hl], $0
dec l dec l
@ -1273,9 +1273,9 @@ BattleBGEffect_AcidArmor: ; c8709 (32:4709)
ret ret
.one .one
ld a, [hFFC8] ld a, [hLYOverrideEnd]
ld l, a ld l, a
ld h, $d2 ld h, LYOverridesBackup / $100
ld e, l ld e, l
ld d, h ld d, h
dec de dec de
@ -1283,11 +1283,11 @@ BattleBGEffect_AcidArmor: ; c8709 (32:4709)
ld a, [de] ld a, [de]
dec de dec de
ld [hld], a ld [hld], a
ld a, [hFFC7] ld a, [hLYOverrideStart]
cp l cp l
jr nz, .loop jr nz, .loop
ld [hl], $90 ld [hl], $90
ld a, [hFFC8] ld a, [hLYOverrideEnd]
ld l, a ld l, a
ld a, [hl] ld a, [hl]
cp $1 cp $1
@ -1309,7 +1309,7 @@ BattleBGEffect_AcidArmor: ; c8709 (32:4709)
call BattleAnim_ResetLCDStatCustom call BattleAnim_ResetLCDStatCustom
ret ret
BattleBGEffect_21: ; c8761 (32:4761) BattleBGEffect_Withdraw: ; c8761 (32:4761)
call BattleBGEffects_AnonJumptable call BattleBGEffects_AnonJumptable
.anon_dw .anon_dw
dw .zero dw .zero
@ -1322,9 +1322,9 @@ BattleBGEffect_21: ; c8761 (32:4761)
call BattleBGEffects_ClearLYOverrides call BattleBGEffects_ClearLYOverrides
ld a, $42 ld a, $42
call BattleBGEffect_SetLCDStatCustoms1 call BattleBGEffect_SetLCDStatCustoms1
ld a, [hFFC8] ld a, [hLYOverrideEnd]
inc a inc a
ld [hFFC8], a ld [hLYOverrideEnd], a
ld hl, BG_EFFECT_STRUCT_BATTLE_TURN ld hl, BG_EFFECT_STRUCT_BATTLE_TURN
add hl, bc add hl, bc
ld [hl], $1 ld [hl], $1
@ -1341,7 +1341,7 @@ BattleBGEffect_21: ; c8761 (32:4761)
ld a, [hl] ld a, [hl]
cp d cp d
ret nc ret nc
call Functionc901b call BGEffect_DisplaceLYOverridesBackup
ld hl, BG_EFFECT_STRUCT_03 ld hl, BG_EFFECT_STRUCT_03
add hl, bc add hl, bc
ld a, [hl] ld a, [hl]
@ -1372,9 +1372,9 @@ BattleBGEffect_Dig: ; c87a7 (32:47a7)
call BattleBGEffects_ClearLYOverrides call BattleBGEffects_ClearLYOverrides
ld a, $42 ld a, $42
call BattleBGEffect_SetLCDStatCustoms1 call BattleBGEffect_SetLCDStatCustoms1
ld a, [hFFC8] ld a, [hLYOverrideEnd]
inc a inc a
ld [hFFC8], a ld [hLYOverrideEnd], a
ld hl, BG_EFFECT_STRUCT_BATTLE_TURN ld hl, BG_EFFECT_STRUCT_BATTLE_TURN
add hl, bc add hl, bc
ld [hl], $2 ld [hl], $2
@ -1396,9 +1396,9 @@ BattleBGEffect_Dig: ; c87a7 (32:47a7)
ld [hl], $10 ld [hl], $10
call BattleBGEffects_IncrementJumptable call BattleBGEffects_IncrementJumptable
.two .two
ld a, [hFFC7] ld a, [hLYOverrideStart]
ld l, a ld l, a
ld a, [hFFC8] ld a, [hLYOverrideEnd]
sub l sub l
dec a dec a
ld hl, BG_EFFECT_STRUCT_BATTLE_TURN ld hl, BG_EFFECT_STRUCT_BATTLE_TURN
@ -1414,7 +1414,7 @@ BattleBGEffect_Dig: ; c87a7 (32:47a7)
dec [hl] dec [hl]
.skip .skip
pop af pop af
call Functionc901b call BGEffect_DisplaceLYOverridesBackup
ld hl, BG_EFFECT_STRUCT_BATTLE_TURN ld hl, BG_EFFECT_STRUCT_BATTLE_TURN
add hl, bc add hl, bc
inc [hl] inc [hl]
@ -1439,9 +1439,9 @@ BattleBGEffect_Tackle: ; c8805 (32:4805)
call BattleBGEffects_ClearLYOverrides call BattleBGEffects_ClearLYOverrides
ld a, $43 ld a, $43
call BattleBGEffect_SetLCDStatCustoms1 call BattleBGEffect_SetLCDStatCustoms1
ld a, [hFFC8] ld a, [hLYOverrideEnd]
inc a inc a
ld [hFFC8], a ld [hLYOverrideEnd], a
ld hl, BG_EFFECT_STRUCT_03 ld hl, BG_EFFECT_STRUCT_03
add hl, bc add hl, bc
ld [hl], $0 ld [hl], $0
@ -1474,9 +1474,9 @@ BattleBGEffect_25: ; c8837 (32:4837)
call BattleBGEffects_ClearLYOverrides call BattleBGEffects_ClearLYOverrides
ld a, $43 ld a, $43
call BattleBGEffect_SetLCDStatCustoms2 call BattleBGEffect_SetLCDStatCustoms2
ld a, [hFFC8] ld a, [hLYOverrideEnd]
inc a inc a
ld [hFFC8], a ld [hLYOverrideEnd], a
ld hl, BG_EFFECT_STRUCT_03 ld hl, BG_EFFECT_STRUCT_03
add hl, bc add hl, bc
ld [hl], $0 ld [hl], $0
@ -1546,19 +1546,19 @@ Functionc88a5: ; c88a5 (32:48a5)
jr z, .rollout jr z, .rollout
.not_rollout .not_rollout
pop af pop af
jp Functionc900b jp BGEffect_FillLYOverridesBackup
.rollout .rollout
ld a, [hFFC7] ld a, [hLYOverrideStart]
ld d, a ld d, a
ld a, [hFFC8] ld a, [hLYOverrideEnd]
sub d sub d
ld d, a ld d, a
ld h, LYOverridesBackup / $100 ld h, LYOverridesBackup / $100
ld a, [hSCY] ld a, [hSCY]
or a or a
jr nz, .skip1 jr nz, .skip1
ld a, [hFFC7] ld a, [hLYOverrideStart]
or a or a
jr z, .skip2 jr z, .skip2
dec a dec a
@ -1567,14 +1567,14 @@ Functionc88a5: ; c88a5 (32:48a5)
jr .skip2 jr .skip2
.skip1 .skip1
ld a, [hFFC8] ld a, [hLYOverrideEnd]
dec a dec a
ld l, a ld l, a
ld [hl], $0 ld [hl], $0
.skip2 .skip2
ld a, [hSCY] ld a, [hSCY]
ld l, a ld l, a
ld a, [hFFC7] ld a, [hLYOverrideStart]
sub l sub l
jr nc, .skip3 jr nc, .skip3
xor a xor a
@ -1606,9 +1606,9 @@ BGEffect2d_2f_zero:
call BattleBGEffects_ClearLYOverrides call BattleBGEffects_ClearLYOverrides
ld a, $43 ld a, $43
call BattleBGEffect_SetLCDStatCustoms1 call BattleBGEffect_SetLCDStatCustoms1
ld a, [hFFC8] ld a, [hLYOverrideEnd]
inc a inc a
ld [hFFC8], a ld [hLYOverrideEnd], a
ld hl, BG_EFFECT_STRUCT_03 ld hl, BG_EFFECT_STRUCT_03
add hl, bc add hl, bc
ld [hl], $0 ld [hl], $0
@ -1650,9 +1650,9 @@ BattleBGEffect_26: ; c892a (32:492a)
call BattleBGEffects_ClearLYOverrides call BattleBGEffects_ClearLYOverrides
ld a, $43 ld a, $43
call BattleBGEffect_SetLCDStatCustoms1 call BattleBGEffect_SetLCDStatCustoms1
ld a, [hFFC8] ld a, [hLYOverrideEnd]
inc a inc a
ld [hFFC8], a ld [hLYOverrideEnd], a
ld hl, BG_EFFECT_STRUCT_03 ld hl, BG_EFFECT_STRUCT_03
add hl, bc add hl, bc
ld [hl], $0 ld [hl], $0
@ -1664,7 +1664,7 @@ BattleBGEffect_26: ; c892a (32:492a)
ld a, [hl] ld a, [hl]
ld d, $8 ld d, $8
call BattleBGEffects_Sine call BattleBGEffects_Sine
call Functionc900b call BGEffect_FillLYOverridesBackup
ld hl, BG_EFFECT_STRUCT_03 ld hl, BG_EFFECT_STRUCT_03
add hl, bc add hl, bc
ld a, [hl] ld a, [hl]
@ -1689,9 +1689,9 @@ BattleBGEffect_2c: ; c8964 (32:4964)
call BattleBGEffects_ClearLYOverrides call BattleBGEffects_ClearLYOverrides
ld a, $43 ld a, $43
call BattleBGEffect_SetLCDStatCustoms1 call BattleBGEffect_SetLCDStatCustoms1
ld a, [hFFC8] ld a, [hLYOverrideEnd]
inc a inc a
ld [hFFC8], a ld [hLYOverrideEnd], a
xor a xor a
ld hl, BG_EFFECT_STRUCT_BATTLE_TURN ld hl, BG_EFFECT_STRUCT_BATTLE_TURN
add hl, bc add hl, bc
@ -1714,7 +1714,7 @@ BattleBGEffect_2c: ; c8964 (32:4964)
ld e, a ld e, a
pop af pop af
add e add e
call Functionc900b call BGEffect_FillLYOverridesBackup
ld hl, BG_EFFECT_STRUCT_BATTLE_TURN ld hl, BG_EFFECT_STRUCT_BATTLE_TURN
add hl, bc add hl, bc
ld a, [hl] ld a, [hl]
@ -1787,9 +1787,9 @@ BattleBGEffect_BounceDown: ; c89ee (32:49ee)
call BattleBGEffects_ClearLYOverrides call BattleBGEffects_ClearLYOverrides
ld a, $42 ld a, $42
call BattleBGEffect_SetLCDStatCustoms2 call BattleBGEffect_SetLCDStatCustoms2
ld a, [hFFC8] ld a, [hLYOverrideEnd]
inc a inc a
ld [hFFC8], a ld [hLYOverrideEnd], a
ld hl, BG_EFFECT_STRUCT_BATTLE_TURN ld hl, BG_EFFECT_STRUCT_BATTLE_TURN
add hl, bc add hl, bc
ld [hl], $1 ld [hl], $1
@ -1814,7 +1814,7 @@ BattleBGEffect_BounceDown: ; c89ee (32:49ee)
ld d, a ld d, a
pop af pop af
add d add d
call Functionc901b call BGEffect_DisplaceLYOverridesBackup
ld hl, BG_EFFECT_STRUCT_03 ld hl, BG_EFFECT_STRUCT_03
add hl, bc add hl, bc
inc [hl] inc [hl]
@ -1841,14 +1841,14 @@ BattleBGEffect_2a: ; c8a3a (32:4a3a)
call BattleBGEffects_SetLYOverrides call BattleBGEffects_SetLYOverrides
ld a, $47 ld a, $47
call BattleBGEffect_SetLCDStatCustoms1 call BattleBGEffect_SetLCDStatCustoms1
ld a, [hFFC8] ld a, [hLYOverrideEnd]
inc a inc a
ld [hFFC8], a ld [hLYOverrideEnd], a
ld a, [hFFC7] ld a, [hLYOverrideStart]
ld l, a ld l, a
ld h, $d2 ld h, LYOverridesBackup / $100
.loop .loop
ld a, [hFFC8] ld a, [hLYOverrideEnd]
cp l cp l
jr z, .done jr z, .done
xor a xor a
@ -1873,9 +1873,9 @@ BattleBGEffect_2a: ; c8a3a (32:4a3a)
ld hl, BG_EFFECT_STRUCT_03 ld hl, BG_EFFECT_STRUCT_03
add hl, bc add hl, bc
ld [hl], $0 ld [hl], $0
ld a, [hFFC7] ld a, [hLYOverrideStart]
inc a inc a
ld [hFFC7], a ld [hLYOverrideStart], a
call BattleBGEffects_IncrementJumptable call BattleBGEffects_IncrementJumptable
ret ret
@ -1883,7 +1883,7 @@ BattleBGEffect_2a: ; c8a3a (32:4a3a)
call .GetLYOverride call .GetLYOverride
jr nc, .finish jr nc, .finish
call .SetLYOverridesBackup call .SetLYOverridesBackup
ld a, [hFFC8] ld a, [hLYOverrideEnd]
dec a dec a
ld l, a ld l, a
ld [hl], e ld [hl], e
@ -1895,9 +1895,9 @@ BattleBGEffect_2a: ; c8a3a (32:4a3a)
.SetLYOverridesBackup: .SetLYOverridesBackup:
ld e, a ld e, a
ld a, [hFFC7] ld a, [hLYOverrideStart]
ld l, a ld l, a
ld a, [hFFC8] ld a, [hLYOverrideEnd]
sub l sub l
srl a srl a
ld h, LYOverridesBackup / $100 ld h, LYOverridesBackup / $100
@ -1989,9 +1989,9 @@ BattleBGEffect_1c: ; c8b00 (32:4b00)
ld a, $47 ld a, $47
ld [hFFC6], a ld [hFFC6], a
xor a xor a
ld [hFFC7], a ld [hLYOverrideStart], a
ld a, $60 ld a, $60
ld [hFFC8], a ld [hLYOverrideEnd], a
ret ret
.one .one
@ -2223,9 +2223,9 @@ BattleBGEffect_VibrateMon: ; c8c61 (32:4c61)
call BattleBGEffects_ClearLYOverrides call BattleBGEffects_ClearLYOverrides
ld a, $43 ld a, $43
call BattleBGEffect_SetLCDStatCustoms1 call BattleBGEffect_SetLCDStatCustoms1
ld a, [hFFC8] ld a, [hLYOverrideEnd]
inc a inc a
ld [hFFC8], a ld [hLYOverrideEnd], a
ld hl, BG_EFFECT_STRUCT_BATTLE_TURN ld hl, BG_EFFECT_STRUCT_BATTLE_TURN
add hl, bc add hl, bc
ld [hl], $1 ld [hl], $1
@ -2249,7 +2249,7 @@ BattleBGEffect_VibrateMon: ; c8c61 (32:4c61)
xor $ff xor $ff
inc a inc a
ld [hl], a ld [hl], a
call Functionc900b call BGEffect_FillLYOverridesBackup
ret ret
.finish .finish
@ -2270,9 +2270,9 @@ BattleBGEffect_WobbleMon: ; c8ca2 (32:4ca2)
ld a, $43 ld a, $43
ld [hFFC6], a ld [hFFC6], a
xor a xor a
ld [hFFC7], a ld [hLYOverrideStart], a
ld a, $37 ld a, $37
ld [hFFC8], a ld [hLYOverrideEnd], a
ld hl, BG_EFFECT_STRUCT_03 ld hl, BG_EFFECT_STRUCT_03
add hl, bc add hl, bc
ld [hl], $0 ld [hl], $0
@ -2286,7 +2286,7 @@ BattleBGEffect_WobbleMon: ; c8ca2 (32:4ca2)
jr nc, .two jr nc, .two
ld d, $6 ld d, $6
call BattleBGEffects_Sine call BattleBGEffects_Sine
call Functionc900b call BGEffect_FillLYOverridesBackup
ld hl, BG_EFFECT_STRUCT_03 ld hl, BG_EFFECT_STRUCT_03
add hl, bc add hl, bc
ld a, [hl] ld a, [hl]
@ -2435,9 +2435,9 @@ BGEffect_RapidCyclePals: ; c8d77 (32:4d77)
call BattleBGEffects_SetLYOverrides call BattleBGEffects_SetLYOverrides
ld a, $47 ld a, $47
call BattleBGEffect_SetLCDStatCustoms1 call BattleBGEffect_SetLCDStatCustoms1
ld a, [hFFC8] ld a, [hLYOverrideEnd]
inc a inc a
ld [hFFC8], a ld [hLYOverrideEnd], a
ld hl, BG_EFFECT_STRUCT_03 ld hl, BG_EFFECT_STRUCT_03
add hl, bc add hl, bc
ld a, [hl] ld a, [hl]
@ -2463,7 +2463,7 @@ BGEffect_RapidCyclePals: ; c8d77 (32:4d77)
ld [hl], a ld [hl], a
call BattleBGEffect_GetFirstDMGPal call BattleBGEffect_GetFirstDMGPal
jr c, .okay_2_dmg jr c, .okay_2_dmg
call Functionc900b call BGEffect_FillLYOverridesBackup
ret ret
.okay_2_dmg .okay_2_dmg
@ -2680,9 +2680,9 @@ BattleBGEffect_SetLCDStatCustoms1: ; c8ede (32:4ede)
lb de, $2f, $5e lb de, $2f, $5e
.okay .okay
ld a, d ld a, d
ld [hFFC7], a ld [hLYOverrideStart], a
ld a, e ld a, e
ld [hFFC8], a ld [hLYOverrideEnd], a
ret ret
BattleBGEffect_SetLCDStatCustoms2: ; c8ef4 (32:4ef4) BattleBGEffect_SetLCDStatCustoms2: ; c8ef4 (32:4ef4)
@ -2696,15 +2696,15 @@ BattleBGEffect_SetLCDStatCustoms2: ; c8ef4 (32:4ef4)
lb de, $2d, $5e lb de, $2d, $5e
.okay .okay
ld a, d ld a, d
ld [hFFC7], a ld [hLYOverrideStart], a
ld a, e ld a, e
ld [hFFC8], a ld [hLYOverrideEnd], a
ret ret
BattleAnim_ResetLCDStatCustom: ; c8f0a (32:4f0a) BattleAnim_ResetLCDStatCustom: ; c8f0a (32:4f0a)
xor a xor a
ld [hFFC7], a ld [hLYOverrideStart], a
ld [hFFC8], a ld [hLYOverrideEnd], a
call BattleBGEffects_ClearLYOverrides call BattleBGEffects_ClearLYOverrides
xor a xor a
ld [hFFC6], a ld [hFFC6], a
@ -2718,8 +2718,8 @@ BattleBGEffects_ResetVideoHRAM: ; c8f19 (32:4f19)
ld [rBGP], a ld [rBGP], a
ld [wBGP], a ld [wBGP], a
ld [wOBP1], a ld [wOBP1], a
ld [hFFC7], a ld [hLYOverrideStart], a
ld [hFFC8], a ld [hLYOverrideEnd], a
call BattleBGEffects_ClearLYOverrides call BattleBGEffects_ClearLYOverrides
ret ret
@ -2735,10 +2735,10 @@ Functionc8f2e: ; c8f2e (32:4f2e)
ld [wBattleAnimTemp3], a ld [wBattleAnimTemp3], a
ld bc, LYOverridesBackup ld bc, LYOverridesBackup
.loop .loop
ld a, [hFFC7] ld a, [hLYOverrideStart]
cp c cp c
jr nc, .next jr nc, .next
ld a, [hFFC8] ld a, [hLYOverrideEnd]
cp c cp c
jr c, .next jr c, .next
ld a, [wBattleAnimTemp2] ld a, [wBattleAnimTemp2]
@ -2812,14 +2812,14 @@ Functionc8f9a: ; c8f9a (32:4f9a)
call BattleBGEffects_Sine call BattleBGEffects_Sine
ld e, a ld e, a
pop hl pop hl
ld a, [hFFC8] ld a, [hLYOverrideEnd]
cp c cp c
jr c, .skip1 jr c, .skip1
ld a, e ld a, e
ld [bc], a ld [bc], a
inc bc inc bc
.skip1 .skip1
ld a, [hFFC7] ld a, [hLYOverrideStart]
cp l cp l
jr nc, .skip2 jr nc, .skip2
ld [hl], e ld [hl], e
@ -2837,7 +2837,7 @@ Functionc8f9a: ; c8f9a (32:4f9a)
ret ret
.GetLYOverrideBackupAddrOffset: .GetLYOverrideBackupAddrOffset:
ld a, [hFFC7] ld a, [hLYOverrideStart]
ld e, a ld e, a
ld a, [wBattleAnimTemp0] ld a, [wBattleAnimTemp0]
add e add e
@ -2847,13 +2847,13 @@ Functionc8f9a: ; c8f9a (32:4f9a)
BattleBGEffect_WavyScreenFX: ; c8fef (32:4fef) BattleBGEffect_WavyScreenFX: ; c8fef (32:4fef)
push bc push bc
ld a, [hFFC7] ld a, [hLYOverrideStart]
ld l, a ld l, a
inc a inc a
ld e, a ld e, a
ld h, $d2 ld h, LYOverridesBackup / $100
ld d, h ld d, h
ld a, [hFFC8] ld a, [hLYOverrideEnd]
sub l sub l
and a and a
jr z, .done jr z, .done
@ -2872,44 +2872,45 @@ BattleBGEffect_WavyScreenFX: ; c8fef (32:4fef)
pop bc pop bc
ret ret
Functionc900b: ; c900b (32:500b) BGEffect_FillLYOverridesBackup: ; c900b (32:500b)
push af push af
ld h, $d2 ld h, LYOverridesBackup / $100
ld a, [hFFC7] ld a, [hLYOverrideStart]
ld l, a ld l, a
ld a, [hFFC8] ld a, [hLYOverrideEnd]
sub l sub l
ld d, a ld d, a
pop af pop af
.asm_c9016 .loop
ld [hli], a ld [hli], a
dec d dec d
jr nz, .asm_c9016 jr nz, .loop
ret ret
Functionc901b: ; c901b (32:501b) BGEffect_DisplaceLYOverridesBackup: ; c901b (32:501b)
; e = a; d = [hLYOverrideEnd] - [hLYOverrideStart] - a
push af push af
ld e, a ld e, a
ld a, [hFFC7] ld a, [hLYOverrideStart]
ld l, a ld l, a
ld a, [hFFC8] ld a, [hLYOverrideEnd]
sub l sub l
sub e sub e
ld d, a ld d, a
ld h, $d2 ld h, LYOverridesBackup / $100
ld a, [hFFC7] ld a, [hLYOverrideStart]
ld l, a ld l, a
ld a, $90 ld a, $90
.asm_c902c .loop
ld [hli], a ld [hli], a
dec e dec e
jr nz, .asm_c902c jr nz, .loop
pop af pop af
xor $ff xor $ff
.asm_c9033 .loop2
ld [hli], a ld [hli], a
dec d dec d
jr nz, .asm_c9033 jr nz, .loop2
ret ret
BGEffect_CheckBattleTurn: ; c9038 (32:5038) BGEffect_CheckBattleTurn: ; c9038 (32:5038)

View File

@ -57,22 +57,22 @@ endm
; ANIM_OBJ_BURNED ; ANIM_OBJ_BURNED
battleanimobj $01, $90, BATTLEANIMFRAMESET_11, BATTLEANIMFUNC_03, $04, $03 battleanimobj $01, $90, BATTLEANIMFRAMESET_11, BATTLEANIMFUNC_03, $04, $03
; ANIM_OBJ_11 ; ANIM_OBJ_BLIZZARD
battleanimobj $01, $90, BATTLEANIMFRAMESET_12, BATTLEANIMFUNC_08, $06, $0a battleanimobj $01, $90, BATTLEANIMFRAMESET_12, BATTLEANIMFUNC_08, $06, $0a
; ANIM_OBJ_12 ; ANIM_OBJ_12
battleanimobj $01, $90, BATTLEANIMFRAMESET_13, BATTLEANIMFUNC_00, $06, $0a battleanimobj $01, $90, BATTLEANIMFRAMESET_13, BATTLEANIMFUNC_00, $06, $0a
; ANIM_OBJ_13 ; ANIM_OBJ_ICE_BEAM
battleanimobj $01, $90, BATTLEANIMFRAMESET_14, BATTLEANIMFUNC_01, $06, $0a battleanimobj $01, $90, BATTLEANIMFRAMESET_14, BATTLEANIMFUNC_01, $06, $0a
; ANIM_OBJ_14 ; ANIM_OBJ_RAZOR_LEAF
battleanimobj $21, $78, BATTLEANIMFRAMESET_16, BATTLEANIMFUNC_0B, $05, $06 battleanimobj $21, $78, BATTLEANIMFRAMESET_16, BATTLEANIMFUNC_RAZOR_LEAF, $05, $06
; ANIM_OBJ_POKE_BALL ; ANIM_OBJ_POKE_BALL
battleanimobj $00, $00, BATTLEANIMFRAMESET_09, BATTLEANIMFUNC_12, $04, $0b battleanimobj $00, $00, BATTLEANIMFRAMESET_09, BATTLEANIMFUNC_12, $04, $0b
; ANIM_OBJ_16 ; ANIM_OBJ_POKE_BALL_BLOCKED
battleanimobj $00, $00, BATTLEANIMFRAMESET_09, BATTLEANIMFUNC_13, $04, $0b battleanimobj $00, $00, BATTLEANIMFRAMESET_09, BATTLEANIMFUNC_13, $04, $0b
; ANIM_OBJ_17 ; ANIM_OBJ_17
@ -90,7 +90,7 @@ endm
; ANIM_OBJ_1B ; ANIM_OBJ_1B
battleanimobj $01, $90, BATTLEANIMFRAMESET_08, BATTLEANIMFUNC_00, $02, $07 battleanimobj $01, $90, BATTLEANIMFRAMESET_08, BATTLEANIMFUNC_00, $02, $07
; ANIM_OBJ_1C ; ANIM_OBJ_BALL_POOF
battleanimobj $01, $a0, BATTLEANIMFRAMESET_08, BATTLEANIMFUNC_00, $02, $07 battleanimobj $01, $a0, BATTLEANIMFRAMESET_08, BATTLEANIMFUNC_00, $02, $07
; ANIM_OBJ_1D ; ANIM_OBJ_1D
@ -105,7 +105,7 @@ endm
; ANIM_OBJ_20 ; ANIM_OBJ_20
battleanimobj $01, $b0, BATTLEANIMFRAMESET_84, BATTLEANIMFUNC_36, $06, $21 battleanimobj $01, $b0, BATTLEANIMFRAMESET_84, BATTLEANIMFUNC_36, $06, $21
; ANIM_OBJ_21 ; ANIM_OBJ_BUBBLE
battleanimobj $01, $90, BATTLEANIMFRAMESET_21, BATTLEANIMFUNC_0C, $06, $0d battleanimobj $01, $90, BATTLEANIMFRAMESET_21, BATTLEANIMFUNC_0C, $06, $0d
; ANIM_OBJ_22 ; ANIM_OBJ_22
@ -129,13 +129,13 @@ endm
; ANIM_OBJ_28 ; ANIM_OBJ_28
battleanimobj $61, $98, BATTLEANIMFRAMESET_2D, BATTLEANIMFUNC_09, $03, $10 battleanimobj $61, $98, BATTLEANIMFRAMESET_2D, BATTLEANIMFUNC_09, $03, $10
; ANIM_OBJ_29 ; ANIM_OBJ_ICE_BUILDUP
battleanimobj $01, $b8, BATTLEANIMFRAMESET_2E, BATTLEANIMFUNC_00, $06, $0a battleanimobj $01, $b8, BATTLEANIMFRAMESET_2E, BATTLEANIMFUNC_00, $06, $0a
; ANIM_OBJ_FROZEN ; ANIM_OBJ_FROZEN
battleanimobj $01, $b8, BATTLEANIMFRAMESET_2F, BATTLEANIMFUNC_00, $06, $0a battleanimobj $01, $b8, BATTLEANIMFRAMESET_2F, BATTLEANIMFUNC_00, $06, $0a
; ANIM_OBJ_2B ; ANIM_OBJ_MASTER_BALL_SPARKLE
battleanimobj $01, $b8, BATTLEANIMFRAMESET_30, BATTLEANIMFUNC_14, $07, $11 battleanimobj $01, $b8, BATTLEANIMFRAMESET_30, BATTLEANIMFUNC_14, $07, $11
; ANIM_OBJ_2C ; ANIM_OBJ_2C
@ -213,7 +213,7 @@ endm
; ANIM_OBJ_44 ; ANIM_OBJ_44
battleanimobj $21, $80, BATTLEANIMFRAMESET_4B, BATTLEANIMFUNC_00, $03, $11 battleanimobj $21, $80, BATTLEANIMFRAMESET_4B, BATTLEANIMFUNC_00, $03, $11
; ANIM_OBJ_45 ; ANIM_OBJ_ABSORB
battleanimobj $01, $88, BATTLEANIMFRAMESET_4C, BATTLEANIMFUNC_1C, $05, $12 battleanimobj $01, $88, BATTLEANIMFRAMESET_4C, BATTLEANIMFUNC_1C, $05, $12
; ANIM_OBJ_46 ; ANIM_OBJ_46
@ -228,8 +228,8 @@ endm
; ANIM_OBJ_49 ; ANIM_OBJ_49
battleanimobj $21, $ff, BATTLEANIMFRAMESET_54, BATTLEANIMFUNC_1F, $05, $16 battleanimobj $21, $ff, BATTLEANIMFRAMESET_54, BATTLEANIMFUNC_1F, $05, $16
; ANIM_OBJ_4A ; ANIM_OBJ_LEECH_SEED
battleanimobj $21, $68, BATTLEANIMFRAMESET_56, BATTLEANIMFUNC_20, $05, $06 battleanimobj $21, $68, BATTLEANIMFRAMESET_56, BATTLEANIMFUNC_LEECH_SEED, $05, $06
; ANIM_OBJ_4B ; ANIM_OBJ_4B
battleanimobj $21, $90, BATTLEANIMFRAMESET_59, BATTLEANIMFUNC_21, $02, $0e battleanimobj $21, $90, BATTLEANIMFRAMESET_59, BATTLEANIMFUNC_21, $02, $0e
@ -279,20 +279,20 @@ endm
; ANIM_OBJ_5A ; ANIM_OBJ_5A
battleanimobj $21, $90, BATTLEANIMFRAMESET_6A, BATTLEANIMFUNC_27, $02, $1b battleanimobj $21, $90, BATTLEANIMFRAMESET_6A, BATTLEANIMFUNC_27, $02, $1b
; ANIM_OBJ_5B ; ANIM_OBJ_HAZE
battleanimobj $00, $00, BATTLEANIMFRAMESET_6F, BATTLEANIMFUNC_29, $02, $1c battleanimobj $00, $00, BATTLEANIMFRAMESET_6F, BATTLEANIMFUNC_SPRIAL_DESCENT, $02, $1c
; ANIM_OBJ_5C ; ANIM_OBJ_MIST
battleanimobj $21, $48, BATTLEANIMFRAMESET_70, BATTLEANIMFUNC_29, $02, $1c battleanimobj $21, $48, BATTLEANIMFRAMESET_70, BATTLEANIMFUNC_SPRIAL_DESCENT, $02, $1c
; ANIM_OBJ_5D ; ANIM_OBJ_SMOG
battleanimobj $21, $48, BATTLEANIMFRAMESET_6F, BATTLEANIMFUNC_29, $02, $1c battleanimobj $21, $48, BATTLEANIMFRAMESET_6F, BATTLEANIMFUNC_SPRIAL_DESCENT, $02, $1c
; ANIM_OBJ_5E ; ANIM_OBJ_POISON_GAS
battleanimobj $21, $78, BATTLEANIMFRAMESET_6F, BATTLEANIMFUNC_2A, $02, $1c battleanimobj $21, $78, BATTLEANIMFRAMESET_6F, BATTLEANIMFUNC_POISON_GAS, $02, $1c
; ANIM_OBJ_5F ; ANIM_OBJ_HORN
battleanimobj $61, $90, BATTLEANIMFRAMESET_71, BATTLEANIMFUNC_2B, $02, $1d battleanimobj $61, $90, BATTLEANIMFRAMESET_71, BATTLEANIMFUNC_HORN, $02, $1d
; ANIM_OBJ_60 ; ANIM_OBJ_60
battleanimobj $61, $90, BATTLEANIMFRAMESET_72, BATTLEANIMFUNC_2C, $02, $1d battleanimobj $61, $90, BATTLEANIMFRAMESET_72, BATTLEANIMFUNC_2C, $02, $1d
@ -313,7 +313,7 @@ endm
battleanimobj $01, $80, BATTLEANIMFRAMESET_30, BATTLEANIMFUNC_2F, $02, $11 battleanimobj $01, $80, BATTLEANIMFRAMESET_30, BATTLEANIMFUNC_2F, $02, $11
; ANIM_OBJ_66 ; ANIM_OBJ_66
battleanimobj $01, $78, BATTLEANIMFRAMESET_76, BATTLEANIMFUNC_2A, $04, $23 battleanimobj $01, $78, BATTLEANIMFRAMESET_76, BATTLEANIMFUNC_POISON_GAS, $04, $23
; ANIM_OBJ_67 ; ANIM_OBJ_67
battleanimobj $01, $80, BATTLEANIMFRAMESET_77, BATTLEANIMFUNC_30, $02, $1f battleanimobj $01, $80, BATTLEANIMFRAMESET_77, BATTLEANIMFUNC_30, $02, $1f
@ -342,7 +342,7 @@ endm
; ANIM_OBJ_LICK ; ANIM_OBJ_LICK
battleanimobj $21, $98, BATTLEANIMFRAMESET_7C, BATTLEANIMFUNC_00, $02, $04 battleanimobj $21, $98, BATTLEANIMFRAMESET_7C, BATTLEANIMFUNC_00, $02, $04
; ANIM_OBJ_70 ; ANIM_OBJ_WITHDRAW
battleanimobj $21, $80, BATTLEANIMFRAMESET_7D, BATTLEANIMFUNC_00, $02, $18 battleanimobj $21, $80, BATTLEANIMFRAMESET_7D, BATTLEANIMFUNC_00, $02, $18
; ANIM_OBJ_71 ; ANIM_OBJ_71
@ -393,8 +393,8 @@ endm
; ANIM_OBJ_80 ; ANIM_OBJ_80
battleanimobj $01, $a8, BATTLEANIMFRAMESET_0F, BATTLEANIMFUNC_3C, $04, $03 battleanimobj $01, $a8, BATTLEANIMFRAMESET_0F, BATTLEANIMFUNC_3C, $04, $03
; ANIM_OBJ_81 ; ANIM_OBJ_COTTON_SPORE
battleanimobj $21, $68, BATTLEANIMFRAMESET_89, BATTLEANIMFUNC_29, $02, $1f battleanimobj $21, $68, BATTLEANIMFRAMESET_89, BATTLEANIMFUNC_SPRIAL_DESCENT, $02, $1f
; ANIM_OBJ_82 ; ANIM_OBJ_82
battleanimobj $21, $b0, BATTLEANIMFRAMESET_8A, BATTLEANIMFUNC_00, $02, $1f battleanimobj $21, $b0, BATTLEANIMFRAMESET_8A, BATTLEANIMFUNC_00, $02, $1f

View File

@ -13,26 +13,26 @@ DoBattleAnimFrame: ; ccfbe
; ccfce ; ccfce
.Jumptable: .Jumptable:
dw BattleAnimFunction_00 ; 00 dw BattleAnimFunction_Null ; 00
dw BattleAnimFunction_01 ; 01 dw BattleAnimFunction_01 ; 01
dw BattleAnimFunction_02 ; 02 dw BattleAnimFunction_02 ; 02
dw BattleAnimFunction_03 ; 03 dw BattleAnimFunction_03 ; 03
dw BattleAnimFunction_04 ; 04 dw BattleAnimFunction_04 ; 04
dw BattleAnimFunction_05 ; 05 dw BattleAnimFunction_ThrowFromPlayerToEnemy ; 05
dw BattleAnimFunction_06 ; 06 dw BattleAnimFunction_ThrowFromPlayerToEnemyAndDisappear ; 06
dw BattleAnimFunction_07 ; 07 dw BattleAnimFunction_07 ; 07
dw BattleAnimFunction_08 ; 08 dw BattleAnimFunction_08 ; 08
dw BattleAnimFunction_09 ; 09 dw BattleAnimFunction_09 ; 09
dw BattleAnimFunction_0A ; 0a dw BattleAnimFunction_0A ; 0a
dw BattleAnimFunction_0B ; 0b dw BattleAnimFunction_RazorLeaf ; 0b
dw BattleAnimFunction_0C ; 0c dw BattleAnimFunction_0C ; 0c
dw BattleAnimFunction_0D ; 0d dw BattleAnimFunction_0D ; 0d
dw BattleAnimFunction_0E ; 0e dw BattleAnimFunction_0E ; 0e
dw BattleAnimFunction_0F ; 0f dw BattleAnimFunction_0F ; 0f
dw BattleAnimFunction_10 ; 10 dw BattleAnimFunction_10 ; 10
dw BattleAnimFunction_11 ; 11 dw BattleAnimFunction_11 ; 11
dw BattleAnimFunction_12 ; 12 dw BattleAnimFunction_PokeBall ; 12
dw BattleAnimFunction_13 ; 13 dw BattleAnimFunction_PokeBallBlocked ; 13
dw BattleAnimFunction_14 ; 14 dw BattleAnimFunction_14 ; 14
dw BattleAnimFunction_15 ; 15 dw BattleAnimFunction_15 ; 15
dw BattleAnimFunction_16 ; 16 dw BattleAnimFunction_16 ; 16
@ -45,7 +45,7 @@ DoBattleAnimFrame: ; ccfbe
dw BattleAnimFunction_1D ; 1d dw BattleAnimFunction_1D ; 1d
dw BattleAnimFunction_1E ; 1e dw BattleAnimFunction_1E ; 1e
dw BattleAnimFunction_1F ; 1f dw BattleAnimFunction_1F ; 1f
dw BattleAnimFunction_20 ; 20 dw BattleAnimFunction_LeechSeed ; 20
dw BattleAnimFunction_21 ; 21 dw BattleAnimFunction_21 ; 21
dw BattleAnimFunction_22 ; 22 dw BattleAnimFunction_22 ; 22
dw BattleAnimFunction_23 ; 23 dw BattleAnimFunction_23 ; 23
@ -54,9 +54,9 @@ DoBattleAnimFrame: ; ccfbe
dw BattleAnimFunction_26 ; 26 dw BattleAnimFunction_26 ; 26
dw BattleAnimFunction_27 ; 27 dw BattleAnimFunction_27 ; 27
dw BattleAnimFunction_28 ; 28 dw BattleAnimFunction_28 ; 28
dw BattleAnimFunction_29 ; 29 dw BattleAnimFunction_SpiralDescent ; 29
dw BattleAnimFunction_2A ; 2a dw BattleAnimFunction_PoisonGas ; 2a
dw BattleAnimFunction_2B ; 2b dw BattleAnimFunction_Horn ; 2b
dw BattleAnimFunction_2C ; 2c dw BattleAnimFunction_2C ; 2c
dw BattleAnimFunction_2D ; 2d dw BattleAnimFunction_2D ; 2d
dw BattleAnimFunction_2E ; 2e dw BattleAnimFunction_2E ; 2e
@ -94,7 +94,7 @@ DoBattleAnimFrame: ; ccfbe
dw BattleAnimFunction_4E ; 4e dw BattleAnimFunction_4E ; 4e
dw BattleAnimFunction_4F ; 4f dw BattleAnimFunction_4F ; 4f
BattleAnimFunction_00: ; cd06e (33:506e) BattleAnimFunction_Null: ; cd06e (33:506e)
call BattleAnim_AnonJumptable call BattleAnim_AnonJumptable
.anon_dw .anon_dw
dw .zero dw .zero
@ -104,34 +104,41 @@ BattleAnimFunction_00: ; cd06e (33:506e)
.zero .zero
ret ret
BattleAnimFunction_06: ; cd079 (33:5079) BattleAnimFunction_ThrowFromPlayerToEnemyAndDisappear: ; cd079 (33:5079)
call BattleAnimFunction_05 call BattleAnimFunction_ThrowFromPlayerToEnemy
ret c ret c
call DeinitBattleAnimation call DeinitBattleAnimation
ret ret
BattleAnimFunction_05: ; cd081 (33:5081) BattleAnimFunction_ThrowFromPlayerToEnemy: ; cd081 (33:5081)
; If x coord at $88 or beyond, abort.
ld hl, BATTLEANIMSTRUCT_XCOORD ld hl, BATTLEANIMSTRUCT_XCOORD
add hl, bc add hl, bc
ld a, [hl] ld a, [hl]
cp $88 cp $88
ret nc ret nc
; Move right 2 pixels
add $2 add $2
ld [hl], a ld [hl], a
; Move down 1 pixel
ld hl, BATTLEANIMSTRUCT_YCOORD ld hl, BATTLEANIMSTRUCT_YCOORD
add hl, bc add hl, bc
dec [hl] dec [hl]
; Decrease ??? and hold onto its previous value (argument of the sine function)
ld hl, BATTLEANIMSTRUCT_0F ld hl, BATTLEANIMSTRUCT_0F
add hl, bc add hl, bc
ld a, [hl] ld a, [hl]
dec [hl] dec [hl]
; Get ???, which is the amplitude of the sine function
ld hl, BATTLEANIMSTRUCT_0B ld hl, BATTLEANIMSTRUCT_0B
add hl, bc add hl, bc
ld d, [hl] ld d, [hl]
call BattleAnim_Sine call BattleAnim_Sine
; Store the result in the Y offset
ld hl, BATTLEANIMSTRUCT_YOFFSET ld hl, BATTLEANIMSTRUCT_YOFFSET
add hl, bc add hl, bc
ld [hl], a ld [hl], a
; Carry flag denotes success
scf scf
ret ret
@ -153,9 +160,10 @@ BattleAnimFunction_04: ; cd0a6 (33:50a6)
ld hl, BATTLEANIMSTRUCT_0F ld hl, BATTLEANIMSTRUCT_0F
add hl, bc add hl, bc
ld a, [hl] ld a, [hl]
rept 4
inc [hl] inc [hl]
endr inc [hl]
inc [hl]
inc [hl]
ld d, $10 ld d, $10
push af push af
push de push de
@ -258,7 +266,7 @@ BattleAnimFunction_02: ; cd146 (33:5146)
call DeinitBattleAnimation call DeinitBattleAnimation
ret ret
BattleAnimFunction_12: ; cd15c (33:515c) BattleAnimFunction_PokeBall: ; cd15c (33:515c)
call BattleAnim_AnonJumptable call BattleAnim_AnonJumptable
.anon_dw .anon_dw
dw .zero dw .zero
@ -273,13 +281,13 @@ BattleAnimFunction_12: ; cd15c (33:515c)
dw .nine dw .nine
dw .ten dw .ten
dw .eleven dw .eleven
.zero .zero ; init
call GetBallAnimPal call GetBallAnimPal
call BattleAnim_IncAnonJumptableIndex call BattleAnim_IncAnonJumptableIndex
ret ret
.one .one
call BattleAnimFunction_05 call BattleAnimFunction_ThrowFromPlayerToEnemy
ret c ret c
ld hl, BATTLEANIMSTRUCT_YOFFSET ld hl, BATTLEANIMSTRUCT_YOFFSET
add hl, bc add hl, bc
@ -288,14 +296,14 @@ BattleAnimFunction_12: ; cd15c (33:515c)
add hl, bc add hl, bc
add [hl] add [hl]
ld [hl], a ld [hl], a
ld a, $b ld a, BATTLEANIMFRAMESET_0B
call ReinitBattleAnimFrameset call ReinitBattleAnimFrameset
call BattleAnim_IncAnonJumptableIndex call BattleAnim_IncAnonJumptableIndex
ret ret
.three .three
call BattleAnim_IncAnonJumptableIndex call BattleAnim_IncAnonJumptableIndex
ld a, $9 ld a, BATTLEANIMFRAMESET_09
call ReinitBattleAnimFrameset call ReinitBattleAnimFrameset
ld hl, BATTLEANIMSTRUCT_0F ld hl, BATTLEANIMSTRUCT_0F
add hl, bc add hl, bc
@ -325,13 +333,13 @@ BattleAnimFunction_12: ; cd15c (33:515c)
sub $4 sub $4
ld [hl], a ld [hl], a
ret nz ret nz
ld a, $c ld a, BATTLEANIMFRAMESET_0C
call ReinitBattleAnimFrameset call ReinitBattleAnimFrameset
call BattleAnim_IncAnonJumptableIndex call BattleAnim_IncAnonJumptableIndex
ret ret
.six .six
ld a, $d ld a, BATTLEANIMFRAMESET_0D
call ReinitBattleAnimFrameset call ReinitBattleAnimFrameset
ld hl, BATTLEANIMSTRUCT_ANON_JT_INDEX ld hl, BATTLEANIMSTRUCT_ANON_JT_INDEX
add hl, bc add hl, bc
@ -343,7 +351,7 @@ BattleAnimFunction_12: ; cd15c (33:515c)
.seven .seven
call GetBallAnimPal call GetBallAnimPal
ld a, $a ld a, BATTLEANIMFRAMESET_0A
call ReinitBattleAnimFrameset call ReinitBattleAnimFrameset
call BattleAnim_IncAnonJumptableIndex call BattleAnim_IncAnonJumptableIndex
ld hl, BATTLEANIMSTRUCT_10 ld hl, BATTLEANIMSTRUCT_10
@ -375,7 +383,7 @@ BattleAnimFunction_12: ; cd15c (33:515c)
call DeinitBattleAnimation call DeinitBattleAnimation
ret ret
BattleAnimFunction_13: ; cd212 (33:5212) BattleAnimFunction_PokeBallBlocked: ; cd212 (33:5212)
call BattleAnim_AnonJumptable call BattleAnim_AnonJumptable
.anon_dw .anon_dw
dw .zero dw .zero
@ -392,7 +400,7 @@ BattleAnimFunction_13: ; cd212 (33:5212)
ld a, [hl] ld a, [hl]
cp $70 cp $70
jr nc, .next jr nc, .next
call BattleAnimFunction_05 call BattleAnimFunction_ThrowFromPlayerToEnemy
ret ret
.next .next
@ -493,7 +501,7 @@ BattleAnimFunction_10: ; cd284 (33:5284)
.three .three
call BattleAnim_IncAnonJumptableIndex call BattleAnim_IncAnonJumptableIndex
ld a, $f ld a, BATTLEANIMFRAMESET_0F
call ReinitBattleAnimFrameset call ReinitBattleAnimFrameset
.four .four
ret ret
@ -727,7 +735,7 @@ BattleAnimFunction_0A: ; cd3f2 (33:53f2)
ld [hl], a ld [hl], a
cp $7 cp $7
jr z, .seven jr z, .seven
ld a, $11 ld a, BATTLEANIMFRAMESET_11
call ReinitBattleAnimFrameset call ReinitBattleAnimFrameset
ret ret
@ -746,7 +754,7 @@ BattleAnimFunction_0A: ; cd3f2 (33:53f2)
.set_up_eight .set_up_eight
call BattleAnim_IncAnonJumptableIndex call BattleAnim_IncAnonJumptableIndex
ld a, $10 ld a, BATTLEANIMFRAMESET_10
call ReinitBattleAnimFrameset call ReinitBattleAnimFrameset
.eight .eight
ld hl, BATTLEANIMSTRUCT_0F ld hl, BATTLEANIMSTRUCT_0F
@ -801,7 +809,7 @@ BattleAnimFunction_0A: ; cd3f2 (33:53f2)
.six .six
ret ret
BattleAnimFunction_0B: ; cd478 (33:5478) BattleAnimFunction_RazorLeaf: ; cd478 (33:5478)
call BattleAnim_AnonJumptable call BattleAnim_AnonJumptable
.anon_dw .anon_dw
dw .zero dw .zero
@ -830,7 +838,7 @@ BattleAnimFunction_0B: ; cd478 (33:5478)
add hl, bc add hl, bc
ld [hli], a ld [hli], a
ld [hl], a ld [hl], a
ld a, $17 ld a, BATTLEANIMFRAMESET_17
call ReinitBattleAnimFrameset call ReinitBattleAnimFrameset
ld hl, BATTLEANIMSTRUCT_0B ld hl, BATTLEANIMSTRUCT_0B
add hl, bc add hl, bc
@ -926,7 +934,7 @@ BattleAnimFunction_0B: ; cd478 (33:5478)
ret ret
.three .three
ld a, $16 ld a, BATTLEANIMFRAMESET_16
call ReinitBattleAnimFrameset call ReinitBattleAnimFrameset
ld hl, BATTLEANIMSTRUCT_01 ld hl, BATTLEANIMSTRUCT_01
add hl, bc add hl, bc
@ -1077,7 +1085,7 @@ BattleAnimFunction_0C: ; cd5e9 (33:55e9)
ld hl, BATTLEANIMSTRUCT_0F ld hl, BATTLEANIMSTRUCT_0F
add hl, bc add hl, bc
ld [hl], $0 ld [hl], $0
ld a, $22 ld a, BATTLEANIMFRAMESET_22
call ReinitBattleAnimFrameset call ReinitBattleAnimFrameset
.two .two
ld hl, BATTLEANIMSTRUCT_XCOORD ld hl, BATTLEANIMSTRUCT_XCOORD
@ -1145,9 +1153,9 @@ BattleAnimFunction_0D: ; cd66a (33:566a)
ld a, $42 ld a, $42
ld [hFFC6], a ld [hFFC6], a
ld a, $58 ld a, $58
ld [hFFC7], a ld [hLYOverrideStart], a
ld a, $5e ld a, $5e
ld [hFFC8], a ld [hLYOverrideEnd], a
ret ret
.one .one
@ -1161,7 +1169,7 @@ BattleAnimFunction_0D: ; cd66a (33:566a)
jr nc, .asm_cd69b jr nc, .asm_cd69b
call BattleAnim_IncAnonJumptableIndex call BattleAnim_IncAnonJumptableIndex
xor a xor a
ld [hFFC7], a ld [hLYOverrideStart], a
ret ret
.asm_cd69b .asm_cd69b
@ -1180,7 +1188,7 @@ BattleAnimFunction_0D: ; cd66a (33:566a)
add [hl] add [hl]
sub $10 sub $10
ret c ret c
ld [hFFC7], a ld [hLYOverrideStart], a
ld hl, BATTLEANIMSTRUCT_XOFFSET ld hl, BATTLEANIMSTRUCT_XOFFSET
add hl, bc add hl, bc
ld a, [hl] ld a, [hl]
@ -1202,8 +1210,8 @@ BattleAnimFunction_0D: ; cd66a (33:566a)
jr c, asm_cd6da jr c, asm_cd6da
xor a xor a
ld [hFFC6], a ld [hFFC6], a
ld [hFFC7], a ld [hLYOverrideStart], a
ld [hFFC8], a ld [hLYOverrideEnd], a
.four .four
call DeinitBattleAnimation call DeinitBattleAnimation
ret ret
@ -1214,7 +1222,7 @@ asm_cd6da: ; cd6da (33:56da)
ld [hl], a ld [hl], a
sub $10 sub $10
ret c ret c
ld [hFFC7], a ld [hLYOverrideStart], a
ret ret
BattleAnimFunction_0E: ; cd6e3 (33:56e3) BattleAnimFunction_0E: ; cd6e3 (33:56e3)
@ -1226,8 +1234,8 @@ Functioncd6ea: ; cd6ea (33:56ea)
call BattleAnim_IncAnonJumptableIndex call BattleAnim_IncAnonJumptableIndex
ld hl, BATTLEANIMSTRUCT_0B ld hl, BATTLEANIMSTRUCT_0B
add hl, bc add hl, bc
ld a, $24 ld a, BATTLEANIMFRAMESET_24
add [hl] add [hl] ; offset
call ReinitBattleAnimFrameset call ReinitBattleAnimFrameset
Functioncd6f7: ; cd6f7 (33:56f7) Functioncd6f7: ; cd6f7 (33:56f7)
ld hl, BATTLEANIMSTRUCT_XCOORD ld hl, BATTLEANIMSTRUCT_XCOORD
@ -1282,7 +1290,7 @@ Functioncd728: ; cd728 (33:5728)
.asm_cd747 .asm_cd747
call BattleAnim_IncAnonJumptableIndex call BattleAnim_IncAnonJumptableIndex
ld a, $28 ld a, BATTLEANIMFRAMESET_28
call ReinitBattleAnimFrameset call ReinitBattleAnimFrameset
ld hl, BATTLEANIMSTRUCT_YOFFSET ld hl, BATTLEANIMSTRUCT_YOFFSET
add hl, bc add hl, bc
@ -1306,7 +1314,7 @@ Functioncd763: ; cd763 (33:5763)
.asm_cd76e .asm_cd76e
call BattleAnim_IncAnonJumptableIndex call BattleAnim_IncAnonJumptableIndex
ld a, $29 ld a, BATTLEANIMFRAMESET_29
call ReinitBattleAnimFrameset call ReinitBattleAnimFrameset
Functioncd776: ; cd776 (33:5776) Functioncd776: ; cd776 (33:5776)
ret ret
@ -1419,7 +1427,7 @@ BattleAnimFunction_15: ; cd80c (33:580c)
dw Functioncd820 dw Functioncd820
Functioncd817: ; cd817 (33:5817) Functioncd817: ; cd817 (33:5817)
call BattleAnim_IncAnonJumptableIndex call BattleAnim_IncAnonJumptableIndex
ld a, $35 ld a, BATTLEANIMFRAMESET_35
call ReinitBattleAnimFrameset call ReinitBattleAnimFrameset
Functioncd81f: ; cd81f (33:581f) Functioncd81f: ; cd81f (33:581f)
ret ret
@ -1477,18 +1485,18 @@ Functioncd860: ; cd860 (33:5860)
add hl, bc add hl, bc
ld [hl], a ld [hl], a
bit 7, a bit 7, a
jr nz, .asm_cd87e jr nz, .load_no_inc
ld hl, BATTLEANIMSTRUCT_10 ld hl, BATTLEANIMSTRUCT_10
add hl, bc add hl, bc
ld a, [hl] ld a, [hl]
inc a inc a
jr .asm_cd883 jr .reinit
.asm_cd87e .load_no_inc
ld hl, BATTLEANIMSTRUCT_10 ld hl, BATTLEANIMSTRUCT_10
add hl, bc add hl, bc
ld a, [hl] ld a, [hl]
.asm_cd883 .reinit
call ReinitBattleAnimFrameset call ReinitBattleAnimFrameset
ld hl, BATTLEANIMSTRUCT_0F ld hl, BATTLEANIMSTRUCT_0F
add hl, bc add hl, bc
@ -1800,50 +1808,50 @@ Functioncda3a: ; cda3a (33:5a3a)
Functioncda4c: ; cda4c (33:5a4c) Functioncda4c: ; cda4c (33:5a4c)
ret ret
BattleAnimFunction_20: ; cda4d (33:5a4d) BattleAnimFunction_LeechSeed: ; cda4d (33:5a4d)
call BattleAnim_AnonJumptable call BattleAnim_AnonJumptable
.anon_dw .anon_dw
dw Functioncda58 dw .zero
dw Functioncda62 dw .one
dw Functioncda7a dw .two
dw Functioncda8c dw .three
Functioncda58: ; cda58 (33:5a58) .zero: ; cda58 (33:5a58)
call BattleAnim_IncAnonJumptableIndex call BattleAnim_IncAnonJumptableIndex
ld hl, BATTLEANIMSTRUCT_10 ld hl, BATTLEANIMSTRUCT_10
add hl, bc add hl, bc
ld [hl], $40 ld [hl], $40
ret ret
Functioncda62: ; cda62 (33:5a62) .one: ; cda62 (33:5a62)
ld hl, BATTLEANIMSTRUCT_10 ld hl, BATTLEANIMSTRUCT_10
add hl, bc add hl, bc
ld a, [hl] ld a, [hl]
cp $20 cp $20
jr c, .asm_cda6f jr c, .sprout
call Functioncda8d call Functioncda8d
ret ret
.asm_cda6f .sprout
ld [hl], $40 ld [hl], $40
ld a, $57 ld a, BATTLEANIMFRAMESET_57
call ReinitBattleAnimFrameset call ReinitBattleAnimFrameset
call BattleAnim_IncAnonJumptableIndex call BattleAnim_IncAnonJumptableIndex
ret ret
Functioncda7a: ; cda7a (33:5a7a) .two: ; cda7a (33:5a7a)
ld hl, BATTLEANIMSTRUCT_10 ld hl, BATTLEANIMSTRUCT_10
add hl, bc add hl, bc
ld a, [hl] ld a, [hl]
and a and a
jr z, .asm_cda84 jr z, .flutter
dec [hl] dec [hl]
ret ret
.asm_cda84 .flutter
call BattleAnim_IncAnonJumptableIndex call BattleAnim_IncAnonJumptableIndex
ld a, $58 ld a, BATTLEANIMFRAMESET_58
call ReinitBattleAnimFrameset call ReinitBattleAnimFrameset
Functioncda8c: ; cda8c (33:5a8c) .three: ; cda8c (33:5a8c)
ret ret
Functioncda8d: ; cda8d (33:5a8d) Functioncda8d: ; cda8d (33:5a8d)
@ -2124,7 +2132,7 @@ Functioncdc1a: ; cdc1a (33:5c1a)
ret ret
Functioncdc1e: ; cdc1e (33:5c1e) Functioncdc1e: ; cdc1e (33:5c1e)
ld a, $4e ld a, BATTLEANIMFRAMESET_4E
call ReinitBattleAnimFrameset call ReinitBattleAnimFrameset
call BattleAnim_IncAnonJumptableIndex call BattleAnim_IncAnonJumptableIndex
ret ret
@ -2143,7 +2151,7 @@ Functioncdc27: ; cdc27 (33:5c27)
ret ret
Functioncdc39: ; cdc39 (33:5c39) Functioncdc39: ; cdc39 (33:5c39)
ld a, $50 ld a, BATTLEANIMFRAMESET_50
call ReinitBattleAnimFrameset call ReinitBattleAnimFrameset
ld hl, BATTLEANIMSTRUCT_YOFFSET ld hl, BATTLEANIMSTRUCT_YOFFSET
add hl, bc add hl, bc
@ -2152,7 +2160,7 @@ Functioncdc39: ; cdc39 (33:5c39)
ret ret
Functioncdc48: ; cdc48 (33:5c48) Functioncdc48: ; cdc48 (33:5c48)
ld a, $4f ld a, BATTLEANIMFRAMESET_4F
call ReinitBattleAnimFrameset call ReinitBattleAnimFrameset
call BattleAnim_IncAnonJumptableIndex call BattleAnim_IncAnonJumptableIndex
ld hl, BATTLEANIMSTRUCT_0F ld hl, BATTLEANIMSTRUCT_0F
@ -2258,7 +2266,7 @@ Functioncdcca: ; cdcca (33:5cca)
ld [hl], $8 ld [hl], $8
ld hl, BATTLEANIMSTRUCT_0B ld hl, BATTLEANIMSTRUCT_0B
add hl, bc add hl, bc
ld a, $59 ld a, BATTLEANIMFRAMESET_59
add [hl] add [hl]
call ReinitBattleAnimFrameset call ReinitBattleAnimFrameset
ret ret
@ -2330,7 +2338,7 @@ Functioncdd31: ; cdd31 (33:5d31)
and $80 and $80
rlca rlca
ld [hl], a ld [hl], a
add $5d add BATTLEANIMFRAMESET_5D
call ReinitBattleAnimFrameset call ReinitBattleAnimFrameset
ret ret
@ -2456,7 +2464,7 @@ Functioncde02: ; cde02 (33:5e02)
ld hl, BATTLEANIMSTRUCT_0B ld hl, BATTLEANIMSTRUCT_0B
add hl, bc add hl, bc
ld a, [hl] ld a, [hl]
add $63 add BATTLEANIMFRAMESET_63
call ReinitBattleAnimFrameset call ReinitBattleAnimFrameset
ld hl, BATTLEANIMSTRUCT_0B ld hl, BATTLEANIMSTRUCT_0B
add hl, bc add hl, bc
@ -2540,7 +2548,7 @@ Functioncde72: ; cde72 (33:5e72)
add hl, bc add hl, bc
set 6, [hl] set 6, [hl]
.asm_cde83 .asm_cde83
add $6a add BATTLEANIMFRAMESET_6A
call ReinitBattleAnimFrameset call ReinitBattleAnimFrameset
Functioncde88: ; cde88 (33:5e88) Functioncde88: ; cde88 (33:5e88)
ret ret
@ -2578,7 +2586,7 @@ Functioncde90: ; cde90 (33:5e90)
xor $ff xor $ff
inc a inc a
ld [hl], a ld [hl], a
ld a, $6e ld a, BATTLEANIMFRAMESET_6E
call ReinitBattleAnimFrameset call ReinitBattleAnimFrameset
ret ret
@ -2606,7 +2614,7 @@ Functioncdebf: ; cdebf (33:5ebf)
ld [hl], a ld [hl], a
ret ret
BattleAnimFunction_29: ; cdedd (33:5edd) BattleAnimFunction_SpiralDescent: ; cdedd (33:5edd)
ld hl, BATTLEANIMSTRUCT_0F ld hl, BATTLEANIMSTRUCT_0F
add hl, bc add hl, bc
ld a, [hl] ld a, [hl]
@ -2639,11 +2647,11 @@ BattleAnimFunction_29: ; cdedd (33:5edd)
add hl, bc add hl, bc
ld a, [hl] ld a, [hl]
cp $28 cp $28
jr nc, .asm_cdf17 jr nc, .delete
inc [hl] inc [hl]
ret ret
.asm_cdf17 .delete
call DeinitBattleAnimation call DeinitBattleAnimation
ret ret
@ -2688,17 +2696,17 @@ BattleAnimFunction_2D: ; cdf1b (33:5f1b)
call DeinitBattleAnimation call DeinitBattleAnimation
ret ret
BattleAnimFunction_2A: ; cdf59 (33:5f59) BattleAnimFunction_PoisonGas: ; cdf59 (33:5f59)
call BattleAnim_AnonJumptable call BattleAnim_AnonJumptable
.anon_dw .anon_dw
dw Functioncdf60 dw Functioncdf60
dw BattleAnimFunction_29 dw BattleAnimFunction_SpiralDescent
Functioncdf60: ; cdf60 (33:5f60) Functioncdf60: ; cdf60 (33:5f60)
ld hl, BATTLEANIMSTRUCT_XCOORD ld hl, BATTLEANIMSTRUCT_XCOORD
add hl, bc add hl, bc
ld a, [hl] ld a, [hl]
cp $84 cp $84
jr nc, .asm_cdf88 jr nc, .next
inc [hl] inc [hl]
ld hl, BATTLEANIMSTRUCT_0F ld hl, BATTLEANIMSTRUCT_0F
add hl, bc add hl, bc
@ -2719,7 +2727,7 @@ Functioncdf60: ; cdf60 (33:5f60)
dec [hl] dec [hl]
ret ret
.asm_cdf88 .next
call BattleAnim_IncAnonJumptableIndex call BattleAnim_IncAnonJumptableIndex
ret ret
@ -2865,14 +2873,14 @@ Functionce05f: ; ce05f (33:605f)
call DeinitBattleAnimation call DeinitBattleAnimation
ret ret
BattleAnimFunction_2B: ; ce063 (33:6063) BattleAnimFunction_Horn: ; ce063 (33:6063)
call BattleAnim_AnonJumptable call BattleAnim_AnonJumptable
.anon_dw .anon_dw
dw Functionce06e dw .zero
dw Functionce083 dw .one
dw Functionce091 dw .two
dw Functionce09e dw Functionce09e
Functionce06e: ; ce06e (33:606e) .zero: ; ce06e (33:606e)
ld hl, BATTLEANIMSTRUCT_0B ld hl, BATTLEANIMSTRUCT_0B
add hl, bc add hl, bc
ld a, [hl] ld a, [hl]
@ -2887,7 +2895,7 @@ Functionce06e: ; ce06e (33:606e)
ld [hl], a ld [hl], a
ret ret
Functionce083: ; ce083 (33:6083) .one: ; ce083 (33:6083)
ld hl, BATTLEANIMSTRUCT_XCOORD ld hl, BATTLEANIMSTRUCT_XCOORD
add hl, bc add hl, bc
ld a, [hl] ld a, [hl]
@ -2897,7 +2905,7 @@ Functionce083: ; ce083 (33:6083)
call Functionce70a call Functionce70a
ret ret
Functionce091: ; ce091 (33:6091) .two: ; ce091 (33:6091)
ld hl, BATTLEANIMSTRUCT_10 ld hl, BATTLEANIMSTRUCT_10
add hl, bc add hl, bc
ld a, [hl] ld a, [hl]
@ -3395,7 +3403,7 @@ Functionce366: ; ce366 (33:6366)
add hl, bc add hl, bc
ld a, [hl] ld a, [hl]
and $7f and $7f
add $81 add BATTLEANIMFRAMESET_81
call ReinitBattleAnimFrameset call ReinitBattleAnimFrameset
Functionce375: ; ce375 (33:6375) Functionce375: ; ce375 (33:6375)
ld hl, BATTLEANIMSTRUCT_0B ld hl, BATTLEANIMSTRUCT_0B
@ -3437,7 +3445,7 @@ Functionce39c: ; ce39c (33:639c)
.asm_ce3a6 .asm_ce3a6
call BattleAnim_IncAnonJumptableIndex call BattleAnim_IncAnonJumptableIndex
ld a, $20 ld a, BATTLEANIMFRAMESET_20
call ReinitBattleAnimFrameset call ReinitBattleAnimFrameset
Functionce3ae: ; ce3ae (33:63ae) Functionce3ae: ; ce3ae (33:63ae)
ld hl, BATTLEANIMSTRUCT_YOFFSET ld hl, BATTLEANIMSTRUCT_YOFFSET
@ -3611,7 +3619,7 @@ Functionce4a3: ; ce4a3 (33:64a3)
call BattleAnim_IncAnonJumptableIndex call BattleAnim_IncAnonJumptableIndex
ld hl, BATTLEANIMSTRUCT_0B ld hl, BATTLEANIMSTRUCT_0B
add hl, bc add hl, bc
ld a, $24 ld a, BATTLEANIMFRAMESET_24
add [hl] add [hl]
call ReinitBattleAnimFrameset call ReinitBattleAnimFrameset
Functionce4b0: ; ce4b0 (33:64b0) Functionce4b0: ; ce4b0 (33:64b0)
@ -3832,13 +3840,14 @@ BattleAnimFunction_48: ; ce5dc (33:65dc)
add hl, bc add hl, bc
ld a, [hl] ld a, [hl]
cp $d0 cp $d0
jr z, .asm_ce5ea jr z, .disappear
rept 4 dec [hl]
dec [hl]
dec [hl]
dec [hl] dec [hl]
endr
ret ret
.asm_ce5ea .disappear
call DeinitBattleAnimation call DeinitBattleAnimation
ret ret
@ -3865,9 +3874,10 @@ Functionce60a: ; ce60a (33:660a)
ld a, [hl] ld a, [hl]
cp $4 cp $4
jr z, Functionce618 jr z, Functionce618
rept 4
inc [hl] inc [hl]
endr inc [hl]
inc [hl]
inc [hl]
ret ret
Functionce618: ; ce618 (33:6618) Functionce618: ; ce618 (33:6618)
@ -3883,9 +3893,10 @@ Functionce622: ; ce622 (33:6622)
ld a, [hl] ld a, [hl]
cp $d8 cp $d8
ret z ret z
rept 4
dec [hl] dec [hl]
endr dec [hl]
dec [hl]
dec [hl]
ret ret
BattleAnimFunction_4A: ; ce62f (33:662f) BattleAnimFunction_4A: ; ce62f (33:662f)
@ -4085,6 +4096,7 @@ BattleAnim_IncAnonJumptableIndex: ; ce72c (33:672c)
BattleAnim_Cosine: ; ce732 (33:6732) BattleAnim_Cosine: ; ce732 (33:6732)
add $10 add $10
BattleAnim_Sine: ; ce734 (33:6734) BattleAnim_Sine: ; ce734 (33:6734)
; a = d sin a
and $3f and $3f
cp $20 cp $20
jr nc, .negative jr nc, .negative

View File

@ -43,23 +43,23 @@ BATTLEANIMSTRUCT_LENGTH EQU const_value
const ANIM_OBJ_0E const ANIM_OBJ_0E
const ANIM_OBJ_0F const ANIM_OBJ_0F
const ANIM_OBJ_BURNED const ANIM_OBJ_BURNED
const ANIM_OBJ_11 const ANIM_OBJ_BLIZZARD
const ANIM_OBJ_12 const ANIM_OBJ_12
const ANIM_OBJ_13 const ANIM_OBJ_ICE_BEAM
const ANIM_OBJ_14 const ANIM_OBJ_RAZOR_LEAF
const ANIM_OBJ_POKE_BALL const ANIM_OBJ_POKE_BALL
const ANIM_OBJ_16 const ANIM_OBJ_POKE_BALL_BLOCKED
const ANIM_OBJ_17 const ANIM_OBJ_17
const ANIM_OBJ_18 const ANIM_OBJ_18
const ANIM_OBJ_19 const ANIM_OBJ_19
const ANIM_OBJ_1A const ANIM_OBJ_1A
const ANIM_OBJ_1B const ANIM_OBJ_1B
const ANIM_OBJ_1C const ANIM_OBJ_BALL_POOF
const ANIM_OBJ_1D const ANIM_OBJ_1D
const ANIM_OBJ_1E const ANIM_OBJ_1E
const ANIM_OBJ_1F const ANIM_OBJ_1F
const ANIM_OBJ_20 const ANIM_OBJ_20
const ANIM_OBJ_21 const ANIM_OBJ_BUBBLE
const ANIM_OBJ_22 const ANIM_OBJ_22
const ANIM_OBJ_23 const ANIM_OBJ_23
const ANIM_OBJ_24 const ANIM_OBJ_24
@ -67,9 +67,9 @@ BATTLEANIMSTRUCT_LENGTH EQU const_value
const ANIM_OBJ_26 const ANIM_OBJ_26
const ANIM_OBJ_27 const ANIM_OBJ_27
const ANIM_OBJ_28 const ANIM_OBJ_28
const ANIM_OBJ_29 const ANIM_OBJ_ICE_BUILDUP
const ANIM_OBJ_FROZEN const ANIM_OBJ_FROZEN
const ANIM_OBJ_2B const ANIM_OBJ_MASTER_BALL_SPARKLE
const ANIM_OBJ_2C const ANIM_OBJ_2C
const ANIM_OBJ_2D const ANIM_OBJ_2D
const ANIM_OBJ_2E const ANIM_OBJ_2E
@ -95,12 +95,12 @@ BATTLEANIMSTRUCT_LENGTH EQU const_value
const ANIM_OBJ_42 const ANIM_OBJ_42
const ANIM_OBJ_43 const ANIM_OBJ_43
const ANIM_OBJ_44 const ANIM_OBJ_44
const ANIM_OBJ_45 const ANIM_OBJ_ABSORB
const ANIM_OBJ_46 const ANIM_OBJ_46
const ANIM_OBJ_47 const ANIM_OBJ_47
const ANIM_OBJ_48 const ANIM_OBJ_48
const ANIM_OBJ_49 const ANIM_OBJ_49
const ANIM_OBJ_4A const ANIM_OBJ_LEECH_SEED
const ANIM_OBJ_4B const ANIM_OBJ_4B
const ANIM_OBJ_4C const ANIM_OBJ_4C
const ANIM_OBJ_4D const ANIM_OBJ_4D
@ -117,11 +117,11 @@ BATTLEANIMSTRUCT_LENGTH EQU const_value
const ANIM_OBJ_58 const ANIM_OBJ_58
const ANIM_OBJ_PARALYZED const ANIM_OBJ_PARALYZED
const ANIM_OBJ_5A const ANIM_OBJ_5A
const ANIM_OBJ_5B const ANIM_OBJ_HAZE
const ANIM_OBJ_5C const ANIM_OBJ_MIST
const ANIM_OBJ_5D const ANIM_OBJ_SMOG
const ANIM_OBJ_5E const ANIM_OBJ_POISON_GAS
const ANIM_OBJ_5F const ANIM_OBJ_HORN
const ANIM_OBJ_60 const ANIM_OBJ_60
const ANIM_OBJ_61 const ANIM_OBJ_61
const ANIM_OBJ_62 const ANIM_OBJ_62
@ -138,7 +138,7 @@ BATTLEANIMSTRUCT_LENGTH EQU const_value
const ANIM_OBJ_6D const ANIM_OBJ_6D
const ANIM_OBJ_SKY_ATTACK_FEAROW const ANIM_OBJ_SKY_ATTACK_FEAROW
const ANIM_OBJ_LICK const ANIM_OBJ_LICK
const ANIM_OBJ_70 const ANIM_OBJ_WITHDRAW
const ANIM_OBJ_71 const ANIM_OBJ_71
const ANIM_OBJ_72 const ANIM_OBJ_72
const ANIM_OBJ_73 const ANIM_OBJ_73
@ -155,7 +155,7 @@ BATTLEANIMSTRUCT_LENGTH EQU const_value
const ANIM_OBJ_HEART const ANIM_OBJ_HEART
const ANIM_OBJ_7F const ANIM_OBJ_7F
const ANIM_OBJ_80 const ANIM_OBJ_80
const ANIM_OBJ_81 const ANIM_OBJ_COTTON_SPORE
const ANIM_OBJ_82 const ANIM_OBJ_82
const ANIM_OBJ_83 const ANIM_OBJ_83
const ANIM_OBJ_84 const ANIM_OBJ_84
@ -227,7 +227,7 @@ BATTLEANIMSTRUCT_LENGTH EQU const_value
const BATTLEANIMFUNC_08 const BATTLEANIMFUNC_08
const BATTLEANIMFUNC_09 const BATTLEANIMFUNC_09
const BATTLEANIMFUNC_0A const BATTLEANIMFUNC_0A
const BATTLEANIMFUNC_0B const BATTLEANIMFUNC_RAZOR_LEAF
const BATTLEANIMFUNC_0C const BATTLEANIMFUNC_0C
const BATTLEANIMFUNC_0D const BATTLEANIMFUNC_0D
const BATTLEANIMFUNC_0E const BATTLEANIMFUNC_0E
@ -248,7 +248,7 @@ BATTLEANIMSTRUCT_LENGTH EQU const_value
const BATTLEANIMFUNC_1D const BATTLEANIMFUNC_1D
const BATTLEANIMFUNC_1E const BATTLEANIMFUNC_1E
const BATTLEANIMFUNC_1F const BATTLEANIMFUNC_1F
const BATTLEANIMFUNC_20 const BATTLEANIMFUNC_LEECH_SEED
const BATTLEANIMFUNC_21 const BATTLEANIMFUNC_21
const BATTLEANIMFUNC_22 const BATTLEANIMFUNC_22
const BATTLEANIMFUNC_23 const BATTLEANIMFUNC_23
@ -257,9 +257,9 @@ BATTLEANIMSTRUCT_LENGTH EQU const_value
const BATTLEANIMFUNC_26 const BATTLEANIMFUNC_26
const BATTLEANIMFUNC_27 const BATTLEANIMFUNC_27
const BATTLEANIMFUNC_28 const BATTLEANIMFUNC_28
const BATTLEANIMFUNC_29 const BATTLEANIMFUNC_SPRIAL_DESCENT
const BATTLEANIMFUNC_2A const BATTLEANIMFUNC_POISON_GAS
const BATTLEANIMFUNC_2B const BATTLEANIMFUNC_HORN
const BATTLEANIMFUNC_2C const BATTLEANIMFUNC_2C
const BATTLEANIMFUNC_2D const BATTLEANIMFUNC_2D
const BATTLEANIMFUNC_2E const BATTLEANIMFUNC_2E
@ -735,7 +735,7 @@ const_value SET 1
const ANIM_BG_1E const ANIM_BG_1E
const ANIM_BG_1F const ANIM_BG_1F
const ANIM_BG_20 const ANIM_BG_20
const ANIM_BG_21 const ANIM_BG_WITHDRAW
const ANIM_BG_BOUNCE_DOWN const ANIM_BG_BOUNCE_DOWN
const ANIM_BG_DIG const ANIM_BG_DIG
const ANIM_BG_TACKLE const ANIM_BG_TACKLE

View File

@ -40,8 +40,8 @@ Predef_StartBattle: ; 8c20f
call DelayFrame call DelayFrame
xor a xor a
ld [hFFC6], a ld [hFFC6], a
ld [hFFC7], a ld [hLYOverrideStart], a
ld [hFFC8], a ld [hLYOverrideEnd], a
ld [hSCY], a ld [hSCY], a
ld a, $1 ld a, $1
@ -305,9 +305,9 @@ StartTrainerBattle_SetUpForWavyOutro: ; 8c3e8 (23:43e8)
ld a, $43 ld a, $43
ld [hFFC6], a ld [hFFC6], a
xor a xor a
ld [hFFC7], a ld [hLYOverrideStart], a
ld a, $90 ld a, $90
ld [hFFC8], a ld [hLYOverrideEnd], a
xor a xor a
ld [wcf64], a ld [wcf64], a
ld [wcf65], a ld [wcf65], a

View File

@ -138,6 +138,7 @@ Function8b07:
; Unreferenced ; Unreferenced
call CheckCGB call CheckCGB
ret z ret z
; CGB only
ld hl, .BGPal ld hl, .BGPal
ld de, UnknBGPals ld de, UnknBGPals
ld bc, 1 palettes ld bc, 1 palettes
@ -534,9 +535,9 @@ CopyPalettes:
GetPredefPal: GetPredefPal:
ld l, a ld l, a
ld h, $0 ld h, $0
rept 3 ; multiply by 8
add hl, hl add hl, hl
endr add hl, hl
add hl, hl
ld bc, Palettes_9df6 ld bc, Palettes_9df6
add hl, bc add hl, bc
ret ret
@ -924,9 +925,10 @@ PushSGBPals:
jr nz, .loop jr nz, .loop
ret ret
Function9853: InitSGBBorder:
call CheckCGB call CheckCGB
ret nz ret nz
; SGB/DMG only
di di
ld a, [wcfbe] ld a, [wcfbe]
push af push af
@ -936,7 +938,7 @@ Function9853:
ld [rJOYP], a ld [rJOYP], a
ld [hSGB], a ld [hSGB], a
call Function994a call Function994a
jr nc, .asm_988a jr nc, .skip
ld a, $1 ld a, $1
ld [hSGB], a ld [hSGB], a
call Function98eb call Function98eb
@ -949,15 +951,16 @@ Function9853:
ld hl, PalPacket_9d66 ld hl, PalPacket_9d66
call PushSGBPals call PushSGBPals
.asm_988a .skip
pop af pop af
ld [wcfbe], a ld [wcfbe], a
ei ei
ret ret
Function9890:: InitCGBPals::
call CheckCGB call CheckCGB
ret z ret z
; CGB only
ld a, $1 ld a, $1
ld [rVBK], a ld [rVBK], a
ld hl, VTiles0 ld hl, VTiles0
@ -1123,7 +1126,7 @@ Function99ab:
Function99b4: Function99b4:
call DisableLCD call DisableLCD
ld a, $e4 ld a, %11100100
ld [rBGP], a ld [rBGP], a
ld hl, Palettes_9df6 ld hl, Palettes_9df6
ld de, VTiles1 ld de, VTiles1
@ -1198,25 +1201,27 @@ Function9a24:
CopyData: ; 0x9a52 CopyData: ; 0x9a52
; copy bc bytes of data from hl to de ; copy bc bytes of data from hl to de
.loop
ld a, [hli] ld a, [hli]
ld [de], a ld [de], a
inc de inc de
dec bc dec bc
ld a, c ld a, c
or b or b
jr nz, CopyData jr nz, .loop
ret ret
; 0x9a5b ; 0x9a5b
ClearBytes: ; 0x9a5b ClearBytes: ; 0x9a5b
; clear bc bytes of data starting from de ; clear bc bytes of data starting from de
.loop
xor a xor a
ld [de], a ld [de], a
inc de inc de
dec bc dec bc
ld a, c ld a, c
or b or b
jr nz, ClearBytes jr nz, .loop
ret ret
; 0x9a64 ; 0x9a64

View File

@ -431,10 +431,12 @@ Gen2ToGen2LinkComms: ; 28177
ld bc, NAME_LENGTH ld bc, NAME_LENGTH
call CopyBytes call CopyBytes
call ReturnToMapFromSubmenu call ReturnToMapFromSubmenu
ld a, [wc2d7]
; LET'S DO THIS
ld a, [wDisableTextAcceleration]
push af push af
ld a, $1 ld a, 1
ld [wc2d7], a ld [wDisableTextAcceleration], a
ld a, [rIE] ld a, [rIE]
push af push af
ld a, [rIF] ld a, [rIF]
@ -446,7 +448,9 @@ Gen2ToGen2LinkComms: ; 28177
ld [rIE], a ld [rIE], a
pop af pop af
ld [rIF], a ld [rIF], a
predef StartBattle predef StartBattle
ld a, [rIF] ld a, [rIF]
ld h, a ld h, a
xor a xor a
@ -456,7 +460,7 @@ Gen2ToGen2LinkComms: ; 28177
ld a, h ld a, h
ld [rIF], a ld [rIF], a
pop af pop af
ld [wc2d7], a ld [wDisableTextAcceleration], a
pop af pop af
ld [Options], a ld [Options], a
callba LoadPokemonData callba LoadPokemonData

View File

@ -4,7 +4,7 @@ INCBIN "gfx/unknown/049c0c.2bpp"
MainMenu: ; 49cdc MainMenu: ; 49cdc
xor a xor a
ld [wc2d7], a ld [wDisableTextAcceleration], a
call Function49ed0 call Function49ed0
ld b, SCGB_08 ld b, SCGB_08
call GetSGBLayout call GetSGBLayout

View File

@ -289,7 +289,7 @@ MapSetupCommands: ; 15440
DontScrollText: ; 154ca DontScrollText: ; 154ca
xor a xor a
ld [wc2d7], a ld [wDisableTextAcceleration], a
ret ret
; 154cf ; 154cf

View File

@ -78,7 +78,7 @@ PredefPointers:: ; 856b
add_predef GetUnownLetter add_predef GetUnownLetter
add_predef LoadPoisonBGPals add_predef LoadPoisonBGPals
add_predef Predef2F add_predef Predef2F
add_predef Function9853 ; $30 add_predef InitSGBBorder ; $30
add_predef Predef_LoadSGBLayout add_predef Predef_LoadSGBLayout
add_predef _Area add_predef _Area
add_predef CheckContestMon add_predef CheckContestMon

View File

@ -62,8 +62,8 @@ Special_MagnetTrain: ; 8cc04
call ClearBGPalettes call ClearBGPalettes
xor a xor a
ld [hFFC6], a ld [hFFC6], a
ld [hFFC7], a ld [hLYOverrideStart], a
ld [hFFC8], a ld [hLYOverrideEnd], a
ld [hSCX], a ld [hSCX], a
ld [Requested2bppSource], a ld [Requested2bppSource], a
ld [Requested2bppSource + 1], a ld [Requested2bppSource + 1], a

View File

@ -342,7 +342,7 @@ PrintLetterDelay:: ; 313d
call GetJoypad call GetJoypad
; input override ; input override
ld a, [wc2d7] ld a, [wDisableTextAcceleration]
and a and a
jr nz, .wait jr nz, .wait

View File

@ -139,7 +139,7 @@ Init:: ; 17d
ld a, -1 ld a, -1
ld [hLinkPlayerNumber], a ld [hLinkPlayerNumber], a
callba Function9890 callba InitCGBPals
ld a, VBGMap1 / $100 ld a, VBGMap1 / $100
ld [hBGMapAddress + 1], a ld [hBGMapAddress + 1], a
@ -154,9 +154,9 @@ Init:: ; 17d
ld a, [hCGB] ld a, [hCGB]
and a and a
jr z, .asm_22b jr z, .no_double_speed
call NormalSpeed call NormalSpeed
.asm_22b .no_double_speed
xor a xor a
ld [rIF], a ld [rIF], a
@ -166,7 +166,7 @@ Init:: ; 17d
call DelayFrame call DelayFrame
predef Function9853 predef InitSGBBorder ; SGB init
call MapSetup_Sound_Off call MapSetup_Sound_Off
xor a xor a

View File

@ -6,7 +6,7 @@ Function3e32:: ; 3e32
ld [$c986], a ld [$c986], a
ld a, h ld a, h
ld [$c987], a ld [$c987], a
jr nz, .asm_3e4f jr nz, .okay
ld [$c982], a ld [$c982], a
ld a, l ld a, l
@ -17,7 +17,7 @@ Function3e32:: ; 3e32
ld a, b ld a, b
ld [hl], a ld [hl], a
.asm_3e4f .okay
ld hl, $c822 ld hl, $c822
set 6, [hl] set 6, [hl]
ld a, [hROMBank] ld a, [hROMBank]
@ -30,6 +30,7 @@ Function3e32:: ; 3e32
; 3e60 ; 3e60
Function3e60:: ; 3e60 Function3e60:: ; 3e60
; Return from Function110030
ld [$c986], a ld [$c986], a
ld a, l ld a, l
ld [$c987], a ld [$c987], a

View File

@ -78,8 +78,8 @@ hFFC2 EQU $ffc2
hMoneyTemp EQU $ffc3 hMoneyTemp EQU $ffc3
hFFC6 EQU $ffc6 hFFC6 EQU $ffc6
hFFC7 EQU $ffc7 hLYOverrideStart EQU $ffc7
hFFC8 EQU $ffc8 hLYOverrideEnd EQU $ffc8
hMobileReceive EQU $ffc9 hMobileReceive EQU $ffc9
hFFCA EQU $ffca hFFCA EQU $ffca
hLinkPlayerNumber EQU $ffcb hLinkPlayerNumber EQU $ffcb

View File

@ -75,7 +75,7 @@ Function110029: ; 110029 (44:4029)
Function110030:: ; 110030 (44:4030) Function110030:: ; 110030 (44:4030)
; Use the byte at $c988 as a parameter ; Use the byte at $c988 as a parameter
; for a dw. ; for a dw.
; If [$c988] in {12, 14, 16}, ; If [$c988] not in {12, 14, 16},
; clear [$c835]. ; clear [$c835].
push de push de
ld a, [$c988] ld a, [$c988]
@ -89,24 +89,29 @@ Function110030:: ; 110030 (44:4030)
ld [$c835], a ld [$c835], a
ld a, [$c988] ld a, [$c988]
.noreset .noreset
ld d, $0 ; Get the pointer
ld d, 0
ld e, a ld e, a
ld hl, .dw ld hl, .dw
add hl, de add hl, de
; Store the low byte in [$c988]
ld a, [hli] ld a, [hli]
ld [$c988], a ld [$c988], a
ld a, [hl] ld a, [hl]
; restore de
pop de pop de
ld hl, Function3e60 ld hl, Function3e60 ; return here
push hl push hl
; If the destination function is not Function110236,
; call Function1100b4.
ld h, a ld h, a
ld a, [$c988] ld a, [$c988]
ld l, a ld l, a
push hl push hl
ld a, $36 ld a, Function110236 % $100
cp l cp l
jr nz, .okay jr nz, .okay
ld a, $42 ld a, Function110236 / $100
cp h cp h
.okay .okay
call nz, Function1100b4 call nz, Function1100b4

View File

@ -183,9 +183,9 @@ anim_0xed: macro
db anim_0xed_command db anim_0xed_command
endm endm
enum anim_jumpand_command ; ee enum anim_if_param_and_command ; ee
anim_jumpand: macro anim_if_param_and: macro
db anim_jumpand_command db anim_if_param_and_command
db \1 ; value db \1 ; value
dw \2 ; address dw \2 ; address
endm endm
@ -243,9 +243,9 @@ anim_0xf7: macro
db anim_0xf7_command db anim_0xf7_command
endm endm
enum anim_jumpif_command ; f8 enum anim_if_param_equal_command ; f8
anim_jumpif: macro anim_if_param_equal: macro
db anim_jumpif_command db anim_if_param_equal_command
db \1 ; value db \1 ; value
dw \2 ; address dw \2 ; address
endm endm
@ -261,9 +261,9 @@ anim_incvar: macro
db anim_incvar_command db anim_incvar_command
endm endm
enum anim_jumpvar_command ; fb enum anim_if_var_equal_command ; fb
anim_jumpvar: macro anim_if_var_equal: macro
db anim_jumpvar_command db anim_if_var_equal_command
db \1 ; value db \1 ; value
dw \2 ; address dw \2 ; address
endm endm

View File

@ -3367,14 +3367,14 @@ Function4e906: ; 4e906
ld [rSVBK], a ld [rSVBK], a
ret ret
Function4e929: ; mobile function GetMobileOTTrainerClass: ; mobile function
ld h, b ld h, b
ld l, c ld l, c
call Function4e930 call .GetMobileOTTrainerClass
ld c, a ld c, a
ret ret
Function4e930: ; 4e930 .GetMobileOTTrainerClass: ; 4e930
ld a, [hli] ld a, [hli]
xor [hl] xor [hl]
ld c, a ld c, a

View File

@ -111,7 +111,7 @@ Function170139: ; 170139
call CopyBytes call CopyBytes
ld bc, PlayerID ld bc, PlayerID
ld de, PlayerGender ld de, PlayerGender
callba Function4e929 callba GetMobileOTTrainerClass
ld de, wBT_OTTempPkmn1CaughtGender ld de, wBT_OTTempPkmn1CaughtGender
ld a, c ld a, c
ld [de], a ld [de], a

View File

@ -941,7 +941,7 @@ Function11c658: ; 11c658 (47:4658)
call Function11cfb5 call Function11cfb5
Function11c675: ; 11c675 (47:4675) Function11c675: ; 11c675 (47:4675)
ld hl, wcd25 ld hl, wMobileCommsJumptableIndex
ld de, hJoypadPressed ; $ffa3 ld de, hJoypadPressed ; $ffa3
ld a, [de] ld a, [de]
and A_BUTTON and A_BUTTON
@ -975,7 +975,7 @@ Function11c675: ; 11c675 (47:4675)
ld [wcd26], a ld [wcd26], a
ld a, [hl] ld a, [hl]
ld b, a ld b, a
ld hl, wcd25 ld hl, wMobileCommsJumptableIndex
ld a, [wcd26] ld a, [wcd26]
add [hl] add [hl]
jr c, .asm_11c6b9 jr c, .asm_11c6b9
@ -986,7 +986,7 @@ Function11c675: ; 11c675 (47:4675)
ld hl, wcd26 ld hl, wcd26
sub [hl] sub [hl]
dec a dec a
ld [wcd25], a ld [wMobileCommsJumptableIndex], a
.asm_11c6c4 .asm_11c6c4
call Function11c992 call Function11c992
call Function11c7bc call Function11c7bc
@ -1101,7 +1101,7 @@ Function11c675: ; 11c675 (47:4675)
Function11c770: ; 11c770 (47:4770) Function11c770: ; 11c770 (47:4770)
xor a xor a
ld [wcd25], a ld [wMobileCommsJumptableIndex], a
ld [wcd26], a ld [wcd26], a
ld [wcd27], a ld [wcd27], a
ld a, [wcd2b] ld a, [wcd2b]
@ -1390,7 +1390,7 @@ Function11c8f6: ; 11c8f6 (47:48f6)
and a and a
jr z, .asm_11c927 jr z, .asm_11c927
ld hl, wcd26 ld hl, wcd26
ld a, [wcd25] ld a, [wMobileCommsJumptableIndex]
add [hl] add [hl]
.asm_11c911 .asm_11c911
ld e, a ld e, a
@ -1412,7 +1412,7 @@ Function11c8f6: ; 11c8f6 (47:48f6)
.asm_11c927 .asm_11c927
ld hl, wcd26 ld hl, wcd26
ld a, [wcd25] ld a, [wMobileCommsJumptableIndex]
add [hl] add [hl]
ld c, a ld c, a
ld b, $0 ld b, $0
@ -1438,7 +1438,7 @@ Function11c8f6: ; 11c8f6 (47:48f6)
ld d, $0 ld d, $0
add hl, de add hl, de
add hl, de add hl, de
ld a, [wcd25] ld a, [wMobileCommsJumptableIndex]
ld e, a ld e, a
add hl, de add hl, de
add hl, de add hl, de
@ -2554,7 +2554,7 @@ Function11d0b6: ; 11d0b6 (47:50b6)
.three ; 11d10f (47:510f) .three ; 11d10f (47:510f)
ld a, SPRITE_ANIM_FRAMESET_27 ld a, SPRITE_ANIM_FRAMESET_27
call ReinitSpriteAnimFrame call ReinitSpriteAnimFrame
ld a, [wcd25] ld a, [wMobileCommsJumptableIndex]
sla a sla a
ld hl, Unknown_11d29e ld hl, Unknown_11d29e
ld e, $8 ld e, $8

View File

@ -769,7 +769,7 @@ Function8956f: ; 8956f
add hl, bc add hl, bc
ld b, h ld b, h
ld c, l ld c, l
callba Function4e929 callba GetMobileOTTrainerClass
ld a, c ld a, c
ld [TrainerClass], a ld [TrainerClass], a
ld a, [rSVBK] ld a, [rSVBK]
@ -1214,7 +1214,7 @@ Function897af: ; 897af
add hl, bc add hl, bc
ld b, h ld b, h
ld c, l ld c, l
callba Function4e929 callba GetMobileOTTrainerClass
ld a, c ld a, c
ld [TrainerClass], a ld [TrainerClass], a
xor a xor a

File diff suppressed because it is too large Load Diff

View File

@ -806,17 +806,17 @@ Function106331: ; 106331 - called by Mobile_DummyReturnFalse in Crystal-J
; 10635c ; 10635c
Function10635c: ; 10635c Function10635c: ; 10635c
ld a, [wcd25] ld a, [wMobileCommsJumptableIndex]
bit 7, a bit 7, a
ret nz ret nz
ld a, [wcd25] ld a, [wMobileCommsJumptableIndex]
ld hl, Jumptable_10636a ld hl, .Jumptable
rst JumpTable rst JumpTable
ret ret
; 10636a ; 10636a
Jumptable_10636a: ; 10636a .Jumptable: ; 10636a
dw Function10637c dw .init
dw Function106392 dw Function106392
dw Function1063cc dw Function1063cc
dw Function1063d8 dw Function1063d8
@ -827,15 +827,15 @@ Jumptable_10636a: ; 10636a
dw Function106453 dw Function106453
; 10637c ; 10637c
Function10637c: ; 10637c .init: ; 10637c
ld de, wcd30 ld de, wcd30
ld hl, $41 ld hl, $41
ld bc, $41 ld bc, $41
ld a, $40 ld a, $40
call Function3e32 call Function3e32
ld a, [wcd25] ld a, [wMobileCommsJumptableIndex]
inc a inc a
ld [wcd25], a ld [wMobileCommsJumptableIndex], a
ret ret
; 106392 ; 106392
@ -857,39 +857,39 @@ Function106392: ; 106392
ld a, $b ld a, $b
ld [wcf64], a ld [wcf64], a
ld a, $7 ld a, $7
ld [wcd25], a ld [wMobileCommsJumptableIndex], a
ret ret
.asm_1063b4 .asm_1063b4
ld a, $7 ld a, $7
ld [wcf64], a ld [wcf64], a
ld a, $7 ld a, $7
ld [wcd25], a ld [wMobileCommsJumptableIndex], a
ret ret
.asm_1063bf .asm_1063bf
ld a, $1 ld a, $1
ld [wcf64], a ld [wcf64], a
ld a, [wcd25] ld a, [wMobileCommsJumptableIndex]
inc a inc a
ld [wcd25], a ld [wMobileCommsJumptableIndex], a
ret ret
; 1063cc ; 1063cc
Function1063cc: ; 1063cc Function1063cc: ; 1063cc
ld a, $78 ld a, $78
ld [wcd42], a ld [wcd42], a
ld a, [wcd25] ld a, [wMobileCommsJumptableIndex]
inc a inc a
ld [wcd25], a ld [wMobileCommsJumptableIndex], a
Function1063d8: ; 1063d8 Function1063d8: ; 1063d8
ld hl, wcd42 ld hl, wcd42
dec [hl] dec [hl]
ret nz ret nz
ld a, [wcd25] ld a, [wMobileCommsJumptableIndex]
inc a inc a
ld [wcd25], a ld [wMobileCommsJumptableIndex], a
ret ret
; 1063e5 ; 1063e5
@ -897,9 +897,9 @@ Function1063e5: ; 1063e5
ld a, [wcf64] ld a, [wcf64]
cp $3 cp $3
ret nz ret nz
ld a, [wcd25] ld a, [wMobileCommsJumptableIndex]
inc a inc a
ld [wcd25], a ld [wMobileCommsJumptableIndex], a
ret ret
; 1063f3 ; 1063f3
@ -907,9 +907,9 @@ Function1063f3: ; 1063f3
ld de, wcd31 ld de, wcd31
ld a, $32 ld a, $32
call Function3e32 call Function3e32
ld a, [wcd25] ld a, [wMobileCommsJumptableIndex]
inc a inc a
ld [wcd25], a ld [wMobileCommsJumptableIndex], a
ret ret
; 106403 ; 106403
@ -930,9 +930,9 @@ Function106403: ; 106403
inc a inc a
ld c, a ld c, a
call MobileFn_106314 call MobileFn_106314
ld a, [wcd25] ld a, [wMobileCommsJumptableIndex]
inc a inc a
ld [wcd25], a ld [wMobileCommsJumptableIndex], a
ret ret
.asm_106426 .asm_106426
@ -940,17 +940,17 @@ Function106403: ; 106403
ld a, c ld a, c
and a and a
jr z, .asm_106435 jr z, .asm_106435
ld a, [wcd25] ld a, [wMobileCommsJumptableIndex]
inc a inc a
ld [wcd25], a ld [wMobileCommsJumptableIndex], a
ret ret
.asm_106435 .asm_106435
ld c, $0 ld c, $0
call MobileFn_106314 call MobileFn_106314
ld a, [wcd25] ld a, [wMobileCommsJumptableIndex]
inc a inc a
ld [wcd25], a ld [wMobileCommsJumptableIndex], a
ret ret
; 106442 ; 106442
@ -960,14 +960,14 @@ Function106442: ; 106442
xor a xor a
ld [hMobile], a ld [hMobile], a
ld [hMobileReceive], a ld [hMobileReceive], a
ld a, [wcd25] ld a, [wMobileCommsJumptableIndex]
inc a inc a
ld [wcd25], a ld [wMobileCommsJumptableIndex], a
Function106453: ; 106453 Function106453: ; 106453
ld a, [wcd25] ld a, [wMobileCommsJumptableIndex]
set 7, a set 7, a
ld [wcd25], a ld [wMobileCommsJumptableIndex], a
nop nop
ld a, $4 ld a, $4
ld [wcf64], a ld [wcf64], a

View File

@ -1,48 +1,56 @@
Function16c000: ; 16c000 Function16c000: ; 16c000
; unreferenced
; Only for CGB
ld a, [hCGB] ld a, [hCGB]
and a and a
ret z ret z
; Only do this once per boot cycle
ld a, [hFFEA] ld a, [hFFEA]
and a and a
ret z ret z
; Set some flag, preserving the old state
ld a, [wcfbe] ld a, [wcfbe]
push af push af
set 7, a set 7, a
ld [wcfbe], a ld [wcfbe], a
call Function16c108 ; Do stuff
callba Function100063 call MobileSystemSplashScreen_InitGFX ; Load GFX
callba Function100082 callba SetRAMStateForMobile
call Function16c031 callba EnableMobile
callba Function1000a4 call .RunJumptable
callba DisableMobile
; Prevent this routine from running again
; until the next time the syatem is turned on
xor a xor a
ld [hFFEA], a ld [hFFEA], a
; Restore the flag state
pop af pop af
ld [wcfbe], a ld [wcfbe], a
ret ret
; 16c031 ; 16c031
Function16c031: ; 16c031 .RunJumptable: ; 16c031
xor a xor a
ld [wJumptableIndex], a ld [wJumptableIndex], a
ld [wcf64], a ld [wcf64], a
ld [wd002], a ld [wd002], a
ld [wd003], a ld [wd003], a
.asm_16c03e .loop
call DelayFrame call DelayFrame
callba Function10635c callba Function10635c
ld a, [wd002] ld a, [wd002]
ld hl, Jumptable_16c05c ld hl, .Jumptable
rst JumpTable rst JumpTable
call Function16cb2e call Function16cb2e
call Function16cbae call Function16cbae
ld a, [wd002] ld a, [wd002]
cp $ff cp $ff
jr nz, .asm_16c03e jr nz, .loop
ret ret
; 16c05c ; 16c05c
Jumptable_16c05c: ; 16c05c .Jumptable: ; 16c05c
dw Function16c074 dw .init
dw Function16c0ba dw Function16c0ba
dw Function16c089 dw Function16c089
dw Function16c09e dw Function16c09e
@ -53,10 +61,10 @@ Jumptable_16c05c: ; 16c05c
dw Function16c0ca dw Function16c0ca
dw Function16c0dc dw Function16c0dc
dw Function16c0ec dw Function16c0ec
dw Function16c081 dw .quit
; 16c074 ; 16c074
Function16c074: ; 16c074 .init ; 16c074
ld a, [wcf64] ld a, [wcf64]
and a and a
ret z ret z
@ -66,7 +74,7 @@ Function16c074: ; 16c074
ret ret
; 16c081 ; 16c081
Function16c081: ; 16c081 .quit ; 16c081
push af push af
ld a, $ff ld a, $ff
ld [wd002], a ld [wd002], a
@ -160,15 +168,15 @@ Function16c0fa: ; 16c0fa
ret ret
; 16c108 ; 16c108
Function16c108: ; 16c108 MobileSystemSplashScreen_InitGFX: ; 16c108
call DisableLCD call DisableLCD
ld hl, VTiles2 ld hl, VTiles2
ld de, GFX_16c173 ld de, .Tiles
lb bc, BANK(GFX_16c173), $68 lb bc, BANK(.Tiles), $68
call Get2bpp call Get2bpp
call Function16c130 call .LoadPals
call Function16c145 call .LoadTileMap
call Function16c15c call .LoadAttrMap
hlbgcoord 0, 0 hlbgcoord 0, 0
call Function16cc73 call Function16cc73
call Function16cc02 call Function16cc02
@ -178,9 +186,9 @@ Function16c108: ; 16c108
ret ret
; 16c130 ; 16c130
Function16c130: ; 16c130 .LoadPals: ; 16c130
ld de, UnknBGPals ld de, UnknBGPals
ld hl, Unknown_16c903 ld hl, UnknownMobilePalettes_16c903
ld bc, 8 ld bc, 8
ld a, $5 ld a, $5
call FarCopyWRAM call FarCopyWRAM
@ -188,40 +196,40 @@ Function16c130: ; 16c130
ret ret
; 16c145 ; 16c145
Function16c145: ; 16c145 .LoadTileMap: ; 16c145
hlcoord 0, 0 hlcoord 0, 0
ld bc, 20 ld bc, 20
xor a xor a
call ByteFill call ByteFill
ld hl, Tilemap_16c633 ld hl, .TileMap
decoord 0, 1 decoord 0, 1
ld bc, $0154 ld bc, $0154
call CopyBytes call CopyBytes
ret ret
; 16c15c ; 16c15c
Function16c15c: ; 16c15c .LoadAttrMap: ; 16c15c
hlcoord 0, 0, AttrMap hlcoord 0, 0, AttrMap
ld bc, SCREEN_WIDTH ld bc, SCREEN_WIDTH
xor a xor a
call ByteFill call ByteFill
ld hl, Tilemap_16c79b ld hl, .AttrMap
decoord 0, 1, AttrMap decoord 0, 1, AttrMap
ld bc, 17 * SCREEN_WIDTH ld bc, 17 * SCREEN_WIDTH
call CopyBytes call CopyBytes
ret ret
; 16c173 ; 16c173
GFX_16c173: .Tiles:
INCBIN "gfx/unknown/16c173.2bpp" INCBIN "gfx/unknown/16c173.2bpp"
Tilemap_16c633: .TileMap:
INCBIN "gfx/unknown/16c633.tilemap" INCBIN "gfx/unknown/16c633.tilemap"
Tilemap_16c79b: .AttrMap:
INCBIN "gfx/unknown/16c79b.tilemap" INCBIN "gfx/unknown/16c79b.tilemap"
Unknown_16c903: UnknownMobilePalettes_16c903: ; 16c903
RGB 31, 31, 31 RGB 31, 31, 31
RGB 04, 10, 20 RGB 04, 10, 20
RGB 16, 19, 25 RGB 16, 19, 25
@ -287,7 +295,7 @@ Function16c943: ; 16c943
ld e, $0 ld e, $0
ld a, $0 ld a, $0
.asm_16c969 .asm_16c969
ld hl, Unknown_16c903 ld hl, UnknownMobilePalettes_16c903
call Function16cab6 call Function16cab6
call Function16cabb call Function16cabb
ld d, a ld d, a
@ -310,7 +318,7 @@ Function16c943: ; 16c943
call Function16cadc call Function16cadc
.asm_16c991 .asm_16c991
ld hl, Unknown_16c903 ld hl, UnknownMobilePalettes_16c903
call Function16cab6 call Function16cab6
call Function16cad8 call Function16cad8
ld d, a ld d, a
@ -333,7 +341,7 @@ Function16c943: ; 16c943
call Function16cb08 call Function16cb08
.asm_16c9b9 .asm_16c9b9
ld hl, Unknown_16c903 ld hl, UnknownMobilePalettes_16c903
call Function16cab6 call Function16cab6
call Function16cac4 call Function16cac4
ld d, a ld d, a

View File

@ -3224,7 +3224,7 @@ Function17e451: ; 17e451
ld b, $0 ld b, $0
add hl, bc add hl, bc
pop bc pop bc
ld a, [wcd25] ld a, [wMobileCommsJumptableIndex]
.asm_17e48b .asm_17e48b
push af push af
push hl push hl
@ -3339,7 +3339,7 @@ Function17e51b: ; 17e51b
ld c, a ld c, a
ld b, $0 ld b, $0
add hl, bc add hl, bc
ld a, [wcd25] ld a, [wMobileCommsJumptableIndex]
ld c, a ld c, a
ld a, [wcd27] ld a, [wcd27]
call SimpleMultiply call SimpleMultiply

View File

@ -160,7 +160,7 @@ wMapTimeOfDay:: ds 1
wc2d4:: ds 1 wc2d4:: ds 1
wc2d5:: ds 1 wc2d5:: ds 1
wLastDexEntry:: ds 1 wLastDexEntry:: ds 1
wc2d7:: ds 1 wDisableTextAcceleration:: ds 1
wPreviousLandmark:: ds 1 wPreviousLandmark:: ds 1
wCurrentLandmark:: ds 1 wCurrentLandmark:: ds 1
wLandmarkSignTimer:: ds 2 wLandmarkSignTimer:: ds 2
@ -1112,7 +1112,7 @@ CreditsTimer:: ; cd22
wcd23:: ds 1 wcd23:: ds 1
wcd24:: ds 1 wcd24:: ds 1
wcd25:: ds 1 wMobileCommsJumptableIndex:: ds 1 ; cd25
wcd26:: ds 1 wcd26:: ds 1
wcd27:: ds 1 wcd27:: ds 1
wcd28:: ds 1 wcd28:: ds 1
@ -1200,7 +1200,7 @@ wcd71:: ds 1
wcd72:: ds 1 wcd72:: ds 1
wcd73:: ds 1 wcd73:: ds 1
wcd74:: ds 1 wcd74:: ds 1
wcd75:: ds 2 wOTMonSelection:: ds 2 ; ds 3
wcd77:: ds 1 wcd77:: ds 1
wcd78:: ds 1 wcd78:: ds 1
wcd79:: ds 1 wcd79:: ds 1
@ -2693,7 +2693,7 @@ wDailyPhoneTimeOfDayFlags:: ds 4
wKenjiBreakTimer:: ds 2 ; Kenji wKenjiBreakTimer:: ds 2 ; Kenji
wYanmaMapGroup:: ds 1 ; dc5a wYanmaMapGroup:: ds 1 ; dc5a
wYanmaMapNumber:: ds 1 wYanmaMapNumber:: ds 1
wdc5c:: ds 3 wPlayerMonSelection:: ds 3
wdc5f:: ds 1 wdc5f:: ds 1
wdc60:: ds 19 wdc60:: ds 19
@ -2923,7 +2923,7 @@ w3_d742:: battle_tower_struct w3_d742
ds -$22 ds -$22
wBTChoiceOfLvlGroup:: wBTChoiceOfLvlGroup::
w3_d800:: ; ds BG_MAP__WIDTH * SCREEN_HEIGHT ($240) w3_d800:: ; ds BG_MAP_WIDTH * SCREEN_HEIGHT ($240)
ds $69 ds $69
w3_d869:: ds $17 w3_d869:: ds $17
w3_d880:: ds 1 w3_d880:: ds 1
@ -2964,7 +2964,7 @@ wMagnetTrainInitPosition:: ds 1
wMagnetTrainHoldPosition:: ds 1 wMagnetTrainHoldPosition:: ds 1
wMagnetTrainFinalPosition:: ds 1 wMagnetTrainFinalPosition:: ds 1
wMagnetTrainPlayerSpriteInitX:: ds 1 wMagnetTrainPlayerSpriteInitX:: ds 1
ds 106 ds 106
LYOverridesBackup:: ; d200 LYOverridesBackup:: ; d200
ds SCREEN_HEIGHT_PX ds SCREEN_HEIGHT_PX