summaryrefslogtreecommitdiff
path: root/engine/gfx/sprite_oam.asm
diff options
context:
space:
mode:
authorRangi <remy.oukaour+rangi42@gmail.com>2020-07-07 11:10:29 -0400
committerRangi <remy.oukaour+rangi42@gmail.com>2020-07-07 11:10:29 -0400
commit45ed05decf330faab4503fe8fecadc54698c9724 (patch)
treeadd3eeda2d09334209abe4e55341b674e64dd117 /engine/gfx/sprite_oam.asm
parentbbc257476f9aac8d04d75a8036d412caa8f7d515 (diff)
Use HIGH() and LOW()
Diffstat (limited to 'engine/gfx/sprite_oam.asm')
-rw-r--r--engine/gfx/sprite_oam.asm8
1 files changed, 4 insertions, 4 deletions
diff --git a/engine/gfx/sprite_oam.asm b/engine/gfx/sprite_oam.asm
index 1a96286d..7e9bf739 100644
--- a/engine/gfx/sprite_oam.asm
+++ b/engine/gfx/sprite_oam.asm
@@ -18,7 +18,7 @@ PrepareOAMData::
.spriteLoop
ldh [hSpriteOffset2], a
- ld d, wSpriteStateData1 / $100
+ ld d, HIGH(wSpriteStateData1)
ldh a, [hSpriteOffset2]
ld e, a
ld a, [de] ; c1x0
@@ -79,7 +79,7 @@ PrepareOAMData::
ldh a, [hOAMBufferOffset]
ld e, a
- ld d, wOAMBuffer / $100
+ ld d, HIGH(wOAMBuffer)
.tileLoop
ldh a, [hSpriteScreenY] ; temp for sprite Y position
@@ -141,13 +141,13 @@ PrepareOAMData::
.nextSprite
ldh a, [hSpriteOffset2]
add $10
- cp $100 % $100
+ cp LOW($100)
jp nz, .spriteLoop
; Clear unused OAM.
ldh a, [hOAMBufferOffset]
ld l, a
- ld h, wOAMBuffer / $100
+ ld h, HIGH(wOAMBuffer)
ld de, $4
ld b, $a0
ld a, [wd736]