pokeplatinum/include/item_use_functions.h
ItsLeaze d3d92e2611
Name item use functions (#680)
Co-authored-by: Rachel <lhearachel@proton.me>
2025-08-16 21:13:42 -07:00

71 lines
1.7 KiB
C

#ifndef POKEPLATINUM_ITEM_USE_FUNCTIONS_H
#define POKEPLATINUM_ITEM_USE_FUNCTIONS_H
#include "struct_decls/struct_0205E884_decl.h"
#include "field/field_system_decl.h"
#include "bg_window.h"
#include "field_task.h"
#include "strbuf.h"
#define USE_ITEM_TASK_MENU 0
#define USE_ITEM_TASK_FIELD 1
#define USE_ITEM_TASK_CHECK 2
typedef void *(*FieldApplicationWorkCtor)(void *fieldSystem);
typedef struct ItemUseContext {
int mapHeaderID;
BOOL hasPartner;
int playerState;
u16 facingTileBehavior; // behavior of the tile the player is facing
u16 currTileBehavior;
u16 unk_10;
u8 padding_12[2];
PlayerAvatar *playerAvatar;
FieldSystem *fieldSystem;
} ItemUseContext;
typedef struct ItemFieldUseContext {
FieldSystem *fieldSystem;
ItemUseContext unk_04;
FieldApplicationWorkCtor unk_20;
void *unk_24;
u16 unk_28;
u8 unk_2A;
} ItemFieldUseContext;
typedef struct ItemMenuUseContext {
FieldTask *fieldTask;
u16 item;
u8 selectedMonSlot;
u8 padding_07;
} ItemMenuUseContext;
typedef BOOL (*ItemFieldUseFunc)(ItemFieldUseContext *);
typedef void (*ItemMenuUseFunc)(ItemMenuUseContext *, const ItemUseContext *);
typedef u32 (*ItemCheckUseFunc)(const ItemUseContext *);
typedef struct UnkStruct_0206851C {
u32 unk_00;
u16 unk_04;
u16 unk_06;
u16 unk_08;
u16 unk_0A;
} UnkStruct_0206851C;
typedef struct UnkStruct_02068EFC {
Window unk_00;
Strbuf *unk_10;
u16 unk_14;
u16 unk_16;
} UnkStruct_02068EFC;
u32 GetItemUseFunction(u16 param0, u16 param1);
void sub_0206842C(FieldSystem *fieldSystem, ItemUseContext *param1);
BOOL sub_02068B50(const ItemUseContext *param0);
BOOL sub_02069238(FieldSystem *fieldSystem);
#endif // POKEPLATINUM_ITEM_USE_FUNCTIONS_H