summaryrefslogtreecommitdiff
path: root/engine/overworld
diff options
context:
space:
mode:
Diffstat (limited to 'engine/overworld')
-rwxr-xr-xengine/overworld/hidden_items.asm16
-rwxr-xr-xengine/overworld/pokemart.asm2
2 files changed, 9 insertions, 9 deletions
diff --git a/engine/overworld/hidden_items.asm b/engine/overworld/hidden_items.asm
index 868f118f..910fcf04 100755
--- a/engine/overworld/hidden_items.asm
+++ b/engine/overworld/hidden_items.asm
@@ -67,9 +67,9 @@ HiddenCoins: ; 76799 (1d:6799)
and a
ret nz
xor a
- ld [$ff9f], a
- ld [$ffa0], a
- ld [$ffa1], a
+ ld [hCoins - 1], a
+ ld [hCoins], a
+ ld [hCoins + 1], a
ld a, [wWhichTrade]
sub COIN
cp 10
@@ -81,22 +81,22 @@ HiddenCoins: ; 76799 (1d:6799)
jr .bcd100
.bcd10
ld a, $10
- ld [$ffa1], a
+ ld [hCoins + 1], a
jr .bcddone
.bcd20
ld a, $20
- ld [$ffa1], a
+ ld [hCoins + 1], a
jr .bcddone
.bcd40 ; due to a typo, this is never used
ld a, $40
- ld [$ffa1], a
+ ld [hCoins + 1], a
jr .bcddone
.bcd100
ld a, $1
- ld [$ffa0], a
+ ld [hCoins], a
.bcddone
ld de, wPlayerCoins + 1
- ld hl, $ffa1
+ ld hl, hCoins + 1
ld c, $2
predef AddBCDPredef
ld hl, wd6fe
diff --git a/engine/overworld/pokemart.asm b/engine/overworld/pokemart.asm
index 2caada1d..e6fdfc92 100755
--- a/engine/overworld/pokemart.asm
+++ b/engine/overworld/pokemart.asm
@@ -206,7 +206,7 @@ DisplayPokemartDialogue_: ; 6c20 (1:6c20)
jp .loop
.isThereEnoughMoney
ld de,wPlayerMoney
- ld hl,$ff9f ; item price
+ ld hl,hMoney
ld c,3 ; length of money in bytes
jp StringCmp
.notEnoughMoney