/**
 * @file enums.h
 *
 * Various global enumerators.
 */

typedef enum item_quality {
	ITEM_QUALITY_NORMAL = 0,
	ITEM_QUALITY_MAGIC  = 1,
	ITEM_QUALITY_UNIQUE = 2,
} item_quality;

typedef enum unique_base_item {
	UITYPE_NONE        = 0x0,
	UITYPE_SHORTBOW    = 0x1,
	UITYPE_LONGBOW     = 0x2,
	UITYPE_HUNTBOW     = 0x3,
	UITYPE_COMPBOW     = 0x4,
	UITYPE_WARBOW      = 0x5,
	UITYPE_BATTLEBOW   = 0x6,
	UITYPE_DAGGER      = 0x7,
	UITYPE_FALCHION    = 0x8,
	UITYPE_CLAYMORE    = 0x9,
	UITYPE_BROADSWR    = 0xA,
	UITYPE_SABRE       = 0xB,
	UITYPE_SCIMITAR    = 0xC,
	UITYPE_LONGSWR     = 0xD,
	UITYPE_BASTARDSWR  = 0xE,
	UITYPE_TWOHANDSWR  = 0xF,
	UITYPE_GREATSWR    = 0x10,
	UITYPE_CLEAVER     = 0x11,
	UITYPE_LARGEAXE    = 0x12,
	UITYPE_BROADAXE    = 0x13,
	UITYPE_SMALLAXE    = 0x14,
	UITYPE_BATTLEAXE   = 0x15,
	UITYPE_GREATAXE    = 0x16,
	UITYPE_MACE        = 0x17,
	UITYPE_MORNSTAR    = 0x18,
	UITYPE_SPIKCLUB    = 0x19,
	UITYPE_MAUL        = 0x1A,
	UITYPE_WARHAMMER   = 0x1B,
	UITYPE_FLAIL       = 0x1C,
	UITYPE_LONGSTAFF   = 0x1D,
	UITYPE_SHORTSTAFF  = 0x1E,
	UITYPE_COMPSTAFF   = 0x1F,
	UITYPE_QUARSTAFF   = 0x20,
	UITYPE_WARSTAFF    = 0x21,
	UITYPE_SKULLCAP    = 0x22,
	UITYPE_HELM        = 0x23,
	UITYPE_GREATHELM   = 0x24,
	UITYPE_CROWN       = 0x25,
	UITYPE_38          = 0x26,
	UITYPE_RAGS        = 0x27,
	UITYPE_STUDARMOR   = 0x28,
	UITYPE_CLOAK       = 0x29,
	UITYPE_ROBE        = 0x2A,
	UITYPE_CHAINMAIL   = 0x2B,
	UITYPE_LEATHARMOR  = 0x2C,
	UITYPE_BREASTPLATE = 0x2D,
	UITYPE_CAPE        = 0x2E,
	UITYPE_PLATEMAIL   = 0x2F,
	UITYPE_FULLPLATE   = 0x30,
	UITYPE_BUCKLER     = 0x31,
	UITYPE_SMALLSHIELD = 0x32,
	UITYPE_LARGESHIELD = 0x33,
	UITYPE_KITESHIELD  = 0x34,
	UITYPE_GOTHSHIELD  = 0x35,
	UITYPE_RING        = 0x36,
	UITYPE_55          = 0x37,
	UITYPE_AMULET      = 0x38,
	UITYPE_SKCROWN     = 0x39,
	UITYPE_INFRARING   = 0x3A,
	UITYPE_OPTAMULET   = 0x3B,
	UITYPE_TRING       = 0x3C,
	UITYPE_HARCREST    = 0x3D,
	UITYPE_MAPOFDOOM   = 0x3E,
	UITYPE_ELIXIR      = 0x3F,
	UITYPE_ARMOFVAL    = 0x40,
	UITYPE_STEELVEIL   = 0x41,
	UITYPE_GRISWOLD    = 0x42,
	UITYPE_LGTFORGE    = 0x43,
	UITYPE_LAZSTAFF    = 0x44,
	UITYPE_INVALID     = -1,
} unique_base_item;

typedef enum item_effect_type {
	IPL_TOHIT            = 0x0,
	IPL_TOHIT_CURSE      = 0x1,
	IPL_DAMP             = 0x2,
	IPL_DAMP_CURSE       = 0x3,
	IPL_TOHIT_DAMP       = 0x4,
	IPL_TOHIT_DAMP_CURSE = 0x5,
	IPL_ACP              = 0x6,
	IPL_ACP_CURSE        = 0x7,
	IPL_FIRERES          = 0x8,
	IPL_LIGHTRES         = 0x9,
	IPL_MAGICRES         = 0xA,
	IPL_ALLRES           = 0xB,
	IPL_SPLCOST          = 0xC, /* only used in beta */
	IPL_SPLDUR           = 0xD, /* only used in beta */
	IPL_SPLLVLADD        = 0xE,
	IPL_CHARGES          = 0xF,
	IPL_FIREDAM          = 0x10,
	IPL_LIGHTDAM         = 0x11,
	IPL_STR              = 0x13,
	IPL_STR_CURSE        = 0x14,
	IPL_MAG              = 0x15,
	IPL_MAG_CURSE        = 0x16,
	IPL_DEX              = 0x17,
	IPL_DEX_CURSE        = 0x18,
	IPL_VIT              = 0x19,
	IPL_VIT_CURSE        = 0x1A,
	IPL_ATTRIBS          = 0x1B,
	IPL_ATTRIBS_CURSE    = 0x1C,
	IPL_GETHIT_CURSE     = 0x1D,
	IPL_GETHIT           = 0x1E,
	IPL_LIFE             = 0x1F,
	IPL_LIFE_CURSE       = 0x20,
	IPL_MANA             = 0x21,
	IPL_MANA_CURSE       = 0x22,
	IPL_DUR              = 0x23,
	IPL_DUR_CURSE        = 0x24,
	IPL_INDESTRUCTIBLE   = 0x25,
	IPL_LIGHT            = 0x26,
	IPL_LIGHT_CURSE      = 0x27,
	IPL_MULT_ARROWS      = 0x29, /* only used in hellfire */
	IPL_FIRE_ARROWS      = 0x2A,
	IPL_LIGHT_ARROWS     = 0x2B,
	IPL_INVCURS          = 0x2C,
	IPL_THORNS           = 0x2D,
	IPL_NOMANA           = 0x2E,
	IPL_NOHEALPLR        = 0x2F,
	IPL_FIREBALL         = 0x32, /* only used in hellfire */
	IPL_ABSHALFTRAP      = 0x34,
	IPL_KNOCKBACK        = 0x35,
	IPL_NOHEALMON        = 0x36,
	IPL_STEALMANA        = 0x37,
	IPL_STEALLIFE        = 0x38,
	IPL_TARGAC           = 0x39,
	IPL_FASTATTACK       = 0x3A,
	IPL_FASTRECOVER      = 0x3B,
	IPL_FASTBLOCK        = 0x3C,
	IPL_DAMMOD           = 0x3D,
	IPL_RNDARROWVEL      = 0x3E,
	IPL_SETDAM           = 0x3F,
	IPL_SETDUR           = 0x40,
	IPL_NOMINSTR         = 0x41,
	IPL_SPELL            = 0x42,
	IPL_FASTSWING        = 0x43,
	IPL_ONEHAND          = 0x44,
	IPL_3XDAMVDEM        = 0x45,
	IPL_ALLRESZERO       = 0x46,
	IPL_DRAINLIFE        = 0x48,
	IPL_RNDSTEALLIFE     = 0x49,
	IPL_INFRAVISION      = 0x4A,
	IPL_SETAC            = 0x4B,
	IPL_ADDACLIFE        = 0x4C,
	IPL_ADDMANAAC        = 0x4D,
	IPL_FIRERESCLVL      = 0x4E,
	IPL_AC_CURSE         = 0x4F,
	IPL_INVALID          = -1,
} item_effect_type;

typedef enum affix_item_type {
	PLT_MISC  = 0x1,
	PLT_BOW   = 0x10,
	PLT_STAFF = 0x100,
	PLT_WEAP  = 0x1000,
	PLT_SHLD  = 0x10000,
	PLT_ARMO  = 0x100000,
} affix_item_type;

/// Item graphic IDs; frame_num-11 of objcurs.cel.
typedef enum item_cursor_graphic {
	ICURS_POTION_OF_FULL_MANA         = 0,
	ICURS_SCROLL_OF                   = 1,
	ICURS_GOLD_SMALL                  = 4,
	ICURS_GOLD_MEDIUM                 = 5,
	ICURS_GOLD_LARGE                  = 6,
	ICURS_RING_OF_TRUTH               = 10,
	ICURS_RING                        = 12,
	ICURS_SPECTRAL_ELIXIR             = 15,
	ICURS_GOLDEN_ELIXIR               = 17,
	ICURS_EMPYREAN_BAND               = 18,
	ICURS_EAR_SORCEROR                = 19,
	ICURS_EAR_WARRIOR                 = 20,
	ICURS_EAR_ROGUE                   = 21,
	ICURS_BLOOD_STONE                 = 25,
	ICURS_ELIXIR_OF_VITALITY          = 31,
	ICURS_POTION_OF_HEALING           = 32,
	ICURS_POTION_OF_FULL_REJUVENATION = 33,
	ICURS_ELIXIR_OF_MAGIC             = 34,
	ICURS_POTION_OF_FULL_HEALING      = 35,
	ICURS_ELIXIR_OF_DEXTERITY         = 36,
	ICURS_POTION_OF_REJUVENATION      = 37,
	ICURS_ELIXIR_OF_STRENGTH          = 38,
	ICURS_POTION_OF_MANA              = 39,
	ICURS_BRAIN                       = 40,
	ICURS_OPTIC_AMULET                = 44,
	ICURS_AMULET                      = 45,
	ICURS_DAGGER                      = 51,
	ICURS_BLADE                       = 56,
	ICURS_BASTARD_SWORD               = 57,
	ICURS_MACE                        = 59,
	ICURS_LONG_SWORD                  = 60,
	ICURS_BROAD_SWORD                 = 61,
	ICURS_FALCHION                    = 62,
	ICURS_MORNING_STAR                = 63,
	ICURS_SHORT_SWORD                 = 64,
	ICURS_CLAYMORE                    = 65,
	ICURS_CLUB                        = 66,
	ICURS_SABRE                       = 67,
	ICURS_SPIKED_CLUB                 = 70,
	ICURS_SCIMITAR                    = 72,
	ICURS_FULL_HELM                   = 75,
	ICURS_MAGIC_ROCK                  = 76,
	ICURS_THE_UNDEAD_CROWN            = 78,
	ICURS_HELM                        = 82,
	ICURS_BUCKLER                     = 83,
	ICURS_VIEL_OF_STEEL               = 85,
	ICURS_BOOK_GREY                   = 86,
	ICURS_BOOK_RED                    = 87,
	ICURS_BOOK_BLUE                   = 88,
	ICURS_BLACK_MUSHROOM              = 89,
	ICURS_SKULL_CAP                   = 90,
	ICURS_CAP                         = 91,
	ICURS_HARLEQUIN_CREST             = 93,
	ICURS_CROWN                       = 95,
	ICURS_MAP_OF_THE_STARS            = 96,
	ICURS_FUNGAL_TOME                 = 97,
	ICURS_GREAT_HELM                  = 98,
	ICURS_BATTLE_AXE                  = 101,
	ICURS_HUNTERS_BOW                 = 102,
	ICURS_FIELD_PLATE                 = 103,
	ICURS_SMALL_SHIELD                = 105,
	ICURS_CLEAVER                     = 106,
	ICURS_STUDDED_LEATHER_ARMOR       = 107,
	ICURS_SHORT_STAFF                 = 109,
	ICURS_TWO_HANDED_SWORD            = 110,
	ICURS_CHAIN_MAIL                  = 111,
	ICURS_SMALL_AXE                   = 112,
	ICURS_KITE_SHIELD                 = 113,
	ICURS_SCALE_MAIL                  = 114,
	ICURS_SHORT_BOW                   = 118,
	ICURS_LONG_WAR_BOW                = 119,
	ICURS_WAR_HAMMER                  = 121,
	ICURS_MAUL                        = 122,
	ICURS_LONG_STAFF                  = 123,
	ICURS_WAR_STAFF                   = 124,
	ICURS_TAVERN_SIGN                 = 126,
	ICURS_HARD_LEATHER_ARMOR          = 127,
	ICURS_RAGS                        = 128,
	ICURS_QUILTED_ARMOR               = 129,
	ICURS_FLAIL                       = 131,
	ICURS_TOWER_SHIELD                = 132,
	ICURS_COMPOSITE_BOW               = 133,
	ICURS_GREAT_SWORD                 = 134,
	ICURS_LEATHER_ARMOR               = 135,
	ICURS_SPLINT_MAIL                 = 136,
	ICURS_ROBE                        = 137,
	ICURS_ANVIL_OF_FURY               = 140,
	ICURS_BROAD_AXE                   = 141,
	ICURS_LARGE_AXE                   = 142,
	ICURS_GREAT_AXE                   = 143,
	ICURS_AXE                         = 144,
	ICURS_LARGE_SHIELD                = 147,
	ICURS_GOTHIC_SHIELD               = 148,
	ICURS_CLOAK                       = 149,
	ICURS_CAPE                        = 150,
	ICURS_FULL_PLATE_MAIL             = 151,
	ICURS_GOTHIC_PLATE                = 152,
	ICURS_BREAST_PLATE                = 153,
	ICURS_RING_MAIL                   = 154,
	ICURS_STAFF_OF_LAZARUS            = 155,
	ICURS_ARKAINES_VALOR              = 157,
	ICURS_SHORT_WAR_BOW               = 165,
	ICURS_COMPOSITE_STAFF             = 166,
	ICURS_SHORT_BATTLE_BOW            = 167,
	ICURS_GOLD                        = 168,
} item_cursor_graphic;

