2017-09-07 17:45:32 +00:00
|
|
|
#ifndef GUARD_BERRY_H
|
|
|
|
#define GUARD_BERRY_H
|
2017-09-08 18:05:45 +00:00
|
|
|
|
2017-09-07 17:45:32 +00:00
|
|
|
enum
|
|
|
|
{
|
|
|
|
BERRY_FIRMNESS_UNKNOWN,
|
|
|
|
BERRY_FIRMNESS_VERY_SOFT,
|
|
|
|
BERRY_FIRMNESS_SOFT,
|
|
|
|
BERRY_FIRMNESS_HARD,
|
|
|
|
BERRY_FIRMNESS_VERY_HARD,
|
|
|
|
BERRY_FIRMNESS_SUPER_HARD,
|
|
|
|
};
|
2017-09-08 18:05:45 +00:00
|
|
|
|
2017-11-18 15:11:34 +00:00
|
|
|
enum
|
|
|
|
{
|
2017-11-27 19:03:41 +00:00
|
|
|
FLAVOR_SPICY,
|
|
|
|
FLAVOR_DRY,
|
|
|
|
FLAVOR_SWEET,
|
|
|
|
FLAVOR_BITTER,
|
|
|
|
FLAVOR_SOUR,
|
|
|
|
FLAVOR_COUNT
|
2017-11-18 15:11:34 +00:00
|
|
|
};
|
|
|
|
|
2017-09-08 18:05:45 +00:00
|
|
|
#define NUM_BERRIES 44
|
|
|
|
|
2018-06-12 00:11:48 +00:00
|
|
|
extern const u8 *const gBerryTreeEventObjectGraphicsIdTablePointers[];
|
2018-06-11 22:33:50 +00:00
|
|
|
extern const struct SpriteFrameImage *const gBerryTreePicTablePointers[];
|
|
|
|
extern const u8 *const gBerryTreePaletteSlotTablePointers[];
|
2017-09-08 18:05:45 +00:00
|
|
|
|
2017-09-07 17:45:32 +00:00
|
|
|
void ClearEnigmaBerries(void);
|
|
|
|
void SetEnigmaBerry(u8 *src);
|
|
|
|
u32 GetEnigmaBerryChecksum(struct EnigmaBerry *enigmaBerry);
|
|
|
|
bool32 IsEnigmaBerryValid(void);
|
|
|
|
const struct Berry *GetBerryInfo(u8 berry);
|
|
|
|
struct BerryTree *GetBerryTreeInfo(u8 id);
|
2018-06-12 00:11:48 +00:00
|
|
|
bool32 EventObjectInteractionWaterBerryTree(void);
|
2017-09-07 17:45:32 +00:00
|
|
|
bool8 IsPlayerFacingPlantedBerryTree(void);
|
|
|
|
bool8 TryToWaterBerryTree(void);
|
|
|
|
void ClearBerryTrees(void);
|
|
|
|
bool32 BerryTreeGrow(struct BerryTree *tree);
|
|
|
|
void BerryTreeTimeUpdate(s32 minutes);
|
|
|
|
void PlantBerryTree(u8 id, u8 berry, u8 stage, bool8 sparkle);
|
|
|
|
void RemoveBerryTree(u8 id);
|
|
|
|
u8 GetBerryTypeByBerryTreeId(u8 id);
|
2017-09-08 18:05:45 +00:00
|
|
|
u8 GetStageByBerryTreeId(u8);
|
2017-09-07 17:45:32 +00:00
|
|
|
u8 ItemIdToBerryType(u16 item);
|
|
|
|
u16 BerryTypeToItemId(u16 berry);
|
|
|
|
void GetBerryNameByBerryType(u8 berry, u8 *string);
|
|
|
|
void ResetBerryTreeSparkleFlag(u8 id);
|
|
|
|
u8 BerryTreeGetNumStagesWatered(struct BerryTree *tree);
|
|
|
|
u8 GetNumStagesWateredByBerryTreeId(u8 id);
|
|
|
|
u8 CalcBerryYieldInternal(u16 max, u16 min, u8 water);
|
|
|
|
u8 CalcBerryYield(struct BerryTree *tree);
|
|
|
|
u8 GetBerryCountByBerryTreeId(u8 id);
|
|
|
|
u16 GetStageDurationByBerryType(u8);
|
2017-09-13 09:16:26 +00:00
|
|
|
void Bag_ChooseBerry(void);
|
2018-06-12 00:11:48 +00:00
|
|
|
void EventObjectInteractionGetBerryTreeData(void);
|
|
|
|
void EventObjectInteractionPlantBerryTree(void);
|
|
|
|
void EventObjectInteractionPickBerryTree(void);
|
|
|
|
void EventObjectInteractionRemoveBerryTree(void);
|
2017-09-07 17:45:32 +00:00
|
|
|
u8 PlayerHasBerries(void);
|
|
|
|
void ResetBerryTreeSparkleFlags(void);
|
2017-09-08 18:05:45 +00:00
|
|
|
|
2017-09-13 09:16:26 +00:00
|
|
|
extern const struct Berry gBerries[];
|
|
|
|
|
2017-09-25 19:03:52 +00:00
|
|
|
struct UnkStruct_0858AB24 {
|
|
|
|
u8 unk0;
|
|
|
|
u16 unk1;
|
|
|
|
};
|
|
|
|
|
|
|
|
extern const struct UnkStruct_0858AB24 gUnknown_0858AB24[];
|
|
|
|
|
2017-09-07 17:45:32 +00:00
|
|
|
#endif // GUARD_BERRY_H
|