mirror of
https://github.com/Ninjdai1/pokeemerald.git
synced 2024-11-16 19:47:35 +01:00
make item compile
This commit is contained in:
parent
fd40e93cb5
commit
9f97646724
@ -1,6 +1,17 @@
|
||||
#ifndef GUARD_ITEM_H
|
||||
#define GUARD_ITEM_H
|
||||
|
||||
// These constants are used in gItems
|
||||
enum
|
||||
{
|
||||
POCKET_NONE,
|
||||
POCKET_ITEMS,
|
||||
POCKET_POKE_BALLS,
|
||||
POCKET_TM_HM,
|
||||
POCKET_BERRIES,
|
||||
POCKET_KEY_ITEMS,
|
||||
};
|
||||
|
||||
enum
|
||||
{
|
||||
ITEMS_POCKET,
|
||||
|
@ -1218,7 +1218,7 @@ void FieldObjectInteractionRemoveBerryTree(void)
|
||||
|
||||
u8 PlayerHasBerries(void)
|
||||
{
|
||||
return IsBagPocketNonEmpty(BAG_BERRIES);
|
||||
return IsBagPocketNonEmpty(POCKET_BERRIES);
|
||||
}
|
||||
|
||||
void ResetBerryTreeSparkleFlags(void)
|
||||
|
@ -2472,7 +2472,7 @@ static void CB2_HandleBlenderEndGame(void)
|
||||
sub_8081F94(&gSendCmd[0]);
|
||||
if (sBerryBlenderData->yesNoAnswer == 0)
|
||||
{
|
||||
if (IsBagPocketNonEmpty(BAG_BERRIES) == FALSE) // no berries
|
||||
if (IsBagPocketNonEmpty(POCKET_BERRIES) == FALSE) // no berries
|
||||
{
|
||||
sBerryBlenderData->playAgainState = CANT_PLAY_NO_BERRIES;
|
||||
gSendCmd[1] = 0x9999;
|
||||
|
@ -517,7 +517,7 @@ static void TryChangeDisplayedBerry(u8 taskId, s8 toMove)
|
||||
s16 *data = gTasks[taskId].data;
|
||||
s16 currPocketPosition = gUnknown_0203CE58.scrollPosition[3] + gUnknown_0203CE58.cursorPosition[3];
|
||||
u32 newPocketPosition = currPocketPosition + toMove;
|
||||
if (newPocketPosition < 46 && BagGetItemIdByPocketPosition(BAG_BERRIES, newPocketPosition) != 0)
|
||||
if (newPocketPosition < 46 && BagGetItemIdByPocketPosition(POCKET_BERRIES, newPocketPosition) != 0)
|
||||
{
|
||||
if (toMove < 0)
|
||||
data[1] = 2;
|
||||
@ -537,7 +537,7 @@ static void HandleBagCursorPositionChange(s8 toMove)
|
||||
u16 *cursorPos = &gUnknown_0203CE58.cursorPosition[3];
|
||||
if (toMove > 0)
|
||||
{
|
||||
if (*cursorPos < 4 || BagGetItemIdByPocketPosition(BAG_BERRIES, *scrollPos + 8) == 0)
|
||||
if (*cursorPos < 4 || BagGetItemIdByPocketPosition(POCKET_BERRIES, *scrollPos + 8) == 0)
|
||||
*cursorPos += toMove;
|
||||
else
|
||||
*scrollPos += toMove;
|
||||
@ -550,7 +550,7 @@ static void HandleBagCursorPositionChange(s8 toMove)
|
||||
*scrollPos += toMove;
|
||||
}
|
||||
|
||||
sBerryTag->berryId = ItemIdToBerryType(BagGetItemIdByPocketPosition(BAG_BERRIES, *scrollPos + *cursorPos));
|
||||
sBerryTag->berryId = ItemIdToBerryType(BagGetItemIdByPocketPosition(POCKET_BERRIES, *scrollPos + *cursorPos));
|
||||
}
|
||||
|
||||
static void Task_DisplayAnotherBerry(u8 taskId)
|
||||
|
11
src/item.c
11
src/item.c
@ -11,17 +11,6 @@
|
||||
#include "strings.h"
|
||||
#include "load_save.h"
|
||||
|
||||
// These constants are used in gItems
|
||||
enum
|
||||
{
|
||||
POCKET_NONE,
|
||||
POCKET_ITEMS,
|
||||
POCKET_POKE_BALLS,
|
||||
POCKET_TM_HM,
|
||||
POCKET_BERRIES,
|
||||
POCKET_KEY_ITEMS,
|
||||
};
|
||||
|
||||
extern bool8 InBattlePyramid(void);
|
||||
extern u16 gUnknown_0203CF30[];
|
||||
extern const struct Item gItems[];
|
||||
|
Loading…
Reference in New Issue
Block a user