aboutsummaryrefslogtreecommitdiffstats
path: root/engine/battle
diff options
context:
space:
mode:
authorColton G. Rushton <colton51919@gmail.com>2022-07-09 18:18:20 -0300
committerGitHub <noreply@github.com>2022-07-09 17:18:20 -0400
commitc0085ea1b21a171ef9f4c73ad28a5306558f2cc3 (patch)
tree311a4a64f13395e2f711b46f8b13bbc1b5ff849e /engine/battle
parentFix typo: HeatButt -> HeadButt (diff)
downloadpokeyellow-c0085ea1b21a171ef9f4c73ad28a5306558f2cc3.tar.gz
pokeyellow-c0085ea1b21a171ef9f4c73ad28a5306558f2cc3.tar.xz
pokeyellow-c0085ea1b21a171ef9f4c73ad28a5306558f2cc3.zip
wOAMBuffer -> wShadowOAM (#95)
Diffstat (limited to 'engine/battle')
-rw-r--r--engine/battle/animations.asm32
-rw-r--r--engine/battle/battle_transitions.asm2
-rw-r--r--engine/battle/core.asm4
-rw-r--r--engine/battle/draw_hud_pokeball_gfx.asm8
-rw-r--r--engine/battle/ghost_marowak_anim.asm2
5 files changed, 24 insertions, 24 deletions
diff --git a/engine/battle/animations.asm b/engine/battle/animations.asm
index 8cd62d2b..9a58c221 100644
--- a/engine/battle/animations.asm
+++ b/engine/battle/animations.asm
@@ -174,7 +174,7 @@ DrawFrameBlock:
jr z, .resetFrameBlockDestAddr
call AnimationCleanOAM
.resetFrameBlockDestAddr
- ld hl, wOAMBuffer ; OAM buffer
+ ld hl, wShadowOAM
ld a, l
ld [wFBDestAddr + 1], a
ld a, h
@@ -622,7 +622,7 @@ PlaySubanimation:
call GetMoveSound
call PlaySound
.skipPlayingSound
- ld hl, wOAMBuffer ; base address of OAM buffer
+ ld hl, wShadowOAM
ld a, l
ld [wFBDestAddr + 1], a
ld a, h
@@ -895,7 +895,7 @@ TradeShakePokeball:
; if it's the end of the animation, make the ball jump up
ld de, BallMoveDistances1
.loop
- ld hl, wOAMBuffer ; OAM buffer
+ ld hl, wShadowOAM
ld bc, 4
.innerLoop
ld a, [de]
@@ -925,7 +925,7 @@ BallMoveDistances1:
TradeJumpPokeball:
ld de, BallMoveDistances2
.loop
- ld hl, wOAMBuffer ; OAM buffer
+ ld hl, wShadowOAM
ld bc, 4
.innerLoop
ld a, [de]
@@ -965,8 +965,8 @@ BallMoveDistances2:
; this function copies the current musical note graphic
; so that there are two musical notes flying towards the defending pokemon
DoGrowlSpecialEffects:
- ld hl, wOAMBuffer ; OAM buffer
- ld de, wOAMBuffer + $10
+ ld hl, wShadowOAM
+ ld de, wShadowOAMSprite04
ld bc, $10
call CopyData ; copy the musical note graphic
ld a, [wSubAnimCounter]
@@ -1180,7 +1180,7 @@ AnimationWaterDropletsEverywhere:
ret
_AnimationWaterDroplets:
- ld hl, wOAMBuffer
+ ld hl, wShadowOAM
.loop
ld a, $1
ld [wdef5], a
@@ -1323,7 +1323,7 @@ ShakeEnemyHUD_WritePlayerMonPicOAM:
ld [wBaseCoordX], a
ld a, $30
ld [wBaseCoordY], a
- ld hl, wOAMBuffer
+ ld hl, wShadowOAM
ld d, 0
ld c, 7
.loop
@@ -1571,7 +1571,7 @@ AnimationSpiralBallsInward:
.loop
push hl
ld c, 3
- ld de, wOAMBuffer
+ ld de, wShadowOAM
.innerLoop
ld a, [hl]
cp $ff
@@ -1723,7 +1723,7 @@ _AnimationShootBallsUpward:
call LoadAnimationTileset
pop bc
ld d, $7a ; ball tile
- ld hl, wOAMBuffer
+ ld hl, wShadowOAM
push bc
ld a, [wBaseCoordY]
ld e, a
@@ -1737,7 +1737,7 @@ _AnimationShootBallsUpward:
ld [wNumShootingBalls], a
.loop
push bc
- ld hl, wOAMBuffer
+ ld hl, wShadowOAM
.innerLoop
ld a, [wBaseCoordY]
add 8
@@ -2240,7 +2240,7 @@ InitMultipleObjectsOAM:
xor a
ld e, a
ld [wBaseCoordX], a
- ld hl, wOAMBuffer
+ ld hl, wShadowOAM
.loop
call BattleAnimWriteOAMEntry
dec c
@@ -2494,7 +2494,7 @@ AnimationFallingObjects:
call InitMultipleObjectsOAM
call FallingObjects_InitXCoords
call FallingObjects_InitMovementData
- ld hl, wOAMBuffer
+ ld hl, wShadowOAM
ld [hl], 0
.loop
ld hl, wFallingObjectsMovementData
@@ -2521,7 +2521,7 @@ AnimationFallingObjects:
dec c
jr nz, .innerLoop
call Delay3
- ld hl, wOAMBuffer
+ ld hl, wShadowOAM
ld a, [hl] ; Y
cp 104 ; has the top falling object reached 104 yet?
jr nz, .loop ; keep moving the falling objects down until it does
@@ -2530,7 +2530,7 @@ AnimationFallingObjects:
FallingObjects_UpdateOAMEntry:
; Increases Y by 2 pixels and adjusts X and X flip based on the falling object's
; movement byte.
- ld hl, wOAMBuffer
+ ld hl, wShadowOAM
add hl, de
ld a, $1
ld [wdef5], a
@@ -2616,7 +2616,7 @@ FallingObjects_UpdateMovementByte:
ret
FallingObjects_InitXCoords:
- ld hl, wOAMBuffer + $01
+ ld hl, wShadowOAMSprite00XCoord
ld de, FallingObjects_InitialXCoords
ld a, [wNumFallingObjects]
ld c, a
diff --git a/engine/battle/battle_transitions.asm b/engine/battle/battle_transitions.asm
index 88cd1d6e..b0289d7e 100644
--- a/engine/battle/battle_transitions.asm
+++ b/engine/battle/battle_transitions.asm
@@ -26,7 +26,7 @@ BattleTransition:
jr nz, .loop1
; Clear OAM except for the blocks used by the player and enemy trainer sprites.
- ld hl, wOAMBuffer + $10
+ ld hl, wShadowOAMSprite04
ld c, 9
.loop2
ld a, b
diff --git a/engine/battle/core.asm b/engine/battle/core.asm
index 03566487..23cac58a 100644
--- a/engine/battle/core.asm
+++ b/engine/battle/core.asm
@@ -108,7 +108,7 @@ SlidePlayerAndEnemySilhouettesOnScreen:
; instead, the enemy pic is part of the background and uses the scroll register, while the player's head is a sprite and is slid by changing its X coordinates in a loop
SlidePlayerHeadLeft:
push bc
- ld hl, wOAMBuffer + $01
+ ld hl, wShadowOAMSprite00XCoord
ld c, $15 ; number of OAM entries
ld de, $4 ; size of OAM entry
.loop
@@ -6511,7 +6511,7 @@ LoadPlayerBackPic:
ASSERT BANK(RedPicBack) == BANK(ProfOakPicBack)
call UncompressSpriteFromDE
predef ScaleSpriteByTwo
- ld hl, wOAMBuffer
+ ld hl, wShadowOAM
xor a
ldh [hOAMTile], a ; initial tile number
ld b, $7 ; 7 columns
diff --git a/engine/battle/draw_hud_pokeball_gfx.asm b/engine/battle/draw_hud_pokeball_gfx.asm
index 6aed1d0a..3f16850a 100644
--- a/engine/battle/draw_hud_pokeball_gfx.asm
+++ b/engine/battle/draw_hud_pokeball_gfx.asm
@@ -29,7 +29,7 @@ SetupOwnPartyPokeballs:
ld [wHUDPokeballGfxOffsetX], a
xor a
ld [wdef5], a
- ld hl, wOAMBuffer
+ ld hl, wShadowOAM
jp WritePokeballOAMData
SetupEnemyPartyPokeballs:
@@ -45,7 +45,7 @@ SetupEnemyPartyPokeballs:
ld [wHUDPokeballGfxOffsetX], a
ld a, $1
ld [wdef5], a
- ld hl, wOAMBuffer + PARTY_LENGTH * 4
+ ld hl, wShadowOAMSprite06
jp WritePokeballOAMData
SetupPokeballs:
@@ -180,7 +180,7 @@ SetupPlayerAndEnemyPokeballs:
ld [wHUDPokeballGfxOffsetX], a
xor a
ld [wdef5], a
- ld hl, wOAMBuffer
+ ld hl, wShadowOAM
call WritePokeballOAMData
ld hl, wEnemyMons
ld de, wEnemyPartyCount
@@ -191,7 +191,7 @@ SetupPlayerAndEnemyPokeballs:
ld [hl], $68
ld a, $1
ld [wdef5], a
- ld hl, wOAMBuffer + $18
+ ld hl, wShadowOAMSprite06
jp WritePokeballOAMData
; four tiles: pokeball, black pokeball (status ailment), crossed out pokeball (fainted) and pokeball slot (no mon)
diff --git a/engine/battle/ghost_marowak_anim.asm b/engine/battle/ghost_marowak_anim.asm
index fd21b29e..7fe42121 100644
--- a/engine/battle/ghost_marowak_anim.asm
+++ b/engine/battle/ghost_marowak_anim.asm
@@ -61,7 +61,7 @@ CopyMonPicFromBGToSpriteVRAM:
ld [wBaseCoordY], a
ld a, $70
ld [wBaseCoordX], a
- ld hl, wOAMBuffer
+ ld hl, wShadowOAM
lb bc, 6, 6
ld d, $8
.oamLoop