#ifndef SPRITEDATA_H
#define SPRITEDATA_H

// Definition for enemies and projectiles
typedef struct EnemyDefinition {
    u16 gfx;
    u16 paletteIndex;
    union {
        const Hitbox* hitbox;
        const struct EnemyDefinition* definition;
    } ptr;
    u16 spriteIndex;
    struct {
        u8 spritePriority : 3;
        u8 collision : 1;
        u8 draw : 2;
        u8 shadow : 2;
    } PACKED spriteFlags;
    u8 health;
    s16 speed;
    u8 damageType;
    u8 flags2;
} EnemyDefinition;

typedef struct ProjectileDefinition {
    u16 gfx;
    u16 paletteIndex;
    union {
        const Hitbox* hitbox;
        const struct ProjectileDefinition* definition;
    } ptr;
    u16 spriteIndex : 12;
    u16 field0x3c : 4;
    struct {
        u8 spritePriority : 3;
        u8 collision : 1;
        u8 draw : 2;
        u8 shadow : 2;
    } PACKED spriteFlags;
    u8 field0x40;
    s16 speed;
    u8 damageType;
    u8 flags2;
} ProjectileDefinition;

// Sprite data definition for objects and npcs
typedef struct ObjectDefinition {
    struct {
        u8 type : 2;
        u8 flags : 2;
        u8 unk : 4;
        u8 hitbox;
        u16 gfx : 10;
        u16 gfx_type : 2;
        u16 unk2 : 4;
    } PACKED bitfield;
    union {
        struct {
            u16 paletteIndex : 10;
            u16 unk : 2;
            u16 shadow : 2;
            u16 unk2 : 2;
            u16 spriteIndex : 10;
            u16 spritePriority : 3;
            u16 draw : 3;
        } PACKED sprite;
        const struct ObjectDefinition* definition;
    } data;
} ObjectDefinition;

typedef struct NPCDefinition {
    struct {
        u8 type : 2;
        u8 flags : 2;
        u8 unk : 4;
        u8 hitbox;
        u16 gfx : 10;
        u16 gfx_type : 2;
        u16 unk2 : 4;
    } PACKED bitfield;
    union {
        struct {
            u16 paletteIndex : 10;
            u16 unk : 2;
            u16 shadow : 2;
            u16 unk2 : 2;
            u16 spriteIndex : 10;
            u16 spritePriority : 3;
            u16 draw : 3;
        } PACKED sprite;
        const struct NPCDefinition* definition;
    } data;
} NPCDefinition;

// Sprite data definition for player items
typedef struct SpriteDataC {
    u8 bitfield;
    u8 index;
    u16 unk;
    u8 unk2;
    u8 spriteIndex;
    u16 gfxLoadBitfield;
} SpriteDataC;

