summaryrefslogtreecommitdiff
path: root/engine/battle_anims/bg_effects.asm
diff options
context:
space:
mode:
authorThomas Winwood <twwinwood@gmail.com>2018-07-21 02:06:31 +0100
committerGitHub <noreply@github.com>2018-07-21 02:06:31 +0100
commit23ef2f50a7b94c23b50e9e690a7482ac349c9ef3 (patch)
tree63c20c67efbdf8334c6e273f78065b83135e3886 /engine/battle_anims/bg_effects.asm
parent17a4d0540acc00e3f5ad260009115eb36e72b7d2 (diff)
parent2d73d040d16a7836f935a7a6cb2a311aed2ca5a2 (diff)
Merge branch 'master' into the-diffening
Diffstat (limited to 'engine/battle_anims/bg_effects.asm')
-rw-r--r--engine/battle_anims/bg_effects.asm261
1 files changed, 104 insertions, 157 deletions
diff --git a/engine/battle_anims/bg_effects.asm b/engine/battle_anims/bg_effects.asm
index 3192774dd..e5e186ab7 100644
--- a/engine/battle_anims/bg_effects.asm
+++ b/engine/battle_anims/bg_effects.asm
@@ -8,7 +8,7 @@
; BG effects for use in battle animations.
-ExecuteBGEffects: ; c8000 (32:4000)
+ExecuteBGEffects:
ld hl, wActiveBGEffects
ld e, 5
.loop
@@ -29,7 +29,7 @@ ExecuteBGEffects: ; c8000 (32:4000)
jr nz, .loop
ret
-QueueBGEffect: ; c801a (32:401a)
+QueueBGEffect:
ld hl, wActiveBGEffects
ld e, 5
.loop
@@ -58,13 +58,13 @@ QueueBGEffect: ; c801a (32:401a)
ld [hl], a
ret
-EndBattleBGEffect: ; c8043 (32:4043)
+EndBattleBGEffect:
ld hl, BG_EFFECT_STRUCT_FUNCTION
add hl, bc
ld [hl], 0
ret
-DoBattleBGEffectFunction: ; c804a (32:404a)
+DoBattleBGEffectFunction:
ld hl, BG_EFFECT_STRUCT_FUNCTION
add hl, bc
ld e, [hl]
@@ -77,7 +77,7 @@ DoBattleBGEffectFunction: ; c804a (32:404a)
ld l, a
jp hl
-BattleBGEffects: ; c805a (32:405a)
+BattleBGEffects:
; entries correspond to ANIM_BG_* constants
dw BattleBGEffect_End
dw BattleBGEffect_FlashInverted
@@ -134,12 +134,11 @@ BattleBGEffects: ; c805a (32:405a)
dw BattleBGEffect_WobbleMon
dw BattleBGEffect_35
-
-BattleBGEffect_End: ; c80c6 (32:40c6)
+BattleBGEffect_End:
call EndBattleBGEffect
ret
-BatttleBGEffects_GetNamedJumptablePointer: ; c80ca (32:40ca)
+BatttleBGEffects_GetNamedJumptablePointer:
ld hl, BG_EFFECT_STRUCT_JT_INDEX
add hl, bc
ld l, [hl]
@@ -151,7 +150,7 @@ BatttleBGEffects_GetNamedJumptablePointer: ; c80ca (32:40ca)
ld l, a
ret
-BattleBGEffects_AnonJumptable: ; c80d7 (32:40d7)
+BattleBGEffects_AnonJumptable:
pop de
ld hl, BG_EFFECT_STRUCT_JT_INDEX
add hl, bc
@@ -164,31 +163,29 @@ BattleBGEffects_AnonJumptable: ; c80d7 (32:40d7)
ld l, a
jp hl
-BattleBGEffects_IncrementJumptable: ; c80e5 (32:40e5)
+BattleBGEffects_IncrementJumptable:
ld hl, BG_EFFECT_STRUCT_JT_INDEX
add hl, bc
inc [hl]
ret
-BattleBGEffect_FlashInverted: ; c80eb (32:40eb)
+BattleBGEffect_FlashInverted:
ld de, .inverted
jp BattleBGEffect_FlashContinue
.inverted
db %11100100 ; 3210
db %00011011 ; 0123
-; c80f3
-BattleBGEffect_FlashWhite: ; c80f3 (32:40f3)
+BattleBGEffect_FlashWhite:
ld de, .white
jp BattleBGEffect_FlashContinue
.white
db %11100100 ; 3210
db %00000000 ; 0000
-; c80fb
-BattleBGEffect_FlashContinue: ; c80fb (32:40fb)
+BattleBGEffect_FlashContinue:
; current timer, flash duration, number of flashes
ld a, $1
ld [wBattleAnimTemp0], a
@@ -226,7 +223,7 @@ BattleBGEffect_FlashContinue: ; c80fb (32:40fb)
ld [wBGP], a
ret
-BattleBGEffect_WhiteHues: ; c812d (32:412d)
+BattleBGEffect_WhiteHues:
ld de, .Pals
call BattleBGEffect_GetNthDMGPal
jr c, .quit
@@ -242,9 +239,8 @@ BattleBGEffect_WhiteHues: ; c812d (32:412d)
db %11100000
db %11010000
db -1
-; c8141
-BattleBGEffect_BlackHues: ; c8141 (32:4141)
+BattleBGEffect_BlackHues:
ld de, .Pals
call BattleBGEffect_GetNthDMGPal
jr c, .quit
@@ -260,9 +256,8 @@ BattleBGEffect_BlackHues: ; c8141 (32:4141)
db %11110100
db %11111000
db -1
-; c8155
-BattleBGEffect_AlternateHues: ; c8155 (32:4155)
+BattleBGEffect_AlternateHues:
ld de, .Pals
call BattleBGEffect_GetNthDMGPal
jr c, .quit
@@ -284,9 +279,8 @@ BattleBGEffect_AlternateHues: ; c8155 (32:4155)
db %01000000
db %10010000
db -2
-; c8171
-BattleBGEffect_06: ; c8171 (32:4171)
+BattleBGEffect_06:
call BattleBGEffects_CheckSGB
jr nz, .sgb
ld de, .PalsCGB
@@ -308,9 +302,8 @@ BattleBGEffect_06: ; c8171 (32:4171)
db %11110000
db %11000000
db -2
-; c818b
-BattleBGEffect_07: ; c818b (32:418b)
+BattleBGEffect_07:
call BattleBGEffects_CheckSGB
jr nz, .sgb
ld de, .PalsCGB
@@ -332,9 +325,8 @@ BattleBGEffect_07: ; c818b (32:418b)
db %11110000
db %11001100
db -2
-; c81a5
-BattleBGEffect_08: ; c81a5 (32:41a5)
+BattleBGEffect_08:
ld de, .Pals
call BattleBGEffect_GetNthDMGPal
ld [wBGP], a
@@ -345,9 +337,8 @@ BattleBGEffect_08: ; c81a5 (32:41a5)
db %01100011
db %10000111
db -2
-; c81b3
-BattleBGEffect_HideMon: ; c81b3 (32:41b3)
+BattleBGEffect_HideMon:
call BattleBGEffects_AnonJumptable
.anon_dw
dw .zero
@@ -356,7 +347,6 @@ BattleBGEffect_HideMon: ; c81b3 (32:41b3)
dw BattleBGEffects_IncrementJumptable
dw .four
-
.zero
call BattleBGEffects_IncrementJumptable
push bc
@@ -384,7 +374,7 @@ BattleBGEffect_HideMon: ; c81b3 (32:41b3)
call EndBattleBGEffect
ret
-BattleBGEffect_ShowMon: ; c81ea (32:41ea)
+BattleBGEffect_ShowMon:
call BGEffect_CheckFlyDigStatus
jr z, .not_flying
call EndBattleBGEffect
@@ -412,9 +402,8 @@ BattleBGEffect_ShowMon: ; c81ea (32:41ea)
.EnemyData:
db 3, $00, 3
db -1
-; c8214
-BattleBGEffect_FeetFollow: ; c8214 (32:4214)
+BattleBGEffect_FeetFollow:
call BattleBGEffects_AnonJumptable
.anon_dw
dw .zero
@@ -424,7 +413,6 @@ BattleBGEffect_FeetFollow: ; c8214 (32:4214)
dw BattleBGEffects_IncrementJumptable
dw .five
-
.zero
call BGEffect_CheckFlyDigStatus
jr z, .not_flying_digging
@@ -482,7 +470,7 @@ BattleBGEffect_FeetFollow: ; c8214 (32:4214)
call EndBattleBGEffect
ret
-BattleBGEffect_HeadFollow: ; c8281 (32:4281)
+BattleBGEffect_HeadFollow:
call BattleBGEffects_AnonJumptable
.anon_dw
dw .zero
@@ -492,7 +480,6 @@ BattleBGEffect_HeadFollow: ; c8281 (32:4281)
dw BattleBGEffects_IncrementJumptable
dw .five
-
.zero
call BGEffect_CheckFlyDigStatus
jr z, .not_flying_digging
@@ -550,11 +537,11 @@ BattleBGEffect_HeadFollow: ; c8281 (32:4281)
call EndBattleBGEffect
ret
-_QueueBattleAnimation: ; c82ee (32:42ee)
+_QueueBattleAnimation:
callfar QueueBattleAnimation
ret
-BattleBGEffect_27: ; c82f5 (32:42f5)
+BattleBGEffect_27:
call BattleBGEffects_AnonJumptable
.anon_dw
dw .zero
@@ -563,7 +550,6 @@ BattleBGEffect_27: ; c82f5 (32:42f5)
dw BattleBGEffects_IncrementJumptable
dw .four
-
.zero
call BattleBGEffects_IncrementJumptable
call BGEffect_CheckBattleTurn
@@ -655,7 +641,7 @@ BattleBGEffect_27: ; c82f5 (32:42f5)
call EndBattleBGEffect
ret
-BattleBGEffect_EnterMon: ; c837b (32:437b)
+BattleBGEffect_EnterMon:
call BGEffect_CheckBattleTurn
jr nz, .player_turn
ld de, .EnemyData
@@ -681,9 +667,8 @@ BattleBGEffect_EnterMon: ; c837b (32:437b)
db 4, $00, 4
db 3, $00, 3
db -1
-; c83a8
-BattleBGEffect_ReturnMon: ; c83a8 (32:43a8)
+BattleBGEffect_ReturnMon:
call BGEffect_CheckBattleTurn
jr nz, .player_turn
ld de, .EnemyData
@@ -717,9 +702,8 @@ BattleBGEffect_ReturnMon: ; c83a8 (32:43a8)
db -2, $33, 5
db -3, $00, 0
db -1
-; c83ed
-BattleBGEffect_RunPicResizeScript: ; c83ed (32:43ed)
+BattleBGEffect_RunPicResizeScript:
call BattleBGEffects_AnonJumptable
.anon_dw
dw .zero
@@ -728,7 +712,6 @@ BattleBGEffect_RunPicResizeScript: ; c83ed (32:43ed)
dw .restart
dw .end
-
.zero
ld hl, BG_EFFECT_STRUCT_03
add hl, bc
@@ -918,16 +901,14 @@ ENDM
db $00, $15, $2a
db $03, $18, $2d
db $06, $1b, $30
-; c8545
-BattleBGEffect_Surf: ; c8545 (32:4545)
+BattleBGEffect_Surf:
call BattleBGEffects_AnonJumptable
.anon_dw
dw .zero
dw .one
dw .two
-
.zero
call BattleBGEffects_IncrementJumptable
lb de, 2, 2
@@ -987,14 +968,13 @@ BattleBGEffect_Surf: ; c8545 (32:4545)
jr c, .loop2
ret
-BattleBGEffect_Whirlpool: ; c8599 (32:4599)
+BattleBGEffect_Whirlpool:
call BattleBGEffects_AnonJumptable
.anon_dw
dw .zero
dw .one
dw .two
-
.zero
call BattleBGEffects_IncrementJumptable
call BattleBGEffects_ClearLYOverrides
@@ -1016,14 +996,14 @@ BattleBGEffect_Whirlpool: ; c8599 (32:4599)
call BattleAnim_ResetLCDStatCustom
ret
-BattleBGEffect_30: ; c85c2 (32:45c2)
+BattleBGEffect_30:
call BattleBGEffects_ClearLYOverrides
ld a, rSCY - $ff00
call BattleBGEffect_SetLCDStatCustoms1
call EndBattleBGEffect
ret
-BattleBGEffect_31: ; c85ce (32:45ce)
+BattleBGEffect_31:
ld hl, BG_EFFECT_STRUCT_03
add hl, bc
ld a, [hl]
@@ -1057,18 +1037,17 @@ BattleBGEffect_31: ; c85ce (32:45ce)
call EndBattleBGEffect
ret
-BattleBGEffect_32: ; c8603 (32:4603)
+BattleBGEffect_32:
call BattleAnim_ResetLCDStatCustom
ret
-BattleBGEffect_Psychic: ; c8607 (32:4607)
+BattleBGEffect_Psychic:
call BattleBGEffects_AnonJumptable
.anon_dw
dw .zero
dw .one
dw .two
-
.zero
call BattleBGEffects_IncrementJumptable
call BattleBGEffects_ClearLYOverrides
@@ -1099,14 +1078,13 @@ BattleBGEffect_Psychic: ; c8607 (32:4607)
call BattleAnim_ResetLCDStatCustom
ret
-BattleBGEffect_Teleport: ; c863f (32:463f)
+BattleBGEffect_Teleport:
call BattleBGEffects_AnonJumptable
.anon_dw
dw .zero
dw .one
dw .two
-
.zero
call BattleBGEffects_IncrementJumptable
call BattleBGEffects_ClearLYOverrides
@@ -1124,14 +1102,13 @@ BattleBGEffect_Teleport: ; c863f (32:463f)
call BattleAnim_ResetLCDStatCustom
ret
-BattleBGEffect_NightShade: ; c8662 (32:4662)
+BattleBGEffect_NightShade:
call BattleBGEffects_AnonJumptable
.anon_dw
dw .zero
dw .one
dw .two
-
.zero
call BattleBGEffects_IncrementJumptable
call BattleBGEffects_ClearLYOverrides
@@ -1152,7 +1129,7 @@ BattleBGEffect_NightShade: ; c8662 (32:4662)
call BattleAnim_ResetLCDStatCustom
ret
-BattleBGEffect_DoubleTeam: ; c8689 (32:4689)
+BattleBGEffect_DoubleTeam:
call BattleBGEffects_AnonJumptable
.anon_dw
dw .zero
@@ -1162,7 +1139,6 @@ BattleBGEffect_DoubleTeam: ; c8689 (32:4689)
dw .four
dw .five
-
.zero
call BattleBGEffects_IncrementJumptable
call BattleBGEffects_ClearLYOverrides
@@ -1247,14 +1223,13 @@ BattleBGEffect_DoubleTeam: ; c8689 (32:4689)
call BattleAnim_ResetLCDStatCustom
ret
-BattleBGEffect_AcidArmor: ; c8709 (32:4709)
+BattleBGEffect_AcidArmor:
call BattleBGEffects_AnonJumptable
.anon_dw
dw .zero
dw .one
dw .two
-
.zero
call BattleBGEffects_IncrementJumptable
call BattleBGEffects_ClearLYOverrides
@@ -1310,14 +1285,13 @@ BattleBGEffect_AcidArmor: ; c8709 (32:4709)
call BattleAnim_ResetLCDStatCustom
ret
-BattleBGEffect_Withdraw: ; c8761 (32:4761)
+BattleBGEffect_Withdraw:
call BattleBGEffects_AnonJumptable
.anon_dw
dw .zero
dw .one
dw .two
-
.zero
call BattleBGEffects_IncrementJumptable
call BattleBGEffects_ClearLYOverrides
@@ -1359,7 +1333,7 @@ BattleBGEffect_Withdraw: ; c8761 (32:4761)
call BattleAnim_ResetLCDStatCustom
ret
-BattleBGEffect_Dig: ; c87a7 (32:47a7)
+BattleBGEffect_Dig:
call BattleBGEffects_AnonJumptable
.anon_dw
dw .zero
@@ -1367,7 +1341,6 @@ BattleBGEffect_Dig: ; c87a7 (32:47a7)
dw .two
dw .three
-
.zero
call BattleBGEffects_IncrementJumptable
call BattleBGEffects_ClearLYOverrides
@@ -1426,7 +1399,7 @@ BattleBGEffect_Dig: ; c87a7 (32:47a7)
call BattleAnim_ResetLCDStatCustom
ret
-BattleBGEffect_Tackle: ; c8805 (32:4805)
+BattleBGEffect_Tackle:
call BattleBGEffects_AnonJumptable
.anon_dw
dw .zero
@@ -1434,7 +1407,6 @@ BattleBGEffect_Tackle: ; c8805 (32:4805)
dw Tackle_BGEffect25_2d_two
dw .three
-
.zero
call BattleBGEffects_IncrementJumptable
call BattleBGEffects_ClearLYOverrides
@@ -1461,7 +1433,7 @@ BattleBGEffect_Tackle: ; c8805 (32:4805)
call BattleAnim_ResetLCDStatCustom
ret
-BattleBGEffect_25: ; c8837 (32:4837)
+BattleBGEffect_25:
call BattleBGEffects_AnonJumptable
.anon_dw
dw .zero
@@ -1469,7 +1441,6 @@ BattleBGEffect_25: ; c8837 (32:4837)
dw Tackle_BGEffect25_2d_two
dw .three
-
.zero
call BattleBGEffects_IncrementJumptable
call BattleBGEffects_ClearLYOverrides
@@ -1537,7 +1508,7 @@ Tackle_BGEffect25_2d_two:
ld [hl], a
ret
-Functionc88a5: ; c88a5 (32:48a5)
+Functionc88a5:
push af
ld a, [wFXAnimID + 1] ; FXAnimID + 1
or a
@@ -1589,7 +1560,7 @@ Functionc88a5: ; c88a5 (32:48a5)
jr nz, .loop
ret
-BattleBGEffect_2d: ; c88e7 (32:48e7)
+BattleBGEffect_2d:
call BattleBGEffects_AnonJumptable
.anon_dw
dw BGEffect2d_2f_zero
@@ -1597,7 +1568,6 @@ BattleBGEffect_2d: ; c88e7 (32:48e7)
dw Tackle_BGEffect25_2d_two
dw .three
-
.three
call BattleAnim_ResetLCDStatCustom
ret
@@ -1624,7 +1594,7 @@ BGEffect2d_2f_zero:
ld [hl], a
ret
-BattleBGEffect_2f: ; c8919 (32:4919)
+BattleBGEffect_2f:
call BattleBGEffects_AnonJumptable
.anon_dw
dw BGEffect2d_2f_zero
@@ -1638,14 +1608,13 @@ BattleBGEffect_2f: ; c8919 (32:4919)
.two
ret
-BattleBGEffect_26: ; c892a (32:492a)
+BattleBGEffect_26:
call BattleBGEffects_AnonJumptable
.anon_dw
dw .zero
dw .one
dw .two
-
.zero
call BattleBGEffects_IncrementJumptable
call BattleBGEffects_ClearLYOverrides
@@ -1677,14 +1646,13 @@ BattleBGEffect_26: ; c892a (32:492a)
call BattleAnim_ResetLCDStatCustom
ret
-BattleBGEffect_2c: ; c8964 (32:4964)
+BattleBGEffect_2c:
call BattleBGEffects_AnonJumptable
.anon_dw
dw .zero
dw .one
dw .two
-
.zero
call BattleBGEffects_IncrementJumptable
call BattleBGEffects_ClearLYOverrides
@@ -1732,14 +1700,13 @@ BattleBGEffect_2c: ; c8964 (32:4964)
call BattleAnim_ResetLCDStatCustom
ret
-BattleBGEffect_28: ; c89b5 (32:49b5)
+BattleBGEffect_28:
call BattleBGEffects_AnonJumptable
.anon_dw
dw .zero
dw .one
dw .two
-
.zero
call BattleBGEffects_IncrementJumptable
call BattleBGEffects_ClearLYOverrides
@@ -1775,14 +1742,13 @@ BattleBGEffect_28: ; c89b5 (32:49b5)
call BattleAnim_ResetLCDStatCustom
ret
-BattleBGEffect_BounceDown: ; c89ee (32:49ee)
+BattleBGEffect_BounceDown:
call BattleBGEffects_AnonJumptable
.anon_dw
dw .zero
dw .one
dw .two
-
.zero
call BattleBGEffects_IncrementJumptable
call BattleBGEffects_ClearLYOverrides
@@ -1826,7 +1792,7 @@ BattleBGEffect_BounceDown: ; c89ee (32:49ee)
call BattleAnim_ResetLCDStatCustom
ret
-BattleBGEffect_2a: ; c8a3a (32:4a3a)
+BattleBGEffect_2a:
call BattleBGEffects_AnonJumptable
.anon_dw
dw .zero
@@ -1933,15 +1899,13 @@ BattleBGEffect_2a: ; c8a3a (32:4a3a)
.data
db $00, $40, $90, $e4
db -1
-; c8acc
-BattleBGEffect_2b: ; c8acc (32:4acc)
+BattleBGEffect_2b:
call BattleBGEffects_AnonJumptable
.anon_dw
dw .zero
dw .one
-
.zero
call BattleBGEffects_IncrementJumptable
call BattleBGEffects_ClearLYOverrides
@@ -1972,7 +1936,7 @@ BattleBGEffect_2b: ; c8acc (32:4acc)
call BattleAnim_ResetLCDStatCustom
ret
-BattleBGEffect_1c: ; c8b00 (32:4b00)
+BattleBGEffect_1c:
ld a, [hCGB]
and a
jr nz, .cgb
@@ -1982,7 +1946,6 @@ BattleBGEffect_1c: ; c8b00 (32:4b00)
dw .one
dw .two
-
.zero
call BattleBGEffects_IncrementJumptable
ld a, $e4
@@ -2130,97 +2093,86 @@ BattleBGEffect_1c: ; c8b00 (32:4b00)
db $90, $f8
db $40, $fc
db $90, $f8
-; c8be8
-BattleBGEffect_RapidFlash: ; c8be8 (32:4be8)
+BattleBGEffect_RapidFlash:
ld de, .FlashPals
call BGEffect_RapidCyclePals
ret
.FlashPals:
db $e4, $6c, $fe
-; c8bf2
-BattleBGEffect_16: ; c8bf2 (32:4bf2)
+BattleBGEffect_16:
ld de, .Pals
call BGEffect_RapidCyclePals
ret
.Pals:
db $e4, $90, $40, $ff
-; c8bfd
-BattleBGEffect_17: ; c8bfd (32:4bfd)
+BattleBGEffect_17:
ld de, .Pals
call BGEffect_RapidCyclePals
ret
.Pals:
db $e4, $f8, $fc, $ff
-; c8c08
-BattleBGEffect_18: ; c8c08 (32:4c08)
+BattleBGEffect_18:
ld de, .Pals
call BGEffect_RapidCyclePals
ret
.Pals:
db $e4, $90, $40, $90, $fe
-; c8c14
-BattleBGEffect_19: ; c8c14 (32:4c14)
+BattleBGEffect_19:
ld de, .Pals
call BGEffect_RapidCyclePals
ret
.Pals:
db $e4, $f8, $fc, $f8, $fe
-; c8c20
-BattleBGEffect_1a: ; c8c20 (32:4c20)
+BattleBGEffect_1a:
ld de, .Pals
call BGEffect_RapidCyclePals
ret
.Pals:
db $e4, $f8, $fc, $f8, $e4, $90, $40, $90, $fe
-; c8c30
-BattleBGEffect_1b: ; c8c30 (32:4c30)
+BattleBGEffect_1b:
ld de, .Pals
call BGEffect_RapidCyclePals
ret
.Pals:
db $e4, $fc, $e4, $00, $fe
-; c8c3c
-BattleBGEffect_1d: ; c8c3c (32:4c3c)
+BattleBGEffect_1d:
ld de, .Pals
call BGEffect_RapidCyclePals
ret
.Pals:
db $e4, $90, $40, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $40, $90, $e4, $ff
-; c8c55
-BattleBGEffect_1e: ; c8c55 (32:4c55)
+BattleBGEffect_1e:
ld de, .Pals
call BGEffect_RapidCyclePals
ret
.Pals:
db $00, $40, $90, $e4, $ff
-; c8c61
-BattleBGEffect_VibrateMon: ; c8c61 (32:4c61)
+BattleBGEffect_VibrateMon:
call BattleBGEffects_AnonJumptable
.anon_dw
dw .zero
dw .one
-
-.zero ; c8c68 (32:4c68)
+.zero
call BattleBGEffects_IncrementJumptable
call BattleBGEffects_ClearLYOverrides
ld a, rSCX - $ff00
@@ -2236,7 +2188,7 @@ BattleBGEffect_VibrateMon: ; c8c61 (32:4c61)
ld [hl], $20
ret
-.one ; c8c85 (32:4c85)
+.one
ld hl, BG_EFFECT_STRUCT_03
add hl, bc
ld a, [hl]
@@ -2258,15 +2210,14 @@ BattleBGEffect_VibrateMon: ; c8c61 (32:4c61)
call BattleAnim_ResetLCDStatCustom
ret
-BattleBGEffect_WobbleMon: ; c8ca2 (32:4ca2)
+BattleBGEffect_WobbleMon:
call BattleBGEffects_AnonJumptable
.anon_dw
dw .zero
dw .one
dw .two
-
-.zero ; c8cab (32:4cab)
+.zero
call BattleBGEffects_IncrementJumptable
call BattleBGEffects_ClearLYOverrides
ld a, rSCX - $ff00
@@ -2280,7 +2231,7 @@ BattleBGEffect_WobbleMon: ; c8ca2 (32:4ca2)
ld [hl], $0
ret
-.one ; c8cc3 (32:4cc3)
+.one
ld hl, BG_EFFECT_STRUCT_03
add hl, bc
ld a, [hl]
@@ -2296,11 +2247,11 @@ BattleBGEffect_WobbleMon: ; c8ca2 (32:4ca2)
ld [hl], a
ret
-.two ; c8cdd (32:4cdd)
+.two
call BattleAnim_ResetLCDStatCustom
ret
-BattleBGEffect_2e: ; c8ce1 (32:4ce1)
+BattleBGEffect_2e:
call Functionc8d0b
jr c, .xor_a
bit 7, a
@@ -2317,7 +2268,7 @@ BattleBGEffect_2e: ; c8ce1 (32:4ce1)
ld [wAnimObject01YOffset], a
ret
-BattleBGEffect_1f: ; c8cf9 (32:4cf9)
+BattleBGEffect_1f:
call Functionc8d0b
jr nc, .skip
xor a
@@ -2325,7 +2276,7 @@ BattleBGEffect_1f: ; c8cf9 (32:4cf9)
ld [hSCX], a
ret
-BattleBGEffect_20: ; c8d02 (32:4d02)
+BattleBGEffect_20:
call Functionc8d0b
jr nc, .skip
xor a
@@ -2333,7 +2284,7 @@ BattleBGEffect_20: ; c8d02 (32:4d02)
ld [hSCY], a
ret
-Functionc8d0b: ; c8d0b (32:4d0b)
+Functionc8d0b:
ld hl, BG_EFFECT_STRUCT_JT_INDEX
add hl, bc
ld a, [hl]
@@ -2371,7 +2322,7 @@ Functionc8d0b: ; c8d0b (32:4d0b)
and a
ret
-BattleBGEffect_35: ; c8d3a (32:4d3a)
+BattleBGEffect_35:
ld hl, BG_EFFECT_STRUCT_03
add hl, bc
ld a, [hl]
@@ -2392,7 +2343,7 @@ BattleBGEffect_35: ; c8d3a (32:4d3a)
ld [hSCX], a
ret
-BattleBGEffect_GetNthDMGPal: ; c8d57 (32:4d57)
+BattleBGEffect_GetNthDMGPal:
ld hl, BG_EFFECT_STRUCT_JT_INDEX
add hl, bc
ld a, [hl]
@@ -2415,7 +2366,7 @@ BattleBGEffect_GetNthDMGPal: ; c8d57 (32:4d57)
call BattleBGEffect_GetFirstDMGPal
ret
-BGEffect_RapidCyclePals: ; c8d77 (32:4d77)
+BGEffect_RapidCyclePals:
ld a, [hCGB]
and a
jr nz, .cgb
@@ -2430,8 +2381,7 @@ BGEffect_RapidCyclePals: ; c8d77 (32:4d77)
dw .one_dmg
dw .two_dmg
-
-.zero_dmg ; c8d8b (32:4d8b)
+.zero_dmg
call BattleBGEffects_IncrementJumptable
ld a, $e4
call BattleBGEffects_SetLYOverrides
@@ -2449,7 +2399,7 @@ BGEffect_RapidCyclePals: ; c8d77 (32:4d77)
ld [hl], a
ret
-.one_dmg ; c8daa (32:4daa)
+.one_dmg
ld hl, BG_EFFECT_STRUCT_BATTLE_TURN
add hl, bc
ld a, [hl]
@@ -2474,7 +2424,7 @@ BGEffect_RapidCyclePals: ; c8d77 (32:4d77)
dec [hl]
ret
-.two_dmg ; c8dc9 (32:4dc9)
+.two_dmg
call BattleBGEffects_ResetVideoHRAM
ld a, %11100100
ld [rBGP], a
@@ -2488,15 +2438,14 @@ BGEffect_RapidCyclePals: ; c8d77 (32:4d77)
pop de
jp hl
-.Jumptable_CGB: ; c8ddd (32:4ddd)
+.Jumptable_CGB:
dw .zero_cgb
dw .one_cgb
dw .two_cgb
dw .three_cgb
dw .four_cgb
-
-.zero_cgb ; c8de7 (32:4de7)
+.zero_cgb
call BGEffect_CheckBattleTurn
jr nz, .player_turn_cgb
call BattleBGEffects_IncrementJumptable
@@ -2512,7 +2461,7 @@ BGEffect_RapidCyclePals: ; c8d77 (32:4d77)
ld [hl], a
ret
-.one_cgb ; c8e02 (32:4e02)
+.one_cgb
ld hl, BG_EFFECT_STRUCT_BATTLE_TURN
add hl, bc
ld a, [hl]
@@ -2537,13 +2486,13 @@ BGEffect_RapidCyclePals: ; c8d77 (32:4d77)
dec [hl]
ret
-.two_cgb ; c8e21 (32:4e21)
+.two_cgb
ld a, $e4
call BGEffects_LoadBGPal0_OBPal1
call EndBattleBGEffect
ret
-.three_cgb ; c8e2a (32:4e2a)
+.three_cgb
ld hl, BG_EFFECT_STRUCT_BATTLE_TURN
add hl, bc
ld a, [hl]
@@ -2568,13 +2517,13 @@ BGEffect_RapidCyclePals: ; c8d77 (32:4d77)
dec [hl]
ret
-.four_cgb ; c8e49 (32:4e49)
+.four_cgb
ld a, $e4
call BGEffects_LoadBGPal1_OBPal0
call EndBattleBGEffect
ret
-BGEffects_LoadBGPal0_OBPal1: ; c8e52 (32:4e52)
+BGEffects_LoadBGPal0_OBPal1:
ld h, a
ld a, [rSVBK]
push af
@@ -2601,7 +2550,7 @@ BGEffects_LoadBGPal0_OBPal1: ; c8e52 (32:4e52)
ld [hCGBPalUpdate], a
ret
-BGEffects_LoadBGPal1_OBPal0: ; c8e7f (32:4e7f)
+BGEffects_LoadBGPal1_OBPal0:
ld h, a
ld a, [rSVBK]
push af
@@ -2628,12 +2577,12 @@ BGEffects_LoadBGPal1_OBPal0: ; c8e7f (32:4e7f)
ld [hCGBPalUpdate], a
ret
-BattleBGEffect_GetFirstDMGPal: ; c8eac (32:4eac)
+BattleBGEffect_GetFirstDMGPal:
ld hl, BG_EFFECT_STRUCT_03
add hl, bc
ld a, [hl]
inc [hl]
-BattleBGEffect_GetNextDMGPal: ; c8eb2 (32:4eb2)
+BattleBGEffect_GetNextDMGPal:
ld l, a
ld h, $0
add hl, de
@@ -2654,9 +2603,9 @@ BattleBGEffect_GetNextDMGPal: ; c8eb2 (32:4eb2)
scf
ret
-BattleBGEffects_ClearLYOverrides: ; c8eca (32:4eca)
+BattleBGEffects_ClearLYOverrides:
xor a
-BattleBGEffects_SetLYOverrides: ; c8ecb (32:4ecb)
+BattleBGEffects_SetLYOverrides:
ld hl, wLYOverrides ; wListPointer
ld e, $99
.loop1
@@ -2671,7 +2620,7 @@ BattleBGEffects_SetLYOverrides: ; c8ecb (32:4ecb)
jr nz, .loop2
ret
-BattleBGEffect_SetLCDStatCustoms1: ; c8ede (32:4ede)
+BattleBGEffect_SetLCDStatCustoms1:
ld [hLCDCPointer], a
call BGEffect_CheckBattleTurn
jr nz, .player_turn
@@ -2687,7 +2636,7 @@ BattleBGEffect_SetLCDStatCustoms1: ; c8ede (32:4ede)
ld [hLYOverrideEnd], a
ret
-BattleBGEffect_SetLCDStatCustoms2: ; c8ef4 (32:4ef4)
+BattleBGEffect_SetLCDStatCustoms2:
ld [hLCDCPointer], a
call BGEffect_CheckBattleTurn
jr nz, .player_turn
@@ -2703,7 +2652,7 @@ BattleBGEffect_SetLCDStatCustoms2: ; c8ef4 (32:4ef4)
ld [hLYOverrideEnd], a
ret
-BattleAnim_ResetLCDStatCustom: ; c8f0a (32:4f0a)
+BattleAnim_ResetLCDStatCustom:
xor a
ld [hLYOverrideStart], a
ld [hLYOverrideEnd], a
@@ -2713,7 +2662,7 @@ BattleAnim_ResetLCDStatCustom: ; c8f0a (32:4f0a)
call EndBattleBGEffect
ret
-BattleBGEffects_ResetVideoHRAM: ; c8f19 (32:4f19)
+BattleBGEffects_ResetVideoHRAM:
xor a
ld [hLCDCPointer], a
ld a, %11100100
@@ -2725,7 +2674,7 @@ BattleBGEffects_ResetVideoHRAM: ; c8f19 (32:4f19)
call BattleBGEffects_ClearLYOverrides
ret
-Functionc8f2e: ; c8f2e (32:4f2e)
+Functionc8f2e:
push bc
xor a
ld [wBattleAnimTemp0], a
@@ -2760,7 +2709,7 @@ Functionc8f2e: ; c8f2e (32:4f2e)
pop bc
ret
-InitSurfWaves: ; c8f69 (32:4f69)
+InitSurfWaves:
push bc
xor a
ld [wBattleAnimTemp0], a
@@ -2788,7 +2737,7 @@ InitSurfWaves: ; c8f69 (32:4f69)
pop bc
ret
-Functionc8f9a: ; c8f9a (32:4f9a)
+Functionc8f9a:
push bc
ld [wBattleAnimTemp3], a
ld a, e
@@ -2847,7 +2796,7 @@ Functionc8f9a: ; c8f9a (32:4f9a)
ld d, $0
ret
-BattleBGEffect_WavyScreenFX: ; c8fef (32:4fef)
+BattleBGEffect_WavyScreenFX:
push bc
ld a, [hLYOverrideStart]
ld l, a
@@ -2874,7 +2823,7 @@ BattleBGEffect_WavyScreenFX: ; c8fef (32:4fef)
pop bc
ret
-BGEffect_FillLYOverridesBackup: ; c900b (32:500b)
+BGEffect_FillLYOverridesBackup:
push af
ld h, HIGH(wLYOverridesBackup)
ld a, [hLYOverrideStart]
@@ -2889,7 +2838,7 @@ BGEffect_FillLYOverridesBackup: ; c900b (32:500b)
jr nz, .loop
ret
-BGEffect_DisplaceLYOverridesBackup: ; c901b (32:501b)
+BGEffect_DisplaceLYOverridesBackup:
; e = a; d = [hLYOverrideEnd] - [hLYOverrideStart] - a
push af
ld e, a
@@ -2915,7 +2864,7 @@ BGEffect_DisplaceLYOverridesBackup: ; c901b (32:501b)
jr nz, .loop2
ret
-BGEffect_CheckBattleTurn: ; c9038 (32:5038)
+BGEffect_CheckBattleTurn:
ld hl, BG_EFFECT_STRUCT_BATTLE_TURN
add hl, bc
ld a, [hBattleTurn]
@@ -2923,7 +2872,7 @@ BGEffect_CheckBattleTurn: ; c9038 (32:5038)
xor [hl]
ret
-BGEffect_CheckFlyDigStatus: ; c9042 (32:5042)
+BGEffect_CheckFlyDigStatus:
ld hl, BG_EFFECT_STRUCT_BATTLE_TURN
add hl, bc
ld a, [hBattleTurn]
@@ -2939,21 +2888,19 @@ BGEffect_CheckFlyDigStatus: ; c9042 (32:5042)
and 1 << SUBSTATUS_FLYING | 1 << SUBSTATUS_UNDERGROUND
ret
-BattleBGEffects_CheckSGB: ; c9059 (32:5059)
+BattleBGEffects_CheckSGB:
ld a, [hSGB]
and a
ret
-BattleBGEffects_Sine: ; c905d (32:505d)
+BattleBGEffects_Sine:
ld e, a
callfar BattleAnim_Sine_e
ld a, e
ret
-BattleBGEffects_Cosine: ; c9066 (32:5066)
+BattleBGEffects_Cosine:
ld e, a
callfar BattleAnim_Cosine_e
ld a, e
ret
-
-; c906f (32:506f)