shithub: pokered

Download patch

ref: cc46b0e510e07f2e7a0d14732c02a2f416eac9e1
parent: b045ac4f16ca9b611a3e3baef0d9a0c33ac6351c
author: Colton G. Rushton <colton51919@gmail.com>
date: Sat Jul 9 14:18:18 EDT 2022

wOAMBuffer -> wShadowOAM (#370)


--- a/constants/gfx_constants.asm
+++ b/constants/gfx_constants.asm
@@ -17,7 +17,7 @@
 DEF HP_BAR_YELLOW EQU 1
 DEF HP_BAR_RED    EQU 2
 
-; wOAMBuffer
+; wShadowOAM
 DEF NUM_SPRITE_OAM_STRUCTS EQU 40
 
 ; hAutoBGTransferEnabled
--- a/engine/battle/animations.asm
+++ b/engine/battle/animations.asm
@@ -147,7 +147,7 @@
 	jr z, .resetFrameBlockDestAddr
 	call AnimationCleanOAM
 .resetFrameBlockDestAddr
-	ld hl, wOAMBuffer ; OAM buffer
+	ld hl, wShadowOAM
 	ld a, l
 	ld [wFBDestAddr + 1], a
 	ld a, h
@@ -583,7 +583,7 @@
 	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
@@ -855,7 +855,7 @@
 ; 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]
@@ -885,7 +885,7 @@
 TradeJumpPokeball:
 	ld de, BallMoveDistances2
 .loop
-	ld hl, wOAMBuffer ; OAM buffer
+	ld hl, wShadowOAM
 	ld bc, 4
 .innerLoop
 	ld a, [de]
@@ -925,8 +925,8 @@
 ; 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]
@@ -1136,7 +1136,7 @@
 	ret
 
 _AnimationWaterDroplets:
-	ld hl, wOAMBuffer
+	ld hl, wShadowOAM
 .loop
 	ld a, [wBaseCoordY]
 	ld [hli], a ; Y
@@ -1264,7 +1264,7 @@
 	ld [wBaseCoordX], a
 	ld a, $30
 	ld [wBaseCoordY], a
-	ld hl, wOAMBuffer
+	ld hl, wShadowOAM
 	ld d, 0
 	ld c, 7
 .loop
@@ -1498,7 +1498,7 @@
 .loop
 	push hl
 	ld c, 3
-	ld de, wOAMBuffer
+	ld de, wShadowOAM
 .innerLoop
 	ld a, [hl]
 	cp $ff
@@ -1637,7 +1637,7 @@
 	call LoadAnimationTileset
 	pop bc
 	ld d, $7a ; ball tile
-	ld hl, wOAMBuffer
+	ld hl, wShadowOAM
 	push bc
 	ld a, [wBaseCoordY]
 	ld e, a
@@ -1651,7 +1651,7 @@
 	ld [wNumShootingBalls], a
 .loop
 	push bc
-	ld hl, wOAMBuffer
+	ld hl, wShadowOAM
 .innerLoop
 	ld a, [wBaseCoordY]
 	add 8
@@ -2080,7 +2080,7 @@
 	xor a
 	ld e, a
 	ld [wBaseCoordX], a
-	ld hl, wOAMBuffer
+	ld hl, wShadowOAM
 .loop
 	call BattleAnimWriteOAMEntry
 	dec c
@@ -2336,7 +2336,7 @@
 	call InitMultipleObjectsOAM
 	call FallingObjects_InitXCoords
 	call FallingObjects_InitMovementData
-	ld hl, wOAMBuffer
+	ld hl, wShadowOAM
 	ld [hl], 0
 .loop
 	ld hl, wFallingObjectsMovementData
@@ -2363,7 +2363,7 @@
 	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
@@ -2372,7 +2372,7 @@
 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, [hl]
 	inc a
@@ -2433,7 +2433,7 @@
 	ret
 
 FallingObjects_InitXCoords:
-	ld hl, wOAMBuffer + $01
+	ld hl, wShadowOAMSprite00XCoord
 	ld de, FallingObjects_InitialXCoords
 	ld a, [wNumFallingObjects]
 	ld c, a
--- a/engine/battle/battle_transitions.asm
+++ b/engine/battle/battle_transitions.asm
@@ -26,7 +26,7 @@
 	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