typedef enum _sfx_id {
	PS_WALK1,
	PS_WALK2,
	PS_WALK3,
	PS_WALK4,
	PS_BFIRE,
	PS_FMAG,
	PS_TMAG,
	PS_LGHIT,
	PS_LGHIT1,
	PS_SWING,
	PS_SWING2,
	PS_DEAD,
	IS_QUESTDN,
	IS_ARMRFKD,
	IS_BARLFIRE,
	IS_BARREL,
	IS_BHIT,
	IS_BHIT1,
	IS_CHEST,
	IS_DOORCLOS,
	IS_DOOROPEN,
	IS_FANVL,
	IS_FAXE,
	IS_FBLST,
	IS_FBODY,
	IS_FBOOK,
	IS_FBOW,
	IS_FCAP,
	IS_FHARM,
	IS_FLARM,
	IS_FMAG,
	IS_FMAG1,
	IS_FMUSH,
	IS_FPOT,
	IS_FRING,
	IS_FROCK,
	IS_FSCRL,
	IS_FSHLD,
	IS_FSIGN,
	IS_FSTAF,
	IS_FSWOR,
	IS_GOLD,
	IS_HLMTFKD,
	IS_IANVL,
	IS_IAXE,
	IS_IBLST,
	IS_IBODY,
	IS_IBOOK,
	IS_IBOW,
	IS_ICAP,
	IS_IGRAB,
	IS_IHARM,
	IS_ILARM,
	IS_IMUSH,
	IS_IPOT,
	IS_IRING,
	IS_IROCK,
	IS_ISCROL,
	IS_ISHIEL,
	IS_ISIGN,
	IS_ISTAF,
	IS_ISWORD,
	IS_LEVER,
	IS_MAGIC,
	IS_MAGIC1,
	IS_RBOOK,
	IS_SARC,
	IS_SHLDFKD,
	IS_SWRDFKD,
	IS_TITLEMOV,
	IS_TITLSLCT,
	SFX_SILENCE,
	IS_TRAP,
	IS_CAST1,
	IS_CAST10,
	IS_CAST12,
	IS_CAST2,
	IS_CAST3,
	IS_CAST4,
	IS_CAST5,
	IS_CAST6,
	IS_CAST7,
	IS_CAST8,
	IS_CAST9,
	LS_HEALING,
	IS_REPAIR,
	LS_ACID,
	LS_ACIDS,
	LS_APOC,
	LS_ARROWALL,
	LS_BLODBOIL,
	LS_BLODSTAR,
	LS_BLSIMPT,
	LS_BONESP,
	LS_BSIMPCT,
	LS_CALDRON,
	LS_CBOLT,
	LS_CHLTNING,
	LS_DSERP,
	LS_ELECIMP1,
	LS_ELEMENTL,
	LS_ETHEREAL,
	LS_FBALL,
	LS_FBOLT1,
	LS_FBOLT2,
	LS_FIRIMP1,
	LS_FIRIMP2,
	LS_FLAMWAVE,
	LS_FLASH,
	LS_FOUNTAIN,
	LS_GOLUM,
	LS_GOLUMDED,
	LS_GSHRINE,
	LS_GUARD,
	LS_GUARDLAN,
	LS_HOLYBOLT,
	LS_HYPER,
	LS_INFRAVIS,
	LS_INVISIBL,
	LS_INVPOT,
	LS_LNING1,
	LS_LTNING,
	LS_MSHIELD,
	LS_NOVA,
	LS_PORTAL,
	LS_PUDDLE,
	LS_RESUR,
	LS_SCURSE,
	LS_SCURIMP,
	LS_SENTINEL,
	LS_SHATTER,
	LS_SOULFIRE,
	LS_SPOUTLOP,
	LS_SPOUTSTR,
	LS_STORM,
	LS_TRAPDIS,
	LS_TELEPORT,
	LS_VTHEFT,
	LS_WALLLOOP,
	LS_WALLSTRT,
#ifndef SPAWN
	TSFX_BMAID1,
	TSFX_BMAID2,
	TSFX_BMAID3,
	TSFX_BMAID4,
	TSFX_BMAID5,
	TSFX_BMAID6,
	TSFX_BMAID7,
	TSFX_BMAID8,
	TSFX_BMAID9,
	TSFX_BMAID10,
	TSFX_BMAID11,
	TSFX_BMAID12,
	TSFX_BMAID13,
	TSFX_BMAID14,
	TSFX_BMAID15,
	TSFX_BMAID16,
	TSFX_BMAID17,
	TSFX_BMAID18,
	TSFX_BMAID19,
	TSFX_BMAID20,
	TSFX_BMAID21,
	TSFX_BMAID22,
	TSFX_BMAID23,
	TSFX_BMAID24,
	TSFX_BMAID25,
	TSFX_BMAID26,
	TSFX_BMAID27,
	TSFX_BMAID28,
	TSFX_BMAID29,
	TSFX_BMAID30,
#endif
	TSFX_BMAID31,
#ifndef SPAWN
	TSFX_BMAID32,
	TSFX_BMAID33,
	TSFX_BMAID34,
	TSFX_BMAID35,
	TSFX_BMAID36,
	TSFX_BMAID37,
	TSFX_BMAID38,
	TSFX_BMAID39,
	TSFX_BMAID40,
	TSFX_SMITH1,
	TSFX_SMITH2,
	TSFX_SMITH3,
	TSFX_SMITH4,
	TSFX_SMITH5,
	TSFX_SMITH6,
	TSFX_SMITH7,
	TSFX_SMITH8,
	TSFX_SMITH9,
	TSFX_SMITH10,
	TSFX_SMITH11,
	TSFX_SMITH12,
	TSFX_SMITH13,
	TSFX_SMITH14,
	TSFX_SMITH15,
	TSFX_SMITH16,
	TSFX_SMITH17,
	TSFX_SMITH18,
	TSFX_SMITH19,
	TSFX_SMITH20,
	TSFX_SMITH21,
	TSFX_SMITH22,
	TSFX_SMITH23,
	TSFX_SMITH24,
	TSFX_SMITH25,
	TSFX_SMITH26,
	TSFX_SMITH27,
	TSFX_SMITH28,
	TSFX_SMITH29,
	TSFX_SMITH30,
	TSFX_SMITH31,
	TSFX_SMITH32,
	TSFX_SMITH33,
	TSFX_SMITH34,
	TSFX_SMITH35,
	TSFX_SMITH36,
	TSFX_SMITH37,
	TSFX_SMITH38,
	TSFX_SMITH39,
	TSFX_SMITH40,
	TSFX_SMITH41,
	TSFX_SMITH42,
	TSFX_SMITH43,
#endif
	TSFX_SMITH44,
#ifndef SPAWN
	TSFX_SMITH45,
	TSFX_SMITH46,
	TSFX_SMITH47,
	TSFX_SMITH48,
	TSFX_SMITH49,
	TSFX_SMITH50,
	TSFX_SMITH51,
	TSFX_SMITH52,
	TSFX_SMITH53,
	TSFX_SMITH54,
	TSFX_SMITH55,
	TSFX_SMITH56,
#endif
	TSFX_COW1,
	TSFX_COW2,
#ifndef SPAWN
	TSFX_DEADGUY,
	TSFX_DRUNK1,
	TSFX_DRUNK2,
	TSFX_DRUNK3,
	TSFX_DRUNK4,
	TSFX_DRUNK5,
	TSFX_DRUNK6,
	TSFX_DRUNK7,
	TSFX_DRUNK8,
	TSFX_DRUNK9,
	TSFX_DRUNK10,
	TSFX_DRUNK11,
	TSFX_DRUNK12,
	TSFX_DRUNK13,
	TSFX_DRUNK14,
	TSFX_DRUNK15,
	TSFX_DRUNK16,
	TSFX_DRUNK17,
	TSFX_DRUNK18,
	TSFX_DRUNK19,
	TSFX_DRUNK20,
	TSFX_DRUNK21,
	TSFX_DRUNK22,
	TSFX_DRUNK23,
	TSFX_DRUNK24,
	TSFX_DRUNK25,
	TSFX_DRUNK26,
#endif
	TSFX_DRUNK27,
#ifndef SPAWN
	TSFX_DRUNK28,
	TSFX_DRUNK29,
	TSFX_DRUNK30,
	TSFX_DRUNK31,
	TSFX_DRUNK32,
	TSFX_DRUNK33,
	TSFX_DRUNK34,
	TSFX_DRUNK35,
	TSFX_HEALER1,
	TSFX_HEALER2,
	TSFX_HEALER3,
	TSFX_HEALER4,
	TSFX_HEALER5,
	TSFX_HEALER6,
	TSFX_HEALER7,
	TSFX_HEALER8,
	TSFX_HEALER9,
	TSFX_HEALER10,
	TSFX_HEALER11,
	TSFX_HEALER12,
	TSFX_HEALER13,
	TSFX_HEALER14,
	TSFX_HEALER15,
	TSFX_HEALER16,
	TSFX_HEALER17,
	TSFX_HEALER18,
	TSFX_HEALER19,
	TSFX_HEALER20,
	TSFX_HEALER21,
	TSFX_HEALER22,
	TSFX_HEALER23,
	TSFX_HEALER24,
	TSFX_HEALER25,
	TSFX_HEALER26,
	TSFX_HEALER27,
	TSFX_HEALER28,
	TSFX_HEALER29,
	TSFX_HEALER30,
	TSFX_HEALER31,
	TSFX_HEALER32,
	TSFX_HEALER33,
	TSFX_HEALER34,
	TSFX_HEALER35,
	TSFX_HEALER36,
#endif
	TSFX_HEALER37,
#ifndef SPAWN
	TSFX_HEALER38,
	TSFX_HEALER39,
	TSFX_HEALER40,
	TSFX_HEALER41,
	TSFX_HEALER42,
	TSFX_HEALER43,
	TSFX_HEALER44,
	TSFX_HEALER45,
	TSFX_HEALER46,
	TSFX_HEALER47,
	TSFX_PEGBOY1,
	TSFX_PEGBOY2,
	TSFX_PEGBOY3,
	TSFX_PEGBOY4,
	TSFX_PEGBOY5,
	TSFX_PEGBOY6,
	TSFX_PEGBOY7,
	TSFX_PEGBOY8,
	TSFX_PEGBOY9,
	TSFX_PEGBOY10,
	TSFX_PEGBOY11,
	TSFX_PEGBOY12,
	TSFX_PEGBOY13,
	TSFX_PEGBOY14,
	TSFX_PEGBOY15,
	TSFX_PEGBOY16,
	TSFX_PEGBOY17,
	TSFX_PEGBOY18,
	TSFX_PEGBOY19,
	TSFX_PEGBOY20,
	TSFX_PEGBOY21,
	TSFX_PEGBOY22,
	TSFX_PEGBOY23,
	TSFX_PEGBOY24,
	TSFX_PEGBOY25,
	TSFX_PEGBOY26,
	TSFX_PEGBOY27,
	TSFX_PEGBOY28,
	TSFX_PEGBOY29,
	TSFX_PEGBOY30,
	TSFX_PEGBOY31,
#endif
	TSFX_PEGBOY32,
#ifndef SPAWN
	TSFX_PEGBOY33,
	TSFX_PEGBOY34,
	TSFX_PEGBOY35,
	TSFX_PEGBOY36,
	TSFX_PEGBOY37,
	TSFX_PEGBOY38,
	TSFX_PEGBOY39,
	TSFX_PEGBOY40,
	TSFX_PEGBOY41,
	TSFX_PEGBOY42,
	TSFX_PEGBOY43,
	TSFX_PRIEST0,
	TSFX_PRIEST1,
	TSFX_PRIEST2,
	TSFX_PRIEST3,
	TSFX_PRIEST4,
	TSFX_PRIEST5,
	TSFX_PRIEST6,
	TSFX_PRIEST7,
	TSFX_STORY0,
	TSFX_STORY1,
	TSFX_STORY2,
	TSFX_STORY3,
	TSFX_STORY4,
	TSFX_STORY5,
	TSFX_STORY6,
	TSFX_STORY7,
	TSFX_STORY8,
	TSFX_STORY9,
	TSFX_STORY10,
	TSFX_STORY11,
	TSFX_STORY12,
	TSFX_STORY13,
	TSFX_STORY14,
	TSFX_STORY15,
	TSFX_STORY16,
	TSFX_STORY17,
	TSFX_STORY18,
	TSFX_STORY19,
	TSFX_STORY20,
	TSFX_STORY21,
	TSFX_STORY22,
	TSFX_STORY23,
	TSFX_STORY24,
#endif
	TSFX_STORY25,
#ifndef SPAWN
	TSFX_STORY26,
	TSFX_STORY27,
	TSFX_STORY28,
	TSFX_STORY29,
	TSFX_STORY30,
	TSFX_STORY31,
	TSFX_STORY32,
	TSFX_STORY33,
	TSFX_STORY34,
	TSFX_STORY35,
	TSFX_STORY36,
	TSFX_STORY37,
	TSFX_STORY38,
#endif
	TSFX_TAVERN0,
#ifndef SPAWN
	TSFX_TAVERN1,
	TSFX_TAVERN2,
	TSFX_TAVERN3,
	TSFX_TAVERN4,
	TSFX_TAVERN5,
	TSFX_TAVERN6,
	TSFX_TAVERN7,
	TSFX_TAVERN8,
	TSFX_TAVERN9,
	TSFX_TAVERN10,
	TSFX_TAVERN11,
	TSFX_TAVERN12,
	TSFX_TAVERN13,
	TSFX_TAVERN14,
	TSFX_TAVERN15,
	TSFX_TAVERN16,
	TSFX_TAVERN17,
	TSFX_TAVERN18,
	TSFX_TAVERN19,
	TSFX_TAVERN20,
	TSFX_TAVERN21,
	TSFX_TAVERN22,
	TSFX_TAVERN23,
	TSFX_TAVERN24,
	TSFX_TAVERN25,
	TSFX_TAVERN26,
	TSFX_TAVERN27,
	TSFX_TAVERN28,
	TSFX_TAVERN29,
	TSFX_TAVERN30,
	TSFX_TAVERN31,
	TSFX_TAVERN32,
	TSFX_TAVERN33,
	TSFX_TAVERN34,
	TSFX_TAVERN35,
#endif
	TSFX_TAVERN36,
#ifndef SPAWN
	TSFX_TAVERN37,
	TSFX_TAVERN38,
	TSFX_TAVERN39,
	TSFX_TAVERN40,
	TSFX_TAVERN41,
	TSFX_TAVERN42,
	TSFX_TAVERN43,
	TSFX_TAVERN44,
	TSFX_TAVERN45,
	TSFX_WITCH1,
	TSFX_WITCH2,
	TSFX_WITCH3,
	TSFX_WITCH4,
	TSFX_WITCH5,
	TSFX_WITCH6,
	TSFX_WITCH7,
	TSFX_WITCH8,
	TSFX_WITCH9,
	TSFX_WITCH10,
	TSFX_WITCH11,
	TSFX_WITCH12,
	TSFX_WITCH13,
	TSFX_WITCH14,
	TSFX_WITCH15,
	TSFX_WITCH16,
	TSFX_WITCH17,
	TSFX_WITCH18,
	TSFX_WITCH19,
	TSFX_WITCH20,
	TSFX_WITCH21,
	TSFX_WITCH22,
	TSFX_WITCH23,
	TSFX_WITCH24,
	TSFX_WITCH25,
	TSFX_WITCH26,
	TSFX_WITCH27,
	TSFX_WITCH28,
	TSFX_WITCH29,
	TSFX_WITCH30,
	TSFX_WITCH31,
	TSFX_WITCH32,
	TSFX_WITCH33,
	TSFX_WITCH34,
	TSFX_WITCH35,
	TSFX_WITCH36,
	TSFX_WITCH37,
#endif
	TSFX_WITCH38,
#ifndef SPAWN
	TSFX_WITCH39,
	TSFX_WITCH40,
	TSFX_WITCH41,
	TSFX_WITCH42,
	TSFX_WITCH43,
	TSFX_WITCH44,
	TSFX_WITCH45,
	TSFX_WITCH46,
	TSFX_WITCH47,
	TSFX_WITCH48,
	TSFX_WITCH49,
	TSFX_WITCH50,
	TSFX_WOUND,
	PS_MAGE1,
	PS_MAGE2,
	PS_MAGE3,
	PS_MAGE4,
	PS_MAGE5,
	PS_MAGE6,
	PS_MAGE7,
	PS_MAGE8,
	PS_MAGE9,
	PS_MAGE10,
	PS_MAGE11,
	PS_MAGE12,
	PS_MAGE13,
	PS_MAGE14,
	PS_MAGE15,
	PS_MAGE16,
	PS_MAGE17,
	PS_MAGE18,
	PS_MAGE19,
	PS_MAGE20,
	PS_MAGE21,
	PS_MAGE22,
	PS_MAGE23,
	PS_MAGE24,
	PS_MAGE25,
	PS_MAGE26,
	PS_MAGE27,
	PS_MAGE28,
	PS_MAGE29,
	PS_MAGE30,
	PS_MAGE31,
	PS_MAGE32,
	PS_MAGE33,
	PS_MAGE34,
	PS_MAGE35,
	PS_MAGE36,
	PS_MAGE37,
	PS_MAGE38,
	PS_MAGE39,
	PS_MAGE40,
	PS_MAGE41,
	PS_MAGE42,
	PS_MAGE43,
	PS_MAGE44,
	PS_MAGE45,
	PS_MAGE46,
	PS_MAGE47,
	PS_MAGE48,
	PS_MAGE49,
	PS_MAGE50,
	PS_MAGE51,
	PS_MAGE52,
	PS_MAGE53,
	PS_MAGE54,
	PS_MAGE55,
	PS_MAGE56,
	PS_MAGE57,
	PS_MAGE58,
	PS_MAGE59,
	PS_MAGE60,
	PS_MAGE61,
	PS_MAGE62,
	PS_MAGE63,
	PS_MAGE64,
	PS_MAGE65,
	PS_MAGE66,
	PS_MAGE67,
	PS_MAGE68,
	PS_MAGE69,
	PS_MAGE69B,
	PS_MAGE70,
	PS_MAGE71,
	PS_MAGE72,
	PS_MAGE73,
	PS_MAGE74,
	PS_MAGE75,
	PS_MAGE76,
	PS_MAGE77,
	PS_MAGE78,
	PS_MAGE79,
	PS_MAGE80,
	PS_MAGE81,
	PS_MAGE82,
	PS_MAGE83,
	PS_MAGE84,
	PS_MAGE85,
	PS_MAGE86,
	PS_MAGE87,
	PS_MAGE88,
	PS_MAGE89,
	PS_MAGE90,
	PS_MAGE91,
	PS_MAGE92,
	PS_MAGE93,
	PS_MAGE94,
	PS_MAGE95,
	PS_MAGE96,
	PS_MAGE97,
	PS_MAGE98,
	PS_MAGE99,
	PS_MAGE100,
	PS_MAGE101,
	PS_MAGE102,
	PS_ROGUE1,
	PS_ROGUE2,
	PS_ROGUE3,
	PS_ROGUE4,
	PS_ROGUE5,
	PS_ROGUE6,
	PS_ROGUE7,
	PS_ROGUE8,
	PS_ROGUE9,
	PS_ROGUE10,
	PS_ROGUE11,
	PS_ROGUE12,
	PS_ROGUE13,
	PS_ROGUE14,
	PS_ROGUE15,
	PS_ROGUE16,
	PS_ROGUE17,
	PS_ROGUE18,
	PS_ROGUE19,
	PS_ROGUE20,
	PS_ROGUE21,
	PS_ROGUE22,
	PS_ROGUE23,
	PS_ROGUE24,
	PS_ROGUE25,
	PS_ROGUE26,
	PS_ROGUE27,
	PS_ROGUE28,
	PS_ROGUE29,
	PS_ROGUE30,
	PS_ROGUE31,
	PS_ROGUE32,
	PS_ROGUE33,
	PS_ROGUE34,
	PS_ROGUE35,
	PS_ROGUE36,
	PS_ROGUE37,
	PS_ROGUE38,
	PS_ROGUE39,
	PS_ROGUE40,
	PS_ROGUE41,
	PS_ROGUE42,
	PS_ROGUE43,
	PS_ROGUE44,
	PS_ROGUE45,
	PS_ROGUE46,
	PS_ROGUE47,
	PS_ROGUE48,
	PS_ROGUE49,
	PS_ROGUE50,
	PS_ROGUE51,
	PS_ROGUE52,
	PS_ROGUE53,
	PS_ROGUE54,
	PS_ROGUE55,
	PS_ROGUE56,
	PS_ROGUE57,
	PS_ROGUE58,
	PS_ROGUE59,
	PS_ROGUE60,
	PS_ROGUE61,
	PS_ROGUE62,
	PS_ROGUE63,
	PS_ROGUE64,
	PS_ROGUE65,
	PS_ROGUE66,
	PS_ROGUE67,
	PS_ROGUE68,
	PS_ROGUE69,
	PS_ROGUE69B,
	PS_ROGUE70,
	PS_ROGUE71,
	PS_ROGUE72,
	PS_ROGUE73,
	PS_ROGUE74,
	PS_ROGUE75,
	PS_ROGUE76,
	PS_ROGUE77,
	PS_ROGUE78,
	PS_ROGUE79,
	PS_ROGUE80,
	PS_ROGUE81,
	PS_ROGUE82,
	PS_ROGUE83,
	PS_ROGUE84,
	PS_ROGUE85,
	PS_ROGUE86,
	PS_ROGUE87,
	PS_ROGUE88,
	PS_ROGUE89,
	PS_ROGUE90,
	PS_ROGUE91,
	PS_ROGUE92,
	PS_ROGUE93,
	PS_ROGUE94,
	PS_ROGUE95,
	PS_ROGUE96,
	PS_ROGUE97,
	PS_ROGUE98,
	PS_ROGUE99,
	PS_ROGUE100,
	PS_ROGUE101,
	PS_ROGUE102,
	PS_WARR1,
	PS_WARR2,
	PS_WARR3,
	PS_WARR4,
	PS_WARR5,
	PS_WARR6,
	PS_WARR7,
	PS_WARR8,
	PS_WARR9,
	PS_WARR10,
	PS_WARR11,
	PS_WARR12,
#endif
	PS_WARR13,
	PS_WARR14,
	PS_WARR14B,
	PS_WARR14C,
	PS_WARR15,
	PS_WARR15B,
	PS_WARR15C,
	PS_WARR16,
	PS_WARR16B,
	PS_WARR16C,
	PS_WARR17,
	PS_WARR18,
	PS_WARR19,
	PS_WARR20,
	PS_WARR21,
	PS_WARR22,
	PS_WARR23,
	PS_WARR24,
	PS_WARR25,
	PS_WARR26,
	PS_WARR27,
	PS_WARR28,
	PS_WARR29,
	PS_WARR30,
	PS_WARR31,
	PS_WARR32,
	PS_WARR33,
	PS_WARR34,
	PS_WARR35,
	PS_WARR36,
	PS_WARR37,
	PS_WARR38,
	PS_WARR39,
	PS_WARR40,
	PS_WARR41,
	PS_WARR42,
	PS_WARR43,
	PS_WARR44,
	PS_WARR45,
	PS_WARR46,
	PS_WARR47,
	PS_WARR48,
	PS_WARR49,
	PS_WARR50,
	PS_WARR51,
	PS_WARR52,
	PS_WARR53,
	PS_WARR54,
	PS_WARR55,
	PS_WARR56,
	PS_WARR57,
	PS_WARR58,
	PS_WARR59,
	PS_WARR60,
	PS_WARR61,
	PS_WARR62,
	PS_WARR63,
	PS_WARR64,
	PS_WARR65,
	PS_WARR66,
	PS_WARR67,
	PS_WARR68,
	PS_WARR69,
	PS_WARR69B,
	PS_WARR70,
	PS_WARR71,
	PS_WARR72,
	PS_WARR73,
	PS_WARR74,
	PS_WARR75,
	PS_WARR76,
	PS_WARR77,
	PS_WARR78,
	PS_WARR79,
#ifndef SPAWN
	PS_WARR80,
	PS_WARR81,
	PS_WARR82,
	PS_WARR83,
	PS_WARR84,
	PS_WARR85,
	PS_WARR86,
	PS_WARR87,
	PS_WARR88,
	PS_WARR89,
	PS_WARR90,
	PS_WARR91,
	PS_WARR92,
	PS_WARR93,
	PS_WARR94,
	PS_WARR95,
	PS_WARR95B,
	PS_WARR95C,
	PS_WARR95D,
	PS_WARR95E,
	PS_WARR95F,
#endif
	PS_WARR96B,
	PS_WARR97,
	PS_WARR98,
	PS_WARR99,
#ifndef SPAWN
	PS_WARR100,
	PS_WARR101,
	PS_WARR102,
	PS_NAR1,
	PS_NAR2,
	PS_NAR3,
	PS_NAR4,
	PS_NAR5,
	PS_NAR6,
	PS_NAR7,
	PS_NAR8,
	PS_NAR9,
	PS_DIABLVLINT,
	USFX_CLEAVER,
	USFX_GARBUD1,
	USFX_GARBUD2,
	USFX_GARBUD3,
	USFX_GARBUD4,
	USFX_IZUAL1,
	USFX_LACH1,
	USFX_LACH2,
	USFX_LACH3,
	USFX_LAZ1,
	USFX_LAZ2,
	USFX_SKING1,
	USFX_SNOT1,
	USFX_SNOT2,
	USFX_SNOT3,
	USFX_WARLRD1,
	USFX_WLOCK1,
	USFX_ZHAR1,
	USFX_ZHAR2,
	USFX_DIABLOD,
#endif
} _sfx_id;

