aboutsummaryrefslogtreecommitdiffstats
path: root/engine/battle/animations.asm
diff options
context:
space:
mode:
authorNarishma-gb <194818981+Narishma-gb@users.noreply.github.com>2025-11-18 21:17:31 +0100
committerGitHub <noreply@github.com>2025-11-18 15:17:31 -0500
commitf3326786259f4e53c06b7565369add7605bea8ba (patch)
tree1e09025ed19a6403fa74c408aa195662178cc0ca /engine/battle/animations.asm
parentAdd `_vc` patch targets to `.PHONY` (diff)
downloadpokeyellow-f3326786259f4e53c06b7565369add7605bea8ba.tar.gz
pokeyellow-f3326786259f4e53c06b7565369add7605bea8ba.tar.xz
pokeyellow-f3326786259f4e53c06b7565369add7605bea8ba.zip
Use more hardware and graphics constants (#532)
- Use `OBJ_SIZE` and `TILE_SIZE` from hardware.inc. - `SPRITESTATEDATA1_LENGTH`, `NUM_SPRITESTATEDATA_STRUCTS` and `TILE_1BPP_SIZE` are used in some places. - Highlight an oversight in `OakSpeech` where several direct MBC bank switches are requested. - Remove redundant comments in home/overworld.asm. - Add unreferenced `FillBgMap` function to avoid a byte of dead code. - Some constants added in wram.asm. - Correctly separate the commented code in `SaveMainData`.
Diffstat (limited to 'engine/battle/animations.asm')
-rw-r--r--engine/battle/animations.asm18
1 files changed, 9 insertions, 9 deletions
diff --git a/engine/battle/animations.asm b/engine/battle/animations.asm
index 40b2047b..711ebda4 100644
--- a/engine/battle/animations.asm
+++ b/engine/battle/animations.asm
@@ -928,7 +928,7 @@ BallMoveDistances2:
DoGrowlSpecialEffects:
ld hl, wShadowOAM
ld de, wShadowOAMSprite04
- ld bc, $10
+ ld bc, OBJ_SIZE * 4
call CopyData ; copy the musical note graphic
ld a, [wSubAnimCounter]
dec a
@@ -1308,7 +1308,7 @@ AdjustOAMBlockXPos:
ld h, d
AdjustOAMBlockXPos2:
- ld de, 4
+ ld de, OBJ_SIZE
.loop
ld a, [wCoordAdjustmentAmount]
ld b, a
@@ -1318,7 +1318,7 @@ AdjustOAMBlockXPos2:
jr c, .skipPuttingEntryOffScreen
; put off-screen if X >= 168
dec hl
- ld a, 160
+ ld a, SCREEN_HEIGHT_PX + OAM_Y_OFS
ld [hli], a
.skipPuttingEntryOffScreen
ld [hl], a
@@ -1332,7 +1332,7 @@ AdjustOAMBlockYPos:
ld h, d
AdjustOAMBlockYPos2:
- ld de, 4
+ ld de, OBJ_SIZE
.loop
ld a, [wCoordAdjustmentAmount]
ld b, a
@@ -1670,7 +1670,7 @@ _AnimationShootBallsUpward:
dec a
ld [wNumShootingBalls], a
.next
- ld de, 4
+ ld de, OBJ_SIZE
add hl, de ; next OAM entry
dec b
jr nz, .innerLoop
@@ -1723,10 +1723,10 @@ AnimationMinimizeMon:
ld hl, wTempPic
push hl
xor a
- ld bc, 7 * 7 * $10
+ ld bc, (7 * 7) tiles
call FillMemory
pop hl
- ld de, 7 * 3 * $10 + 4 * $10 + 4
+ ld de, (7 * 3 + 4) tiles + TILE_SIZE / 4
add hl, de
ld de, MinimizedMonSprite
ld c, MinimizedMonSpriteEnd - MinimizedMonSprite
@@ -1971,7 +1971,7 @@ AnimationSubstitute:
jp AnimationShowMonPic
CopyMonsterSpriteData:
- ld bc, 1 tiles
+ ld bc, TILE_SIZE
ld a, BANK(MonsterSprite)
jp FarCopyData2
@@ -2379,7 +2379,7 @@ FallingObjects_UpdateOAMEntry:
inc a
cp 112
jr c, .next
- ld a, 160 ; if Y >= 112, put it off-screen
+ ld a, SCREEN_HEIGHT_PX + OAM_Y_OFS ; if Y >= 112, put it off-screen
.next
ld [hli], a ; Y
ld a, [wFallingObjectMovementByte]