From e92d1af478c8381fde30f709c2619abe90104d3a Mon Sep 17 00:00:00 2001 From: Rangi <35663410+Rangi42@users.noreply.github.com> Date: Tue, 25 Nov 2025 17:53:29 -0500 Subject: Avoid magic numbers for most `CopyData` calls (#542) --- engine/overworld/cut2.asm | 6 +++--- engine/overworld/player_animations.asm | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) (limited to 'engine/overworld') diff --git a/engine/overworld/cut2.asm b/engine/overworld/cut2.asm index 69c8cb13..7697d430 100644 --- a/engine/overworld/cut2.asm +++ b/engine/overworld/cut2.asm @@ -77,13 +77,13 @@ AnimCutGrass_UpdateOAMEntries: AnimCutGrass_SwapOAMEntries: ld hl, wShadowOAMSprite36 ld de, wBuffer - ld bc, $8 + ld bc, 2 * OBJ_SIZE call CopyData ld hl, wShadowOAMSprite38 ld de, wShadowOAMSprite36 - ld bc, $8 + ld bc, 2 * OBJ_SIZE call CopyData ld hl, wBuffer ld de, wShadowOAMSprite38 - ld bc, $8 + ld bc, 2 * OBJ_SIZE jp CopyData diff --git a/engine/overworld/player_animations.asm b/engine/overworld/player_animations.asm index 4ed1f49f..657c001e 100644 --- a/engine/overworld/player_animations.asm +++ b/engine/overworld/player_animations.asm @@ -264,7 +264,7 @@ InitFacingDirectionList: ld [wSavedPlayerScreenY], a ld hl, PlayerSpinningFacingOrder ld de, wFacingDirectionList - ld bc, 4 + ld bc, OBJ_SIZE call CopyData ld a, [wSpritePlayerStateData1ImageIndex] ; (image index is locked to standing images) ld hl, wFacingDirectionList @@ -288,7 +288,7 @@ SpinPlayerSprite: push hl ld hl, wFacingDirectionList ld de, wFacingDirectionList - 1 - ld bc, 4 + ld bc, OBJ_SIZE call CopyData ld a, [wFacingDirectionList - 1] ld [wFacingDirectionList + 3], a @@ -393,7 +393,7 @@ FishingAnim: ld hl, FishingRodOAM add hl, bc ld de, wShadowOAMSprite39 - ld bc, $4 + ld bc, OBJ_SIZE call CopyData ld c, 100 call DelayFrames -- cgit v1.3.1-sl0p