typedef enum sfx_flag {
	sfx_STREAM   = 0x01,
	sfx_MISC     = 0x02,
	sfx_UI       = 0x04,
	sfx_MONK     = 0x08,
	sfx_ROGUE    = 0x10,
	sfx_WARRIOR  = 0x20,
	sfx_SORCEROR = 0x40,
	sfx_LOADED   = 0x80,
} sfx_flag;

typedef enum item_equip_type {
	ILOC_NONE        = 0x0,
	ILOC_ONEHAND     = 0x1,
	ILOC_TWOHAND     = 0x2,
	ILOC_ARMOR       = 0x3,
	ILOC_HELM        = 0x4,
	ILOC_RING        = 0x5,
	ILOC_AMULET      = 0x6,
	ILOC_UNEQUIPABLE = 0x7,
	ILOC_BELT        = 0x8,
	ILOC_INVALID     = -1,
} item_equip_type;

typedef enum missile_id {
	MIS_ARROW         = 0x0,
	MIS_FIREBOLT      = 0x1,
	MIS_GUARDIAN      = 0x2,
	MIS_RNDTELEPORT   = 0x3,
	MIS_LIGHTBALL     = 0x4,
	MIS_FIREWALL      = 0x5,
	MIS_FIREBALL      = 0x6,
	MIS_LIGHTCTRL     = 0x7,
	MIS_LIGHTNING     = 0x8,
	MIS_MISEXP        = 0x9,
	MIS_TOWN          = 0xA,
	MIS_FLASH         = 0xB,
	MIS_FLASH2        = 0xC,
	MIS_MANASHIELD    = 0xD,
	MIS_FIREMOVE      = 0xE,
	MIS_CHAIN         = 0xF,
	MIS_SENTINAL      = 0x10, // TODO: Check beta
	MIS_BLODSTAR      = 0x11, // TODO: Check beta
	MIS_BONE          = 0x12, // TODO: Check beta
	MIS_METLHIT       = 0x13, // TODO: Check beta
	MIS_RHINO         = 0x14,
	MIS_MAGMABALL     = 0x15,
	MIS_LIGHTCTRL2    = 0x16,
	MIS_LIGHTNING2    = 0x17,
	MIS_FLARE         = 0x18,
	MIS_MISEXP2       = 0x19,
	MIS_TELEPORT      = 0x1A,
	MIS_FARROW        = 0x1B,
	MIS_DOOMSERP      = 0x1C,
	MIS_FIREWALLA     = 0x1D, // TODO: Check beta
	MIS_STONE         = 0x1E,
	MIS_NULL_1F       = 0x1F,
	MIS_INVISIBL      = 0x20,
	MIS_GOLEM         = 0x21,
	MIS_ETHEREALIZE   = 0x22,
	MIS_BLODBUR       = 0x23, // TODO: Check beta
	MIS_BOOM          = 0x24,
	MIS_HEAL          = 0x25,
	MIS_FIREWALLC     = 0x26,
	MIS_INFRA         = 0x27,
	MIS_IDENTIFY      = 0x28,
	MIS_WAVE          = 0x29,
	MIS_NOVA          = 0x2A,
	MIS_BLODBOIL      = 0x2B,
	MIS_APOCA         = 0x2C,
	MIS_REPAIR        = 0x2D,
	MIS_RECHARGE      = 0x2E,
	MIS_DISARM        = 0x2F,
	MIS_FLAME         = 0x30,
	MIS_FLAMEC        = 0x31,
	MIS_FIREMAN       = 0x32, // TODO: Check beta
	MIS_KRULL         = 0x33, // TODO: Check beta
	MIS_CBOLT         = 0x34,
	MIS_HBOLT         = 0x35,
	MIS_RESURRECT     = 0x36,
	MIS_TELEKINESIS   = 0x37,
	MIS_LARROW        = 0x38,
	MIS_ACID          = 0x39,
	MIS_MISEXP3       = 0x3A,
	MIS_ACIDPUD       = 0x3B,
	MIS_HEALOTHER     = 0x3C,
	MIS_ELEMENT       = 0x3D,
	MIS_RESURRECTBEAM = 0x3E,
	MIS_BONESPIRIT    = 0x3F,
	MIS_WEAPEXP       = 0x40,
	MIS_RPORTAL       = 0x41,
	MIS_BOOM2         = 0x42,
	MIS_DIABAPOCA     = 0x43,
} missile_id;

