summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRangi <35663410+Rangi42@users.noreply.github.com>2019-03-30 16:51:30 -0400
committerGitHub <noreply@github.com>2019-03-30 16:51:30 -0400
commitec8869584ff7a02ab1ca12fe8b5e6652034f2f17 (patch)
treec5f73ab73975166562e74d4a1889be63f160fc87
parent179dc85ba1464ce6ec358f54a638e1dd70fb8283 (diff)
parente598e49edb0e7107a81214499f5517fb7d3f3bf5 (diff)
Merge pull request #617 from FredrIQ/master
Fix wram labeling for wPCItems
-rw-r--r--engine/events/mom_phone.asm2
-rw-r--r--engine/events/pokecenter_pc.asm8
-rw-r--r--engine/items/items.asm4
-rw-r--r--engine/menus/intro_menu.asm2
-rw-r--r--mobile/mobile_12_2.asm2
-rw-r--r--mobile/mobile_5f.asm2
-rw-r--r--wram.asm3
7 files changed, 11 insertions, 12 deletions
diff --git a/engine/events/mom_phone.asm b/engine/events/mom_phone.asm
index 48e879ed9..27144b339 100644
--- a/engine/events/mom_phone.asm
+++ b/engine/events/mom_phone.asm
@@ -147,7 +147,7 @@ Mom_GiveItemOrDoll:
ld [wCurItem], a
ld a, 1
ld [wItemQuantityChangeBuffer], a
- ld hl, wPCItems
+ ld hl, wNumPCItems
call ReceiveItem
ret
diff --git a/engine/events/pokecenter_pc.asm b/engine/events/pokecenter_pc.asm
index 3dc02372d..767495592 100644
--- a/engine/events/pokecenter_pc.asm
+++ b/engine/events/pokecenter_pc.asm
@@ -354,7 +354,7 @@ PlayerWithdrawItemMenu:
ld [wItemQuantityChangeBuffer], a
ld a, [wBuffer2]
ld [wCurItemQuantity], a
- ld hl, wPCItems
+ ld hl, wNumPCItems
call TossItem
predef PartyMonItemName
ld hl, .WithdrewText
@@ -390,7 +390,7 @@ PlayerTossItemMenu:
.loop
call PCItemsJoypad
jr c, .quit
- ld de, wPCItems
+ ld de, wNumPCItems
farcall TossItemFromPC
jr .loop
@@ -509,7 +509,7 @@ PlayerDepositItemMenu:
ld [wBuffer1], a
ld a, [wCurItemQuantity]
ld [wBuffer2], a
- ld hl, wPCItems
+ ld hl, wNumPCItems
call ReceiveItem
jr nc, .NoRoomInPC
ld a, [wBuffer1]
@@ -628,7 +628,7 @@ PCItemsJoypad:
db SCROLLINGMENU_ENABLE_SELECT | SCROLLINGMENU_ENABLE_FUNCTION3 | SCROLLINGMENU_DISPLAY_ARROWS ; flags
db 4, 8 ; rows/cols?
db 2 ; horizontal spacing?
- dbw 0, wPCItems
+ dbw 0, wNumPCItems
dba PlaceMenuItemName
dba PlaceMenuItemQuantity
dba UpdateItemDescription
diff --git a/engine/items/items.asm b/engine/items/items.asm
index 28c79f4cc..ef0f10dda 100644
--- a/engine/items/items.asm
+++ b/engine/items/items.asm
@@ -145,10 +145,10 @@ GetPocketCapacity:
.not_bag
ld c, MAX_PC_ITEMS
ld a, e
- cp LOW(wPCItems)
+ cp LOW(wNumPCItems)
jr nz, .not_pc
ld a, d
- cp HIGH(wPCItems)
+ cp HIGH(wNumPCItems)
ret z
.not_pc
diff --git a/engine/menus/intro_menu.asm b/engine/menus/intro_menu.asm
index f6be52c52..c7c3058d1 100644
--- a/engine/menus/intro_menu.asm
+++ b/engine/menus/intro_menu.asm
@@ -151,7 +151,7 @@ _ResetWRAM:
ld hl, wNumBalls
call .InitList
- ld hl, wPCItems
+ ld hl, wNumPCItems
call .InitList
xor a
diff --git a/mobile/mobile_12_2.asm b/mobile/mobile_12_2.asm
index 27d59471a..cd5a7b233 100644
--- a/mobile/mobile_12_2.asm
+++ b/mobile/mobile_12_2.asm
@@ -158,7 +158,7 @@ MobileCheckOwnMonAnywhere:
UnusedFindItemInPCOrBag:
ld a, [wScriptVar]
ld [wCurItem], a
- ld hl, wPCItems
+ ld hl, wNumPCItems
call CheckItem
jr c, .found
diff --git a/mobile/mobile_5f.asm b/mobile/mobile_5f.asm
index d36daca91..48ba99276 100644
--- a/mobile/mobile_5f.asm
+++ b/mobile/mobile_5f.asm
@@ -2664,7 +2664,7 @@ Function17e165:
pop hl
jr c, .asm_17e195
push hl
- ld hl, wPCItems
+ ld hl, wNumPCItems
call CheckItem
pop hl
jr c, .asm_17e195
diff --git a/wram.asm b/wram.asm
index 7fa8363d7..686b17f04 100644
--- a/wram.asm
+++ b/wram.asm
@@ -2513,11 +2513,10 @@ wNumBalls:: db ; d8d7
wBalls:: ds MAX_BALLS * 2 + 1 ; d8d8
wBallsEnd::
+wNumPCItems:: db
wPCItems:: ds MAX_PC_ITEMS * 2 + 1 ; d8f1
wPCItemsEnd::
- ds 1
-
wPokegearFlags::
; bit 0: map
; bit 1: radio