summaryrefslogtreecommitdiff
path: root/src/item.c
diff options
context:
space:
mode:
authorDizzyEggg <jajkodizzy@wp.pl>2018-06-17 12:30:09 +0200
committerDizzyEggg <jajkodizzy@wp.pl>2018-06-17 12:30:09 +0200
commit0fe3e612ebd3e7f49f930f7ae40aa9d9267862fa (patch)
tree690380f4554942a198355b8b35e4f85b4ad3aedd /src/item.c
parentf807eb1f2de629ef094c3dae37d6380049980a8f (diff)
battle tent start and create frontier struct in saveblock
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)