typedef enum missile_graphic_id {
	MFILE_ARROWS,
	MFILE_FIREBA,
	MFILE_GUARD,
	MFILE_LGHNING,
	MFILE_FIREWAL,
	MFILE_MAGBLOS,
	MFILE_PORTAL,
	MFILE_BLUEXFR,
	MFILE_BLUEXBK,
	MFILE_MANASHLD,
	MFILE_BLOOD,
	MFILE_BONE,
	MFILE_METLHIT,
	MFILE_FARROW,
	MFILE_DOOM,
	MFILE_0F,
	MFILE_BLODBUR,
	MFILE_NEWEXP,
	MFILE_SHATTER1,
	MFILE_BIGEXP,
	MFILE_INFERNO,
	MFILE_THINLGHT,
	MFILE_FLARE,
	MFILE_FLAREEXP,
	MFILE_MAGBALL,
	MFILE_KRULL,
	MFILE_MINILTNG,
	MFILE_HOLY,
	MFILE_HOLYEXPL,
	MFILE_LARROW,
	MFILE_FIRARWEX,
	MFILE_ACIDBF,
	MFILE_ACIDSPLA,
	MFILE_ACIDPUD,
	MFILE_ETHRSHLD,
	MFILE_FIRERUN,
	MFILE_RESSUR1,
	MFILE_SKLBALL,
	MFILE_RPORTAL,
	MFILE_FIREPLAR,
	MFILE_SCUBMISB,
	MFILE_SCBSEXPB,
	MFILE_SCUBMISC,
	MFILE_SCBSEXPC,
	MFILE_SCUBMISD,
	MFILE_SCBSEXPD,
	MFILE_NULL,
	MFILE_NONE = 0xFF, // BUGFIX: should be `MFILE_NONE = MFILE_SCBSEXPD+1`, i.e. MFILE_NULL, since there would otherwise be an out-of-bounds in SetMissAnim when accessing misfiledata for any of the missiles that have MFILE_NONE as mFileNum in missiledata.
} missile_graphic_id;

typedef enum _mai_id {
	AI_ZOMBIE   = 0,
	AI_FAT      = 1,
	AI_SKELSD   = 2,
	AI_SKELBOW  = 3,
	AI_SCAV     = 4,
	AI_RHINO    = 5,
	AI_GOATMC   = 6,
	AI_GOATBOW  = 7,
	AI_FALLEN   = 8,
	AI_MAGMA    = 9,
	AI_SKELKING = 10,
	AI_BAT      = 11,
	AI_GARG     = 12,
	AI_CLEAVER  = 13,
	AI_SUCC     = 14,
	AI_SNEAK    = 15,
	AI_STORM    = 16,
	AI_FIREMAN  = 17,
	AI_GARBUD   = 18,
	AI_ACID     = 19,
	AI_ACIDUNIQ = 20,
	AI_GOLUM    = 21,
	AI_ZHAR     = 22,
	AI_SNOTSPIL = 23,
	AI_SNAKE    = 24,
	AI_COUNSLR  = 25,
	AI_MEGA     = 26,
	AI_DIABLO   = 27,
	AI_LAZURUS  = 28,
	AI_LAZHELP  = 29,
	AI_LACHDAN  = 30,
	AI_WARLORD  = 31,
} _mai_id;

typedef enum _mc_id {
	MC_UNDEAD = 0,
	MC_DEMON  = 1,
	MC_ANIMAL = 2,
} _mc_id;

typedef enum FILE_SYSTEM {
	FS_PC = 0,
	FS_CD = 1,
} FILE_SYSTEM;

typedef enum _artfonts {
	AF_SMALL     = 0,
	AF_SMALLGRAY = 1,
	AF_MED       = 2,
	AF_MEDGRAY   = 3,
	AF_BIG       = 4,
	AF_BIGGRAY   = 5,
	AF_HUGE      = 6,
	AF_HUGEGRAY  = 7,
} _artfonts;

typedef enum _monster_id {
	MT_NZOMBIE  = 0x0,
	MT_BZOMBIE  = 0x1,
	MT_GZOMBIE  = 0x2,
	MT_YZOMBIE  = 0x3,
	MT_RFALLSP  = 0x4,
	MT_DFALLSP  = 0x5,
	MT_YFALLSP  = 0x6,
	MT_BFALLSP  = 0x7,
	MT_WSKELAX  = 0x8,
	MT_TSKELAX  = 0x9,
	MT_RSKELAX  = 0xA,
	MT_XSKELAX  = 0xB,
	MT_RFALLSD  = 0xC,
	MT_DFALLSD  = 0xD,
	MT_YFALLSD  = 0xE,
	MT_BFALLSD  = 0xF,
	MT_NSCAV    = 0x10,
	MT_BSCAV    = 0x11,
	MT_WSCAV    = 0x12,
	MT_YSCAV    = 0x13,
	MT_WSKELBW  = 0x14,
	MT_TSKELBW  = 0x15,
	MT_RSKELBW  = 0x16,
	MT_XSKELBW  = 0x17,
	MT_WSKELSD  = 0x18,
	MT_TSKELSD  = 0x19,
	MT_RSKELSD  = 0x1A,
	MT_XSKELSD  = 0x1B,
	MT_INVILORD = 0x1C,
	MT_SNEAK    = 0x1D,
	MT_STALKER  = 0x1E,
	MT_UNSEEN   = 0x1F,
	MT_ILLWEAV  = 0x20,
	MT_LRDSAYTR = 0x21,
	MT_NGOATMC  = 0x22,
	MT_BGOATMC  = 0x23,
	MT_RGOATMC  = 0x24,
	MT_GGOATMC  = 0x25,
	MT_FIEND    = 0x26,
	MT_BLINK    = 0x27,
	MT_GLOOM    = 0x28,
	MT_FAMILIAR = 0x29,
	MT_NGOATBW  = 0x2A,
	MT_BGOATBW  = 0x2B,
	MT_RGOATBW  = 0x2C,
	MT_GGOATBW  = 0x2D,
	MT_NACID    = 0x2E,
	MT_RACID    = 0x2F,
	MT_BACID    = 0x30,
	MT_XACID    = 0x31,
	MT_SKING    = 0x32,
	MT_CLEAVER  = 0x33,
	MT_FAT      = 0x34,
	MT_MUDMAN   = 0x35,
	MT_TOAD     = 0x36,
	MT_FLAYED   = 0x37,
	MT_WYRM     = 0x38,
	MT_CAVSLUG  = 0x39,
	MT_DVLWYRM  = 0x3A,
	MT_DEVOUR   = 0x3B,
	MT_NMAGMA   = 0x3C,
	MT_YMAGMA   = 0x3D,
	MT_BMAGMA   = 0x3E,
	MT_WMAGMA   = 0x3F,
	MT_HORNED   = 0x40,
	MT_MUDRUN   = 0x41,
	MT_FROSTC   = 0x42,
	MT_OBLORD   = 0x43,
	MT_BONEDMN  = 0x44,
	MT_REDDTH   = 0x45,
	MT_LTCHDMN  = 0x46,
	MT_UDEDBLRG = 0x47,
	MT_INCIN    = 0x48,
	MT_FLAMLRD  = 0x49,
	MT_DOOMFIRE = 0x4A,
	MT_HELLBURN = 0x4B,
	MT_STORM    = 0x4C,
	MT_RSTORM   = 0x4D,
	MT_STORML   = 0x4E,
	MT_MAEL     = 0x4F,
	MT_BIGFALL  = 0x50,
	MT_WINGED   = 0x51,
	MT_GARGOYLE = 0x52,
	MT_BLOODCLW = 0x53,
	MT_DEATHW   = 0x54,
	MT_MEGA     = 0x55,
	MT_GUARD    = 0x56,
	MT_VTEXLRD  = 0x57,
	MT_BALROG   = 0x58,
	MT_NSNAKE   = 0x59,
	MT_RSNAKE   = 0x5A,
	MT_BSNAKE   = 0x5B,
	MT_GSNAKE   = 0x5C,
	MT_NBLACK   = 0x5D,
	MT_RTBLACK  = 0x5E,
	MT_BTBLACK  = 0x5F,
	MT_RBLACK   = 0x60,
	MT_UNRAV    = 0x61,
	MT_HOLOWONE = 0x62,
	MT_PAINMSTR = 0x63,
	MT_REALWEAV = 0x64,
	MT_SUCCUBUS = 0x65,
	MT_SNOWWICH = 0x66,
	MT_HLSPWN   = 0x67,
	MT_SOLBRNR  = 0x68,
	MT_COUNSLR  = 0x69,
	MT_MAGISTR  = 0x6A,
	MT_CABALIST = 0x6B,
	MT_ADVOCATE = 0x6C,
	MT_GOLEM    = 0x6D,
	MT_DIABLO   = 0x6E,
	MT_DARKMAGE = 0x6F,
	NUM_MTYPES  = 0x6F, /// BUGFIX the count is off by one
} _monster_id;

// this enum contains indexes from UniqMonst array for special unique monsters (usually quest related)
typedef enum {
	UMT_GARBUD    = 0,
	UMT_SKELKING  = 1,
	UMT_ZHAR      = 2,
	UMT_SNOTSPIL  = 3,
	UMT_LAZURUS   = 4,
	UMT_RED_VEX   = 5,
	UMT_BLACKJADE = 6,
	UMT_LACHDAN   = 7,
	UMT_WARLORD   = 8,
	UMT_BUTCHER   = 9,
} _uniq_monsterid;

typedef enum monster_flag {
	MFLAG_HIDDEN          = 0x01,
	MFLAG_LOCK_ANIMATION  = 0x02,
	MFLAG_ALLOW_SPECIAL   = 0x04,
	MFLAG_NOHEAL          = 0x08,
	MFLAG_TARGETS_MONSTER = 0x10,
	MFLAG_GOLEM           = 0x20,
	MFLAG_QUEST_COMPLETE  = 0x40,
	MFLAG_KNOCKBACK       = 0x80,
	MFLAG_SEARCH          = 0x100,
	MFLAG_CAN_OPEN_DOOR   = 0x200,
	MFLAG_NO_ENEMY        = 0x400,
	MFLAG_UNUSED          = 0x800,
	MFLAG_NOLIFESTEAL     = 0x1000
} monster_flag;

typedef enum monster_goal {
	MGOAL_NORMAL    = 1,
	MGOAL_RETREAT   = 2,
	MGOAL_HEALING   = 3,
	MGOAL_MOVE      = 4,
	MGOAL_SHOOT     = 5,
	MGOAL_INQUIRING = 6,
	MGOAL_TALKING   = 7,
} monster_goal;

typedef enum monster_resistance {
	RESIST_MAGIC     = 0x01,
	RESIST_FIRE      = 0x02,
	RESIST_LIGHTNING = 0x04,
	IMUNE_MAGIC      = 0x08,
	IMUNE_FIRE       = 0x10,
	IMUNE_LIGHTNING  = 0x20,
	IMUNE_NULL_40    = 0x40,
	IMUNE_ACID       = 0x80,
} monster_resistance;

typedef enum missile_resistance {
	MISR_FIRE      = 1,
	MISR_LIGHTNING = 2,
	MISR_MAGIC     = 3,
	MISR_ACID      = 4,
} missile_resistance;

