summaryrefslogtreecommitdiff
path: root/engine/battle_anims
diff options
context:
space:
mode:
Diffstat (limited to 'engine/battle_anims')
-rw-r--r--engine/battle_anims/anim_commands.asm188
-rw-r--r--engine/battle_anims/bg_effects.asm44
-rwxr-xr-xengine/battle_anims/core.asm8
-rwxr-xr-xengine/battle_anims/functions.asm10
-rwxr-xr-xengine/battle_anims/getpokeballwobble.asm8
5 files changed, 129 insertions, 129 deletions
diff --git a/engine/battle_anims/anim_commands.asm b/engine/battle_anims/anim_commands.asm
index 0bbedf909..ca4928233 100644
--- a/engine/battle_anims/anim_commands.asm
+++ b/engine/battle_anims/anim_commands.asm
@@ -5,7 +5,7 @@ PlayBattleAnim: ; cc0d6
ld a, [rSVBK]
push af
- ld a, BANK(ActiveAnimObjects)
+ ld a, BANK(wActiveAnimObjects)
ld [rSVBK], a
call _PlayBattleAnim
@@ -56,7 +56,7 @@ _PlayBattleAnim: ; cc0e4
BattleAnimRunScript: ; cc11c
- ld a, [FXAnimID + 1]
+ ld a, [wFXAnimID + 1]
and a
jr nz, .hi_byte
@@ -85,9 +85,9 @@ BattleAnimRunScript: ; cc11c
ld de, ANIM_MISS
add hl, de
ld a, l
- ld [FXAnimID], a
+ ld [wFXAnimID], a
ld a, h
- ld [FXAnimID + 1], a
+ ld [wFXAnimID + 1], a
.hi_byte
call WaitSFX
@@ -111,18 +111,18 @@ RunBattleAnimScript: ; cc163
call BattleAnimRequestPals
; Speed up Rollout's animation.
- ld a, [FXAnimID + 1]
+ ld a, [wFXAnimID + 1]
or a
jr nz, .not_rollout
- ld a, [FXAnimID]
+ ld a, [wFXAnimID]
cp ROLLOUT
jr nz, .not_rollout
ld a, $2e
ld b, 5
ld de, 4
- ld hl, ActiveBGEffects
+ ld hl, wActiveBGEffects
.find
cp [hl]
jr z, .done
@@ -134,7 +134,7 @@ RunBattleAnimScript: ; cc163
call BattleAnimDelayFrame
.done
- ld a, [BattleAnimFlags]
+ ld a, [wBattleAnimFlags]
bit 0, a
jr z, .playframe
@@ -163,7 +163,7 @@ BattleAnimRestoreHuds: ; cc1bb
ld a, [rSVBK]
push af
- ld a, BANK(CurBattleMon) ; alternatively: BANK(TempMon), BANK(PartyMon1), several others
+ ld a, BANK(wCurBattleMon) ; alternatively: BANK(wTempMon), BANK(wPartyMon1), several others
ld [rSVBK], a
ld hl, UpdateBattleHuds
@@ -206,9 +206,9 @@ BattleAnimDelayFrame: ; cc1fb
; Like DelayFrame but wastes battery life.
ld a, 1
- ld [VBlankOccurred], a
+ ld [wVBlankOccurred], a
.wait
- ld a, [VBlankOccurred]
+ ld a, [wVBlankOccurred]
and a
jr nz, .wait
ret
@@ -253,11 +253,11 @@ Unreferenced_Functioncc220: ; cc220
BattleAnim_ClearCGB_OAMFlags: ; cc23d
- ld a, [BattleAnimFlags]
+ ld a, [wBattleAnimFlags]
bit 3, a
jr z, .delete
- ld hl, Sprite01Attributes
+ ld hl, wVirtualOAMSprite00Attributes
ld c, NUM_SPRITE_OAM_STRUCTS
.loop
ld a, [hl]
@@ -271,8 +271,8 @@ endr
ret
.delete
- ld hl, Sprites
- ld c, SpritesEnd - Sprites
+ ld hl, wVirtualOAM
+ ld c, wVirtualOAMEnd - wVirtualOAM
xor a
.loop2
ld [hli], a
@@ -289,12 +289,12 @@ RunBattleAnimCommand: ; cc25f
; cc267
.CheckTimer: ; cc267
- ld a, [BattleAnimDuration]
+ ld a, [wBattleAnimDuration]
and a
jr z, .done
dec a
- ld [BattleAnimDuration], a
+ ld [wBattleAnimDuration], a
and a
ret
@@ -311,7 +311,7 @@ RunBattleAnimCommand: ; cc25f
jr nz, .not_done_with_anim
; Return from a subroutine.
- ld hl, BattleAnimFlags
+ ld hl, wBattleAnimFlags
bit 1, [hl]
jr nz, .do_anim
@@ -322,7 +322,7 @@ RunBattleAnimCommand: ; cc25f
cp $d0
jr nc, .do_anim
- ld [BattleAnimDuration], a
+ ld [wBattleAnimDuration], a
ret
.do_anim
@@ -332,8 +332,8 @@ RunBattleAnimCommand: ; cc25f
; cc293
.DoCommand: ; cc293
-; Execute battle animation command in [BattleAnimByte].
- ld a, [BattleAnimByte]
+; Execute battle animation command in [wBattleAnimByte].
+ ld a, [wBattleAnimByte]
sub $d0
ld e, a
@@ -408,13 +408,13 @@ BattleAnimCmd_ED: ; cc304 (33:4304)
ret
BattleAnimCmd_Ret: ; cc305 (33:4305)
- ld hl, BattleAnimFlags
+ ld hl, wBattleAnimFlags
res 1, [hl]
- ld hl, BattleAnimParent
+ ld hl, wBattleAnimParent
ld e, [hl]
inc hl
ld d, [hl]
- ld hl, BattleAnimAddress
+ ld hl, wBattleAnimAddress
ld [hl], e
inc hl
ld [hl], d
@@ -426,20 +426,20 @@ BattleAnimCmd_Call: ; cc317 (33:4317)
call GetBattleAnimByte
ld d, a
push de
- ld hl, BattleAnimAddress
+ ld hl, wBattleAnimAddress
ld e, [hl]
inc hl
ld d, [hl]
- ld hl, BattleAnimParent
+ ld hl, wBattleAnimParent
ld [hl], e
inc hl
ld [hl], d
pop de
- ld hl, BattleAnimAddress
+ ld hl, wBattleAnimAddress
ld [hl], e
inc hl
ld [hl], d
- ld hl, BattleAnimFlags
+ ld hl, wBattleAnimFlags
set 1, [hl]
ret
@@ -448,7 +448,7 @@ BattleAnimCmd_Jump: ; cc339 (33:4339)
ld e, a
call GetBattleAnimByte
ld d, a
- ld hl, BattleAnimAddress
+ ld hl, wBattleAnimAddress
ld [hl], e
inc hl
ld [hl], d
@@ -456,16 +456,16 @@ BattleAnimCmd_Jump: ; cc339 (33:4339)
BattleAnimCmd_Loop: ; cc348 (33:4348)
call GetBattleAnimByte
- ld hl, BattleAnimFlags
+ ld hl, wBattleAnimFlags
bit 2, [hl]
jr nz, .continue_loop
and a
jr z, .perpetual
dec a
set 2, [hl]
- ld [BattleAnimLoops], a
+ ld [wBattleAnimLoops], a
.continue_loop
- ld hl, BattleAnimLoops
+ ld hl, wBattleAnimLoops
ld a, [hl]
and a
jr z, .return_from_loop
@@ -475,16 +475,16 @@ BattleAnimCmd_Loop: ; cc348 (33:4348)
ld e, a
call GetBattleAnimByte
ld d, a
- ld hl, BattleAnimAddress
+ ld hl, wBattleAnimAddress
ld [hl], e
inc hl
ld [hl], d
ret
.return_from_loop
- ld hl, BattleAnimFlags
+ ld hl, wBattleAnimFlags
res 2, [hl]
- ld hl, BattleAnimAddress
+ ld hl, wBattleAnimAddress
ld e, [hl]
inc hl
ld d, [hl]
@@ -506,14 +506,14 @@ BattleAnimCmd_JumpUntil: ; cc383 (33:4383)
ld e, a
call GetBattleAnimByte
ld d, a
- ld hl, BattleAnimAddress
+ ld hl, wBattleAnimAddress
ld [hl], e
inc hl
ld [hl], d
ret
.dont_jump
- ld hl, BattleAnimAddress
+ ld hl, wBattleAnimAddress
ld e, [hl]
inc hl
ld d, [hl]
@@ -526,21 +526,21 @@ BattleAnimCmd_JumpUntil: ; cc383 (33:4383)
BattleAnimCmd_SetVar: ; cc3a6 (33:43a6)
call GetBattleAnimByte
- ld [BattleAnimVar], a
+ ld [wBattleAnimVar], a
ret
BattleAnimCmd_IncVar: ; cc3ad (33:43ad)
- ld hl, BattleAnimVar
+ ld hl, wBattleAnimVar
inc [hl]
ret
BattleAnimCmd_IfVarEqual: ; cc3b2 (33:43b2)
call GetBattleAnimByte
- ld hl, BattleAnimVar
+ ld hl, wBattleAnimVar
cp [hl]
jr z, .jump
- ld hl, BattleAnimAddress
+ ld hl, wBattleAnimAddress
ld e, [hl]
inc hl
ld d, [hl]
@@ -556,7 +556,7 @@ BattleAnimCmd_IfVarEqual: ; cc3b2 (33:43b2)
ld e, a
call GetBattleAnimByte
ld d, a
- ld hl, BattleAnimAddress
+ ld hl, wBattleAnimAddress
ld [hl], e
inc hl
ld [hl], d
@@ -568,7 +568,7 @@ BattleAnimCmd_IfParamEqual: ; cc3d6 (33:43d6)
cp [hl]
jr z, .jump
- ld hl, BattleAnimAddress
+ ld hl, wBattleAnimAddress
ld e, [hl]
inc hl
ld d, [hl]
@@ -584,7 +584,7 @@ BattleAnimCmd_IfParamEqual: ; cc3d6 (33:43d6)
ld e, a
call GetBattleAnimByte
ld d, a
- ld hl, BattleAnimAddress
+ ld hl, wBattleAnimAddress
ld [hl], e
inc hl
ld [hl], d
@@ -597,7 +597,7 @@ BattleAnimCmd_IfParamAnd: ; cc3fa (33:43fa)
and e
jr nz, .jump
- ld hl, BattleAnimAddress
+ ld hl, wBattleAnimAddress
ld e, [hl]
inc hl
ld d, [hl]
@@ -613,7 +613,7 @@ BattleAnimCmd_IfParamAnd: ; cc3fa (33:43fa)
ld e, a
call GetBattleAnimByte
ld d, a
- ld hl, BattleAnimAddress
+ ld hl, wBattleAnimAddress
ld [hl], e
inc hl
ld [hl], d
@@ -670,7 +670,7 @@ BattleAnimCmd_ResetObp0: ; cc46c (33:446c)
ret
BattleAnimCmd_ClearObjs: ; cc479 (33:4479)
- ld hl, ActiveAnimObjects
+ ld hl, wActiveAnimObjects
ld a, $a0
.loop
ld [hl], $0
@@ -684,7 +684,7 @@ BattleAnimCmd_2GFX:
BattleAnimCmd_3GFX:
BattleAnimCmd_4GFX:
BattleAnimCmd_5GFX: ; cc485 (33:4485)
- ld a, [BattleAnimByte]
+ ld a, [wBattleAnimByte]
and $f
ld c, a
ld hl, wBattleAnimTileDict
@@ -707,7 +707,7 @@ rept 4
endr
ld de, vTiles0 tile $31
add hl, de
- ld a, [BattleAnimByte]
+ ld a, [wBattleAnimByte]
call LoadBattleAnimObj
ld a, [wBattleAnimTemp0]
add c
@@ -721,12 +721,12 @@ endr
BattleAnimCmd_IncObj: ; cc4c0 (33:44c0)
call GetBattleAnimByte
ld e, 10
- ld bc, ActiveAnimObjects
+ ld bc, wActiveAnimObjects
.loop
ld hl, BATTLEANIMSTRUCT_INDEX
add hl, bc
ld d, [hl]
- ld a, [BattleAnimByte]
+ ld a, [wBattleAnimByte]
cp d
jr z, .found
ld hl, BATTLEANIMSTRUCT_LENGTH
@@ -746,12 +746,12 @@ BattleAnimCmd_IncObj: ; cc4c0 (33:44c0)
BattleAnimCmd_IncBGEffect: ; cc4e3 (33:44e3)
call GetBattleAnimByte
ld e, 5
- ld bc, ActiveBGEffects
+ ld bc, wActiveBGEffects
.loop
ld hl, $0
add hl, bc
ld d, [hl]
- ld a, [BattleAnimByte]
+ ld a, [wBattleAnimByte]
cp d
jr z, .found
ld hl, 4
@@ -771,12 +771,12 @@ BattleAnimCmd_IncBGEffect: ; cc4e3 (33:44e3)
BattleAnimCmd_SetObj: ; cc506 (33:4506)
call GetBattleAnimByte
ld e, 10
- ld bc, ActiveAnimObjects
+ ld bc, wActiveAnimObjects
.loop
ld hl, BATTLEANIMSTRUCT_INDEX
add hl, bc
ld d, [hl]
- ld a, [BattleAnimByte]
+ ld a, [wBattleAnimByte]
cp d
jr z, .found
ld hl, BATTLEANIMSTRUCT_LENGTH
@@ -907,7 +907,7 @@ BattleAnimCmd_PlayerHeadObj: ; cc57e (33:457e)
BattleAnimCmd_CheckPokeball: ; cc5d0 (33:45d0)
callfar GetPokeBallWobble
ld a, c
- ld [BattleAnimVar], a
+ ld [wBattleAnimVar], a
ret
BattleAnimCmd_E7: ; cc5db (33:45db)
@@ -916,34 +916,34 @@ BattleAnimCmd_E7: ; cc5db (33:45db)
BattleAnimCmd_Transform: ; cc5dc (33:45dc)
ld a, [rSVBK]
push af
- ld a, BANK(CurPartySpecies)
+ ld a, BANK(wCurPartySpecies)
ld [rSVBK], a
- ld a, [CurPartySpecies] ; CurPartySpecies
+ ld a, [wCurPartySpecies] ; CurPartySpecies
push af
ld a, [hBattleTurn]
and a
jr z, .player
- ld a, [TempBattleMonSpecies] ; TempBattleMonSpecies
- ld [CurPartySpecies], a ; CurPartySpecies
- ld hl, BattleMonDVs ; BattleMonDVs
+ ld a, [wTempBattleMonSpecies] ; TempBattleMonSpecies
+ ld [wCurPartySpecies], a ; CurPartySpecies
+ ld hl, wBattleMonDVs ; BattleMonDVs
predef GetUnownLetter
ld de, vTiles0 tile $00
predef GetMonFrontpic
jr .done
.player
- ld a, [TempEnemyMonSpecies] ; TempEnemyMonSpecies
- ld [CurPartySpecies], a ; CurPartySpecies
- ld hl, EnemyMonDVs ; EnemyMonDVs
+ ld a, [wTempEnemyMonSpecies] ; TempEnemyMonSpecies
+ ld [wCurPartySpecies], a ; CurPartySpecies
+ ld hl, wEnemyMonDVs ; EnemyMonDVs
predef GetUnownLetter
ld de, vTiles0 tile $00
predef GetMonBackpic
.done
pop af
- ld [CurPartySpecies], a ; CurPartySpecies
+ ld [wCurPartySpecies], a ; CurPartySpecies
pop af
ld [rSVBK], a
ret
@@ -1117,10 +1117,10 @@ BattleAnimCmd_Minimize: ; cc735 (33:4735)
BattleAnimCmd_DropSub: ; cc750 (33:4750)
ld a, [rSVBK]
push af
- ld a, BANK(CurPartySpecies)
+ ld a, BANK(wCurPartySpecies)
ld [rSVBK], a
- ld a, [CurPartySpecies] ; CurPartySpecies
+ ld a, [wCurPartySpecies] ; CurPartySpecies
push af
ld a, [hBattleTurn]
and a
@@ -1134,7 +1134,7 @@ BattleAnimCmd_DropSub: ; cc750 (33:4750)
.done
pop af
- ld [CurPartySpecies], a ; CurPartySpecies
+ ld [wCurPartySpecies], a ; CurPartySpecies
pop af
ld [rSVBK], a
ret
@@ -1142,33 +1142,33 @@ BattleAnimCmd_DropSub: ; cc750 (33:4750)
BattleAnimCmd_BeatUp: ; cc776 (33:4776)
ld a, [rSVBK]
push af
- ld a, BANK(CurPartySpecies)
+ ld a, BANK(wCurPartySpecies)
ld [rSVBK], a
- ld a, [CurPartySpecies] ; CurPartySpecies
+ ld a, [wCurPartySpecies] ; CurPartySpecies
push af
ld a, [wBattleAnimParam]
- ld [CurPartySpecies], a ; CurPartySpecies
+ ld [wCurPartySpecies], a ; CurPartySpecies
ld a, [hBattleTurn]
and a
jr z, .player
- ld hl, BattleMonDVs
+ ld hl, wBattleMonDVs
predef GetUnownLetter
ld de, vTiles2 tile $00
predef GetMonFrontpic
jr .done
.player
- ld hl, EnemyMonDVs
+ ld hl, wEnemyMonDVs
predef GetUnownLetter
ld de, vTiles2 tile $31
predef GetMonBackpic
.done
pop af
- ld [CurPartySpecies], a ; CurPartySpecies
+ ld [wCurPartySpecies], a ; CurPartySpecies
ld b, SCGB_BATTLE_COLORS
call GetSGBLayout
pop af
@@ -1186,7 +1186,7 @@ BattleAnimCmd_OAMOff: ; cc7bf (33:47bf)
ret
BattleAnimCmd_ClearSprites: ; cc7c4 (33:47c4)
- ld hl, BattleAnimFlags
+ ld hl, wBattleAnimFlags
set 3, [hl]
ret
@@ -1207,7 +1207,7 @@ BattleAnimCmd_Sound: ; cc7cd (33:47cd)
ld [wSFXDuration], a
call .GetCryTrack
maskbits NUM_NOISE_CHANS
- ld [CryTracks], a ; CryTracks
+ ld [wCryTracks], a ; CryTracks
ld e, a
ld d, 0
@@ -1253,7 +1253,7 @@ endr
ld a, [rSVBK]
push af
- ld a, BANK(EnemyMon) ; BattleMon is in WRAM0, but EnemyMon is in WRAMX
+ ld a, BANK(wEnemyMon) ; wBattleMon is in WRAM0, but EnemyMon is in WRAMX
ld [rSVBK], a
ld a, [hBattleTurn]
@@ -1261,14 +1261,14 @@ endr
jr nz, .enemy
ld a, $f0
- ld [CryTracks], a
- ld a, [BattleMonSpecies]
+ ld [wCryTracks], a
+ ld a, [wBattleMonSpecies]
jr .done_cry_tracks
.enemy
ld a, $0f
- ld [CryTracks], a
- ld a, [EnemyMonSpecies]
+ ld [wCryTracks], a
+ ld a, [wEnemyMonSpecies]
.done_cry_tracks
push hl
@@ -1282,30 +1282,30 @@ endr
ld b, a
push hl
- ld hl, CryPitch
+ ld hl, wCryPitch
ld a, [hli]
ld h, [hl]
ld l, a
add hl, bc
ld a, l
- ld [CryPitch], a
+ ld [wCryPitch], a
ld a, h
- ld [CryPitch + 1], a
+ ld [wCryPitch + 1], a
pop hl
ld a, [hli]
ld c, a
ld b, [hl]
- ld hl, CryLength ; CryLength
+ ld hl, wCryLength ; CryLength
ld a, [hli]
ld h, [hl]
ld l, a
add hl, bc
ld a, l
- ld [CryLength], a ; CryLength
+ ld [wCryLength], a ; CryLength
ld a, h
- ld [CryLength + 1], a
+ ld [wCryLength + 1], a
ld a, 1
ld [wStereoPanningMask], a
@@ -1334,7 +1334,7 @@ PlayHitSound: ; cc881
ret nz
.okay
- ld a, [TypeModifier]
+ ld a, [wTypeModifier]
and $7f
ret z
@@ -1382,8 +1382,8 @@ BattleAnimAssignPals: ; cc8a4
ClearBattleAnims: ; cc8d3
; Clear animation block
- ld hl, LYOverrides
- ld bc, wBattleAnimEnd - LYOverrides
+ ld hl, wLYOverrides
+ ld bc, wBattleAnimEnd - wLYOverrides
.loop
ld [hl], $0
inc hl
@@ -1392,7 +1392,7 @@ ClearBattleAnims: ; cc8d3
or b
jr nz, .loop
- ld hl, FXAnimID
+ ld hl, wFXAnimID
ld e, [hl]
inc hl
ld d, [hl]
@@ -1476,7 +1476,7 @@ BattleAnim_SetOBPals: ; cc94b
BattleAnim_UpdateOAM_All: ; cc96e
ld a, $0
ld [wBattleAnimOAMPointerLo], a
- ld hl, ActiveAnimObjects
+ ld hl, wActiveAnimObjects
ld e, 10
.loop
ld a, [hl]
@@ -1499,10 +1499,10 @@ BattleAnim_UpdateOAM_All: ; cc96e
jr nz, .loop
ld a, [wBattleAnimOAMPointerLo]
ld l, a
- ld h, HIGH(Sprites)
+ ld h, HIGH(wVirtualOAM)
.loop2
ld a, l
- cp LOW(SpritesEnd)
+ cp LOW(wVirtualOAMEnd)
jr nc, .done
xor a
ld [hli], a
diff --git a/engine/battle_anims/bg_effects.asm b/engine/battle_anims/bg_effects.asm
index a7c2012e5..3192774dd 100644
--- a/engine/battle_anims/bg_effects.asm
+++ b/engine/battle_anims/bg_effects.asm
@@ -9,7 +9,7 @@
; BG effects for use in battle animations.
ExecuteBGEffects: ; c8000 (32:4000)
- ld hl, ActiveBGEffects
+ ld hl, wActiveBGEffects
ld e, 5
.loop
ld a, [hl]
@@ -30,7 +30,7 @@ ExecuteBGEffects: ; c8000 (32:4000)
ret
QueueBGEffect: ; c801a (32:401a)
- ld hl, ActiveBGEffects
+ ld hl, wActiveBGEffects
ld e, 5
.loop
ld a, [hl]
@@ -960,7 +960,7 @@ BattleBGEffect_Surf: ; c8545 (32:4545)
jr nz, .loop
pop af
ld [hl], a
- ld de, LYOverridesBackup
+ ld de, wLYOverridesBackup
ld hl, wSurfWaveBGEffect
ld bc, $0
.loop2
@@ -1224,7 +1224,7 @@ BattleBGEffect_DoubleTeam: ; c8689 (32:4689)
xor $ff
inc a
ld d, a
- ld h, HIGH(LYOverridesBackup)
+ ld h, HIGH(wLYOverridesBackup)
ld a, [hLYOverrideStart]
ld l, a
ld a, [hLYOverrideEnd]
@@ -1265,7 +1265,7 @@ BattleBGEffect_AcidArmor: ; c8709 (32:4709)
ld e, [hl]
ld d, 2
call Functionc8f2e
- ld h, HIGH(LYOverridesBackup)
+ ld h, HIGH(wLYOverridesBackup)
ld a, [hLYOverrideEnd]
ld l, a
ld [hl], $0
@@ -1276,7 +1276,7 @@ BattleBGEffect_AcidArmor: ; c8709 (32:4709)
.one
ld a, [hLYOverrideEnd]
ld l, a
- ld h, HIGH(LYOverridesBackup)
+ ld h, HIGH(wLYOverridesBackup)
ld e, l
ld d, h
dec de
@@ -1539,10 +1539,10 @@ Tackle_BGEffect25_2d_two:
Functionc88a5: ; c88a5 (32:48a5)
push af
- ld a, [FXAnimID + 1] ; FXAnimID + 1
+ ld a, [wFXAnimID + 1] ; FXAnimID + 1
or a
jr nz, .not_rollout
- ld a, [FXAnimID] ; FXAnimID
+ ld a, [wFXAnimID] ; FXAnimID
cp ROLLOUT
jr z, .rollout
.not_rollout
@@ -1555,7 +1555,7 @@ Functionc88a5: ; c88a5 (32:48a5)
ld a, [hLYOverrideEnd]
sub d
ld d, a
- ld h, HIGH(LYOverridesBackup)
+ ld h, HIGH(wLYOverridesBackup)
ld a, [hSCY]
or a
jr nz, .skip1
@@ -1847,7 +1847,7 @@ BattleBGEffect_2a: ; c8a3a (32:4a3a)
ld [hLYOverrideEnd], a
ld a, [hLYOverrideStart]
ld l, a
- ld h, HIGH(LYOverridesBackup)
+ ld h, HIGH(wLYOverridesBackup)
.loop
ld a, [hLYOverrideEnd]
cp l
@@ -1901,7 +1901,7 @@ BattleBGEffect_2a: ; c8a3a (32:4a3a)
ld a, [hLYOverrideEnd]
sub l
srl a
- ld h, HIGH(LYOverridesBackup)
+ ld h, HIGH(wLYOverridesBackup)
.loop2
ld [hl], e
inc hl
@@ -2044,7 +2044,7 @@ BattleBGEffect_1c: ; c8b00 (32:4b00)
ret
.DMG_LYOverrideLoads:
- ld hl, LYOverridesBackup
+ ld hl, wLYOverridesBackup
.loop1
ld [hl], d
inc hl
@@ -2314,7 +2314,7 @@ BattleBGEffect_2e: ; c8ce1 (32:4ce1)
ld [hSCY], a
xor $ff
inc a
- ld [AnimObject01YOffset], a
+ ld [wAnimObject01YOffset], a
ret
BattleBGEffect_1f: ; c8cf9 (32:4cf9)
@@ -2657,13 +2657,13 @@ BattleBGEffect_GetNextDMGPal: ; c8eb2 (32:4eb2)
BattleBGEffects_ClearLYOverrides: ; c8eca (32:4eca)
xor a
BattleBGEffects_SetLYOverrides: ; c8ecb (32:4ecb)
- ld hl, LYOverrides ; wListPointer
+ ld hl, wLYOverrides ; wListPointer
ld e, $99
.loop1
ld [hli], a
dec e
jr nz, .loop1
- ld hl, LYOverridesBackup
+ ld hl, wLYOverridesBackup
ld e, $91
.loop2
ld [hli], a
@@ -2735,7 +2735,7 @@ Functionc8f2e: ; c8f2e (32:4f2e)
ld [wBattleAnimTemp2], a
ld a, $80
ld [wBattleAnimTemp3], a
- ld bc, LYOverridesBackup
+ ld bc, wLYOverridesBackup
.loop
ld a, [hLYOverrideStart]
cp c
@@ -2796,7 +2796,7 @@ Functionc8f9a: ; c8f9a (32:4f9a)
ld a, d
ld [wBattleAnimTemp2], a
call .GetLYOverrideBackupAddrOffset
- ld hl, LYOverridesBackup
+ ld hl, wLYOverridesBackup
add hl, de
ld c, l
ld b, h
@@ -2853,7 +2853,7 @@ BattleBGEffect_WavyScreenFX: ; c8fef (32:4fef)
ld l, a
inc a
ld e, a
- ld h, HIGH(LYOverridesBackup)
+ ld h, HIGH(wLYOverridesBackup)
ld d, h
ld a, [hLYOverrideEnd]
sub l
@@ -2876,7 +2876,7 @@ BattleBGEffect_WavyScreenFX: ; c8fef (32:4fef)
BGEffect_FillLYOverridesBackup: ; c900b (32:500b)
push af
- ld h, HIGH(LYOverridesBackup)
+ ld h, HIGH(wLYOverridesBackup)
ld a, [hLYOverrideStart]
ld l, a
ld a, [hLYOverrideEnd]
@@ -2899,7 +2899,7 @@ BGEffect_DisplaceLYOverridesBackup: ; c901b (32:501b)
sub l
sub e
ld d, a
- ld h, HIGH(LYOverridesBackup)
+ ld h, HIGH(wLYOverridesBackup)
ld a, [hLYOverrideStart]
ld l, a
ld a, $90
@@ -2930,12 +2930,12 @@ BGEffect_CheckFlyDigStatus: ; c9042 (32:5042)
and $1
xor [hl]
jr nz, .player
- ld a, [EnemySubStatus3] ; EnemySubStatus3
+ ld a, [wEnemySubStatus3] ; EnemySubStatus3
and 1 << SUBSTATUS_FLYING | 1 << SUBSTATUS_UNDERGROUND
ret
.player
- ld a, [PlayerSubStatus3] ; PlayerSubStatus3
+ ld a, [wPlayerSubStatus3] ; PlayerSubStatus3
and 1 << SUBSTATUS_FLYING | 1 << SUBSTATUS_UNDERGROUND
ret
diff --git a/engine/battle_anims/core.asm b/engine/battle_anims/core.asm
index 55adeae8c..11578f7f0 100755
--- a/engine/battle_anims/core.asm
+++ b/engine/battle_anims/core.asm
@@ -1,5 +1,5 @@
QueueBattleAnimation: ; cc9a1 (33:49a1)
- ld hl, ActiveAnimObjects
+ ld hl, wActiveAnimObjects
ld e, 10
.loop
ld a, [hl]
@@ -106,7 +106,7 @@ BattleAnimOAMUpdate: ; cca09
ld l, a
ld a, [wBattleAnimOAMPointerLo]
ld e, a
- ld d, HIGH(Sprites)
+ ld d, HIGH(wVirtualOAM)
.loop
ld a, [wBattleAnimTempYCoord]
ld b, a
@@ -249,10 +249,10 @@ InitBattleAnimBuffer: ; ccaaa
.check_kinesis_softboiled_milkdrink
sub d
push af
- ld a, [FXAnimID + 1]
+ ld a, [wFXAnimID + 1]
or a
jr nz, .no_sub
- ld a, [FXAnimID]
+ ld a, [wFXAnimID]
cp KINESIS
jr z, .kinesis
cp SOFTBOILED
diff --git a/engine/battle_anims/functions.asm b/engine/battle_anims/functions.asm
index 5e85ffdb0..e747feeef 100755
--- a/engine/battle_anims/functions.asm
+++ b/engine/battle_anims/functions.asm
@@ -428,9 +428,9 @@ GetBallAnimPal: ; cd249 (33:5249)
ld hl, BallColors
ld a, [rSVBK]
push af
- ld a, BANK(CurItem)
+ ld a, BANK(wCurItem)
ld [rSVBK], a
- ld a, [CurItem]
+ ld a, [wCurItem]
ld e, a
pop af
ld [rSVBK], a
@@ -1611,7 +1611,7 @@ Functioncd913: ; cd913 (33:5913)
ld hl, BATTLEANIMSTRUCT_10
add hl, bc
ld e, [hl]
- ld hl, hPushOAM ; $ff80
+ ld hl, hTransferVirtualOAM ; $ff80
add hl, de
ld e, l
ld d, h
@@ -2104,7 +2104,7 @@ asm_cdbfa: ; cdbfa (33:5bfa)
ld hl, BATTLEANIMSTRUCT_0F
add hl, bc
ld e, [hl]
- ld hl, hPushOAM ; $ff80
+ ld hl, hTransferVirtualOAM ; $ff80
add hl, de
ld e, l
ld d, h
@@ -3332,7 +3332,7 @@ Functionce306: ; ce306 (33:6306)
ld hl, BATTLEANIMSTRUCT_0F
add hl, bc
ld e, [hl]
- ld hl, hPushOAM ; $ff80
+ ld hl, hTransferVirtualOAM ; $ff80
add hl, de
ld e, l
ld d, h
diff --git a/engine/battle_anims/getpokeballwobble.asm b/engine/battle_anims/getpokeballwobble.asm
index 2bc53d798..b3f558039 100755
--- a/engine/battle_anims/getpokeballwobble.asm
+++ b/engine/battle_anims/getpokeballwobble.asm
@@ -8,12 +8,12 @@ GetPokeBallWobble: ; f971 (3:7971)
ld d, a
push de
- ld a, BANK(Buffer2)
+ ld a, BANK(wBuffer2)
ld [rSVBK], a
- ld a, [Buffer2]
+ ld a, [wBuffer2]
inc a
- ld [Buffer2], a
+ ld [wBuffer2], a
; Wobble up to 3 times.
cp 3 + 1
@@ -25,7 +25,7 @@ GetPokeBallWobble: ; f971 (3:7971)
jr nz, .done
ld hl, .WobbleProbabilities
- ld a, [Buffer1]
+ ld a, [wBuffer1]
ld b, a
.loop
ld a, [hli]