#ifndef Z_EN_ITEM00_H
#define Z_EN_ITEM00_H

#include "ultra64.h"
#include "actor.h"

#define COLLECTIBLE_DROP_RANDOM_PARAMS(dropTable, params8000) (((dropTable) * 16) | ((params8000) ? 0x8000 : 0))

typedef enum CollectibleDropTable {
    /*  0 */ COLLECTIBLE_DROP_TABLE_0,
    /*  1 */ COLLECTIBLE_DROP_TABLE_1,
    /*  2 */ COLLECTIBLE_DROP_TABLE_2,
    /*  3 */ COLLECTIBLE_DROP_TABLE_3,
    /*  4 */ COLLECTIBLE_DROP_TABLE_4,
    /*  5 */ COLLECTIBLE_DROP_TABLE_5,
    /*  6 */ COLLECTIBLE_DROP_TABLE_6,
    /*  7 */ COLLECTIBLE_DROP_TABLE_7,
    /*  8 */ COLLECTIBLE_DROP_TABLE_8,
    /*  9 */ COLLECTIBLE_DROP_TABLE_9,
    /* 10 */ COLLECTIBLE_DROP_TABLE_10,
    /* 11 */ COLLECTIBLE_DROP_TABLE_11,
    /* 12 */ COLLECTIBLE_DROP_TABLE_12,
    /* 13 */ COLLECTIBLE_DROP_TABLE_13,
    /* 14 */ COLLECTIBLE_DROP_TABLE_14
} CollectibleDropTable;

typedef enum Item00Type {
    /* 0x00 */ ITEM00_RUPEE_GREEN,
    /* 0x01 */ ITEM00_RUPEE_BLUE,
    /* 0x02 */ ITEM00_RUPEE_RED,
    /* 0x03 */ ITEM00_RECOVERY_HEART,
    /* 0x04 */ ITEM00_BOMBS_A,
    /* 0x05 */ ITEM00_ARROWS_SINGLE,
    /* 0x06 */ ITEM00_HEART_PIECE,
    /* 0x07 */ ITEM00_HEART_CONTAINER,
    /* 0x08 */ ITEM00_ARROWS_SMALL,
    /* 0x09 */ ITEM00_ARROWS_MEDIUM,
    /* 0x0A */ ITEM00_ARROWS_LARGE,
    /* 0x0B */ ITEM00_BOMBS_B,
    /* 0x0C */ ITEM00_NUTS,
    /* 0x0D */ ITEM00_STICK,
    /* 0x0E */ ITEM00_MAGIC_LARGE,
    /* 0x0F */ ITEM00_MAGIC_SMALL,
    /* 0x10 */ ITEM00_SEEDS,
    /* 0x11 */ ITEM00_SMALL_KEY,
    /* 0x12 */ ITEM00_FLEXIBLE,
    /* 0x13 */ ITEM00_RUPEE_ORANGE,
    /* 0x14 */ ITEM00_RUPEE_PURPLE,
    /* 0x15 */ ITEM00_SHIELD_DEKU,
    /* 0x16 */ ITEM00_SHIELD_HYLIAN,
    /* 0x17 */ ITEM00_TUNIC_ZORA,
    /* 0x18 */ ITEM00_TUNIC_GORON,
    /* 0x19 */ ITEM00_BOMBS_SPECIAL,
    /* 0x1A */ ITEM00_MAX,
    /* 0xFF */ ITEM00_NONE = 0xFF
} Item00Type;

struct EnItem00;

typedef void (*EnItem00ActionFunc)(struct EnItem00*, struct PlayState*);

typedef struct EnItem00 {
    /* 0x000 */ Actor actor;
    /* 0x14C */ EnItem00ActionFunc actionFunc;
    /* 0x150 */ s16 collectibleFlag;
    /* 0x152 */ s16 getItemId;
    /* 0x154 */ s16 unk_154;
    /* 0x156 */ s16 unk_156;
    /* 0x158 */ s16 unk_158;
    /* 0x15A */ s16 despawnTimer;
    /* 0x15C */ f32 scale;
    /* 0x160 */ ColliderCylinder collider;
} EnItem00; // size = 0x1AC

EnItem00* Item_DropCollectible(struct PlayState* play, Vec3f* spawnPos, s16 params);
EnItem00* Item_DropCollectible2(struct PlayState* play, Vec3f* spawnPos, s16 params);
void Item_DropCollectibleRandom(struct PlayState* play, Actor* fromActor, Vec3f* spawnPos, s16 params);

#endif