typedef enum _speech_id {
	TEXT_KING1      = 0x0,
	TEXT_KING2      = 0x1,
	TEXT_KING3      = 0x2,
	TEXT_KING4      = 0x3,
	TEXT_KING5      = 0x4,
	TEXT_KING6      = 0x5,
	TEXT_KING7      = 0x6,
	TEXT_KING8      = 0x7,
	TEXT_KING9      = 0x8,
	TEXT_KING10     = 0x9,
	TEXT_KING11     = 0xA,
	TEXT_BANNER1    = 0xB,
	TEXT_BANNER2    = 0xC,
	TEXT_BANNER3    = 0xD,
	TEXT_BANNER4    = 0xE,
	TEXT_BANNER5    = 0xF,
	TEXT_BANNER6    = 0x10,
	TEXT_BANNER7    = 0x11,
	TEXT_BANNER8    = 0x12,
	TEXT_BANNER9    = 0x13,
	TEXT_BANNER10   = 0x14,
	TEXT_BANNER11   = 0x15,
	TEXT_BANNER12   = 0x16,
	TEXT_VILE1      = 0x17,
	TEXT_VILE2      = 0x18,
	TEXT_VILE3      = 0x19,
	TEXT_VILE4      = 0x1A,
	TEXT_VILE5      = 0x1B,
	TEXT_VILE6      = 0x1C,
	TEXT_VILE7      = 0x1D,
	TEXT_VILE8      = 0x1E,
	TEXT_VILE9      = 0x1F,
	TEXT_VILE10     = 0x20,
	TEXT_VILE11     = 0x21,
	TEXT_VILE12     = 0x22,
	TEXT_VILE13     = 0x23,
	TEXT_VILE14     = 0x24,
	TEXT_POISON1    = 0x25,
	TEXT_POISON2    = 0x26,
	TEXT_POISON3    = 0x27,
	TEXT_POISON4    = 0x28,
	TEXT_POISON5    = 0x29,
	TEXT_POISON6    = 0x2A,
	TEXT_POISON7    = 0x2B,
	TEXT_POISON8    = 0x2C,
	TEXT_POISON9    = 0x2D,
	TEXT_POISON10   = 0x2E,
	TEXT_BONE1      = 0x2F,
	TEXT_BONE2      = 0x30,
	TEXT_BONE3      = 0x31,
	TEXT_BONE4      = 0x32,
	TEXT_BONE5      = 0x33,
	TEXT_BONE6      = 0x34,
	TEXT_BONE7      = 0x35,
	TEXT_BONE8      = 0x36,
	TEXT_BUTCH1     = 0x37,
	TEXT_BUTCH2     = 0x38,
	TEXT_BUTCH3     = 0x39,
	TEXT_BUTCH4     = 0x3A,
	TEXT_BUTCH5     = 0x3B,
	TEXT_BUTCH6     = 0x3C,
	TEXT_BUTCH7     = 0x3D,
	TEXT_BUTCH8     = 0x3E,
	TEXT_BUTCH9     = 0x3F,
	TEXT_BUTCH10    = 0x40,
	TEXT_BLIND1     = 0x41,
	TEXT_BLIND2     = 0x42,
	TEXT_BLIND3     = 0x43,
	TEXT_BLIND4     = 0x44,
	TEXT_BLIND5     = 0x45,
	TEXT_BLIND6     = 0x46,
	TEXT_BLIND7     = 0x47,
	TEXT_BLIND8     = 0x48,
	TEXT_VEIL1      = 0x49,
	TEXT_VEIL2      = 0x4A,
	TEXT_VEIL3      = 0x4B,
	TEXT_VEIL4      = 0x4C,
	TEXT_VEIL5      = 0x4D,
	TEXT_VEIL6      = 0x4E,
	TEXT_VEIL7      = 0x4F,
	TEXT_VEIL8      = 0x50,
	TEXT_VEIL9      = 0x51,
	TEXT_VEIL10     = 0x52,
	TEXT_VEIL11     = 0x53,
	TEXT_ANVIL1     = 0x54,
	TEXT_ANVIL2     = 0x55,
	TEXT_ANVIL3     = 0x56,
	TEXT_ANVIL4     = 0x57,
	TEXT_ANVIL5     = 0x58,
	TEXT_ANVIL6     = 0x59,
	TEXT_ANVIL7     = 0x5A,
	TEXT_ANVIL8     = 0x5B,
	TEXT_ANVIL9     = 0x5C,
	TEXT_ANVIL10    = 0x5D,
	TEXT_BLOOD1     = 0x5E,
	TEXT_BLOOD2     = 0x5F,
	TEXT_BLOOD3     = 0x60,
	TEXT_BLOOD4     = 0x61,
	TEXT_BLOOD5     = 0x62,
	TEXT_BLOOD6     = 0x63,
	TEXT_BLOOD7     = 0x64,
	TEXT_BLOOD8     = 0x65,
	TEXT_WARLRD1    = 0x66,
	TEXT_WARLRD2    = 0x67,
	TEXT_WARLRD3    = 0x68,
	TEXT_WARLRD4    = 0x69,
	TEXT_WARLRD5    = 0x6A,
	TEXT_WARLRD6    = 0x6B,
	TEXT_WARLRD7    = 0x6C,
	TEXT_WARLRD8    = 0x6D,
	TEXT_WARLRD9    = 0x6E,
	TEXT_INFRA1     = 0x6F,
	TEXT_INFRA2     = 0x70,
	TEXT_INFRA3     = 0x71,
	TEXT_INFRA4     = 0x72,
	TEXT_INFRA5     = 0x73,
	TEXT_INFRA6     = 0x74,
	TEXT_INFRA7     = 0x75,
	TEXT_INFRA8     = 0x76,
	TEXT_INFRA9     = 0x77,
	TEXT_INFRA10    = 0x78,
	TEXT_MUSH1      = 0x79,
	TEXT_MUSH2      = 0x7A,
	TEXT_MUSH3      = 0x7B,
	TEXT_MUSH4      = 0x7C,
	TEXT_MUSH5      = 0x7D,
	TEXT_MUSH6      = 0x7E,
	TEXT_MUSH7      = 0x7F,
	TEXT_MUSH8      = 0x80,
	TEXT_MUSH9      = 0x81,
	TEXT_MUSH10     = 0x82,
	TEXT_MUSH11     = 0x83,
	TEXT_MUSH12     = 0x84,
	TEXT_MUSH13     = 0x85,
	TEXT_DOOM1      = 0x86,
	TEXT_DOOM2      = 0x87,
	TEXT_DOOM3      = 0x88,
	TEXT_DOOM4      = 0x89,
	TEXT_DOOM5      = 0x8A,
	TEXT_DOOM6      = 0x8B,
	TEXT_DOOM7      = 0x8C,
	TEXT_DOOM8      = 0x8D,
	TEXT_DOOM9      = 0x8E,
	TEXT_DOOM10     = 0x8F,
	TEXT_GARBUD1    = 0x90,
	TEXT_GARBUD2    = 0x91,
	TEXT_GARBUD3    = 0x92,
	TEXT_GARBUD4    = 0x93,
	TEXT_ZHAR1      = 0x94,
	TEXT_ZHAR2      = 0x95,
	TEXT_STORY1     = 0x96,
	TEXT_STORY2     = 0x97,
	TEXT_STORY3     = 0x98,
	TEXT_STORY4     = 0x99,
	TEXT_STORY5     = 0x9A,
	TEXT_STORY6     = 0x9B,
	TEXT_STORY7     = 0x9C,
	TEXT_STORY9     = 0x9D,
	TEXT_STORY10    = 0x9E,
	TEXT_STORY11    = 0x9F,
	TEXT_OGDEN1     = 0xA0,
	TEXT_OGDEN2     = 0xA1,
	TEXT_OGDEN3     = 0xA2,
	TEXT_OGDEN4     = 0xA3,
	TEXT_OGDEN5     = 0xA4,
	TEXT_OGDEN6     = 0xA5,
	TEXT_OGDEN8     = 0xA6,
	TEXT_OGDEN9     = 0xA7,
	TEXT_OGDEN10    = 0xA8,
	TEXT_PEPIN1     = 0xA9,
	TEXT_PEPIN2     = 0xAA,
	TEXT_PEPIN3     = 0xAB,
	TEXT_PEPIN4     = 0xAC,
	TEXT_PEPIN5     = 0xAD,
	TEXT_PEPIN6     = 0xAE,
	TEXT_PEPIN7     = 0xAF,
	TEXT_PEPIN9     = 0xB0,
	TEXT_PEPIN10    = 0xB1,
	TEXT_PEPIN11    = 0xB2,
	TEXT_GILLIAN1   = 0xB3,
	TEXT_GILLIAN2   = 0xB4,
	TEXT_GILLIAN3   = 0xB5,
	TEXT_GILLIAN4   = 0xB6,
	TEXT_GILLIAN5   = 0xB7,
	TEXT_GILLIAN6   = 0xB8,
	TEXT_GILLIAN7   = 0xB9,
	TEXT_GILLIAN9   = 0xBA,
	TEXT_GILLIAN10  = 0xBB,
	TEXT_GRISWOLD1  = 0xBC,
	TEXT_GRISWOLD2  = 0xBD,
	TEXT_GRISWOLD3  = 0xBE,
	TEXT_GRISWOLD4  = 0xBF,
	TEXT_GRISWOLD5  = 0xC0,
	TEXT_GRISWOLD6  = 0xC1,
	TEXT_GRISWOLD7  = 0xC2,
	TEXT_GRISWOLD8  = 0xC3,
	TEXT_GRISWOLD9  = 0xC4,
	TEXT_GRISWOLD10 = 0xC5,
	TEXT_GRISWOLD12 = 0xC6,
	TEXT_GRISWOLD13 = 0xC7,
	TEXT_FARNHAM1   = 0xC8,
	TEXT_FARNHAM2   = 0xC9,
	TEXT_FARNHAM3   = 0xCA,
	TEXT_FARNHAM4   = 0xCB,
	TEXT_FARNHAM5   = 0xCC,
	TEXT_FARNHAM6   = 0xCD,
	TEXT_FARNHAM8   = 0xCE,
	TEXT_FARNHAM9   = 0xCF,
	TEXT_FARNHAM10  = 0xD0,
	TEXT_FARNHAM11  = 0xD1,
	TEXT_FARNHAM12  = 0xD2,
	TEXT_FARNHAM13  = 0xD3,
	TEXT_ADRIA1     = 0xD4,
	TEXT_ADRIA2     = 0xD5,
	TEXT_ADRIA3     = 0xD6,
	TEXT_ADRIA4     = 0xD7,
	TEXT_ADRIA5     = 0xD8,
	TEXT_ADRIA6     = 0xD9,
	TEXT_ADRIA7     = 0xDA,
	TEXT_ADRIA8     = 0xDB,
	TEXT_ADRIA9     = 0xDC,
	TEXT_ADRIA10    = 0xDD,
	TEXT_ADRIA12    = 0xDE,
	TEXT_ADRIA13    = 0xDF,
	TEXT_WIRT1      = 0xE0,
	TEXT_WIRT2      = 0xE1,
	TEXT_WIRT3      = 0xE2,
	TEXT_WIRT4      = 0xE3,
	TEXT_WIRT5      = 0xE4,
	TEXT_WIRT6      = 0xE5,
	TEXT_WIRT7      = 0xE6,
	TEXT_WIRT8      = 0xE7,
	TEXT_WIRT9      = 0xE8,
	TEXT_WIRT11     = 0xE9,
	TEXT_WIRT12     = 0xEA,
	TEXT_BONER      = 0xEB,
	TEXT_BLOODY     = 0xEC,
	TEXT_BLINDING   = 0xED,
	TEXT_BLOODWAR   = 0xEE,
	TEXT_MBONER     = 0xEF,
	TEXT_MBLOODY    = 0xF0,
	TEXT_MBLINDING  = 0xF1,
	TEXT_MBLOODWAR  = 0xF2,
	TEXT_RBONER     = 0xF3,
	TEXT_RBLOODY    = 0xF4,
	TEXT_RBLINDING  = 0xF5,
	TEXT_RBLOODWAR  = 0xF6,
	TEXT_COW1       = 0xF7,
	TEXT_COW2       = 0xF8,
	TEXT_BOOK11     = 0xF9,
	TEXT_BOOK12     = 0xFA,
	TEXT_BOOK13     = 0xFB,
	TEXT_BOOK21     = 0xFC,
	TEXT_BOOK22     = 0xFD,
	TEXT_BOOK23     = 0xFE,
	TEXT_BOOK31     = 0xFF,
	TEXT_BOOK32     = 0x100,
	TEXT_BOOK33     = 0x101,
	TEXT_INTRO      = 0x102,
} _speech_id;

typedef enum object_graphic_id {
	OFILE_L1BRAZ   = 0x0,
	OFILE_L1DOORS  = 0x1,
	OFILE_LEVER    = 0x2,
	OFILE_CHEST1   = 0x3,
	OFILE_CHEST2   = 0x4,
	OFILE_BANNER   = 0x5,
	OFILE_SKULPILE = 0x6,
	OFILE_SKULFIRE = 0x7,
	OFILE_SKULSTIK = 0x8,
	OFILE_CRUXSK1  = 0x9,
	OFILE_CRUXSK2  = 0xA,
	OFILE_CRUXSK3  = 0xB,
	OFILE_BOOK1    = 0xC,
	OFILE_BOOK2    = 0xD,
	OFILE_ROCKSTAN = 0xE,
	OFILE_ANGEL    = 0xF,
	OFILE_CHEST3   = 0x10,
	OFILE_BURNCROS = 0x11,
	OFILE_CANDLE2  = 0x12,
	OFILE_NUDE2    = 0x13,
	OFILE_SWITCH4  = 0x14,
	OFILE_TNUDEM   = 0x15,
	OFILE_TNUDEW   = 0x16,
	OFILE_TSOUL    = 0x17,
	OFILE_L2DOORS  = 0x18,
	OFILE_WTORCH4  = 0x19,
	OFILE_WTORCH3  = 0x1A,
	OFILE_SARC     = 0x1B,
	OFILE_FLAME1   = 0x1C,
	OFILE_PRSRPLT1 = 0x1D,
	OFILE_TRAPHOLE = 0x1E,
	OFILE_MINIWATR = 0x1F,
	OFILE_WTORCH2  = 0x20,
	OFILE_WTORCH1  = 0x21,
	OFILE_BCASE    = 0x22,
	OFILE_BSHELF   = 0x23,
	OFILE_WEAPSTND = 0x24,
	OFILE_BARREL   = 0x25,
	OFILE_BARRELEX = 0x26,
	OFILE_LSHRINEG = 0x27,
	OFILE_RSHRINEG = 0x28,
	OFILE_BLOODFNT = 0x29,
	OFILE_DECAP    = 0x2A,
	OFILE_PEDISTL  = 0x2B,
	OFILE_L3DOORS  = 0x2C,
	OFILE_PFOUNTN  = 0x2D,
	OFILE_ARMSTAND = 0x2E,
	OFILE_GOATSHRN = 0x2F,
	OFILE_CAULDREN = 0x30,
	OFILE_MFOUNTN  = 0x31,
	OFILE_TFOUNTN  = 0x32,
	OFILE_ALTBOY   = 0x33,
	OFILE_MCIRL    = 0x34,
	OFILE_BKSLBRNT = 0x35,
	OFILE_MUSHPTCH = 0x36,
	OFILE_LZSTAND  = 0x37,
} object_graphic_id;

typedef enum dungeon_type {
	DTYPE_TOWN      = 0x0,
	DTYPE_CATHEDRAL = 0x1,
	DTYPE_CATACOMBS = 0x2,
	DTYPE_CAVES     = 0x3,
	DTYPE_HELL      = 0x4,
	DTYPE_NONE      = 0xFF,
} dungeon_type;

typedef enum dflag {
	BFLAG_MISSILE     = 0x01,
	BFLAG_VISIBLE     = 0x02,
	BFLAG_DEAD_PLAYER = 0x04,
	BFLAG_POPULATED   = 0x08,
	BFLAG_MONSTLR     = 0x10,
	BFLAG_PLAYERLR    = 0x20,
	BFLAG_LIT         = 0x40,
	BFLAG_EXPLORED    = 0x80,
} dflag;

 /*
 First 5 bits store level
 6th bit stores onlygood flag
 7th bit stores uper15 flag - uper means unique percent, this flag is true for unique monsters and loot from them has 15% to become unique
 8th bit stores uper1 flag - this is loot from normal monsters, which has 1% to become unique
 9th bit stores info if item is unique
 10th bit stores info if item is a basic one from griswold
 11th bit stores info if item is a premium one from griswold
 12th bit stores info if item is from wirt
 13th bit stores info if item is from adria
 14th bit stores info if item is from pepin
 15th bit stores pregen flag

 combining CF_UPER15 and CF_UPER1 flags (CF_USEFUL) is used to mark potions and town portal scrolls created on the ground
 CF_TOWN is combining all store flags and indicates if item has been bought from a NPC
 */
typedef enum icreateinfo_flag {
	CF_LEVEL        = (1 << 6) - 1,
	CF_ONLYGOOD     = 1 << 6,
	CF_UPER15       = 1 << 7,
	CF_UPER1        = 1 << 8,
	CF_UNIQUE       = 1 << 9,
	CF_SMITH        = 1 << 10,
	CF_SMITHPREMIUM = 1 << 11,
	CF_BOY          = 1 << 12,
	CF_WITCH        = 1 << 13,
	CF_HEALER       = 1 << 14,
	CF_PREGEN       = 1 << 15,

	CF_USEFUL = CF_UPER15 | CF_UPER1,
	CF_TOWN   = CF_SMITH | CF_SMITHPREMIUM | CF_BOY | CF_WITCH | CF_HEALER,
} icreateinfo_flag;