--- a/engine/battle/core.asm
+++ b/engine/battle/core.asm
@@ -105,7 +105,7 @@
 ; 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
@@ -6327,7 +6327,7 @@
 	ASSERT BANK(RedPicBack) == BANK(OldManPicBack)
 	call UncompressSpriteFromDE
 	predef ScaleSpriteByTwo
-	ld hl, wOAMBuffer
+	ld hl, wShadowOAM
 	xor a
 	ldh [hOAMTile], a ; initial tile number
 	ld b, $7 ; 7 columns
--- a/engine/battle/draw_hud_pokeball_gfx.asm
+++ b/engine/battle/draw_hud_pokeball_gfx.asm
@@ -27,7 +27,7 @@
 	ld [hl], a
 	ld a, 8
 	ld [wHUDPokeballGfxOffsetX], a
-	ld hl, wOAMBuffer
+	ld hl, wShadowOAM
 	jp WritePokeballOAMData
 
 SetupEnemyPartyPokeballs:
@@ -41,7 +41,7 @@
 	ld [hl], $20
 	ld a, -8
 	ld [wHUDPokeballGfxOffsetX], a
-	ld hl, wOAMBuffer + PARTY_LENGTH * 4
+	ld hl, wShadowOAMSprite06
 	jp WritePokeballOAMData
 
 SetupPokeballs:
@@ -174,7 +174,7 @@
 	ld [hl], $40
 	ld a, 8
 	ld [wHUDPokeballGfxOffsetX], a
-	ld hl, wOAMBuffer
+	ld hl, wShadowOAM
 	call WritePokeballOAMData
 	ld hl, wEnemyMons
 	ld de, wEnemyPartyCount
@@ -183,7 +183,7 @@
 	ld a, $50
 	ld [hli], a
 	ld [hl], $68
-	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)
--- a/engine/battle/ghost_marowak_anim.asm
+++ b/engine/battle/ghost_marowak_anim.asm
@@ -58,7 +58,7 @@
 	ld [wBaseCoordY], a
 	ld a, $70
 	ld [wBaseCoordX], a
-	ld hl, wOAMBuffer
+	ld hl, wShadowOAM
 	lb bc, 6, 6
 	ld d, $8
 .oamLoop
--- a/engine/events/diploma.asm
+++ b/engine/events/diploma.asm
@@ -42,7 +42,7 @@
 
 ; Move the player 33 pixels right and set the priority bit so he appears
 ; behind the background layer.
-	ld hl, wOAMBuffer + $01
+	ld hl, wShadowOAMSprite00XCoord
 	lb bc, $80, $28
 .adjustPlayerGfxLoop
 	ld a, [hl] ; X
--- a/engine/gfx/mon_icons.asm
+++ b/engine/gfx/mon_icons.asm
@@ -43,7 +43,7 @@
 .resetSprites
 	push bc
 	ld hl, wMonPartySpritesSavedOAM
-	ld de, wOAMBuffer
+	ld de, wShadowOAM
 	ld bc, $60
 	call CopyData
 	pop bc
@@ -51,7 +51,7 @@
 	jr .incTimer
 .animateSprite
 	push bc
-	ld hl, wOAMBuffer + $02 ; OAM tile id
+	ld hl, wShadowOAMSprite00TileID
 	ld bc, $10
 	ld a, [wCurrentMenuItem]
 	call AddNTimes
@@ -236,7 +236,7 @@
 ; make a copy at wMonPartySpritesSavedOAM.
 	push af
 	ld c, $10
-	ld h, HIGH(wOAMBuffer)
+	ld h, HIGH(wShadowOAM)
 	ldh a, [hPartyMonIndex]
 	swap a
 	ld l, a
@@ -252,7 +252,7 @@
 ; Make a copy of the OAM buffer with the first animation frame written so that
 ; we can flip back to it from the second frame by copying it back.
 .makeCopy
-	ld hl, wOAMBuffer
+	ld hl, wShadowOAM
 	ld de, wMonPartySpritesSavedOAM
 	ld bc, $60
 	jp CopyData
--- a/engine/gfx/oam_dma.asm
+++ b/engine/gfx/oam_dma.asm
@@ -16,7 +16,7 @@
 LOAD "OAM DMA", HRAM
 hDMARoutine::
 	; initiate DMA
