summaryrefslogtreecommitdiff
path: root/src/item.c
diff options
context:
space:
mode:
authorDiegoisawesome <Diegoisawesome@users.noreply.github.com>2018-06-30 11:25:19 -0700
committerGitHub <noreply@github.com>2018-06-30 11:25:19 -0700
commitefebc51972b23ddffa2700b1dd6895d4728646a3 (patch)
tree5dfa68e92aa9d1a267af8dde9ca8040294952e3f /src/item.c
parent91ee3221b3a4885d155ad2cca16b7678062ad18a (diff)
parent97712ec931febe390861f2234e26a66f15c9c295 (diff)
Merge pull request #268 from DizzyEggg/decompile_battle_tent
Decompile a bit of battle tent
Diffstat (limited to 'src/item.c')
-rw-r--r--src/item.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/item.c b/src/item.c
index 319d167fc..30710d08a 100644
--- a/src/item.c
+++ b/src/item.c
@@ -845,8 +845,8 @@ u16 CountTotalItemQuantityInBag(u16 itemId)
static bool8 CheckPyramidBagHasItem(u16 itemId, u16 count)
{
u8 i;
- u16 *items = gSaveBlock2Ptr->pyramidBag.itemId[gSaveBlock2Ptr->frontierChosenLvl];
- u8 *quantities = gSaveBlock2Ptr->pyramidBag.quantity[gSaveBlock2Ptr->frontierChosenLvl];
+ u16 *items = gSaveBlock2Ptr->frontier.pyramidBag.itemId[gSaveBlock2Ptr->frontier.chosenLvl];
+ u8 *quantities = gSaveBlock2Ptr->frontier.pyramidBag.quantity[gSaveBlock2Ptr->frontier.chosenLvl];
for (i = 0; i < PYRAMID_BAG_ITEMS_COUNT; i++)
{
@@ -867,8 +867,8 @@ static bool8 CheckPyramidBagHasItem(u16 itemId, u16 count)
static bool8 CheckPyramidBagHasSpace(u16 itemId, u16 count)
{
u8 i;
- u16 *items = gSaveBlock2Ptr->pyramidBag.itemId[gSaveBlock2Ptr->frontierChosenLvl];
- u8 *quantities = gSaveBlock2Ptr->pyramidBag.quantity[gSaveBlock2Ptr->frontierChosenLvl];
+ u16 *items = gSaveBlock2Ptr->frontier.pyramidBag.itemId[gSaveBlock2Ptr->frontier.chosenLvl];
+ u8 *quantities = gSaveBlock2Ptr->frontier.pyramidBag.quantity[gSaveBlock2Ptr->frontier.chosenLvl];
for (i = 0; i < PYRAMID_BAG_ITEMS_COUNT; i++)
{
@@ -890,8 +890,8 @@ bool8 AddPyramidBagItem(u16 itemId, u16 count)
{
u16 i;
- u16 *items = gSaveBlock2Ptr->pyramidBag.itemId[gSaveBlock2Ptr->frontierChosenLvl];
- u8 *quantities = gSaveBlock2Ptr->pyramidBag.quantity[gSaveBlock2Ptr->frontierChosenLvl];
+ u16 *items = gSaveBlock2Ptr->frontier.pyramidBag.itemId[gSaveBlock2Ptr->frontier.chosenLvl];
+ u8 *quantities = gSaveBlock2Ptr->frontier.pyramidBag.quantity[gSaveBlock2Ptr->frontier.chosenLvl];
u16 *newItems = Alloc(PYRAMID_BAG_ITEMS_COUNT * sizeof(u16));
u8 *newQuantities = Alloc(PYRAMID_BAG_ITEMS_COUNT * sizeof(u8));
@@ -963,8 +963,8 @@ bool8 RemovePyramidBagItem(u16 itemId, u16 count)
{
u16 i;
- u16 *items = gSaveBlock2Ptr->pyramidBag.itemId[gSaveBlock2Ptr->frontierChosenLvl];
- u8 *quantities = gSaveBlock2Ptr->pyramidBag.quantity[gSaveBlock2Ptr->frontierChosenLvl];
+ u16 *items = gSaveBlock2Ptr->frontier.pyramidBag.itemId[gSaveBlock2Ptr->frontier.chosenLvl];
+ u8 *quantities = gSaveBlock2Ptr->frontier.pyramidBag.quantity[gSaveBlock2Ptr->frontier.chosenLvl];
i = gUnknown_0203CF30[3] + gUnknown_0203CF30[4];
if (items[i] == itemId && quantities[i] >= count)