typedef enum dungeon_message {
	DMSG_CATHEDRAL = 1 << 0,
	DMSG_CATACOMBS = 1 << 1,
	DMSG_CAVES     = 1 << 2,
	DMSG_HELL      = 1 << 3,
	DMSG_DIABLO    = 1 << 4,
} dungeon_message;

typedef enum diablo_message {
	EMSG_NONE                   = 0,
	EMSG_NO_AUTOMAP_IN_TOWN     = 1,
	EMSG_NO_MULTIPLAYER_IN_DEMO = 2,
	EMSG_DIRECT_SOUND_FAILED    = 3,
	EMSG_NOT_IN_SHAREWARE       = 4,
	EMSG_NO_SPACE_TO_SAVE       = 5,
	EMSG_NO_PAUSE_IN_TOWN       = 6,
	EMSG_COPY_TO_HDD            = 7,
	EMSG_DESYNC                 = 8,
	EMSG_NO_PAUSE_IN_MP         = 9,
	EMSG_LOADING                = 10,
	EMSG_SAVING                 = 11,
	EMSG_SHRINE_MYSTERIOUS      = 12,
	EMSG_SHRINE_HIDDEN          = 13,
	EMSG_SHRINE_GLOOMY          = 14,
	EMSG_SHRINE_WEIRD           = 15,
	EMSG_SHRINE_MAGICAL         = 16,
	EMSG_SHRINE_STONE           = 17,
	EMSG_SHRINE_RELIGIOUS       = 18,
	EMSG_SHRINE_ENCHANTED       = 19,
	EMSG_SHRINE_THAUMATURGIC    = 20,
	EMSG_SHRINE_FASCINATING     = 21,
	EMSG_SHRINE_CRYPTIC         = 22,
	EMSG_SHRINE_UNUSED          = 23,
	EMSG_SHRINE_ELDRITCH        = 24,
	EMSG_SHRINE_EERIE           = 25,
	EMSG_SHRINE_DIVINE          = 26,
	EMSG_SHRINE_HOLY            = 27,
	EMSG_SHRINE_SACRED          = 28,
	EMSG_SHRINE_SPIRITUAL       = 29,
	EMSG_SHRINE_SPOOKY1         = 30,
	EMSG_SHRINE_SPOOKY2         = 31,
	EMSG_SHRINE_ABANDONED       = 32,
	EMSG_SHRINE_CREEPY          = 33,
	EMSG_SHRINE_QUIET           = 34,
	EMSG_SHRINE_SECLUDED        = 35,
	EMSG_SHRINE_ORNATE          = 36,
	EMSG_SHRINE_GLIMMERING      = 37,
	EMSG_SHRINE_TAINTED1        = 38,
	EMSG_SHRINE_TAINTED2        = 39,
	EMSG_REQUIRES_LVL_8         = 40,
	EMSG_REQUIRES_LVL_13        = 41,
	EMSG_REQUIRES_LVL_17        = 42,
	EMSG_BONECHAMB              = 43,
} diablo_message;

typedef enum magic_type {
	STYPE_FIRE      = 0x0,
	STYPE_LIGHTNING = 0x1,
	STYPE_MAGIC     = 0x2,
} magic_type;

typedef enum theme_id {
	THEME_BARREL            = 0x0,
	THEME_SHRINE            = 0x1,
	THEME_MONSTPIT          = 0x2,
	THEME_SKELROOM          = 0x3,
	THEME_TREASURE          = 0x4,
	THEME_LIBRARY           = 0x5,
	THEME_TORTURE           = 0x6,
	THEME_BLOODFOUNTAIN     = 0x7,
	THEME_DECAPITATED       = 0x8,
	THEME_PURIFYINGFOUNTAIN = 0x9,
	THEME_ARMORSTAND        = 0xA,
	THEME_GOATSHRINE        = 0xB,
	THEME_CAULDRON          = 0xC,
	THEME_MURKYFOUNTAIN     = 0xD,
	THEME_TEARFOUNTAIN      = 0xE,
	THEME_BRNCROSS          = 0xF,
	THEME_WEAPONRACK        = 0x10,
	THEME_NONE              = -1,
} theme_id;

typedef enum event_type {
	EVENT_TYPE_PLAYER_CREATE_GAME = 1,
	EVENT_TYPE_2                  = 2,
	EVENT_TYPE_PLAYER_LEAVE_GAME  = 3,
	EVENT_TYPE_PLAYER_MESSAGE     = 4,
	EVENT_TYPE_5                  = 5,
	EVENT_TYPE_6                  = 6,
	EVENT_TYPE_7                  = 7,
	EVENT_TYPE_8                  = 8,
	EVENT_TYPE_9                  = 9,
	EVENT_TYPE_10                 = 10,
	EVENT_TYPE_11                 = 11,
	EVENT_TYPE_12                 = 12,
	EVENT_TYPE_13                 = 13,
	EVENT_TYPE_14                 = 14,
	EVENT_TYPE_15                 = 15,
} event_type;

typedef enum _copyprot_results {
	COPYPROT_OK     = 1,
	COPYPROT_CANCEL = 2,
} _copyprot_results;

typedef enum text_color {
	COL_WHITE = 0x0,
	COL_BLUE  = 0x1,
	COL_RED   = 0x2,
	COL_GOLD  = 0x3,
} text_color;

typedef enum item_color {
	ICOL_WHITE = PAL16_YELLOW + 5,
	ICOL_BLUE  = PAL16_BLUE + 5,
	ICOL_RED   = PAL16_RED + 5,
} item_color;

typedef enum _difficulty {
	DIFF_NORMAL      = 0x0,
	DIFF_NIGHTMARE   = 0x1,
	DIFF_HELL        = 0x2,
	NUM_DIFFICULTIES = 0x3,
} _difficulty;

typedef enum MON_MODE {
	MM_STAND     = 0,
	MM_WALK      = 1,
	MM_WALK2     = 2,
	MM_WALK3     = 3,
	MM_ATTACK    = 4,
	MM_GOTHIT    = 5,
	MM_DEATH     = 6,
	MM_SATTACK   = 7,
	MM_FADEIN    = 8,
	MM_FADEOUT   = 9,
	MM_RATTACK   = 10,
	MM_SPSTAND   = 11,
	MM_RSPATTACK = 12,
	MM_DELAY     = 13,
	MM_CHARGE    = 14,
	MM_STONE     = 15,
	MM_HEAL      = 16,
	MM_TALK      = 17,
} MON_MODE;

typedef enum MON_ANIM {
	MA_STAND   = 0,
	MA_WALK    = 1,
	MA_ATTACK  = 2,
	MA_GOTHIT  = 3,
	MA_DEATH   = 4,
	MA_SPECIAL = 5,
} MON_ANIM;

typedef enum PLR_MODE {
	PM_STAND   = 0,
	PM_WALK    = 1,
	PM_WALK2   = 2,
	PM_WALK3   = 3,
	PM_ATTACK  = 4,
	PM_RATTACK = 5,
	PM_BLOCK   = 6,
	PM_GOTHIT  = 7,
	PM_DEATH   = 8,
	PM_SPELL   = 9,
	PM_NEWLVL  = 10,
	PM_QUIT    = 11,
} PLR_MODE;

typedef enum spell_type {
	RSPLTYPE_SKILL   = 0x0,
	RSPLTYPE_SPELL   = 0x1,
	RSPLTYPE_SCROLL  = 0x2,
	RSPLTYPE_CHARGES = 0x3,
	RSPLTYPE_INVALID = 0x4,
} spell_type;

typedef enum cursor_id {
	CURSOR_NONE        = 0x0,
	CURSOR_HAND        = 0x1,
	CURSOR_IDENTIFY    = 0x2,
	CURSOR_REPAIR      = 0x3,
	CURSOR_RECHARGE    = 0x4,
	CURSOR_DISARM      = 0x5,
	CURSOR_OIL         = 0x6,
	CURSOR_TELEKINESIS = 0x7,
	CURSOR_RESURRECT   = 0x8,
	CURSOR_TELEPORT    = 0x9,
	CURSOR_HEALOTHER   = 0xA,
	CURSOR_HOURGLASS   = 0xB,
	CURSOR_FIRSTITEM   = 0xC,
} cursor_id;

typedef enum direction {
	DIR_S    = 0x0,
	DIR_SW   = 0x1,
	DIR_W    = 0x2,
	DIR_NW   = 0x3,
	DIR_N    = 0x4,
	DIR_NE   = 0x5,
	DIR_E    = 0x6,
	DIR_SE   = 0x7,
	DIR_OMNI = 0x8,
} direction;

typedef enum _scroll_direction {
	SDIR_NONE = 0x0,
	SDIR_N    = 0x1,
	SDIR_NE   = 0x2,
	SDIR_E    = 0x3,
	SDIR_SE   = 0x4,
	SDIR_S    = 0x5,
	SDIR_SW   = 0x6,
	SDIR_W    = 0x7,
	SDIR_NW   = 0x8,
} _scroll_direction;

typedef enum interface_mode {
	WM_DIABNEXTLVL  = 0x402, // WM_USER+2
	WM_DIABPREVLVL  = 0x403,
	WM_DIABRTNLVL   = 0x404,
	WM_DIABSETLVL   = 0x405,
	WM_DIABWARPLVL  = 0x406,
	WM_DIABTOWNWARP = 0x407,
	WM_DIABTWARPUP  = 0x408,
	WM_DIABRETOWN   = 0x409,
	WM_DIABNEWGAME  = 0x40A,
	WM_DIABLOADGAME = 0x40B
	// WM_LEIGHSKIP = 0x40C, // psx only
	// WM_DIAVNEWLVL = 0x40D, // psx only
} interface_mode;

typedef enum game_info {
	GAMEINFO_NAME         = 1,
	GAMEINFO_PASSWORD     = 2,
	GAMEINFO_STATS        = 3,
	GAMEINFO_MODEFLAG     = 4,
	GAMEINFO_GAMETEMPLATE = 5,
	GAMEINFO_PLAYERS      = 6,
} game_info;

typedef enum spell_id {
	SPL_NULL        = 0x0,
	SPL_FIREBOLT    = 0x1,
	SPL_HEAL        = 0x2,
	SPL_LIGHTNING   = 0x3,
	SPL_FLASH       = 0x4,
	SPL_IDENTIFY    = 0x5,
	SPL_FIREWALL    = 0x6,
	SPL_TOWN        = 0x7,
	SPL_STONE       = 0x8,
	SPL_INFRA       = 0x9,
	SPL_RNDTELEPORT = 0xA,
	SPL_MANASHIELD  = 0xB,
	SPL_FIREBALL    = 0xC,
	SPL_GUARDIAN    = 0xD,
	SPL_CHAIN       = 0xE,
	SPL_WAVE        = 0xF,
	SPL_DOOMSERP    = 0x10,
	SPL_BLODRIT     = 0x11,
	SPL_NOVA        = 0x12,
	SPL_INVISIBIL   = 0x13,
	SPL_FLAME       = 0x14,
	SPL_GOLEM       = 0x15,
	SPL_BLODBOIL    = 0x16,
	SPL_TELEPORT    = 0x17,
	SPL_APOCA       = 0x18,
	SPL_ETHEREALIZE = 0x19,
	SPL_REPAIR      = 0x1A,
	SPL_RECHARGE    = 0x1B,
	SPL_DISARM      = 0x1C,
	SPL_ELEMENT     = 0x1D,
	SPL_CBOLT       = 0x1E,
	SPL_HBOLT       = 0x1F,
	SPL_RESURRECT   = 0x20,
	SPL_TELEKINESIS = 0x21,
	SPL_HEALOTHER   = 0x22,
	SPL_FLARE       = 0x23,
	SPL_BONESPIRIT  = 0x24,
	SPL_INVALID     = -1,
} spell_id;

typedef enum _cmd_id {
	CMD_STAND,
	CMD_WALKXY,
	CMD_ACK_PLRINFO,
	CMD_ADDSTR,
	CMD_ADDMAG,
	CMD_ADDDEX,
	CMD_ADDVIT,
	CMD_SBSPELL,
	CMD_GETITEM,
	CMD_AGETITEM,
	CMD_PUTITEM,
	CMD_RESPAWNITEM,
	CMD_ATTACKXY,
	CMD_RATTACKXY,
	CMD_SPELLXY,
	CMD_TSPELLXY,
	CMD_OPOBJXY,
	CMD_DISARMXY,
	CMD_ATTACKID,
	CMD_ATTACKPID,
	CMD_RATTACKID,
	CMD_RATTACKPID,
	CMD_SPELLID,
	CMD_SPELLPID,
	CMD_TSPELLID,
	CMD_TSPELLPID,
	CMD_RESURRECT,
	CMD_OPOBJT,
	CMD_KNOCKBACK,
	CMD_TALKXY,
	CMD_NEWLVL,
	CMD_WARP,
	CMD_CHEAT_EXPERIENCE,
	CMD_CHEAT_SPELL_LEVEL,
	CMD_DEBUG,
	CMD_SYNCDATA,
	CMD_MONSTDEATH,
	CMD_MONSTDAMAGE,
	CMD_PLRDEAD,
	CMD_REQUESTGITEM,
	CMD_REQUESTAGITEM,
	CMD_GOTOGETITEM,
	CMD_GOTOAGETITEM,
	CMD_OPENDOOR,
	CMD_CLOSEDOOR,
	CMD_OPERATEOBJ,
	CMD_PLROPOBJ,
	CMD_BREAKOBJ,
	CMD_CHANGEPLRITEMS,
	CMD_DELPLRITEMS,
	CMD_PLRDAMAGE,
	CMD_PLRLEVEL,
	CMD_DROPITEM,
	CMD_PLAYER_JOINLEVEL,
	CMD_SEND_PLRINFO,
	CMD_SATTACKXY,
	CMD_ACTIVATEPORTAL,
	CMD_DEACTIVATEPORTAL,
	CMD_DLEVEL_0,
	CMD_DLEVEL_1,
	CMD_DLEVEL_2,
	CMD_DLEVEL_3,
	CMD_DLEVEL_4,
	CMD_DLEVEL_5,
	CMD_DLEVEL_6,
	CMD_DLEVEL_7,
	CMD_DLEVEL_8,
	CMD_DLEVEL_9,
	CMD_DLEVEL_10,
	CMD_DLEVEL_11,
	CMD_DLEVEL_12,
	CMD_DLEVEL_13,
	CMD_DLEVEL_14,
	CMD_DLEVEL_15,
	CMD_DLEVEL_16,
	CMD_DLEVEL_JUNK,
	CMD_DLEVEL_END,
	CMD_HEALOTHER,
	CMD_STRING,
	CMD_SETSTR,
	CMD_SETMAG,
	CMD_SETDEX,
	CMD_SETVIT,
	CMD_RETOWN,
	CMD_SPELLXYD,
	CMD_ITEMEXTRA,
	CMD_SYNCPUTITEM,
	CMD_KILLGOLEM,
	CMD_SYNCQUEST,
	CMD_ENDSHIELD,
	CMD_AWAKEGOLEM,
	CMD_NOVA,
	CMD_SETSHIELD,
	CMD_REMSHIELD,
	FAKE_CMD_SETID,
	FAKE_CMD_DROPID,
	NUM_CMDS,
} _cmd_id;