-	ld a, HIGH(wOAMBuffer)
+	ld a, HIGH(wShadowOAM)
 	ldh [rDMA], a
 	; wait for DMA to finish
 	ld a, $28
--- a/engine/gfx/sprite_oam.asm
+++ b/engine/gfx/sprite_oam.asm
@@ -1,6 +1,6 @@
 PrepareOAMData::
 ; Determine OAM data for currently visible
-; sprites and write it to wOAMBuffer.
+; sprites and write it to wShadowOAM.
 
 	ld a, [wUpdateSpritesEnabled]
 	dec a
@@ -79,7 +79,7 @@
 
 	ldh a, [hOAMBufferOffset]
 	ld e, a
-	ld d, HIGH(wOAMBuffer)
+	ld d, HIGH(wShadowOAM)
 
 .tileLoop
 	ldh a, [hSpriteScreenY]   ; temp for sprite Y position
@@ -147,7 +147,7 @@
 	; Clear unused OAM.
 	ldh a, [hOAMBufferOffset]
 	ld l, a
-	ld h, HIGH(wOAMBuffer)
+	ld h, HIGH(wShadowOAM)
 	ld de, $4
 	ld b, $a0
 	ld a, [wd736]
--- a/engine/items/item_effects.asm
+++ b/engine/items/item_effects.asm
@@ -1175,7 +1175,7 @@
 	xor a
 	ld [wBattleMonStatus], a ; remove the status ailment in the in-battle pokemon data
 .calculateHPBarCoords
-	ld hl, wOAMBuffer + $90
+	ld hl, wShadowOAMSprite36
 	ld bc, 2 * SCREEN_WIDTH
 	inc d
 .calculateHPBarCoordsLoop
--- a/engine/items/town_map.asm
+++ b/engine/items/town_map.asm
@@ -16,7 +16,7 @@
 	hlcoord 1, 0
 	ld de, wcd6d
 	call PlaceString
-	ld hl, wOAMBuffer
+	ld hl, wShadowOAM
 	ld de, wTileMapBackup
 	ld bc, $10
 	call CopyData
@@ -47,7 +47,7 @@
 	call TownMapCoordsToOAMCoords
 	ld a, $4
 	ld [wOAMBaseTile], a
-	ld hl, wOAMBuffer + $10
+	ld hl, wShadowOAMSprite04
 	call WriteTownMapSpriteOAM ; town map cursor sprite
 	pop hl
 	ld de, wcd6d
@@ -60,7 +60,7 @@
 	hlcoord 1, 0
 	ld de, wcd6d
 	call PlaceString
-	ld hl, wOAMBuffer + $10
+	ld hl, wShadowOAMSprite04
 	ld de, wTileMapBackup + 16
 	ld bc, $10
 	call CopyData
@@ -362,7 +362,7 @@
 	inc de
 	cp "@"
 	jr nz, .loop
-	ld hl, wOAMBuffer
+	ld hl, wShadowOAM
 	ld de, wTileMapBackup
 	ld bc, $a0
 	jp CopyData
@@ -370,7 +370,7 @@
 DisplayWildLocations:
 	farcall FindWildLocationsOfMon
 	call ZeroOutDuplicatesInList
-	ld hl, wOAMBuffer
+	ld hl, wShadowOAM
 	ld de, wTownMapCoords
 .loop
 	ld a, [de]
@@ -410,7 +410,7 @@
 	ld b, $0
 	call DrawPlayerOrBirdSprite
 .done
-	ld hl, wOAMBuffer
+	ld hl, wShadowOAM
 	ld de, wTileMapBackup
 	ld bc, $a0
 	jp CopyData
@@ -439,9 +439,9 @@
 WritePlayerOrBirdSpriteOAM:
 	ld a, [wOAMBaseTile]
 	and a
-	ld hl, wOAMBuffer + $90 ; for player sprite
+	ld hl, wShadowOAMSprite36 ; for player sprite
 	jr z, WriteTownMapSpriteOAM
-	ld hl, wOAMBuffer + $80 ; for bird sprite
+	ld hl, wShadowOAMSprite32 ; for bird sprite
 
 WriteTownMapSpriteOAM:
 	push hl
@@ -600,13 +600,13 @@
 	jr nz, .done
 ; show sprites when the counter reaches 50
 	ld hl, wTileMapBackup
