aboutsummaryrefslogtreecommitdiffstats
path: root/home/pics.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 /home/pics.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 'home/pics.asm')
-rw-r--r--home/pics.asm10
1 files changed, 5 insertions, 5 deletions
diff --git a/home/pics.asm b/home/pics.asm
index ea34e3d5..475e834d 100644
--- a/home/pics.asm
+++ b/home/pics.asm
@@ -127,8 +127,8 @@ AlignSpriteDataCentered::
dec c
jr nz, .columnInnerLoop
pop hl
- ld bc, 7*8 ; 7 tiles
- add hl, bc ; advance one full column
+ ld bc, 7 * TILE_1BPP_SIZE
+ add hl, bc ; advance one full column
pop af
dec a
jr nz, .columnLoop
@@ -156,7 +156,7 @@ InterlaceMergeSpriteBuffers::
ld hl, sSpriteBuffer2 + (SPRITEBUFFERSIZE - 1) ; destination: end of buffer 2
ld de, sSpriteBuffer1 + (SPRITEBUFFERSIZE - 1) ; source 2: end of buffer 1
ld bc, sSpriteBuffer0 + (SPRITEBUFFERSIZE - 1) ; source 1: end of buffer 0
- ld a, SPRITEBUFFERSIZE/2 ; $c4
+ ld a, SPRITEBUFFERSIZE / 2
ldh [hSpriteInterlaceCounter], a
.interlaceLoop
ld a, [de]
@@ -178,7 +178,7 @@ InterlaceMergeSpriteBuffers::
ld a, [wSpriteFlipped]
and a
jr z, .notFlipped
- ld bc, 2*SPRITEBUFFERSIZE
+ ld bc, 2 * SPRITEBUFFERSIZE
ld hl, sSpriteBuffer1
.swapLoop
swap [hl] ; if flipped swap nybbles in all bytes
@@ -190,7 +190,7 @@ InterlaceMergeSpriteBuffers::
.notFlipped
pop hl
ld de, sSpriteBuffer1
- ld c, (2*SPRITEBUFFERSIZE)/16 ; $31, number of 16 byte chunks to be copied
+ ld c, (2 * SPRITEBUFFERSIZE) / TILE_SIZE ; $31, number of 16 byte chunks to be copied
ldh a, [hLoadedROMBank]
ld b, a
jp CopyVideoData