typedef enum _talker_id {
	TOWN_SMITH   = 0x0,
	TOWN_HEALER  = 0x1,
	TOWN_DEADGUY = 0x2,
	TOWN_TAVERN  = 0x3,
	TOWN_STORY   = 0x4,
	TOWN_DRUNK   = 0x5,
	TOWN_WITCH   = 0x6,
	TOWN_BMAID   = 0x7,
	TOWN_PEGBOY  = 0x8,
	TOWN_COW     = 0x9,
	TOWN_PRIEST  = 0xA,
} _talker_id;

typedef enum _music_id {
	TMUSIC_TOWN,
	TMUSIC_L1,
	TMUSIC_L2,
	TMUSIC_L3,
	TMUSIC_L4,
	TMUSIC_INTRO,
	NUM_MUSIC,
} _music_id;

typedef enum _mainmenu_selections {
	MAINMENU_SINGLE_PLAYER = 1,
	MAINMENU_MULTIPLAYER   = 2,
	MAINMENU_REPLAY_INTRO  = 3,
	MAINMENU_SHOW_CREDITS  = 4,
	MAINMENU_EXIT_DIABLO   = 5,
	MAINMENU_ATTRACT_MODE  = 6,
} _mainmenu_selections;

typedef enum _selhero_selections {
	SELHERO_NEW_DUNGEON = 1,
	SELHERO_CONTINUE    = 2,
	SELHERO_CONNECT     = 3,
	SELHERO_PREVIOUS    = 4
} _selhero_selections;

typedef enum panel_button_id {
	PANBTN_CHARINFO  = 0,
	PANBTN_QLOG      = 1,
	PANBTN_AUTOMAP   = 2,
	PANBTN_MAINMENU  = 3,
	PANBTN_INVENTORY = 4,
	PANBTN_SPELLBOOK = 5,
	PANBTN_SENDMSG   = 6,
	PANBTN_FRIENDLY  = 7,
} panel_button_id;

typedef enum attribute_id {
	ATTRIB_STR = 0,
	ATTRIB_MAG = 1,
	ATTRIB_DEX = 2,
	ATTRIB_VIT = 3,
} attribute_id;

typedef enum _object_id {
	OBJ_L1LIGHT      = 0x0,
	OBJ_L1LDOOR      = 0x1,
	OBJ_L1RDOOR      = 0x2,
	OBJ_SKFIRE       = 0x3,
	OBJ_LEVER        = 0x4,
	OBJ_CHEST1       = 0x5,
	OBJ_CHEST2       = 0x6,
	OBJ_CHEST3       = 0x7,
	OBJ_CANDLE1      = 0x8,
	OBJ_CANDLE2      = 0x9,
	OBJ_CANDLEO      = 0xA,
	OBJ_BANNERL      = 0xB,
	OBJ_BANNERM      = 0xC,
	OBJ_BANNERR      = 0xD,
	OBJ_SKPILE       = 0xE,
	OBJ_SKSTICK1     = 0xF,
	OBJ_SKSTICK2     = 0x10,
	OBJ_SKSTICK3     = 0x11,
	OBJ_SKSTICK4     = 0x12,
	OBJ_SKSTICK5     = 0x13,
	OBJ_CRUX1        = 0x14,
	OBJ_CRUX2        = 0x15,
	OBJ_CRUX3        = 0x16,
	OBJ_STAND        = 0x17,
	OBJ_ANGEL        = 0x18,
	OBJ_BOOK2L       = 0x19,
	OBJ_BCROSS       = 0x1A,
	OBJ_NUDEW2R      = 0x1B,
	OBJ_SWITCHSKL    = 0x1C,
	OBJ_TNUDEM1      = 0x1D,
	OBJ_TNUDEM2      = 0x1E,
	OBJ_TNUDEM3      = 0x1F,
	OBJ_TNUDEM4      = 0x20,
	OBJ_TNUDEW1      = 0x21,
	OBJ_TNUDEW2      = 0x22,
	OBJ_TNUDEW3      = 0x23,
	OBJ_TORTURE1     = 0x24,
	OBJ_TORTURE2     = 0x25,
	OBJ_TORTURE3     = 0x26,
	OBJ_TORTURE4     = 0x27,
	OBJ_TORTURE5     = 0x28,
	OBJ_BOOK2R       = 0x29,
	OBJ_L2LDOOR      = 0x2A,
	OBJ_L2RDOOR      = 0x2B,
	OBJ_TORCHL       = 0x2C,
	OBJ_TORCHR       = 0x2D,
	OBJ_TORCHL2      = 0x2E,
	OBJ_TORCHR2      = 0x2F,
	OBJ_SARC         = 0x30,
	OBJ_FLAMEHOLE    = 0x31,
	OBJ_FLAMELVR     = 0x32,
	OBJ_WATER        = 0x33,
	OBJ_BOOKLVR      = 0x34,
	OBJ_TRAPL        = 0x35,
	OBJ_TRAPR        = 0x36,
	OBJ_BOOKSHELF    = 0x37,
	OBJ_WEAPRACK     = 0x38,
	OBJ_BARREL       = 0x39,
	OBJ_BARRELEX     = 0x3A,
	OBJ_SHRINEL      = 0x3B,
	OBJ_SHRINER      = 0x3C,
	OBJ_SKELBOOK     = 0x3D,
	OBJ_BOOKCASEL    = 0x3E,
	OBJ_BOOKCASER    = 0x3F,
	OBJ_BOOKSTAND    = 0x40,
	OBJ_BOOKCANDLE   = 0x41,
	OBJ_BLOODFTN     = 0x42,
	OBJ_DECAP        = 0x43,
	OBJ_TCHEST1      = 0x44,
	OBJ_TCHEST2      = 0x45,
	OBJ_TCHEST3      = 0x46,
	OBJ_BLINDBOOK    = 0x47,
	OBJ_BLOODBOOK    = 0x48,
	OBJ_PEDISTAL     = 0x49,
	OBJ_L3LDOOR      = 0x4A,
	OBJ_L3RDOOR      = 0x4B,
	OBJ_PURIFYINGFTN = 0x4C,
	OBJ_ARMORSTAND   = 0x4D,
	OBJ_ARMORSTANDN  = 0x4E,
	OBJ_GOATSHRINE   = 0x4F,
	OBJ_CAULDRON     = 0x50,
	OBJ_MURKYFTN     = 0x51,
	OBJ_TEARFTN      = 0x52,
	OBJ_ALTBOY       = 0x53,
	OBJ_MCIRCLE1     = 0x54,
	OBJ_MCIRCLE2     = 0x55,
	OBJ_STORYBOOK    = 0x56,
	OBJ_STORYCANDLE  = 0x57,
	OBJ_STEELTOME    = 0x58,
	OBJ_WARARMOR     = 0x59,
	OBJ_WARWEAP      = 0x5A,
	OBJ_TBCROSS      = 0x5B,
	OBJ_WEAPONRACK   = 0x5C,
	OBJ_WEAPONRACKN  = 0x5D,
	OBJ_MUSHPATCH    = 0x5E,
	OBJ_LAZSTAND     = 0x5F,
	OBJ_SLAINHERO    = 0x60,
	OBJ_SIGNCHEST    = 0x61,
	OBJ_NULL_98      = 0x62,
} _object_id;

typedef enum item_misc_id {
	IMISC_NONE      = 0x0,
	IMISC_USEFIRST  = 0x1,
	IMISC_FULLHEAL  = 0x2,
	IMISC_HEAL      = 0x3,
	IMISC_OLDHEAL   = 0x4,
	IMISC_DEADHEAL  = 0x5,
	IMISC_MANA      = 0x6,
	IMISC_FULLMANA  = 0x7,
	IMISC_POTEXP    = 0x8, /* add experience */
	IMISC_POTFORG   = 0x9, /* remove experience */
	IMISC_ELIXSTR   = 0xA,
	IMISC_ELIXMAG   = 0xB,
	IMISC_ELIXDEX   = 0xC,
	IMISC_ELIXVIT   = 0xD,
	IMISC_ELIXWEAK  = 0xE, /* double check with alpha */
	IMISC_ELIXDIS   = 0xF,
	IMISC_ELIXCLUM  = 0x10,
	IMISC_ELIXSICK  = 0x11,
	IMISC_REJUV     = 0x12,
	IMISC_FULLREJUV = 0x13,
	IMISC_USELAST   = 0x14,
	IMISC_SCROLL    = 0x15,
	IMISC_SCROLLT   = 0x16,
	IMISC_STAFF     = 0x17,
	IMISC_BOOK      = 0x18,
	IMISC_RING      = 0x19,
	IMISC_AMULET    = 0x1A,
	IMISC_UNIQUE    = 0x1B,
	IMISC_MEAT      = 0x1C, /* from demo/PSX */
	IMISC_OILFIRST  = 0x1D,
	IMISC_OILOF     = 0x1E, /* oils are beta or hellfire only */
	IMISC_OILACC    = 0x1F,
	IMISC_OILMAST   = 0x20,
	IMISC_OILSHARP  = 0x21,
	IMISC_OILDEATH  = 0x22,
	IMISC_OILSKILL  = 0x23,
	IMISC_OILBSMTH  = 0x24,
	IMISC_OILFORT   = 0x25,
	IMISC_OILPERM   = 0x26,
	IMISC_OILHARD   = 0x27,
	IMISC_OILIMP    = 0x28,
	IMISC_OILLAST   = 0x29,
	IMISC_MAPOFDOOM = 0x2A,
	IMISC_EAR       = 0x2B,
	IMISC_SPECELIX  = 0x2C,
	IMISC_INVALID   = -1,
} item_misc_id;

typedef enum item_type {
	ITYPE_MISC   = 0x0,
	ITYPE_SWORD  = 0x1,
	ITYPE_AXE    = 0x2,
	ITYPE_BOW    = 0x3,
	ITYPE_MACE   = 0x4,
	ITYPE_SHIELD = 0x5,
	ITYPE_LARMOR = 0x6,
	ITYPE_HELM   = 0x7,
	ITYPE_MARMOR = 0x8,
	ITYPE_HARMOR = 0x9,
	ITYPE_STAFF  = 0xA,
	ITYPE_GOLD   = 0xB,
	ITYPE_RING   = 0xC,
	ITYPE_AMULET = 0xD,
	ITYPE_MEAT   = 0xE, /* used in demo, might be generic for 'food' */
	ITYPE_NONE   = -1,
} item_type;

typedef enum _item_indexes {
	IDI_GOLD,
	IDI_WARRIOR,
	IDI_WARRSHLD,
	IDI_WARRCLUB,
	IDI_ROGUE,
	IDI_SORCEROR,
	IDI_CLEAVER,
	IDI_FIRSTQUEST = IDI_CLEAVER,
	IDI_SKCROWN,
	IDI_INFRARING,
	IDI_ROCK,
	IDI_OPTAMULET,
	IDI_TRING,
	IDI_BANNER,
	IDI_HARCREST,
	IDI_STEELVEIL,
	IDI_GLDNELIX,
	IDI_ANVIL,
	IDI_MUSHROOM,
	IDI_BRAIN,
	IDI_FUNGALTM,
	IDI_SPECELIX,
	IDI_BLDSTONE,
	IDI_MAPOFDOOM,
	IDI_LASTQUEST = IDI_MAPOFDOOM,
	IDI_EAR,
	IDI_HEAL,
	IDI_MANA,
	IDI_IDENTIFY,
	IDI_PORTAL,
	IDI_ARMOFVAL,
	IDI_FULLHEAL,
	IDI_FULLMANA,
	IDI_GRISWOLD,
	IDI_LGTFORGE,
	IDI_LAZSTAFF,
	IDI_RESURRECT,
} _item_indexes;

typedef enum _setlevels {
	//SL_BUTCHCHAMB = 0x0,
	SL_SKELKING     = 0x1,
	SL_BONECHAMB    = 0x2,
	SL_MAZE         = 0x3,
	SL_POISONWATER  = 0x4,
	SL_VILEBETRAYER = 0x5,
} _setlevels;

typedef enum quest_id {
	Q_ROCK     = 0x0,
	Q_MUSHROOM = 0x1,
	Q_GARBUD   = 0x2,
	Q_ZHAR     = 0x3,
	Q_VEIL     = 0x4,
	Q_DIABLO   = 0x5,
	Q_BUTCHER  = 0x6,
	Q_LTBANNER = 0x7,
	Q_BLIND    = 0x8,
	Q_BLOOD    = 0x9,
	Q_ANVIL    = 0xA,
	Q_WARLORD  = 0xB,
	Q_SKELKING = 0xC,
	Q_PWATER   = 0xD,
	Q_SCHAMB   = 0xE,
	Q_BETRAYER = 0xF,
	Q_INVALID  = -1,
} quest_id;

typedef enum quest_state {
	QUEST_NOTAVAIL = 0,
	QUEST_INIT     = 1,
	QUEST_ACTIVE   = 2,
	QUEST_DONE     = 3
} quest_state;

typedef enum quest_mush_state {
	QS_INIT         = 0,
	QS_TOMESPAWNED  = 1,
	QS_TOMEGIVEN    = 2,
	QS_MUSHSPAWNED  = 3,
	QS_MUSHPICKED   = 4,
	QS_MUSHGIVEN    = 5,
	QS_BRAINSPAWNED = 6,
	QS_BRAINGIVEN   = 7,
} quest_mush_state;

typedef enum talk_id {
	STORE_NONE      = 0x0,
	STORE_SMITH     = 0x1,
	STORE_SBUY      = 0x2,
	STORE_SSELL     = 0x3,
	STORE_SREPAIR   = 0x4,
	STORE_WITCH     = 0x5,
	STORE_WBUY      = 0x6,
	STORE_WSELL     = 0x7,
	STORE_WRECHARGE = 0x8,
	STORE_NOMONEY   = 0x9,
	STORE_NOROOM    = 0xA,
	STORE_CONFIRM   = 0xB,
	STORE_BOY       = 0xC,
	STORE_BBOY      = 0xD,
	STORE_HEALER    = 0xE,
	STORE_STORY     = 0xF,
	STORE_HBUY      = 0x10,
	STORE_SIDENTIFY = 0x11,
	STORE_SPBUY     = 0x12,
	STORE_GOSSIP    = 0x13,
	STORE_IDSHOW    = 0x14,
	STORE_TAVERN    = 0x15,
	STORE_DRUNK     = 0x16,
	STORE_BARMAID   = 0x17,
} talk_id;