-	ld de, wOAMBuffer
+	ld de, wShadowOAM
 	ld bc, $90
 	call CopyData
 	xor a
 	jr .done
 .hideSprites
-	ld hl, wOAMBuffer
+	ld hl, wShadowOAM
 	ld b, $24
 	ld de, $4
 .hideSpritesLoop
--- a/engine/menus/start_sub_menus.asm
+++ b/engine/menus/start_sub_menus.asm
@@ -677,7 +677,7 @@
 	dec c
 	jr nz, .clearMonBGLoop
 	pop af
-	ld hl, wOAMBuffer
+	ld hl, wShadowOAM
 	ld bc, $10
 	call AddNTimes
 	ld de, $4
--- a/engine/movie/intro.asm
+++ b/engine/movie/intro.asm
@@ -158,7 +158,7 @@
 	jr AnimateIntroNidorino
 
 UpdateIntroNidorinoOAM:
-	ld hl, wOAMBuffer
+	ld hl, wShadowOAM
 	ld a, [wIntroNidorinoBaseTile]
 	ld d, a
 .loop
@@ -177,7 +177,7 @@
 	ret
 
 InitIntroNidorinoOAM:
-	ld hl, wOAMBuffer
+	ld hl, wShadowOAM
 	ld d, 0
 .loop
 	push bc
--- a/engine/movie/splash.asm
+++ b/engine/movie/splash.asm
@@ -16,11 +16,11 @@
 	lb bc, BANK(FallingStar), (FallingStarEnd - FallingStar) / $10
 	call CopyVideoData
 	ld hl, GameFreakLogoOAMData
-	ld de, wOAMBuffer + $60
+	ld de, wShadowOAMSprite24
 	ld bc, GameFreakLogoOAMDataEnd - GameFreakLogoOAMData
 	call CopyData
 	ld hl, GameFreakShootingStarOAMData
-	ld de, wOAMBuffer
+	ld de, wShadowOAM
 	ld bc, GameFreakShootingStarOAMDataEnd - GameFreakShootingStarOAMData
 	jp CopyData
 
@@ -30,7 +30,7 @@
 	call PlaySound
 
 ; Move the big star down and left across the screen.
-	ld hl, wOAMBuffer
+	ld hl, wShadowOAM
 	lb bc, $a0, $4
 .bigStarLoop
 	push hl
@@ -60,7 +60,7 @@
 	jr nz, .bigStarLoop
 
 ; Clear big star OAM.
-	ld hl, wOAMBuffer
+	ld hl, wShadowOAM
 	ld c, 4
 	ld de, 4
 .clearOAMLoop
@@ -83,7 +83,7 @@
 
 ; Copy 24 instances of the small stars OAM data.
 ; Note that their coordinates put them off-screen.
-	ld de, wOAMBuffer
+	ld de, wShadowOAM
 	ld a, 24
 .initSmallStarsOAMLoop
 	push af
@@ -106,7 +106,7 @@
 	ld d, a
 	push bc
 	push hl
-	ld hl, wOAMBuffer + $50
+	ld hl, wShadowOAMSprite20
 	ld c, 4
 .smallStarsInnerLoop ; introduce new wave of 4 small stars OAM entries
 	ld a, [de]
@@ -131,8 +131,8 @@
 	push af
 
 ; shift the existing OAM entries down to make room for the next wave
-	ld hl, wOAMBuffer + $10
-	ld de, wOAMBuffer
+	ld hl, wShadowOAMSprite04
+	ld de, wShadowOAM
 	ld bc, $50
 	call CopyData
 
@@ -186,7 +186,7 @@
 MoveDownSmallStars:
 	ld b, 8
 .loop
-	ld hl, wOAMBuffer + $5c
+	ld hl, wShadowOAMSprite23
 	ld a, [wMoveDownSmallStarsOAMCount]
 	ld de, -4
 	ld c, a
--- a/engine/movie/title.asm
+++ b/engine/movie/title.asm
@@ -93,7 +93,7 @@
 	call DrawPlayerCharacter
 
 ; put a pokeball in the player's hand
-	ld hl, wOAMBuffer + $28
+	ld hl, wShadowOAMSprite10
 	ld a, $74
 	ld [hl], a
 
@@ -322,7 +322,7 @@
 	call ClearSprites
 	xor a
 	ld [wPlayerCharacterOAMTile], a
