aboutsummaryrefslogtreecommitdiffstats
path: root/engine/overworld/missable_objects.asm
diff options
context:
space:
mode:
authorRangi <35663410+Rangi42@users.noreply.github.com>2020-07-04 16:19:15 -0400
committerGitHub <noreply@github.com>2020-07-04 16:19:15 -0400
commit2718c36065e7eb201a149938bcdd51987c4e56b6 (patch)
tree4a1c0294193a497e15ec8e6be59390eb1f84b5d3 /engine/overworld/missable_objects.asm
parentMerge pull request #256 from Rangi42/master (diff)
parentUPDATE_PARTY_MENU_BLK_PACKET -> SET_PAL_PARTY_MENU_HP_BARS, and introduce SET... (diff)
downloadpokeyellow-2718c36065e7eb201a149938bcdd51987c4e56b6.tar.gz
pokeyellow-2718c36065e7eb201a149938bcdd51987c4e56b6.tar.xz
pokeyellow-2718c36065e7eb201a149938bcdd51987c4e56b6.zip
Merge pull request #257 from Rangi42/master
More reorganization
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 7d6de545..a89fcb54 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 [H_DIVIDEND], a
+ ld [hDividend], a
ld a, l
- ld [H_DIVIDEND+1], a
+ ld [hDividend+1], a
xor a
- ld [H_DIVIDEND+2], a
- ld [H_DIVIDEND+3], a
+ ld [hDividend+2], a
+ ld [hDividend+3], a
ld a, $3
- ld [H_DIVISOR], a
+ ld [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, [H_DIVIDEND+3]
+ ld 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, [H_CURRENTSPRITEOFFSET]
+ ld a, [hCurrentSpriteOffset]
swap a
ld b, a
ld hl, wMissableObjectList
@@ -120,7 +120,7 @@ IsObjectHidden:
.notHidden
xor a
.hidden
- ld [$ffe5], a
+ ld [hIsHiddenMissableObject], a
ret
; adds missable object (items, leg. pokemon, etc.) to the map