typedef enum _unique_items {
	UITEM_CLEAVER      = 0x0,
	UITEM_SKCROWN      = 0x1,
	UITEM_INFRARING    = 0x2,
	UITEM_OPTAMULET    = 0x3,
	UITEM_TRING        = 0x4,
	UITEM_HARCREST     = 0x5,
	UITEM_STEELVEIL    = 0x6,
	UITEM_ARMOFVAL     = 0x7,
	UITEM_GRISWOLD     = 0x8,
	UITEM_LGTFORGE     = 0x9,
	UITEM_RIFTBOW      = 0xA,
	UITEM_NEEDLER      = 0xB,
	UITEM_CELESTBOW    = 0xC,
	UITEM_DEADLYHUNT   = 0xD,
	UITEM_BOWOFDEAD    = 0xE,
	UITEM_BLKOAKBOW    = 0xF,
	UITEM_FLAMEDART    = 0x10,
	UITEM_FLESHSTING   = 0x11,
	UITEM_WINDFORCE    = 0x12,
	UITEM_EAGLEHORN    = 0x13,
	UITEM_GONNAGALDIRK = 0x14,
	UITEM_DEFENDER     = 0x15,
	UITEM_GRYPHONCLAW  = 0x16,
	UITEM_BLACKRAZOR   = 0x17,
	UITEM_GIBBOUSMOON  = 0x18,
	UITEM_ICESHANK     = 0x19,
	UITEM_EXECUTIONER  = 0x1A,
	UITEM_BONESAW      = 0x1B,
	UITEM_SHADHAWK     = 0x1C,
	UITEM_WIZSPIKE     = 0x1D,
	UITEM_LGTSABRE     = 0x1E,
	UITEM_FALCONTALON  = 0x1F,
	UITEM_INFERNO      = 0x20,
	UITEM_DOOMBRINGER  = 0x21,
	UITEM_GRIZZLY      = 0x22,
	UITEM_GRANDFATHER  = 0x23,
	UITEM_MANGLER      = 0x24,
	UITEM_SHARPBEAK    = 0x25,
	UITEM_BLOODLSLAYER = 0x26,
	UITEM_CELESTAXE    = 0x27,
	UITEM_WICKEDAXE    = 0x28,
	UITEM_STONECLEAV   = 0x29,
	UITEM_AGUHATCHET   = 0x2A,
	UITEM_HELLSLAYER   = 0x2B,
	UITEM_MESSERREAVER = 0x2C,
	UITEM_CRACKRUST    = 0x2D,
	UITEM_JHOLMHAMM    = 0x2E,
	UITEM_CIVERBS      = 0x2F,
	UITEM_CELESTSTAR   = 0x30,
	UITEM_BARANSTAR    = 0x31,
	UITEM_GNARLROOT    = 0x32,
	UITEM_CRANBASH     = 0x33,
	UITEM_SCHAEFHAMM   = 0x34,
	UITEM_DREAMFLANGE  = 0x35,
	UITEM_STAFFOFSHAD  = 0x36,
	UITEM_IMMOLATOR    = 0x37,
	UITEM_STORMSPIRE   = 0x38,
	UITEM_GLEAMSONG    = 0x39,
	UITEM_THUNDERCALL  = 0x3A,
	UITEM_PROTECTOR    = 0x3B,
	UITEM_NAJPUZZLE    = 0x3C,
	UITEM_MINDCRY      = 0x3D,
	UITEM_RODOFONAN    = 0x3E,
	UITEM_SPIRITSHELM  = 0x3F,
	UITEM_THINKINGCAP  = 0x40,
	UITEM_OVERLORDHELM = 0x41,
	UITEM_FOOLSCREST   = 0x42,
	UITEM_GOTTERDAM    = 0x43,
	UITEM_ROYCIRCLET   = 0x44,
	UITEM_TORNFLESH    = 0x45,
	UITEM_GLADBANE     = 0x46,
	UITEM_RAINCLOAK    = 0x47,
	UITEM_LEATHAUT     = 0x48,
	UITEM_WISDWRAP     = 0x49,
	UITEM_SPARKMAIL    = 0x4A,
	UITEM_SCAVCARAP    = 0x4B,
	UITEM_NIGHTSCAPE   = 0x4C,
	UITEM_NAJPLATE     = 0x4D,
	UITEM_DEMONSPIKE   = 0x4E,
	UITEM_DEFLECTOR    = 0x4F,
	UITEM_SKULLSHLD    = 0x50,
	UITEM_DRAGONBRCH   = 0x51,
	UITEM_BLKOAKSHLD   = 0x52,
	UITEM_HOLYDEF      = 0x53,
	UITEM_STORMSHLD    = 0x54,
	UITEM_BRAMBLE      = 0x55,
	UITEM_REGHA        = 0x56,
	UITEM_BLEEDER      = 0x57,
	UITEM_CONSTRICT    = 0x58,
	UITEM_ENGAGE       = 0x59,
	UITEM_INVALID      = 0x5A,
} _unique_items;

typedef enum plr_class {
	PC_WARRIOR  = 0x0,
	PC_ROGUE    = 0x1,
	PC_SORCERER = 0x2,
	NUM_CLASSES
} plr_class;

typedef enum _ui_classes {
	UI_WARRIOR  = 0x0,
	UI_ROGUE    = 0x1,
	UI_SORCERER = 0x2,
	UI_NUM_CLASSES,
} _ui_classes;

typedef enum _walk_path {
	WALK_NE   = 0x1,
	WALK_NW   = 0x2,
	WALK_SE   = 0x3,
	WALK_SW   = 0x4,
	WALK_N    = 0x5,
	WALK_E    = 0x6,
	WALK_S    = 0x7,
	WALK_W    = 0x8,
	WALK_NONE = -1,
} _walk_path;

typedef enum player_weapon_type {
	WT_MELEE  = 0,
	WT_RANGED = 1,
} player_weapon_type;

typedef enum item_class {
	ICLASS_NONE   = 0,
	ICLASS_WEAPON = 1,
	ICLASS_ARMOR  = 2,
	ICLASS_MISC   = 3,
	ICLASS_GOLD   = 4,
	ICLASS_QUEST  = 5,
} item_class;

typedef enum item_drop_rate {
	IDROP_NEVER   = 0,
	IDROP_REGULAR = 1,
	IDROP_DOUBLE  = 2,
} item_drop_rate;

typedef enum item_special_effect {
	ISPL_NONE           = 0x00000000,
	ISPL_INFRAVISION    = 0x00000001,
	ISPL_RNDSTEALLIFE   = 0x00000002,
	ISPL_RNDARROWVEL    = 0x00000004,
	ISPL_FIRE_ARROWS    = 0x00000008,
	ISPL_FIREDAM        = 0x00000010,
	ISPL_LIGHTDAM       = 0x00000020,
	ISPL_DRAINLIFE      = 0x00000040,
	ISPL_UNKNOWN_1      = 0x00000080,
	ISPL_NOHEALPLR      = 0x00000100,
	ISPL_UNKNOWN_2      = 0x00000200,
	ISPL_UNKNOWN_3      = 0x00000400,
	ISPL_KNOCKBACK      = 0x00000800,
	ISPL_NOHEALMON      = 0x00001000,
	ISPL_STEALMANA_3    = 0x00002000,
	ISPL_STEALMANA_5    = 0x00004000,
	ISPL_STEALLIFE_3    = 0x00008000,
	ISPL_STEALLIFE_5    = 0x00010000,
	ISPL_QUICKATTACK    = 0x00020000,
	ISPL_FASTATTACK     = 0x00040000,
	ISPL_FASTERATTACK   = 0x00080000,
	ISPL_FASTESTATTACK  = 0x00100000,
	ISPL_FASTRECOVER    = 0x00200000,
	ISPL_FASTERRECOVER  = 0x00400000,
	ISPL_FASTESTRECOVER = 0x00800000,
	ISPL_FASTBLOCK      = 0x01000000,
	ISPL_LIGHT_ARROWS   = 0x02000000,
	ISPL_THORNS         = 0x04000000,
	ISPL_NOMANA         = 0x08000000,
	ISPL_ABSHALFTRAP    = 0x10000000,
	ISPL_UNKNOWN_4      = 0x20000000,
	ISPL_3XDAMVDEM      = 0x40000000,
	ISPL_ALLRESZERO     = 0x80000000,
} item_special_effect;

// Logical equipment locations
typedef enum inv_body_loc {
	INVLOC_HEAD       = 0,
	INVLOC_RING_LEFT  = 1,
	INVLOC_RING_RIGHT = 2,
	INVLOC_AMULET     = 3,
	INVLOC_HAND_LEFT  = 4,
	INVLOC_HAND_RIGHT = 5,
	INVLOC_CHEST      = 6,
	NUM_INVLOC,
} inv_body_loc;

typedef enum inv_item {
	INVITEM_HEAD       = 0,
	INVITEM_RING_LEFT  = 1,
	INVITEM_RING_RIGHT = 2,
	INVITEM_AMULET     = 3,
	INVITEM_HAND_LEFT  = 4,
	INVITEM_HAND_RIGHT = 5,
	INVITEM_CHEST      = 6,
	INVITEM_INV_FIRST  = 7,
	INVITEM_INV_LAST   = 46,
	INVITEM_BELT_FIRST = 47,
	INVITEM_BELT_LAST  = 54,
	NUM_INVELEM
} inv_item;

// identifiers for each of the inventory squares
// see https://github.com/sanctuary/graphics/blob/master/inventory.png
typedef enum inv_xy_slot {
	SLOTXY_HEAD_FIRST       = 0,
	SLOTXY_HEAD_LAST        = 3,
	SLOTXY_RING_LEFT        = 4,
	SLOTXY_RING_RIGHT       = 5,
	SLOTXY_AMULET           = 6,
	SLOTXY_HAND_LEFT_FIRST  = 7,
	SLOTXY_HAND_LEFT_LAST   = 12,
	SLOTXY_HAND_RIGHT_FIRST = 13,
	SLOTXY_HAND_RIGHT_LAST  = 18,
	SLOTXY_CHEST_FIRST      = 19,
	SLOTXY_CHEST_LAST       = 24,

	// regular inventory
	SLOTXY_INV_FIRST = 25,
	SLOTXY_INV_LAST  = 64,

	// belt items
	SLOTXY_BELT_FIRST = 65,
	SLOTXY_BELT_LAST  = 72,
	NUM_XY_SLOTS      = 73
} inv_xy_slot;

typedef enum player_graphic {
	PFILE_STAND     = 1 << 0,
	PFILE_WALK      = 1 << 1,
	PFILE_ATTACK    = 1 << 2,
	PFILE_HIT       = 1 << 3,
	PFILE_LIGHTNING = 1 << 4,
	PFILE_FIRE      = 1 << 5,
	PFILE_MAGIC     = 1 << 6,
	PFILE_DEATH     = 1 << 7,
	PFILE_BLOCK     = 1 << 8,
	// everything except PFILE_DEATH
	// 0b1_0111_1111
	PFILE_NONDEATH = 0x17F
} player_graphic;

typedef enum anim_weapon_id {
	ANIM_ID_UNARMED        = 0x00,
	ANIM_ID_UNARMED_SHIELD = 0x01,
	ANIM_ID_SWORD          = 0x02,
	ANIM_ID_SWORD_SHIELD   = 0x03,
	ANIM_ID_BOW            = 0x04,
	ANIM_ID_AXE            = 0x05,
	ANIM_ID_MACE           = 0x06,
	ANIM_ID_MACE_SHIELD    = 0x07,
	ANIM_ID_STAFF          = 0x08
} anim_weapon_id;

typedef enum anim_armor_id {
	ANIM_ID_LIGHT_ARMOR = 0x00,
#ifndef SPAWN
	ANIM_ID_MEDIUM_ARMOR = 0x10,
	ANIM_ID_HEAVY_ARMOR  = 0x20
#endif
} anim_armor_id;

typedef enum shrine_type {
	SHRINE_MYSTERIOUS   = 0,
	SHRINE_HIDDEN       = 1,
	SHRINE_GLOOMY       = 2,
	SHRINE_WEIRD        = 3,
	SHRINE_MAGICAL      = 4,
	SHRINE_STONE        = 5,
	SHRINE_RELIGIOUS    = 6,
	SHRINE_ENCHANTED    = 7,
	SHRINE_THAUMATURGIC = 8,
	SHRINE_FASCINATING  = 9,
	SHRINE_CRYPTIC      = 10,
	SHRINE_MAGICAL2     = 11,
	SHRINE_ELDRITCH     = 12,
	SHRINE_EERIE        = 13,
	SHRINE_DIVINE       = 14,
	SHRINE_HOLY         = 15,
	SHRINE_SACRED       = 16,
	SHRINE_SPIRITUAL    = 17,
	SHRINE_SPOOKY       = 18,
	SHRINE_ABANDONED    = 19,
	SHRINE_CREEPY       = 20,
	SHRINE_QUIET        = 21,
	SHRINE_SECLUDED     = 22,
	SHRINE_ORNATE       = 23,
	SHRINE_GLIMMERING   = 24,
	SHRINE_TAINTED      = 25,
	NUM_SHRINETYPE
} shrine_type;

typedef enum action_id {
	ACTION_NONE        = -1,
	ACTION_ATTACK      = 9,
	ACTION_RATTACK     = 10,
	ACTION_SPELL       = 12,
	ACTION_OPERATE     = 13,
	ACTION_DISARM      = 14,
	ACTION_PICKUPITEM  = 15, // put item in hand (inventory screen open)
	ACTION_PICKUPAITEM = 16, // put item in inventory
	ACTION_TALK        = 17,
	ACTION_OPERATETK   = 18, // operate via telekinesis
	ACTION_ATTACKMON   = 20,
	ACTION_ATTACKPLR   = 21,
	ACTION_RATTACKMON  = 22,
	ACTION_RATTACKPLR  = 23,
	ACTION_SPELLMON    = 24,
	ACTION_SPELLPLR    = 25,
	ACTION_SPELLWALL   = 26,
} action_id;

typedef enum dlrg_flag {
	DLRG_HDOOR     = 0x01,
	DLRG_VDOOR     = 0x02,
	DLRG_CHAMBER   = 0x40,
	DLRG_PROTECTED = 0x80,
} dlrg_flag;