-	ld hl, wOAMBuffer
+	ld hl, wShadowOAM
 	lb de, $60, $5a
 	ld b, 7
 .loop
--- a/engine/movie/title2.asm
+++ b/engine/movie/title2.asm
@@ -115,6 +115,6 @@
 	pop de
 	and a
 	ret z
-	ld [wOAMBuffer + $28], a
+	ld [wShadowOAMSprite10YCoord], a
 	inc e
 	ret
--- a/engine/movie/trade.asm
+++ b/engine/movie/trade.asm
@@ -315,7 +315,7 @@
 	xor $1
 	ld [wLinkCableAnimBulgeToggle], a
 	add $7e
-	ld hl, wOAMBuffer + $02
+	ld hl, wShadowOAMSprite00TileID
 	ld de, 4
 	ld c, e
 .cycleLinkCableBulgeTile
@@ -599,7 +599,7 @@
 	ldh a, [rBGP]
 	xor $3c ; make link cable flash
 	ldh [rBGP], a
-	ld hl, wOAMBuffer + $02
+	ld hl, wShadowOAMSprite00TileID
 	ld de, $4
 	ld c, $14
 .loop
@@ -619,7 +619,7 @@
 	call Trade_WriteCircleOAM
 
 Trade_AddOffsetsToOAMCoords:
-	ld hl, wOAMBuffer
+	ld hl, wShadowOAM
 	ld c, $14
 .loop
 	ld a, [wBaseCoordY]
--- a/engine/overworld/cut.asm
+++ b/engine/overworld/cut.asm
@@ -99,7 +99,7 @@
 	ld hl, vChars1 tile $7f
 	call LoadCutGrassAnimationTilePattern
 	call WriteCutOrBoulderDustAnimationOAMBlock
-	ld hl, wOAMBuffer + $93
+	ld hl, wShadowOAMSprite36Attributes
 	ld de, 4
 	ld a, $30
 	ld c, e
--- a/engine/overworld/cut2.asm
+++ b/engine/overworld/cut2.asm
@@ -5,12 +5,12 @@
 	ld c, $8
 .cutTreeLoop
 	push bc
-	ld hl, wOAMBuffer + $91
+	ld hl, wShadowOAMSprite36XCoord
 	ld a, 1
 	ld [wCoordAdjustmentAmount], a
 	ld c, 2
 	call AdjustOAMBlockXPos2
-	ld hl, wOAMBuffer + $99
+	ld hl, wShadowOAMSprite38XCoord
 	ld a, -1
 	ld [wCoordAdjustmentAmount], a
 	ld c, 2
@@ -33,7 +33,7 @@
 	ld c, $8
 	call AnimCutGrass_UpdateOAMEntries
 	call AnimCutGrass_SwapOAMEntries
-	ld hl, wOAMBuffer + $90
+	ld hl, wShadowOAMSprite36YCoord
 	ld a, 2
 	ld [wCoordAdjustmentAmount], a
 	ld c, 4
@@ -45,22 +45,22 @@
 
 AnimCutGrass_UpdateOAMEntries:
 	push bc
-	ld hl, wOAMBuffer + $91
+	ld hl, wShadowOAMSprite36XCoord
 	ld a, 1
 	ld [wCoordAdjustmentAmount], a
 	ld c, 1
 	call AdjustOAMBlockXPos2
-	ld hl, wOAMBuffer + $95
+	ld hl, wShadowOAMSprite37XCoord
 	ld a, 2
 	ld [wCoordAdjustmentAmount], a
 	ld c, 1
 	call AdjustOAMBlockXPos2
-	ld hl, wOAMBuffer + $99
+	ld hl, wShadowOAMSprite38XCoord
 	ld a, -2
 	ld [wCoordAdjustmentAmount], a
 	ld c, 1
 	call AdjustOAMBlockXPos2
-	ld hl, wOAMBuffer + $9d
+	ld hl, wShadowOAMSprite39XCoord
 	ld a, -1
 	ld [wCoordAdjustmentAmount], a
 	ld c, 1
@@ -75,15 +75,15 @@
 	ret
 
 AnimCutGrass_SwapOAMEntries:
-	ld hl, wOAMBuffer + $90
+	ld hl, wShadowOAMSprite36
 	ld de, wBuffer
 	ld bc, $8
 	call CopyData
