summaryrefslogtreecommitdiff
path: root/engine/overworld/missable_objects.asm
diff options
context:
space:
mode:
authorRangi <35663410+Rangi42@users.noreply.github.com>2020-07-07 19:48:22 -0400
committerGitHub <noreply@github.com>2020-07-07 19:48:22 -0400
commit9571c550b6a0dcb3a4f54513c881661a87271024 (patch)
treed73507228a57e4f3cece2fb93fe7df3a9439553f /engine/overworld/missable_objects.asm
parentc480632d5494d04f7f5f0298a31877a2293b564e (diff)
parentbbf2f51a02b2544f1bef32a5868503b474ae2fef (diff)
Merge pull request #263 from Rangi42/master
Syncing style with pokecrystal
Diffstat (limited to 'engine/overworld/missable_objects.asm')
-rw-r--r--engine/overworld/missable_objects.asm16
1 files changed, 8 insertions, 8 deletions
diff --git a/engine/overworld/missable_objects.asm b/engine/overworld/missable_objects.asm
index 1ebe8064..fd2fe578 100644
--- a/engine/overworld/missable_objects.asm
+++ b/engine/overworld/missable_objects.asm
@@ -31,19 +31,19 @@ LoadMissableObjects:
sub d
ld h, a
ld a, h
- ld [hDividend], a
+ ldh [hDividend], a
ld a, l
- ld [hDividend+1], a
+ ldh [hDividend+1], a
xor a
- ld [hDividend+2], a
- ld [hDividend+3], a
+ ldh [hDividend+2], a
+ ldh [hDividend+3], a
ld a, $3
- ld [hDivisor], a
+ ldh [hDivisor], a
ld b, $2
call Divide ; divide difference by 3, resulting in the global offset (number of missable items before ours)
ld a, [wCurMap]
ld b, a
- ld a, [hDividend+3]
+ ldh a, [hDividend+3]
ld c, a ; store global offset in c
ld de, wMissableObjectList
pop hl
@@ -99,7 +99,7 @@ InitializeMissableObjectsFlags:
; tests if current sprite is a missable object that is hidden/has been removed
IsObjectHidden:
- ld a, [hCurrentSpriteOffset]
+ ldh a, [hCurrentSpriteOffset]
swap a
ld b, a
ld hl, wMissableObjectList
@@ -120,7 +120,7 @@ IsObjectHidden:
.notHidden
xor a
.hidden
- ld [hIsHiddenMissableObject], a
+ ldh [hIsHiddenMissableObject], a
ret
; adds missable object (items, leg. pokemon, etc.) to the map