summaryrefslogtreecommitdiff
path: root/engine/gfx
diff options
context:
space:
mode:
Diffstat (limited to 'engine/gfx')
-rwxr-xr-xengine/gfx/mon_icons.asm2
-rw-r--r--engine/gfx/oam_dma.asm4
-rw-r--r--engine/gfx/sprite_oam.asm8
3 files changed, 7 insertions, 7 deletions
diff --git a/engine/gfx/mon_icons.asm b/engine/gfx/mon_icons.asm
index 19008c05..253fca35 100755
--- a/engine/gfx/mon_icons.asm
+++ b/engine/gfx/mon_icons.asm
@@ -236,7 +236,7 @@ WriteMonPartySpriteOAM:
; make a copy at wMonPartySpritesSavedOAM.
push af
ld c, $10
- ld h, wOAMBuffer / $100
+ ld h, HIGH(wOAMBuffer)
ldh a, [hPartyMonIndex]
swap a
ld l, a
diff --git a/engine/gfx/oam_dma.asm b/engine/gfx/oam_dma.asm
index d8d8839a..84bb4b5c 100644
--- a/engine/gfx/oam_dma.asm
+++ b/engine/gfx/oam_dma.asm
@@ -1,7 +1,7 @@
WriteDMACodeToHRAM::
; Since no other memory is available during OAM DMA,
; DMARoutine is copied to HRAM and executed there.
- ld c, hDMARoutine % $100
+ ld c, LOW(hDMARoutine)
ld b, DMARoutineEnd - DMARoutine
ld hl, DMARoutine
.copy
@@ -14,7 +14,7 @@ WriteDMACodeToHRAM::
DMARoutine:
; initiate DMA
- ld a, wOAMBuffer / $100
+ ld a, HIGH(wOAMBuffer)
ldh [rDMA], a
; wait for DMA to finish
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]