-	ld hl, wOAMBuffer + $98
-	ld de, wOAMBuffer + $90
+	ld hl, wShadowOAMSprite38
+	ld de, wShadowOAMSprite36
 	ld bc, $8
 	call CopyData
 	ld hl, wBuffer
-	ld de, wOAMBuffer + $98
+	ld de, wShadowOAMSprite38
 	ld bc, $8
 	jp CopyData
--- a/engine/overworld/dust_smoke.asm
+++ b/engine/overworld/dust_smoke.asm
@@ -43,7 +43,7 @@
 	ld h, [hl]
 	ld l, a
 	push hl
-	ld hl, wOAMBuffer + $90
+	ld hl, wShadowOAMSprite36
 	ld d, $0
 	add hl, de
 	ld e, l
--- a/engine/overworld/emotion_bubbles.asm
+++ b/engine/overworld/emotion_bubbles.asm
@@ -17,11 +17,11 @@
 	ld [wUpdateSpritesEnabled], a
 	ld a, [wd736]
 	bit 6, a ; are the last 4 OAM entries reserved for a shadow or fishing rod?
-	ld hl, wOAMBuffer + 4 * 35 + $3 ; $8f
-	ld de, wOAMBuffer + 4 * 39 + $3 ; $9f
+	ld hl, wShadowOAMSprite35Attributes
+	ld de, wShadowOAMSprite39Attributes
 	jr z, .next
-	ld hl, wOAMBuffer + 4 * 31 + $3 ; $7f
-	ld de, wOAMBuffer + 4 * 35 + $3 ; $8f
+	ld hl, wShadowOAMSprite31Attributes
+	ld de, wShadowOAMSprite35Attributes
 
 ; Copy OAM data 16 bytes forward to make room for emotion bubble OAM data at the
 ; start of the OAM buffer.
--- a/engine/overworld/healing_machine.asm
+++ b/engine/overworld/healing_machine.asm
@@ -12,7 +12,7 @@
 	push af
 	ld a, $e0
 	ldh [rOBP1], a
-	ld hl, wOAMBuffer + $84
+	ld hl, wShadowOAMSprite33
 	ld de, PokeCenterOAMData
 	call CopyHealingMachineOAM
 	ld a, 4
--- a/engine/overworld/player_animations.asm
+++ b/engine/overworld/player_animations.asm
@@ -205,19 +205,19 @@
 	ld a, $ff
 	ld [wUpdateSpritesEnabled], a ; disable UpdateSprites
 	; shift upper half of player's sprite down 8 pixels and hide lower half
-	ld a, [wOAMBuffer + 0 * 4 + 2]
-	ld [wOAMBuffer + 2 * 4 + 2], a
-	ld a, [wOAMBuffer + 1 * 4 + 2]
-	ld [wOAMBuffer + 3 * 4 + 2], a
+	ld a, [wShadowOAMSprite00TileID]
+	ld [wShadowOAMSprite02TileID], a
+	ld a, [wShadowOAMSprite01TileID]
+	ld [wShadowOAMSprite03TileID], a
 	ld a, $a0
-	ld [wOAMBuffer + 0 * 4], a
-	ld [wOAMBuffer + 1 * 4], a
+	ld [wShadowOAMSprite00YCoord], a
+	ld [wShadowOAMSprite01YCoord], a
 	ld c, 2
 	call DelayFrames
 	; hide upper half of player's sprite
 	ld a, $a0
-	ld [wOAMBuffer + 2 * 4], a
-	ld [wOAMBuffer + 3 * 4], a
+	ld [wShadowOAMSprite02YCoord], a
+	ld [wShadowOAMSprite03YCoord], a
 	call GBFadeOutToWhite
 	ld a, $1
 	ld [wUpdateSpritesEnabled], a ; enable UpdateSprites
@@ -392,7 +392,7 @@
 	ld b, $0
 	ld hl, FishingRodOAM
 	add hl, bc
-	ld de, wOAMBuffer + $9c
+	ld de, wShadowOAMSprite39
 	ld bc, $4
 	call CopyData
 	ld c, 100
@@ -412,7 +412,7 @@
 .loop
 	ld hl, wSpritePlayerStateData1YPixels
 	call .ShakePlayerSprite
-	ld hl, wOAMBuffer + $9c
+	ld hl, wShadowOAMSprite39
 	call .ShakePlayerSprite
 	call Delay3
 	dec b