typedef enum {
    SPRITE_0,
    SPRITE_1,
    SPRITE_2,
    SPRITE_3,
    SPRITE_4,
    SPRITE_5,
    SPRITE_6,
    SPRITE_7,
    SPRITE_8,
    SPRITE_9,
    SPRITE_MINISHEMOTICON,
    SPRITE_EZLOCAP,
    SPRITE_12,
    SPRITE_13,
    SPRITE_14,
    SPRITE_15,
    SPRITE_16,
    SPRITE_17,
    SPRITE_18,
    SPRITE_19,
    SPRITE_20,
    SPRITE_21,
    SPRITE_22,
    SPRITE_ITEMGUSTJAR,
    SPRITE_GENTARI,
    SPRITE_FESTARI,
    SPRITE_MELARI,
    SPRITE_MOUNTAINMINISH,
    SPRITE_28,
    SPRITE_TOWNMINISH,
    SPRITE_LIBRARI,
    SPRITE_FORESTMINISH,
    SPRITE_VAATI,
    SPRITE_OBJECT6A_9,
    SPRITE_OBJECT6A_0,
    SPRITE_OBJECT6A_1,
    SPRITE_OBJECT6A_2,
    SPRITE_MINISHEZLO,
    SPRITE_OBJECT6A_3,
    SPRITE_DIN,
    SPRITE_NAYRU,
    SPRITE_FARORE,
    SPRITE_NPC5,
    SPRITE_GUARDWITHSPEAR,
    SPRITE_KINGDALTUS,
    SPRITE_MINISTERPOTHO,
    SPRITE_NPC26,
    SPRITE_MAID,
    SPRITE_TINGLESIBLINGS,
    SPRITE_BEEDLE,
    SPRITE_BROCCO,
    SPRITE_PINA,
    SPRITE_POSTMAN,
    SPRITE_MALON,
    SPRITE_EPONA,
    SPRITE_MILKCART,
    SPRITE_SMITH,
    SPRITE_TOWNSPERSON,
    SPRITE_58,
    SPRITE_KID,
    SPRITE_MAILBOX,
    SPRITE_SITTINGPERSON,
    SPRITE_MUTOH,
    SPRITE_CARPENTER,
    SPRITE_GORMAN,
    SPRITE_CAT,
    SPRITE_CAT_1,
    SPRITE_DOG,
    SPRITE_DOG_1,
    SPRITE_DOG_2,
    SPRITE_SYRUP,
    SPRITE_PERCY,
    SPRITE_FARMERS_0,
    SPRITE_FARMERS_1,
    SPRITE_DAMPE,
    SPRITE_KINGGUSTAF,
    SPRITE_GINA,
    SPRITE_SIMON,
    SPRITE_MAMA,
    SPRITE_TEACHERS,
    SPRITE_TEACHERS_1,
    SPRITE_WINDTRIBESPEOPLE_0,
    SPRITE_WINDTRIBESPEOPLE_1,
    SPRITE_WINDTRIBESPEOPLE_2,
    SPRITE_WINDTRIBESPEOPLE_3,
    SPRITE_WINDTRIBESPEOPLE_4,
    SPRITE_WINDTRIBESPEOPLE_5,
    SPRITE_MAYORHAGEN,
    SPRITE_GHOSTBROTHERS,
    SPRITE_HURDYGURDYMAN,
    SPRITE_COW,
    SPRITE_GORONMERCHANT,
    SPRITE_GORONMERCHANT_1,
    SPRITE_GORON,
    SPRITE_CASTORWILDSSTATUE,
    SPRITE_NPC4F,
    SPRITE_OBJECT6A_4,
    SPRITE_97,
    SPRITE_DARKNUT_0,
    SPRITE_DARKNUT_1,
    SPRITE_CHUCHUBOSS_0,
    SPRITE_DEATHFX_0,
    SPRITE_MADDERPILLAR_0,
    SPRITE_GLEEROK_0,
    SPRITE_KEATON,
    SPRITE_MAZAALHAND,
    SPRITE_SCISSORSBEETLE,
    SPRITE_MANDIBLESPROJECTILE,
    SPRITE_STALFOS,
    SPRITE_GIBDO,
    SPRITE_LAKITU,
    SPRITE_LAKITUCLOUDPROJECTILE,
    SPRITE_VAATIREBORNENEMY_0,
    SPRITE_VAATIREBORNENEMY_1,
    SPRITE_VAATIREBORNENEMY_2,
    SPRITE_VAATIREBORNENEMY_3,
    SPRITE_VAATIBALL,
    SPRITE_VAATITRANSFIGURED_0,
    SPRITE_VAATITRANSFIGURED_1,
    SPRITE_VAATITRANSFIGURED_2,
    SPRITE_VAATITRANSFIGURED_3,
    SPRITE_VAATIARM,
    SPRITE_VAATIWRATH,
    SPRITE_VAATIREBORN,
    SPRITE_MOBLINLADY_1,
    SPRITE_BALLCHAINSOLDIER,
    SPRITE_GYORGMALE,
    SPRITE_JARPORTAL,
    SPRITE_BEANSTALK_0,
    SPRITE_MINECART,
    SPRITE_LAVAPLATFORM_1,
    SPRITE_WHIRLWIND,
    SPRITE_BIGVORTEX,
    SPRITE_MACROBOOK,
    SPRITE_GENTARICURTAINS,
    SPRITE_SPIDERWEB,
    SPRITE_OBJECT79,
    SPRITE_OCTOROKBOSS_0,
    SPRITE_BELL,
    SPRITE_TALON,
    SPRITE_STURGEON,
    SPRITE_LIBRARIANS_0,
    SPRITE_LIBRARIANS_1,
    SPRITE_STAMP,
    SPRITE_MARCY,
    SPRITE_STOCKWELL,
    SPRITE_WHEATON,
    SPRITE_PITA,
    SPRITE_CUCCOAGGR,
    SPRITE_BLADEBROTHERS_0,
    SPRITE_BLADEBROTHERS_1,
    SPRITE_REM,
    SPRITE_CARLOV_0,
    SPRITE_CARLOV_1,
    SPRITE_DRLEFT,
    SPRITE_155,
    SPRITE_ANJU,
    SPRITE_EMMA,
    SPRITE_GREGAL,
    SPRITE_159,
    SPRITE_CASTORWILDSSTATUE_1,
    SPRITE_CHUCHU,
    SPRITE_SPECIALFX,
    SPRITE_SPECIALFX_1,
    SPRITE_OBJECT64,
    SPRITE_BEETLE,
    SPRITE_166,
    SPRITE_POT,
    SPRITE_DEATHFX_1,
    SPRITE_PEAHAT,
    SPRITE_RAILTRACK,
    SPRITE_ROLLOBITE,
    SPRITE_OBJECTD,
    SPRITE_OBJECT2A,
    SPRITE_OCTOROK,
    SPRITE_OBJECT43,
    SPRITE_ROCKPROJECTILE,
    SPRITE_KEESE,
    SPRITE_DOORMIMIC,
    SPRITE_DOORMIMIC_1,
    SPRITE_ROCKCHUCHU,
    SPRITE_SPINYCHUCHU,
    SPRITE_PRESSUREPLATE,
    SPRITE_OBJECT1E,
    SPRITE_CHESTSPAWNER,
    SPRITE_BIGBARREL,
    SPRITE_PUSHABLESTATUE,
    SPRITE_MOLDWORM,
    SPRITE_SLUGGULA,
    SPRITE_SLUGGULA_1,
    SPRITE_SLUGGULA_2,
    SPRITE_PESTO,
    SPRITE_PUFFSTOOL,
    SPRITE_PUSHABLEROCK,
    SPRITE_BEANSTALK_1,
    SPRITE_OBJECTB3,
    SPRITE_PULLABLEMUSHROOM,
    SPRITE_BOLLARD,
    SPRITE_WARPPOINT,
    SPRITE_AMBIENTCLOUDS,
    SPRITE_CHUCHUBOSS_1,
    SPRITE_CHUCHUBOSS_2,
    SPRITE_OBJECT9,
    SPRITE_BOSSDOOR,
    SPRITE_OBJECT45,
    SPRITE_LIKELIKE,
    SPRITE_SPEARMOBLIN,
    SPRITE_BOWMOBLIN,
    SPRITE_BUSINESSSCRUB,
    SPRITE_RUPEELIKE,
    SPRITE_MINISHSIZEDENTRANCE,
    SPRITE_PULLABLELEVER,
    SPRITE_THOUGHTBUBBLE,
    SPRITE_MADDERPILLAR_1,
    SPRITE_LAVAPLATFORM,
    SPRITE_WATERDROP,
    SPRITE_WALLMASTER,
    SPRITE_DIRTBALLPROJECTILE,
    SPRITE_CRENELBEANSPROUT,
    SPRITE_BOMBPEAHAT,
    SPRITE_SPARK,
    SPRITE_CHASER,
    SPRITE_SPIKEDBEETLE,
    SPRITE_HELMASAUR,
    SPRITE_FALLINGBOULDER,
    SPRITE_BOBOMB,
    SPRITE_GLEEROK_1,
    SPRITE_GREATFAIRY,
    SPRITE_TEKTITE,
    SPRITE_WIZZROBEWIND,
    SPRITE_WIZZROBEFIRE,
    SPRITE_WIZZROBEICE,
    SPRITE_WINDPROJECTILE,
    SPRITE_FIREPROJECTILE,
    SPRITE_ICEPROJECTILE,
    SPRITE_ARMOS,
    SPRITE_LEEVER,
    SPRITE_ROPE,
    SPRITE_EYEGORE,
    SPRITE_PESTO_1,
    SPRITE_ACROBANDITS,
    SPRITE_CROW,
    SPRITE_MULLDOZER,
    SPRITE_PUSHABLELEVER,
    SPRITE_BIGPUSHABLELEVER,
    SPRITE_BOMBAROSSA,
    SPRITE_WISP,
    SPRITE_SPINYBEETLE,
    SPRITE_MAZAALHEAD,
    SPRITE_MAZAALBRACELET,
    SPRITE_MAZAALENERGYBEAM,
    SPRITE_MAZAALENERGYBEAM_1,
    SPRITE_MAZAALMACRO,
    SPRITE_EYESWITCH,
    SPRITE_OCTOROKBOSS_1,
    SPRITE_PICOBLOOM,
    SPRITE_OBJECT35,
    SPRITE_BIGICEBLOCK,
    SPRITE_BIGICEBLOCK_1,
    SPRITE_SMALLICEBLOCK,
    SPRITE_OBJECT86,
    SPRITE_EVILSPIRIT,
    SPRITE_CLOUDPIRANHA,
    SPRITE_FLYINGSKULL,
    SPRITE_BONEPROJECTILE,
    SPRITE_BAKEROVEN,
    SPRITE_LAMP_0,
    SPRITE_LAKITULIGHTNING,
    SPRITE_OBJECT6A_5,
    SPRITE_BIRD_1,
    SPRITE_BIRD,
    SPRITE_TORCHTRAPPROJECTILE_0,
    SPRITE_TORCHTRAPPROJECTILE_1,
    SPRITE_OBJECT98,
    SPRITE_LAMP_1,
    SPRITE_FIGURINEDEVICE,
    SPRITE_PULLABLELEVER_1,
    SPRITE_VAATIPROJECTILE,
    SPRITE_OBJECT44,
    SPRITE_GHINI,
    SPRITE_VAATIARM_1,
    SPRITE_VAATIWRATH_1,
    SPRITE_OBJECTAF,
    SPRITE_WRATHEYE,
    SPRITE_V3HANDPROJECTILE,
    SPRITE_VAATIWRATH_2,
    SPRITE_VAATIEYESMACRO,
    SPRITE_OBJECTB4,
#if !defined(EU)
    SPRITE_OBJECTB4_1,
#endif
    SPRITE_FAN,
    SPRITE_ANGRYSTATUE,
    SPRITE_CANNONBALLPROJECTILE,
    SPRITE_V1EYELASER,
    SPRITE_V1DARKMAGICPROJECTILE,
    SPRITE_SLIME,
    SPRITE_CURTAIN,
    SPRITE_OBJECT9B,
    SPRITE_ENEMY5A,
    SPRITE_VAATITRANSFIGURED_4,
    SPRITE_VAATITRANSFIGURED_5,
    SPRITE_OBJECTA6,
    SPRITE_FIREBALLGUY,
    SPRITE_SPIKEDROLLERS,
    SPRITE_OBJECT6A_6,
    SPRITE_MOBLINLADY,
    SPRITE_OBJECTAB,
    SPRITE_GYORGMALEENERGYPROJECTILE,
    SPRITE_CLOTHESRACK,
    SPRITE_OBJECT6A_7,
    SPRITE_JAILBARS,
    SPRITE_OBJECTB2,
    SPRITE_ENEMY62,
    SPRITE_GYORGFEMALEEYE,
    SPRITE_GYORGCHILD,
    SPRITE_SMALLTOWNMINISH,
    SPRITE_GYORGFEMALEMOUTH,
    SPRITE_V2PROJECTILE,
    SPRITE_OBJECT6A_8,
    SPRITE_PINWHEEL,
    SPRITE_SPEARMOBLIN_1,
    SPRITE_BOWMOBLIN_1,
    SPRITE_ARROWPROJECTILE,
    SPRITE_322,
    SPRITE_323,
    SPRITE_324,
    SPRITE_FILESCREENOBJECTS,
    SPRITE_OBJECTA2,
    SPRITE_OBJECT6A_10,
    SPRITE_VAATI_1,

} Sprites;
#endif