@@ -424,7 +424,7 @@
 	cp SPRITE_FACING_UP
 	jr nz, .skipHidingFishingRod
 	ld a, $a0
-	ld [wOAMBuffer + $9c], a
+	ld [wShadowOAMSprite39YCoord], a
 
 .skipHidingFishingRod
 	ld hl, wEmotionBubbleSpriteIndex
@@ -438,7 +438,7 @@
 	cp SPRITE_FACING_UP
 	jr nz, .skipUnhidingFishingRod
 	ld a, $44
-	ld [wOAMBuffer + $9c], a
+	ld [wShadowOAMSprite39YCoord], a
 
 .skipUnhidingFishingRod
 	ld hl, ItsABiteText
--- a/engine/slots/slot_machine.asm
+++ b/engine/slots/slot_machine.asm
@@ -757,7 +757,7 @@
 SlotMachine_AnimWheel1:
 	ld bc, SlotMachineWheel1
 	ld de, wSlotMachineWheel1Offset
-	ld hl, wOAMBuffer
+	ld hl, wShadowOAMSprite00
 	ld a, $30
 	ld [wBaseCoordX], a
 	jr SlotMachine_AnimWheel
@@ -765,7 +765,7 @@
 SlotMachine_AnimWheel2:
 	ld bc, SlotMachineWheel2
 	ld de, wSlotMachineWheel2Offset
-	ld hl, wOAMBuffer + $30
+	ld hl, wShadowOAMSprite12
 	ld a, $50
 	ld [wBaseCoordX], a
 	jr SlotMachine_AnimWheel
@@ -773,7 +773,7 @@
 SlotMachine_AnimWheel3:
 	ld bc, SlotMachineWheel3
 	ld de, wSlotMachineWheel3Offset
-	ld hl, wOAMBuffer + $60
+	ld hl, wShadowOAMSprite24
 	ld a, $70
 	ld [wBaseCoordX], a
 
--- a/home/clear_sprites.asm
+++ b/home/clear_sprites.asm
@@ -1,7 +1,7 @@
 ClearSprites::
 	xor a
-	ld hl, wOAMBuffer
-	ld b, wOAMBufferEnd - wOAMBuffer
+	ld hl, wShadowOAM
+	ld b, wShadowOAMEnd - wShadowOAM
 .loop
 	ld [hli], a
 	dec b
@@ -10,7 +10,7 @@
 
 HideSprites::
 	ld a, 160
-	ld hl, wOAMBuffer
+	ld hl, wShadowOAM
 	ld de, 4
 	ld b, 40
 .loop
--- a/home/oam.asm
+++ b/home/oam.asm
@@ -4,7 +4,7 @@
 ; c = X coordinate of upper left corner of sprite
 ; de = base address of 4 tile number and attribute pairs
 WriteOAMBlock::
-	ld h, HIGH(wOAMBuffer)
+	ld h, HIGH(wShadowOAM)
 	swap a ; multiply by 16
 	ld l, a
 	call .writeOneEntry ; upper left
--- a/ram/wram.asm
+++ b/ram/wram.asm
@@ -143,12 +143,12 @@
 SECTION "OAM Buffer", WRAM0
 
 ; buffer for OAM data. Copied to OAM by DMA
-wOAMBuffer::
-; wOAMBufferSprite00 - wOAMBufferSprite39
+wShadowOAM::
+; wShadowOAMSprite00 - wShadowOAMSprite39
 FOR n, NUM_SPRITE_OAM_STRUCTS
-wOAMBufferSprite{02d:n}:: sprite_oam_struct wOAMBufferSprite{02d:n}
+wShadowOAMSprite{02d:n}:: sprite_oam_struct wShadowOAMSprite{02d:n}
 ENDR
-wOAMBufferEnd::
+wShadowOAMEnd::
 
 
 SECTION "Tilemap", WRAM0
--- a/scripts/VermilionDock.asm
+++ b/scripts/VermilionDock.asm
@@ -124,7 +124,7 @@
 VermilionDock_AnimSmokePuffDriftRight:
 	push bc
 	push de
-	ld hl, wOAMBuffer + 4 * $4 + 1 ; x coord
+	ld hl, wShadowOAMSprite04XCoord
 	ld a, [wSSAnneSmokeDriftAmount]
 	swap a
 	ld c, a