/*
   This file has been generated by IDA.
   It contains local type definitions from
   the type library 'Diablo'
*/

struct HWND__;
struct _RTL_CRITICAL_SECTION_DEBUG;
struct tagWNDCLASSEXA;
struct HINSTANCE__;
struct HICON__;
struct HBRUSH__;
struct _iobuf;
struct _GUID;
struct ITypeInfo;
struct ITypeInfoVtbl;
struct tagTYPEATTR;
struct tagTYPEDESC;
struct ITypeComp;
struct ITypeCompVtbl;
union tagBINDPTR;
struct tagFUNCDESC;
struct tagELEMDESC;
struct tagPARAMDESCEX;
struct tagVARIANT;
struct IUnknown;
struct IUnknownVtbl;
struct IDispatch;
struct IDispatchVtbl;
struct tagDISPPARAMS;
struct tagEXCEPINFO;
struct tagSAFEARRAY;
struct tagDEC;
struct IRecordInfo;
struct IRecordInfoVtbl;
struct tagVARDESC;
struct ITypeLib;
struct ITypeLibVtbl;
struct tagTLIBATTR;
struct CMonster;
struct _DDSURFACEDESC;
struct IDirectSoundBuffer;
struct tagVS_FIXEDFILEINFO;
struct TSnd;
struct pcmwaveformat_tag;
struct IDirectDrawSurface;
struct _DDBLTFX;
struct _DDBLTBATCH;
struct IDirectDrawClipper;
struct IDirectDrawClipperVtbl;
struct _RGNDATA;
struct IDirectDraw;
struct IDirectDrawVtbl;
struct IDirectDrawPalette;
struct IDirectDrawPaletteVtbl;
struct _DDCAPS;
struct HDC__;
struct _DDOVERLAYFX;

/* 1 */
struct _SCOPETABLE_ENTRY
{
  int EnclosingLevel;
  void *FilterFunc;
  void *HandlerFunc;
};

/* 2 */
typedef struct _SCOPETABLE_ENTRY *PSCOPETABLE_ENTRY;

/* 36 */
typedef void *PVOID;

/* 15 */
//typedef unsigned __int32 DWORD;

/* 3 */
struct _EH3_EXCEPTION_REGISTRATION
{
  struct _EH3_EXCEPTION_REGISTRATION *Next;
  PVOID ExceptionHandler;
  PSCOPETABLE_ENTRY ScopeTable;
  DWORD TryLevel;
};

/* 4 */
typedef struct _EH3_EXCEPTION_REGISTRATION EH3_EXCEPTION_REGISTRATION;

/* 5 */
typedef struct _EH3_EXCEPTION_REGISTRATION *PEH3_EXCEPTION_REGISTRATION;

/* 6 */
struct CPPEH_RECORD
{
  DWORD old_esp;
  EXCEPTION_POINTERS *exc_ptr;
  struct _EH3_EXCEPTION_REGISTRATION registration;
};

/* 8 */
//typedef __int32 LONG;

// /* 7 */
// struct tagRECT
// {
  // LONG left;
  // LONG top;
  // LONG right;
  // LONG bottom;
// };

/* 10 */
typedef HWND__ *HWND;

/* 12 */
typedef unsigned int UINT;

/* 13 */
typedef UINT WPARAM;

/* 14 */
typedef LONG LPARAM;

/* 17 */
/* struct tagPOINT
{
  LONG x;
  LONG y;
}; */

/* 16 */
typedef tagPOINT POINT;

/* 9 */
/* struct tagMSG
{
  HWND hwnd;
  UINT message;
  WPARAM wParam;
  LPARAM lParam;
  DWORD time;
  POINT pt;
}; */

/* 11 */
// struct HWND__
// {
  // int unused;
// };

/* 21 */
// typedef unsigned short WORD;

/* 20 */
// struct _SYSTEM_INFO::$A707B71C060B6D10F73A71917EA8473F::$AA04DEB0C6383F89F13D312A174572A9
// {
  // WORD wProcessorArchitecture;
  // WORD wReserved;
// };

/* 19 */
/* union _SYSTEM_INFO::$A707B71C060B6D10F73A71917EA8473F
{
  DWORD dwOemId;
  struct
  {
    WORD wProcessorArchitecture;
    WORD wReserved;
  };
}; */

/* 22 */
typedef void *LPVOID;

/* 18 */
// struct _SYSTEM_INFO
// {
  // union
  // {
    // DWORD dwOemId;
    // struct
    // {
      // WORD wProcessorArchitecture;
      // WORD wReserved;
    // };
  // };
  // DWORD dwPageSize;
  // LPVOID lpMinimumApplicationAddress;
  // LPVOID lpMaximumApplicationAddress;
  // DWORD dwActiveProcessorMask;
  // DWORD dwNumberOfProcessors;
  // DWORD dwProcessorType;
  // DWORD dwAllocationGranularity;
  // WORD wProcessorLevel;
  // WORD wProcessorRevision;
// };

/* 25 */
typedef char CHAR;

/* 24 */
typedef CHAR *LPSTR;

/* 27 */
/* typedef unsigned char BYTE;
 */
/* 26 */
typedef BYTE *LPBYTE;

/* 28 */
typedef void *HANDLE;

/* 23 */
/* struct _STARTUPINFOA
{
  DWORD cb;
  LPSTR lpReserved;
  LPSTR lpDesktop;
  LPSTR lpTitle;
  DWORD dwX;
  DWORD dwY;
  DWORD dwXSize;
  DWORD dwYSize;
  DWORD dwXCountChars;
  DWORD dwYCountChars;
  DWORD dwFillAttribute;
  DWORD dwFlags;
  WORD wShowWindow;
  WORD cbReserved2;
  LPBYTE lpReserved2;
  HANDLE hStdInput;
  HANDLE hStdOutput;
  HANDLE hStdError;
}; */

/* 29 */
/* struct _PROCESS_INFORMATION
{
  HANDLE hProcess;
  HANDLE hThread;
  DWORD dwProcessId;
  DWORD dwThreadId;
}; */



/* 45 */
typedef LONG LRESULT;

/* 44 */
typedef LRESULT (__stdcall *WNDPROC)(HWND, UINT, WPARAM, LPARAM);

/* 46 */
typedef HINSTANCE__ *HINSTANCE;

/* 48 */
typedef HICON__ *HICON;

/* 50 */
typedef HICON HCURSOR;

/* 51 */
typedef HBRUSH__ *HBRUSH;

/* 53 */
typedef const CHAR *LPCSTR;

/* 43 */
/* struct tagWNDCLASSEXA
{
  UINT cbSize;
  UINT style;
  WNDPROC lpfnWndProc;
  int cbClsExtra;
  int cbWndExtra;
  HINSTANCE hInstance;
  HICON hIcon;
  HCURSOR hCursor;
  HBRUSH hbrBackground;
  LPCSTR lpszMenuName;
  LPCSTR lpszClassName;
  HICON hIconSm;
}; */

/* 47 */
/* struct HINSTANCE__
{
  int unused;
}; */

/* 49 */
/* struct HICON__
{
  int unused;
}; */

/* 52 */
/* struct HBRUSH__
{
  int unused;
}; */

/* 54 */
typedef tagMSG MSG;

/* 55 */
/* struct _SYSTEMTIME
{
  WORD wYear;
  WORD wMonth;
  WORD wDayOfWeek;
  WORD wDay;
  WORD wHour;
  WORD wMinute;
  WORD wSecond;
  WORD wMilliseconds;
}; */

/* 56 */
/* struct tagPALETTEENTRY
{
  BYTE peRed;
  BYTE peGreen;
  BYTE peBlue;
  BYTE peFlags;
}; */

/* 57 */
/* struct _OFSTRUCT
{
  BYTE cBytes;
  BYTE fFixedDisk;
  WORD nErrCode;
  WORD Reserved1;
  WORD Reserved2;
  CHAR szPathName[128];
}; */

/* 58 */
/* struct _OSVERSIONINFOA
{
  DWORD dwOSVersionInfoSize;
  DWORD dwMajorVersion;
  DWORD dwMinorVersion;
  DWORD dwBuildNumber;
  DWORD dwPlatformId;
  CHAR szCSDVersion[128];
}; */

/* 61 */
/* typedef unsigned short wchar_t;
 */
/* 60 */
typedef wchar_t WCHAR;

/* 62 */
typedef _SYSTEMTIME SYSTEMTIME;

/* 59 */
/* struct _TIME_ZONE_INFORMATION
{
  LONG Bias;
  WCHAR StandardName[32];
  SYSTEMTIME StandardDate;
  LONG StandardBias;
  WCHAR DaylightName[32];
  SYSTEMTIME DaylightDate;
  LONG DaylightBias;
}; */

/* 63 */
/* struct _cpinfo
{
  UINT MaxCharSize;
  BYTE DefaultChar[2];
  BYTE LeadByte[12];
}; */

/* 65 */
typedef int BOOL;

/* 64 */
/* struct _SECURITY_ATTRIBUTES
{
  DWORD nLength;
  LPVOID lpSecurityDescriptor;
  BOOL bInheritHandle;
}; */

/* 67 */
/* typedef __int32 time_t;
 */
/* 68 */
/* typedef unsigned __int32 _fsize_t;
 */
/* 66 */
#pragma pack(push, 8)
/* struct _finddata_t
{
  unsigned int attrib;
  time_t time_create;
  time_t time_access;
  time_t time_write;
  _fsize_t size;
  char name[260];
}; */
#pragma pack(pop)

/* 69 */
typedef _iobuf FILE;

/* 70 */
#pragma pack(push, 8)
/* struct _iobuf
{
  char *_ptr;
  int _cnt;
  char *_base;
  int _flag;
  int _file;
  int _charbuf;
  int _bufsiz;
  char *_tmpfname;
}; */
#pragma pack(pop)

/* 71 */
/* struct type_info;
 */
/* 72 */
/* union __declspec(align(8)) __m64
{
  unsigned __int64 m64_u64;
  float m64_f32[2];
  char m64_i8[8];
  short m64_i16[4];
  __int32 m64_i32[2];
  __int64 m64_i64;
  unsigned char m64_u8[8];
  unsigned short m64_u16[4];
  unsigned __int32 m64_u32[2];
}; */

/* 73 */
/* union __declspec(align(16)) __m128
{
  float m128_f32[4];
  unsigned __int64 m128_u64[2];
  char m128_i8[16];
  short m128_i16[8];
  __int32 m128_i32[4];
  __int64 m128_i64[2];
  unsigned char m128_u8[16];
  unsigned short m128_u16[8];
  unsigned __int32 m128_u32[4];
}; */

/* 74 */
/* struct __m128d
{
  double m128d_f64[2];
}; */

/* 75 */
/* union __declspec(align(16)) __m128i
{
  char m128i_i8[16];
  short m128i_i16[8];
  __int32 m128i_i32[4];
  __int64 m128i_i64[2];
  unsigned char m128i_u8[16];
  unsigned short m128i_u16[8];
  unsigned __int32 m128i_u32[4];
  unsigned __int64 m128i_u64[2];
}; */

/* 201 */
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 = 0xFF,
};

/* 202 */
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_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 = 0x1D,
  IPL_GETHIT_CURSE = 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_FIRE_ARROWS = 0x2A,
  IPL_LIGHT_ARROWS = 0x2B,
  IPL_INVCURS = 0x2C,
  IPL_THORNS = 0x2D,
  IPL_NOMANA = 0x2E,
  IPL_NOHEALPLR = 0x2F,
  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 = 0xFF,
};

/* 76 */
struct UItemStruct
{
  char *UIName;
  char UIItemId;
  unsigned char UIMinLvl;
  unsigned char UINumPL;
  int UIValue;
  char UIPower1;
  int UIParam1;
  int UIParam2;
  char UIPower2;
  int UIParam3;
  int UIParam4;
  char UIPower3;
  int UIParam5;
  int UIParam6;
  char UIPower4;
  int UIParam7;
  int UIParam8;
  char UIPower5;
  int UIParam9;
  int UIParam10;
  char UIPower6;
  int UIParam11;
  int UIParam12;
};

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

/* 79 */
struct PLStruct
{
  const char *PLName;
  char PLPower;
  int PLParam1;
  int PLParam2;
  int PLMinLvl;
  int PLIType;
  int PLGOE;
  int PLDouble;
  int PLOk;
  int PLMinVal;
  int PLMaxVal;
  int PLMultVal;
};

/* 321 */
enum _sfx_id
{
  PS_WALK1 = 0x0,
  PS_WALK2 = 0x1,
  PS_WALK3 = 0x2,
  PS_WALK4 = 0x3,
  PS_BFIRE = 0x4,
  PS_FMAG = 0x5,
  PS_TMAG = 0x6,
  PS_LGHIT = 0x7,
  PS_LGHIT1 = 0x8,
  PS_SWING = 0x9,
  PS_SWING2 = 0xA,
  PS_DEAD = 0xB,
  IS_QUESTDN = 0xC,
  IS_ARMRFKD = 0xD,
  IS_BARLFIRE = 0xE,
  IS_BARREL = 0xF,
  IS_BHIT = 0x10,
  IS_BHIT1 = 0x11,
  IS_CHEST = 0x12,
  IS_DOORCLOS = 0x13,
  IS_DOOROPEN = 0x14,
  IS_FANVL = 0x15,
  IS_FAXE = 0x16,
  IS_FBLST = 0x17,
  IS_FBODY = 0x18,
  IS_FBOOK = 0x19,
  IS_FBOW = 0x1A,
  IS_FCAP = 0x1B,
  IS_FHARM = 0x1C,
  IS_FLARM = 0x1D,
  IS_FMAG = 0x1E,
  IS_FMAG1 = 0x1F,
  IS_FMUSH = 0x20,
  IS_FPOT = 0x21,
  IS_FRING = 0x22,
  IS_FROCK = 0x23,
  IS_FSCRL = 0x24,
  IS_FSHLD = 0x25,
  IS_FSIGN = 0x26,
  IS_FSTAF = 0x27,
  IS_FSWOR = 0x28,
  IS_GOLD = 0x29,
  IS_HLMTFKD = 0x2A,
  IS_IANVL = 0x2B,
  IS_IAXE = 0x2C,
  IS_IBLST = 0x2D,
  IS_IBODY = 0x2E,
  IS_IBOOK = 0x2F,
  IS_IBOW = 0x30,
  IS_ICAP = 0x31,
  IS_IGRAB = 0x32,
  IS_IHARM = 0x33,
  IS_ILARM = 0x34,
  IS_IMUSH = 0x35,
  IS_IPOT = 0x36,
  IS_IRING = 0x37,
  IS_IROCK = 0x38,
  IS_ISCROL = 0x39,
  IS_ISHIEL = 0x3A,
  IS_ISIGN = 0x3B,
  IS_ISTAF = 0x3C,
  IS_ISWORD = 0x3D,
  IS_LEVER = 0x3E,
  IS_MAGIC = 0x3F,
  IS_MAGIC1 = 0x40,
  IS_RBOOK = 0x41,
  IS_SARC = 0x42,
  IS_SHLDFKD = 0x43,
  IS_SWRDFKD = 0x44,
  IS_TITLEMOV = 0x45,
  IS_TITLSLCT = 0x46,
  SFX_SILENCE = 0x47,
  IS_TRAP = 0x48,
  IS_CAST1 = 0x49,
  IS_CAST10 = 0x4A,
  IS_CAST12 = 0x4B,
  IS_CAST2 = 0x4C,
  IS_CAST3 = 0x4D,
  IS_CAST4 = 0x4E,
  IS_CAST5 = 0x4F,
  IS_CAST6 = 0x50,
  IS_CAST7 = 0x51,
  IS_CAST8 = 0x52,
  IS_CAST9 = 0x53,
  LS_HEALING = 0x54,
  IS_REPAIR = 0x55,
  LS_ACID = 0x56,
  LS_ACIDS = 0x57,
  LS_APOC = 0x58,
  LS_ARROWALL = 0x59,
  LS_BLODBOIL = 0x5A,
  LS_BLODSTAR = 0x5B,
  LS_BLSIMPT = 0x5C,
  LS_BONESP = 0x5D,
  LS_BSIMPCT = 0x5E,
  LS_CALDRON = 0x5F,
  LS_CBOLT = 0x60,
  LS_CHLTNING = 0x61,
  LS_DSERP = 0x62,
  LS_ELECIMP1 = 0x63,
  LS_ELEMENTL = 0x64,
  LS_ETHEREAL = 0x65,
  LS_FBALL = 0x66,
  LS_FBOLT1 = 0x67,
  LS_FBOLT2 = 0x68,
  LS_FIRIMP1 = 0x69,
  LS_FIRIMP2 = 0x6A,
  LS_FLAMWAVE = 0x6B,
  LS_FLASH = 0x6C,
  LS_FOUNTAIN = 0x6D,
  LS_GOLUM = 0x6E,
  LS_GOLUMDED = 0x6F,
  LS_GSHRINE = 0x70,
  LS_GUARD = 0x71,
  LS_GUARDLAN = 0x72,
  LS_HOLYBOLT = 0x73,
  LS_HYPER = 0x74,
  LS_INFRAVIS = 0x75,
  LS_INVISIBL = 0x76,
  LS_INVPOT = 0x77,
  LS_LNING1 = 0x78,
  LS_LTNING = 0x79,
  LS_MSHIELD = 0x7A,
  LS_NOVA = 0x7B,
  LS_PORTAL = 0x7C,
  LS_PUDDLE = 0x7D,
  LS_RESUR = 0x7E,
  LS_SCURSE = 0x7F,
  LS_SCURIMP = 0x80,
  LS_SENTINEL = 0x81,
  LS_SHATTER = 0x82,
  LS_SOULFIRE = 0x83,
  LS_SPOUTLOP = 0x84,
  LS_SPOUTSTR = 0x85,
  LS_STORM = 0x86,
  LS_TRAPDIS = 0x87,
  LS_TELEPORT = 0x88,
  LS_VTHEFT = 0x89,
  LS_WALLLOOP = 0x8A,
  LS_WALLSTRT = 0x8B,
  TSFX_BMAID1 = 0x8C,
  TSFX_BMAID2 = 0x8D,
  TSFX_BMAID3 = 0x8E,
  TSFX_BMAID4 = 0x8F,
  TSFX_BMAID5 = 0x90,
  TSFX_BMAID6 = 0x91,
  TSFX_BMAID7 = 0x92,
  TSFX_BMAID8 = 0x93,
  TSFX_BMAID9 = 0x94,
  TSFX_BMAID10 = 0x95,
  TSFX_BMAID11 = 0x96,
  TSFX_BMAID12 = 0x97,
  TSFX_BMAID13 = 0x98,
  TSFX_BMAID14 = 0x99,
  TSFX_BMAID15 = 0x9A,
  TSFX_BMAID16 = 0x9B,
  TSFX_BMAID17 = 0x9C,
  TSFX_BMAID18 = 0x9D,
  TSFX_BMAID19 = 0x9E,
  TSFX_BMAID20 = 0x9F,
  TSFX_BMAID21 = 0xA0,
  TSFX_BMAID22 = 0xA1,
  TSFX_BMAID23 = 0xA2,
  TSFX_BMAID24 = 0xA3,
  TSFX_BMAID25 = 0xA4,
  TSFX_BMAID26 = 0xA5,
  TSFX_BMAID27 = 0xA6,
  TSFX_BMAID28 = 0xA7,
  TSFX_BMAID29 = 0xA8,
  TSFX_BMAID30 = 0xA9,
  TSFX_BMAID31 = 0xAA,
  TSFX_BMAID32 = 0xAB,
  TSFX_BMAID33 = 0xAC,
  TSFX_BMAID34 = 0xAD,
  TSFX_BMAID35 = 0xAE,
  TSFX_BMAID36 = 0xAF,
  TSFX_BMAID37 = 0xB0,
  TSFX_BMAID38 = 0xB1,
  TSFX_BMAID39 = 0xB2,
  TSFX_BMAID40 = 0xB3,
  TSFX_SMITH1 = 0xB4,
  TSFX_SMITH2 = 0xB5,
  TSFX_SMITH3 = 0xB6,
  TSFX_SMITH4 = 0xB7,
  TSFX_SMITH5 = 0xB8,
  TSFX_SMITH6 = 0xB9,
  TSFX_SMITH7 = 0xBA,
  TSFX_SMITH8 = 0xBB,
  TSFX_SMITH9 = 0xBC,
  TSFX_SMITH10 = 0xBD,
  TSFX_SMITH11 = 0xBE,
  TSFX_SMITH12 = 0xBF,
  TSFX_SMITH13 = 0xC0,
  TSFX_SMITH14 = 0xC1,
  TSFX_SMITH15 = 0xC2,
  TSFX_SMITH16 = 0xC3,
  TSFX_SMITH17 = 0xC4,
  TSFX_SMITH18 = 0xC5,
  TSFX_SMITH19 = 0xC6,
  TSFX_SMITH20 = 0xC7,
  TSFX_SMITH21 = 0xC8,
  TSFX_SMITH22 = 0xC9,
  TSFX_SMITH23 = 0xCA,
  TSFX_SMITH24 = 0xCB,
  TSFX_SMITH25 = 0xCC,
  TSFX_SMITH26 = 0xCD,
  TSFX_SMITH27 = 0xCE,
  TSFX_SMITH28 = 0xCF,
  TSFX_SMITH29 = 0xD0,
  TSFX_SMITH30 = 0xD1,
  TSFX_SMITH31 = 0xD2,
  TSFX_SMITH32 = 0xD3,
  TSFX_SMITH33 = 0xD4,
  TSFX_SMITH34 = 0xD5,
  TSFX_SMITH35 = 0xD6,
  TSFX_SMITH36 = 0xD7,
  TSFX_SMITH37 = 0xD8,
  TSFX_SMITH38 = 0xD9,
  TSFX_SMITH39 = 0xDA,
  TSFX_SMITH40 = 0xDB,
  TSFX_SMITH41 = 0xDC,
  TSFX_SMITH42 = 0xDD,
  TSFX_SMITH43 = 0xDE,
  TSFX_SMITH44 = 0xDF,
  TSFX_SMITH45 = 0xE0,
  TSFX_SMITH46 = 0xE1,
  TSFX_SMITH47 = 0xE2,
  TSFX_SMITH48 = 0xE3,
  TSFX_SMITH49 = 0xE4,
  TSFX_SMITH50 = 0xE5,
  TSFX_SMITH51 = 0xE6,
  TSFX_SMITH52 = 0xE7,
  TSFX_SMITH53 = 0xE8,
  TSFX_SMITH54 = 0xE9,
  TSFX_SMITH55 = 0xEA,
  TSFX_SMITH56 = 0xEB,
  TSFX_COW1 = 0xEC,
  TSFX_COW2 = 0xED,
  TSFX_DEADGUY = 0xEE,
  TSFX_DRUNK1 = 0xEF,
  TSFX_DRUNK2 = 0xF0,
  TSFX_DRUNK3 = 0xF1,
  TSFX_DRUNK4 = 0xF2,
  TSFX_DRUNK5 = 0xF3,
  TSFX_DRUNK6 = 0xF4,
  TSFX_DRUNK7 = 0xF5,
  TSFX_DRUNK8 = 0xF6,
  TSFX_DRUNK9 = 0xF7,
  TSFX_DRUNK10 = 0xF8,
  TSFX_DRUNK11 = 0xF9,
  TSFX_DRUNK12 = 0xFA,
  TSFX_DRUNK13 = 0xFB,
  TSFX_DRUNK14 = 0xFC,
  TSFX_DRUNK15 = 0xFD,
  TSFX_DRUNK16 = 0xFE,
  TSFX_DRUNK17 = 0xFF,
  TSFX_DRUNK18 = 0x100,
  TSFX_DRUNK19 = 0x101,
  TSFX_DRUNK20 = 0x102,
  TSFX_DRUNK21 = 0x103,
  TSFX_DRUNK22 = 0x104,
  TSFX_DRUNK23 = 0x105,
  TSFX_DRUNK24 = 0x106,
  TSFX_DRUNK25 = 0x107,
  TSFX_DRUNK26 = 0x108,
  TSFX_DRUNK27 = 0x109,
  TSFX_DRUNK28 = 0x10A,
  TSFX_DRUNK29 = 0x10B,
  TSFX_DRUNK30 = 0x10C,
  TSFX_DRUNK31 = 0x10D,
  TSFX_DRUNK32 = 0x10E,
  TSFX_DRUNK33 = 0x10F,
  TSFX_DRUNK34 = 0x110,
  TSFX_DRUNK35 = 0x111,
  TSFX_HEALER1 = 0x112,
  TSFX_HEALER2 = 0x113,
  TSFX_HEALER3 = 0x114,
  TSFX_HEALER4 = 0x115,
  TSFX_HEALER5 = 0x116,
  TSFX_HEALER6 = 0x117,
  TSFX_HEALER7 = 0x118,
  TSFX_HEALER8 = 0x119,
  TSFX_HEALER9 = 0x11A,
  TSFX_HEALER10 = 0x11B,
  TSFX_HEALER11 = 0x11C,
  TSFX_HEALER12 = 0x11D,
  TSFX_HEALER13 = 0x11E,
  TSFX_HEALER14 = 0x11F,
  TSFX_HEALER15 = 0x120,
  TSFX_HEALER16 = 0x121,
  TSFX_HEALER17 = 0x122,
  TSFX_HEALER18 = 0x123,
  TSFX_HEALER19 = 0x124,
  TSFX_HEALER20 = 0x125,
  TSFX_HEALER21 = 0x126,
  TSFX_HEALER22 = 0x127,
  TSFX_HEALER23 = 0x128,
  TSFX_HEALER24 = 0x129,
  TSFX_HEALER25 = 0x12A,
  TSFX_HEALER26 = 0x12B,
  TSFX_HEALER27 = 0x12C,
  TSFX_HEALER28 = 0x12D,
  TSFX_HEALER29 = 0x12E,
  TSFX_HEALER30 = 0x12F,
  TSFX_HEALER31 = 0x130,
  TSFX_HEALER32 = 0x131,
  TSFX_HEALER33 = 0x132,
  TSFX_HEALER34 = 0x133,
  TSFX_HEALER35 = 0x134,
  TSFX_HEALER36 = 0x135,
  TSFX_HEALER37 = 0x136,
  TSFX_HEALER38 = 0x137,
  TSFX_HEALER39 = 0x138,
  TSFX_HEALER40 = 0x139,
  TSFX_HEALER41 = 0x13A,
  TSFX_HEALER42 = 0x13B,
  TSFX_HEALER43 = 0x13C,
  TSFX_HEALER44 = 0x13D,
  TSFX_HEALER45 = 0x13E,
  TSFX_HEALER46 = 0x13F,
  TSFX_HEALER47 = 0x140,
  TSFX_PEGBOY1 = 0x141,
  TSFX_PEGBOY2 = 0x142,
  TSFX_PEGBOY3 = 0x143,
  TSFX_PEGBOY4 = 0x144,
  TSFX_PEGBOY5 = 0x145,
  TSFX_PEGBOY6 = 0x146,
  TSFX_PEGBOY7 = 0x147,
  TSFX_PEGBOY8 = 0x148,
  TSFX_PEGBOY9 = 0x149,
  TSFX_PEGBOY10 = 0x14A,
  TSFX_PEGBOY11 = 0x14B,
  TSFX_PEGBOY12 = 0x14C,
  TSFX_PEGBOY13 = 0x14D,
  TSFX_PEGBOY14 = 0x14E,
  TSFX_PEGBOY15 = 0x14F,
  TSFX_PEGBOY16 = 0x150,
  TSFX_PEGBOY17 = 0x151,
  TSFX_PEGBOY18 = 0x152,
  TSFX_PEGBOY19 = 0x153,
  TSFX_PEGBOY20 = 0x154,
  TSFX_PEGBOY21 = 0x155,
  TSFX_PEGBOY22 = 0x156,
  TSFX_PEGBOY23 = 0x157,
  TSFX_PEGBOY24 = 0x158,
  TSFX_PEGBOY25 = 0x159,
  TSFX_PEGBOY26 = 0x15A,
  TSFX_PEGBOY27 = 0x15B,
  TSFX_PEGBOY28 = 0x15C,
  TSFX_PEGBOY29 = 0x15D,
  TSFX_PEGBOY30 = 0x15E,
  TSFX_PEGBOY31 = 0x15F,
  TSFX_PEGBOY32 = 0x160,
  TSFX_PEGBOY33 = 0x161,
  TSFX_PEGBOY34 = 0x162,
  TSFX_PEGBOY35 = 0x163,
  TSFX_PEGBOY36 = 0x164,
  TSFX_PEGBOY37 = 0x165,
  TSFX_PEGBOY38 = 0x166,
  TSFX_PEGBOY39 = 0x167,
  TSFX_PEGBOY40 = 0x168,
  TSFX_PEGBOY41 = 0x169,
  TSFX_PEGBOY42 = 0x16A,
  TSFX_PEGBOY43 = 0x16B,
  TSFX_PRIEST0 = 0x16C,
  TSFX_PRIEST1 = 0x16D,
  TSFX_PRIEST2 = 0x16E,
  TSFX_PRIEST3 = 0x16F,
  TSFX_PRIEST4 = 0x170,
  TSFX_PRIEST5 = 0x171,
  TSFX_PRIEST6 = 0x172,
  TSFX_PRIEST7 = 0x173,
  TSFX_STORY0 = 0x174,
  TSFX_STORY1 = 0x175,
  TSFX_STORY2 = 0x176,
  TSFX_STORY3 = 0x177,
  TSFX_STORY4 = 0x178,
  TSFX_STORY5 = 0x179,
  TSFX_STORY6 = 0x17A,
  TSFX_STORY7 = 0x17B,
  TSFX_STORY8 = 0x17C,
  TSFX_STORY9 = 0x17D,
  TSFX_STORY10 = 0x17E,
  TSFX_STORY11 = 0x17F,
  TSFX_STORY12 = 0x180,
  TSFX_STORY13 = 0x181,
  TSFX_STORY14 = 0x182,
  TSFX_STORY15 = 0x183,
  TSFX_STORY16 = 0x184,
  TSFX_STORY17 = 0x185,
  TSFX_STORY18 = 0x186,
  TSFX_STORY19 = 0x187,
  TSFX_STORY20 = 0x188,
  TSFX_STORY21 = 0x189,
  TSFX_STORY22 = 0x18A,
  TSFX_STORY23 = 0x18B,
  TSFX_STORY24 = 0x18C,
  TSFX_STORY25 = 0x18D,
  TSFX_STORY26 = 0x18E,
  TSFX_STORY27 = 0x18F,
  TSFX_STORY28 = 0x190,
  TSFX_STORY29 = 0x191,
  TSFX_STORY30 = 0x192,
  TSFX_STORY31 = 0x193,
  TSFX_STORY32 = 0x194,
  TSFX_STORY33 = 0x195,
  TSFX_STORY34 = 0x196,
  TSFX_STORY35 = 0x197,
  TSFX_STORY36 = 0x198,
  TSFX_STORY37 = 0x199,
  TSFX_STORY38 = 0x19A,
  TSFX_TAVERN0 = 0x19B,
  TSFX_TAVERN1 = 0x19C,
  TSFX_TAVERN2 = 0x19D,
  TSFX_TAVERN3 = 0x19E,
  TSFX_TAVERN4 = 0x19F,
  TSFX_TAVERN5 = 0x1A0,
  TSFX_TAVERN6 = 0x1A1,
  TSFX_TAVERN7 = 0x1A2,
  TSFX_TAVERN8 = 0x1A3,
  TSFX_TAVERN9 = 0x1A4,
  TSFX_TAVERN10 = 0x1A5,
  TSFX_TAVERN11 = 0x1A6,
  TSFX_TAVERN12 = 0x1A7,
  TSFX_TAVERN13 = 0x1A8,
  TSFX_TAVERN14 = 0x1A9,
  TSFX_TAVERN15 = 0x1AA,
  TSFX_TAVERN16 = 0x1AB,
  TSFX_TAVERN17 = 0x1AC,
  TSFX_TAVERN18 = 0x1AD,
  TSFX_TAVERN19 = 0x1AE,
  TSFX_TAVERN20 = 0x1AF,
  TSFX_TAVERN21 = 0x1B0,
  TSFX_TAVERN22 = 0x1B1,
  TSFX_TAVERN23 = 0x1B2,
  TSFX_TAVERN24 = 0x1B3,
  TSFX_TAVERN25 = 0x1B4,
  TSFX_TAVERN26 = 0x1B5,
  TSFX_TAVERN27 = 0x1B6,
  TSFX_TAVERN28 = 0x1B7,
  TSFX_TAVERN29 = 0x1B8,
  TSFX_TAVERN30 = 0x1B9,
  TSFX_TAVERN31 = 0x1BA,
  TSFX_TAVERN32 = 0x1BB,
  TSFX_TAVERN33 = 0x1BC,
  TSFX_TAVERN34 = 0x1BD,
  TSFX_TAVERN35 = 0x1BE,
  TSFX_TAVERN36 = 0x1BF,
  TSFX_TAVERN37 = 0x1C0,
  TSFX_TAVERN38 = 0x1C1,
  TSFX_TAVERN39 = 0x1C2,
  TSFX_TAVERN40 = 0x1C3,
  TSFX_TAVERN41 = 0x1C4,
  TSFX_TAVERN42 = 0x1C5,
  TSFX_TAVERN43 = 0x1C6,
  TSFX_TAVERN44 = 0x1C7,
  TSFX_TAVERN45 = 0x1C8,
  TSFX_WITCH1 = 0x1C9,
  TSFX_WITCH2 = 0x1CA,
  TSFX_WITCH3 = 0x1CB,
  TSFX_WITCH4 = 0x1CC,
  TSFX_WITCH5 = 0x1CD,
  TSFX_WITCH6 = 0x1CE,
  TSFX_WITCH7 = 0x1CF,
  TSFX_WITCH8 = 0x1D0,
  TSFX_WITCH9 = 0x1D1,
  TSFX_WITCH10 = 0x1D2,
  TSFX_WITCH11 = 0x1D3,
  TSFX_WITCH12 = 0x1D4,
  TSFX_WITCH13 = 0x1D5,
  TSFX_WITCH14 = 0x1D6,
  TSFX_WITCH15 = 0x1D7,
  TSFX_WITCH16 = 0x1D8,
  TSFX_WITCH17 = 0x1D9,
  TSFX_WITCH18 = 0x1DA,
  TSFX_WITCH19 = 0x1DB,
  TSFX_WITCH20 = 0x1DC,
  TSFX_WITCH21 = 0x1DD,
  TSFX_WITCH22 = 0x1DE,
  TSFX_WITCH23 = 0x1DF,
  TSFX_WITCH24 = 0x1E0,
  TSFX_WITCH25 = 0x1E1,
  TSFX_WITCH26 = 0x1E2,
  TSFX_WITCH27 = 0x1E3,
  TSFX_WITCH28 = 0x1E4,
  TSFX_WITCH29 = 0x1E5,
  TSFX_WITCH30 = 0x1E6,
  TSFX_WITCH31 = 0x1E7,
  TSFX_WITCH32 = 0x1E8,
  TSFX_WITCH33 = 0x1E9,
  TSFX_WITCH34 = 0x1EA,
  TSFX_WITCH35 = 0x1EB,
  TSFX_WITCH36 = 0x1EC,
  TSFX_WITCH37 = 0x1ED,
  TSFX_WITCH38 = 0x1EE,
  TSFX_WITCH39 = 0x1EF,
  TSFX_WITCH40 = 0x1F0,
  TSFX_WITCH41 = 0x1F1,
  TSFX_WITCH42 = 0x1F2,
  TSFX_WITCH43 = 0x1F3,
  TSFX_WITCH44 = 0x1F4,
  TSFX_WITCH45 = 0x1F5,
  TSFX_WITCH46 = 0x1F6,
  TSFX_WITCH47 = 0x1F7,
  TSFX_WITCH48 = 0x1F8,
  TSFX_WITCH49 = 0x1F9,
  TSFX_WITCH50 = 0x1FA,
  TSFX_WOUND = 0x1FB,
  PS_MAGE1 = 0x1FC,
  PS_MAGE2 = 0x1FD,
  PS_MAGE3 = 0x1FE,
  PS_MAGE4 = 0x1FF,
  PS_MAGE5 = 0x200,
  PS_MAGE6 = 0x201,
  PS_MAGE7 = 0x202,
  PS_MAGE8 = 0x203,
  PS_MAGE9 = 0x204,
  PS_MAGE10 = 0x205,
  PS_MAGE11 = 0x206,
  PS_MAGE12 = 0x207,
  PS_MAGE13 = 0x208,
  PS_MAGE14 = 0x209,
  PS_MAGE15 = 0x20A,
  PS_MAGE16 = 0x20B,
  PS_MAGE17 = 0x20C,
  PS_MAGE18 = 0x20D,
  PS_MAGE19 = 0x20E,
  PS_MAGE20 = 0x20F,
  PS_MAGE21 = 0x210,
  PS_MAGE22 = 0x211,
  PS_MAGE23 = 0x212,
  PS_MAGE24 = 0x213,
  PS_MAGE25 = 0x214,
  PS_MAGE26 = 0x215,
  PS_MAGE27 = 0x216,
  PS_MAGE28 = 0x217,
  PS_MAGE29 = 0x218,
  PS_MAGE30 = 0x219,
  PS_MAGE31 = 0x21A,
  PS_MAGE32 = 0x21B,
  PS_MAGE33 = 0x21C,
  PS_MAGE34 = 0x21D,
  PS_MAGE35 = 0x21E,
  PS_MAGE36 = 0x21F,
  PS_MAGE37 = 0x220,
  PS_MAGE38 = 0x221,
  PS_MAGE39 = 0x222,
  PS_MAGE40 = 0x223,
  PS_MAGE41 = 0x224,
  PS_MAGE42 = 0x225,
  PS_MAGE43 = 0x226,
  PS_MAGE44 = 0x227,
  PS_MAGE45 = 0x228,
  PS_MAGE46 = 0x229,
  PS_MAGE47 = 0x22A,
  PS_MAGE48 = 0x22B,
  PS_MAGE49 = 0x22C,
  PS_MAGE50 = 0x22D,
  PS_MAGE51 = 0x22E,
  PS_MAGE52 = 0x22F,
  PS_MAGE53 = 0x230,
  PS_MAGE54 = 0x231,
  PS_MAGE55 = 0x232,
  PS_MAGE56 = 0x233,
  PS_MAGE57 = 0x234,
  PS_MAGE58 = 0x235,
  PS_MAGE59 = 0x236,
  PS_MAGE60 = 0x237,
  PS_MAGE61 = 0x238,
  PS_MAGE62 = 0x239,
  PS_MAGE63 = 0x23A,
  PS_MAGE64 = 0x23B,
  PS_MAGE65 = 0x23C,
  PS_MAGE66 = 0x23D,
  PS_MAGE67 = 0x23E,
  PS_MAGE68 = 0x23F,
  PS_MAGE69 = 0x240,
  PS_MAGE69B = 0x241,
  PS_MAGE70 = 0x242,
  PS_MAGE71 = 0x243,
  PS_MAGE72 = 0x244,
  PS_MAGE73 = 0x245,
  PS_MAGE74 = 0x246,
  PS_MAGE75 = 0x247,
  PS_MAGE76 = 0x248,
  PS_MAGE77 = 0x249,
  PS_MAGE78 = 0x24A,
  PS_MAGE79 = 0x24B,
  PS_MAGE80 = 0x24C,
  PS_MAGE81 = 0x24D,
  PS_MAGE82 = 0x24E,
  PS_MAGE83 = 0x24F,
  PS_MAGE84 = 0x250,
  PS_MAGE85 = 0x251,
  PS_MAGE86 = 0x252,
  PS_MAGE87 = 0x253,
  PS_MAGE88 = 0x254,
  PS_MAGE89 = 0x255,
  PS_MAGE90 = 0x256,
  PS_MAGE91 = 0x257,
  PS_MAGE92 = 0x258,
  PS_MAGE93 = 0x259,
  PS_MAGE94 = 0x25A,
  PS_MAGE95 = 0x25B,
  PS_MAGE96 = 0x25C,
  PS_MAGE97 = 0x25D,
  PS_MAGE98 = 0x25E,
  PS_MAGE99 = 0x25F,
  PS_MAGE100 = 0x260,
  PS_MAGE101 = 0x261,
  PS_MAGE102 = 0x262,
  PS_ROGUE1 = 0x263,
  PS_ROGUE2 = 0x264,
  PS_ROGUE3 = 0x265,
  PS_ROGUE4 = 0x266,
  PS_ROGUE5 = 0x267,
  PS_ROGUE6 = 0x268,
  PS_ROGUE7 = 0x269,
  PS_ROGUE8 = 0x26A,
  PS_ROGUE9 = 0x26B,
  PS_ROGUE10 = 0x26C,
  PS_ROGUE11 = 0x26D,
  PS_ROGUE12 = 0x26E,
  PS_ROGUE13 = 0x26F,
  PS_ROGUE14 = 0x270,
  PS_ROGUE15 = 0x271,
  PS_ROGUE16 = 0x272,
  PS_ROGUE17 = 0x273,
  PS_ROGUE18 = 0x274,
  PS_ROGUE19 = 0x275,
  PS_ROGUE20 = 0x276,
  PS_ROGUE21 = 0x277,
  PS_ROGUE22 = 0x278,
  PS_ROGUE23 = 0x279,
  PS_ROGUE24 = 0x27A,
  PS_ROGUE25 = 0x27B,
  PS_ROGUE26 = 0x27C,
  PS_ROGUE27 = 0x27D,
  PS_ROGUE28 = 0x27E,
  PS_ROGUE29 = 0x27F,
  PS_ROGUE30 = 0x280,
  PS_ROGUE31 = 0x281,
  PS_ROGUE32 = 0x282,
  PS_ROGUE33 = 0x283,
  PS_ROGUE34 = 0x284,
  PS_ROGUE35 = 0x285,
  PS_ROGUE36 = 0x286,
  PS_ROGUE37 = 0x287,
  PS_ROGUE38 = 0x288,
  PS_ROGUE39 = 0x289,
  PS_ROGUE40 = 0x28A,
  PS_ROGUE41 = 0x28B,
  PS_ROGUE42 = 0x28C,
  PS_ROGUE43 = 0x28D,
  PS_ROGUE44 = 0x28E,
  PS_ROGUE45 = 0x28F,
  PS_ROGUE46 = 0x290,
  PS_ROGUE47 = 0x291,
  PS_ROGUE48 = 0x292,
  PS_ROGUE49 = 0x293,
  PS_ROGUE50 = 0x294,
  PS_ROGUE51 = 0x295,
  PS_ROGUE52 = 0x296,
  PS_ROGUE53 = 0x297,
  PS_ROGUE54 = 0x298,
  PS_ROGUE55 = 0x299,
  PS_ROGUE56 = 0x29A,
  PS_ROGUE57 = 0x29B,
  PS_ROGUE58 = 0x29C,
  PS_ROGUE59 = 0x29D,
  PS_ROGUE60 = 0x29E,
  PS_ROGUE61 = 0x29F,
  PS_ROGUE62 = 0x2A0,
  PS_ROGUE63 = 0x2A1,
  PS_ROGUE64 = 0x2A2,
  PS_ROGUE65 = 0x2A3,
  PS_ROGUE66 = 0x2A4,
  PS_ROGUE67 = 0x2A5,
  PS_ROGUE68 = 0x2A6,
  PS_ROGUE69 = 0x2A7,
  PS_ROGUE69B = 0x2A8,
  PS_ROGUE70 = 0x2A9,
  PS_ROGUE71 = 0x2AA,
  PS_ROGUE72 = 0x2AB,
  PS_ROGUE73 = 0x2AC,
  PS_ROGUE74 = 0x2AD,
  PS_ROGUE75 = 0x2AE,
  PS_ROGUE76 = 0x2AF,
  PS_ROGUE77 = 0x2B0,
  PS_ROGUE78 = 0x2B1,
  PS_ROGUE79 = 0x2B2,
  PS_ROGUE80 = 0x2B3,
  PS_ROGUE81 = 0x2B4,
  PS_ROGUE82 = 0x2B5,
  PS_ROGUE83 = 0x2B6,
  PS_ROGUE84 = 0x2B7,
  PS_ROGUE85 = 0x2B8,
  PS_ROGUE86 = 0x2B9,
  PS_ROGUE87 = 0x2BA,
  PS_ROGUE88 = 0x2BB,
  PS_ROGUE89 = 0x2BC,
  PS_ROGUE90 = 0x2BD,
  PS_ROGUE91 = 0x2BE,
  PS_ROGUE92 = 0x2BF,
  PS_ROGUE93 = 0x2C0,
  PS_ROGUE94 = 0x2C1,
  PS_ROGUE95 = 0x2C2,
  PS_ROGUE96 = 0x2C3,
  PS_ROGUE97 = 0x2C4,
  PS_ROGUE98 = 0x2C5,
  PS_ROGUE99 = 0x2C6,
  PS_ROGUE100 = 0x2C7,
  PS_ROGUE101 = 0x2C8,
  PS_ROGUE102 = 0x2C9,
  PS_WARR1 = 0x2CA,
  PS_WARR2 = 0x2CB,
  PS_WARR3 = 0x2CC,
  PS_WARR4 = 0x2CD,
  PS_WARR5 = 0x2CE,
  PS_WARR6 = 0x2CF,
  PS_WARR7 = 0x2D0,
  PS_WARR8 = 0x2D1,
  PS_WARR9 = 0x2D2,
  PS_WARR10 = 0x2D3,
  PS_WARR11 = 0x2D4,
  PS_WARR12 = 0x2D5,
  PS_WARR13 = 0x2D6,
  PS_WARR14 = 0x2D7,
  PS_WARR14B = 0x2D8,
  PS_WARR14C = 0x2D9,
  PS_WARR15 = 0x2DA,
  PS_WARR15B = 0x2DB,
  PS_WARR15C = 0x2DC,
  PS_WARR16 = 0x2DD,
  PS_WARR16B = 0x2DE,
  PS_WARR16C = 0x2DF,
  PS_WARR17 = 0x2E0,
  PS_WARR18 = 0x2E1,
  PS_WARR19 = 0x2E2,
  PS_WARR20 = 0x2E3,
  PS_WARR21 = 0x2E4,
  PS_WARR22 = 0x2E5,
  PS_WARR23 = 0x2E6,
  PS_WARR24 = 0x2E7,
  PS_WARR25 = 0x2E8,
  PS_WARR26 = 0x2E9,
  PS_WARR27 = 0x2EA,
  PS_WARR28 = 0x2EB,
  PS_WARR29 = 0x2EC,
  PS_WARR30 = 0x2ED,
  PS_WARR31 = 0x2EE,
  PS_WARR32 = 0x2EF,
  PS_WARR33 = 0x2F0,
  PS_WARR34 = 0x2F1,
  PS_WARR35 = 0x2F2,
  PS_WARR36 = 0x2F3,
  PS_WARR37 = 0x2F4,
  PS_WARR38 = 0x2F5,
  PS_WARR39 = 0x2F6,
  PS_WARR40 = 0x2F7,
  PS_WARR41 = 0x2F8,
  PS_WARR42 = 0x2F9,
  PS_WARR43 = 0x2FA,
  PS_WARR44 = 0x2FB,
  PS_WARR45 = 0x2FC,
  PS_WARR46 = 0x2FD,
  PS_WARR47 = 0x2FE,
  PS_WARR48 = 0x2FF,
  PS_WARR49 = 0x300,
  PS_WARR50 = 0x301,
  PS_WARR51 = 0x302,
  PS_WARR52 = 0x303,
  PS_WARR53 = 0x304,
  PS_WARR54 = 0x305,
  PS_WARR55 = 0x306,
  PS_WARR56 = 0x307,
  PS_WARR57 = 0x308,
  PS_WARR58 = 0x309,
  PS_WARR59 = 0x30A,
  PS_WARR60 = 0x30B,
  PS_WARR61 = 0x30C,
  PS_WARR62 = 0x30D,
  PS_WARR63 = 0x30E,
  PS_WARR64 = 0x30F,
  PS_WARR65 = 0x310,
  PS_WARR66 = 0x311,
  PS_WARR67 = 0x312,
  PS_WARR68 = 0x313,
  PS_WARR69 = 0x314,
  PS_WARR69B = 0x315,
  PS_WARR70 = 0x316,
  PS_WARR71 = 0x317,
  PS_WARR72 = 0x318,
  PS_WARR73 = 0x319,
  PS_WARR74 = 0x31A,
  PS_WARR75 = 0x31B,
  PS_WARR76 = 0x31C,
  PS_WARR77 = 0x31D,
  PS_WARR78 = 0x31E,
  PS_WARR79 = 0x31F,
  PS_WARR80 = 0x320,
  PS_WARR81 = 0x321,
  PS_WARR82 = 0x322,
  PS_WARR83 = 0x323,
  PS_WARR84 = 0x324,
  PS_WARR85 = 0x325,
  PS_WARR86 = 0x326,
  PS_WARR87 = 0x327,
  PS_WARR88 = 0x328,
  PS_WARR89 = 0x329,
  PS_WARR90 = 0x32A,
  PS_WARR91 = 0x32B,
  PS_WARR92 = 0x32C,
  PS_WARR93 = 0x32D,
  PS_WARR94 = 0x32E,
  PS_WARR95 = 0x32F,
  PS_WARR95B = 0x330,
  PS_WARR95C = 0x331,
  PS_WARR95D = 0x332,
  PS_WARR95E = 0x333,
  PS_WARR95F = 0x334,
  PS_WARR96B = 0x335,
  PS_WARR97 = 0x336,
  PS_WARR98 = 0x337,
  PS_WARR99 = 0x338,
  PS_WARR100 = 0x339,
  PS_WARR101 = 0x33A,
  PS_WARR102 = 0x33B,
  PS_NAR1 = 0x33C,
  PS_NAR2 = 0x33D,
  PS_NAR3 = 0x33E,
  PS_NAR4 = 0x33F,
  PS_NAR5 = 0x340,
  PS_NAR6 = 0x341,
  PS_NAR7 = 0x342,
  PS_NAR8 = 0x343,
  PS_NAR9 = 0x344,
  PS_DIABLVLINT = 0x345,
  USFX_CLEAVER = 0x346,
  USFX_GARBUD1 = 0x347,
  USFX_GARBUD2 = 0x348,
  USFX_GARBUD3 = 0x349,
  USFX_GARBUD4 = 0x34A,
  USFX_IZUAL1 = 0x34B,
  USFX_LACH1 = 0x34C,
  USFX_LACH2 = 0x34D,
  USFX_LACH3 = 0x34E,
  USFX_LAZ1 = 0x34F,
  USFX_LAZ2 = 0x350,
  USFX_SKING1 = 0x351,
  USFX_SNOT1 = 0x352,
  USFX_SNOT2 = 0x353,
  USFX_SNOT3 = 0x354,
  USFX_WARLRD1 = 0x355,
  USFX_WLOCK1 = 0x356,
  USFX_ZHAR1 = 0x357,
  USFX_ZHAR2 = 0x358,
  USFX_DIABLOD = 0x359,
};

/* 85 */
struct TextDataStruct
{
  char *txtstr;
  int scrlltxt;
  int txtspd;
  int sfxnr;
};

/* 87 */
struct RECT32
{
  int x;
  int y;
  int w;
  int h;
};

/* 88 */
struct TSFX
{
  unsigned char bFlags;
  char *pszName;
  int Channel;
};

/* 94 */
typedef LONG HRESULT;

/* 92 */
typedef _GUID GUID;

/* 91 */
typedef GUID IID;

/* 95 */
//typedef unsigned __int32 ULONG;

/* 96 */
typedef DWORD LCID;

/* 188 */
typedef WCHAR *LPWSTR;

/* 102 */
typedef LONG DISPID;

/* 151 */
typedef tagDISPPARAMS DISPPARAMS;

/* 132 */
typedef tagVARIANT VARIANT;

/* 153 */
typedef tagEXCEPINFO EXCEPINFO;

/* 104 */
typedef WCHAR OLECHAR;

/* 146 */
typedef OLECHAR *BSTR;

/* 189 */
typedef BSTR *PBSTR;

/* 190 */
typedef BOOL *PBOOL;

/* 90 */
/* struct MenuItemVtbl
{
  HRESULT (__stdcall *QueryInterface)(#89 *This, const IID *const riid, void **ppvObject);
  ULONG (__stdcall *AddRef)(#89 *This);
  ULONG (__stdcall *Release)(#89 *This);
  HRESULT (__stdcall *GetTypeInfoCount)(#89 *This, UINT *pctinfo);
  HRESULT (__stdcall *GetTypeInfo)(#89 *This, UINT iTInfo, LCID lcid, ITypeInfo **ppTInfo);
  HRESULT (__stdcall *GetIDsOfNames)(#89 *This, const IID *const riid, LPWSTR *rgszNames, UINT cNames, LCID lcid, DISPID *rgDispId);
  HRESULT (__stdcall *Invoke)(#89 *This, DISPID dispIdMember, const IID *const riid, LCID lcid, WORD wFlags, DISPPARAMS *pDispParams, VARIANT *pVarResult, EXCEPINFO *pExcepInfo, UINT *puArgErr);
  HRESULT (__stdcall *get_DisplayName)(#89 *This, PBSTR DisplayName);
  HRESULT (__stdcall *get_LanguageIndependentName)(#89 *This, PBSTR LanguageIndependentName);
  HRESULT (__stdcall *get_Path)(#89 *This, PBSTR Path);
  HRESULT (__stdcall *get_LanguageIndependentPath)(#89 *This, PBSTR LanguageIndependentPath);
  HRESULT (__stdcall *Execute)(#89 *This);
  HRESULT (__stdcall *get_Enabled)(#89 *This, PBOOL Enabled);
}; */

/* 93 */
/* struct _GUID
{
  DWORD Data1;
  WORD Data2;
  WORD Data3;
  BYTE Data4[8];
}; */

/* 97 */
#pragma pack(push, 8)
/* struct ITypeInfo
{
  ITypeInfoVtbl *lpVtbl;
}; */
#pragma pack(pop)

/* 131 */
/* typedef VARIANT VARIANTARG;
 */
/* 152 */
#pragma pack(push, 8)
/* struct tagDISPPARAMS
{
  VARIANTARG *rgvarg;
  DISPID *rgdispidNamedArgs;
  UINT cArgs;
  UINT cNamedArgs;
}; */
#pragma pack(pop)

/* 111 */
/* typedef unsigned short VARTYPE;
 */
/* 137 */
/* typedef short SHORT;
 */
/* 138 */
typedef float FLOAT;

/* 139 */
typedef double DOUBLE;

/* 140 */
/* typedef short VARIANT_BOOL;
 */
/* 123 */
typedef LONG SCODE;

/* 143 */
#pragma pack(push, 8)
/* struct tagCY::$4ADA6AE34E722E24764E0C4FBCDA3E73
{
  unsigned __int32 Lo;
  __int32 Hi;
}; */
#pragma pack(pop)

/* 144 */
typedef __int64 LONGLONG;

/* 142 */
#pragma pack(push, 8)
/* union tagCY
{
  #pragma pack(push, 8)
  struct
  {
    unsigned __int32 Lo;
    __int32 Hi;
  };
  #pragma pack(pop)
  LONGLONG int64;
}; */
#pragma pack(pop)

/* 141 */
/* typedef tagCY CY;
 */
/* 145 */
typedef double DATE;

/* 155 */
typedef tagSAFEARRAY SAFEARRAY;

/* 114 */
/* typedef unsigned short USHORT;
 */
/* 159 */
typedef int INT;

/* 160 */
typedef tagDEC DECIMAL;

/* 167 */
#pragma pack(push, 8)
/* struct tagVARIANT::$::$::$E3ADF3533BFFE4E09553D0C58E41D45E::$0FDBD249F1AECD6A49409B6B82281578
{
  PVOID pvRecord;
  IRecordInfo *pRecInfo;
}; */
#pragma pack(pop)

/* 136 */
#pragma pack(push, 8)
/* union tagVARIANT::$::$2E851DBA257FA738680F86C475CAC6EB::$E3ADF3533BFFE4E09553D0C58E41D45E
{
  LONG lVal;
  BYTE bVal;
  SHORT iVal;
  FLOAT fltVal;
  DOUBLE dblVal;
  VARIANT_BOOL boolVal;
  SCODE scode;
  CY cyVal;
  DATE date;
  BSTR bstrVal;
  IUnknown *punkVal;
  IDispatch *pdispVal;
  SAFEARRAY *parray;
  BYTE *pbVal;
  SHORT *piVal;
  LONG *plVal;
  FLOAT *pfltVal;
  DOUBLE *pdblVal;
  VARIANT_BOOL *pboolVal;
  SCODE *pscode;
  CY *pcyVal;
  DATE *pdate;
  BSTR *pbstrVal;
  IUnknown **ppunkVal;
  IDispatch **ppdispVal;
  SAFEARRAY **pparray;
  VARIANT *pvarVal;
  PVOID byref;
  CHAR cVal;
  USHORT uiVal;
  ULONG ulVal;
  INT intVal;
  UINT uintVal;
  DECIMAL *pdecVal;
  CHAR *pcVal;
  USHORT *puiVal;
  ULONG *pulVal;
  INT *pintVal;
  UINT *puintVal;
  #pragma pack(push, 8)
  struct
  {
    PVOID pvRecord;
    IRecordInfo *pRecInfo;
  };
  #pragma pack(pop)
}; */
#pragma pack(pop)

/* 135 */
#pragma pack(push, 8)
/* struct tagVARIANT::$CFEED276C078973BD7512520F6B5AF6E::$2E851DBA257FA738680F86C475CAC6EB
{
  VARTYPE vt;
  WORD wReserved1;
  WORD wReserved2;
  WORD wReserved3;
  #pragma pack(push, 8)
  union
  {
    LONG lVal;
    BYTE bVal;
    SHORT iVal;
    FLOAT fltVal;
    DOUBLE dblVal;
    VARIANT_BOOL boolVal;
    SCODE scode;
    CY cyVal;
    DATE date;
    BSTR bstrVal;
    IUnknown *punkVal;
    IDispatch *pdispVal;
    SAFEARRAY *parray;
    BYTE *pbVal;
    SHORT *piVal;
    LONG *plVal;
    FLOAT *pfltVal;
    DOUBLE *pdblVal;
    VARIANT_BOOL *pboolVal;
    SCODE *pscode;
    CY *pcyVal;
    DATE *pdate;
    BSTR *pbstrVal;
    IUnknown **ppunkVal;
    IDispatch **ppdispVal;
    SAFEARRAY **pparray;
    VARIANT *pvarVal;
    PVOID byref;
    CHAR cVal;
    USHORT uiVal;
    ULONG ulVal;
    INT intVal;
    UINT uintVal;
    DECIMAL *pdecVal;
    CHAR *pcVal;
    USHORT *puiVal;
    ULONG *pulVal;
    INT *pintVal;
    UINT *puintVal;
    #pragma pack(push, 8)
    struct
    {
      PVOID pvRecord;
      IRecordInfo *pRecInfo;
    };
    #pragma pack(pop)
  };
  #pragma pack(pop)
}; */
#pragma pack(pop)

/* 163 */
#pragma pack(push, 8)
/* struct tagDEC::$64EC678C49E7BE49873AFBFB7A849D34::$7F8459940C2B08BD5D82B0F27239141B
{
  BYTE scale;
  BYTE sign;
}; */
#pragma pack(pop)

/* 162 */
#pragma pack(push, 8)
/* union tagDEC::$64EC678C49E7BE49873AFBFB7A849D34
{
  #pragma pack(push, 8)
  struct
  {
    BYTE scale;
    BYTE sign;
  };
  #pragma pack(pop)
  USHORT signscale;
}; */
#pragma pack(pop)

/* 165 */
#pragma pack(push, 8)
/* struct tagDEC::$D28E26DEC3EC762C06C2AA9D0F7AC301::$674876891A86A76F12C10005982BCA56
{
  ULONG Lo32;
  ULONG Mid32;
}; */
#pragma pack(pop)

/* 166 */
typedef unsigned __int64 ULONGLONG;

/* 164 */
#pragma pack(push, 8)
/* union tagDEC::$D28E26DEC3EC762C06C2AA9D0F7AC301
{
  #pragma pack(push, 8)
  struct
  {
    ULONG Lo32;
    ULONG Mid32;
  };
  #pragma pack(pop)
  ULONGLONG Lo64;
}; */
#pragma pack(pop)

/* 161 */
#pragma pack(push, 8)
/* struct tagDEC
{
  USHORT wReserved;
  #pragma pack(push, 8)
  union
  {
    #pragma pack(push, 8)
    struct
    {
      BYTE scale;
      BYTE sign;
    };
    #pragma pack(pop)
    USHORT signscale;
  };
  #pragma pack(pop)
  ULONG Hi32;
  #pragma pack(push, 8)
  union
  {
    #pragma pack(push, 8)
    struct
    {
      ULONG Lo32;
      ULONG Mid32;
    };
    #pragma pack(pop)
    ULONGLONG Lo64;
  };
  #pragma pack(pop)
}; */
#pragma pack(pop)

/* 134 */
#pragma pack(push, 8)
/* union tagVARIANT::$CFEED276C078973BD7512520F6B5AF6E
{
  #pragma pack(push, 8)
  struct
  {
    VARTYPE vt;
    WORD wReserved1;
    WORD wReserved2;
    WORD wReserved3;
    #pragma pack(push, 8)
    union
    {
      LONG lVal;
      BYTE bVal;
      SHORT iVal;
      FLOAT fltVal;
      DOUBLE dblVal;
      VARIANT_BOOL boolVal;
      SCODE scode;
      CY cyVal;
      DATE date;
      BSTR bstrVal;
      IUnknown *punkVal;
      IDispatch *pdispVal;
      SAFEARRAY *parray;
      BYTE *pbVal;
      SHORT *piVal;
      LONG *plVal;
      FLOAT *pfltVal;
      DOUBLE *pdblVal;
      VARIANT_BOOL *pboolVal;
      SCODE *pscode;
      CY *pcyVal;
      DATE *pdate;
      BSTR *pbstrVal;
      IUnknown **ppunkVal;
      IDispatch **ppdispVal;
      SAFEARRAY **pparray;
      VARIANT *pvarVal;
      PVOID byref;
      CHAR cVal;
      USHORT uiVal;
      ULONG ulVal;
      INT intVal;
      UINT uintVal;
      DECIMAL *pdecVal;
      CHAR *pcVal;
      USHORT *puiVal;
      ULONG *pulVal;
      INT *pintVal;
      UINT *puintVal;
      #pragma pack(push, 8)
      struct
      {
        PVOID pvRecord;
        IRecordInfo *pRecInfo;
      };
      #pragma pack(pop)
    };
    #pragma pack(pop)
  };
  #pragma pack(pop)
  DECIMAL decVal;
}; */
#pragma pack(pop)

/* 133 */
#pragma pack(push, 8)
/* struct tagVARIANT
{
  #pragma pack(push, 8)
  union
  {
    #pragma pack(push, 8)
    struct
    {
      VARTYPE vt;
      WORD wReserved1;
      WORD wReserved2;
      WORD wReserved3;
      #pragma pack(push, 8)
      union
      {
        LONG lVal;
        BYTE bVal;
        SHORT iVal;
        FLOAT fltVal;
        DOUBLE dblVal;
        VARIANT_BOOL boolVal;
        SCODE scode;
        CY cyVal;
        DATE date;
        BSTR bstrVal;
        IUnknown *punkVal;
        IDispatch *pdispVal;
        SAFEARRAY *parray;
        BYTE *pbVal;
        SHORT *piVal;
        LONG *plVal;
        FLOAT *pfltVal;
        DOUBLE *pdblVal;
        VARIANT_BOOL *pboolVal;
        SCODE *pscode;
        CY *pcyVal;
        DATE *pdate;
        BSTR *pbstrVal;
        IUnknown **ppunkVal;
        IDispatch **ppdispVal;
        SAFEARRAY **pparray;
        VARIANT *pvarVal;
        PVOID byref;
        CHAR cVal;
        USHORT uiVal;
        ULONG ulVal;
        INT intVal;
        UINT uintVal;
        DECIMAL *pdecVal;
        CHAR *pcVal;
        USHORT *puiVal;
        ULONG *pulVal;
        INT *pintVal;
        UINT *puintVal;
        #pragma pack(push, 8)
        struct
        {
          PVOID pvRecord;
          IRecordInfo *pRecInfo;
        };
        #pragma pack(pop)
      };
      #pragma pack(pop)
    };
    #pragma pack(pop)
    DECIMAL decVal;
  };
  #pragma pack(pop)
}; */
#pragma pack(pop)

/* 154 */
#pragma pack(push, 8)
/* struct tagEXCEPINFO
{
  WORD wCode;
  WORD wReserved;
  BSTR bstrSource;
  BSTR bstrDescription;
  BSTR bstrHelpFile;
  DWORD dwHelpContext;
  PVOID pvReserved;
  HRESULT (__stdcall *pfnDeferredFillIn)(tagEXCEPINFO *);
  SCODE scode;
}; */
#pragma pack(pop)

/* 99 */
typedef tagTYPEATTR TYPEATTR;

/* 121 */
typedef tagFUNCDESC FUNCDESC;

/* 177 */
typedef tagVARDESC VARDESC;

/* 101 */
typedef DISPID MEMBERID;

/* 110 */
typedef DWORD HREFTYPE;

/* 103 */
typedef OLECHAR *LPOLESTR;

/* 174 */
/* enum tagINVOKEKIND
{
  INVOKE_FUNC = 0x1,
  INVOKE_PROPERTYGET = 0x2,
  INVOKE_PROPERTYPUT = 0x4,
  INVOKE_PROPERTYPUTREF = 0x8,
}; */

/* 173 */
typedef tagINVOKEKIND INVOKEKIND;

/* 98 */
#pragma pack(push, 8)
struct ITypeInfoVtbl
{
  HRESULT (__stdcall *QueryInterface)(ITypeInfo *This, const IID *const riid, void **ppvObject);
  ULONG (__stdcall *AddRef)(ITypeInfo *This);
  ULONG (__stdcall *Release)(ITypeInfo *This);
  HRESULT (__stdcall *GetTypeAttr)(ITypeInfo *This, TYPEATTR **ppTypeAttr);
  HRESULT (__stdcall *GetTypeComp)(ITypeInfo *This, ITypeComp **ppTComp);
  HRESULT (__stdcall *GetFuncDesc)(ITypeInfo *This, UINT index, FUNCDESC **ppFuncDesc);
  HRESULT (__stdcall *GetVarDesc)(ITypeInfo *This, UINT index, VARDESC **ppVarDesc);
  HRESULT (__stdcall *GetNames)(ITypeInfo *This, MEMBERID memid, BSTR *rgBstrNames, UINT cMaxNames, UINT *pcNames);
  HRESULT (__stdcall *GetRefTypeOfImplType)(ITypeInfo *This, UINT index, HREFTYPE *pRefType);
  HRESULT (__stdcall *GetImplTypeFlags)(ITypeInfo *This, UINT index, INT *pImplTypeFlags);
  HRESULT (__stdcall *GetIDsOfNames)(ITypeInfo *This, LPOLESTR *rgszNames, UINT cNames, MEMBERID *pMemId);
  HRESULT (__stdcall *Invoke)(ITypeInfo *This, PVOID pvInstance, MEMBERID memid, WORD wFlags, DISPPARAMS *pDispParams, VARIANT *pVarResult, EXCEPINFO *pExcepInfo, UINT *puArgErr);
  HRESULT (__stdcall *GetDocumentation)(ITypeInfo *This, MEMBERID memid, BSTR *pBstrName, BSTR *pBstrDocString, DWORD *pdwHelpContext, BSTR *pBstrHelpFile);
  HRESULT (__stdcall *GetDllEntry)(ITypeInfo *This, MEMBERID memid, INVOKEKIND invKind, BSTR *pBstrDllName, BSTR *pBstrName, WORD *pwOrdinal);
  HRESULT (__stdcall *GetRefTypeInfo)(ITypeInfo *This, HREFTYPE hRefType, ITypeInfo **ppTInfo);
  HRESULT (__stdcall *AddressOfMember)(ITypeInfo *This, MEMBERID memid, INVOKEKIND invKind, PVOID *ppv);
  HRESULT (__stdcall *CreateInstance)(ITypeInfo *This, IUnknown *pUnkOuter, const IID *const riid, PVOID *ppvObj);
  HRESULT (__stdcall *GetMops)(ITypeInfo *This, MEMBERID memid, BSTR *pBstrMops);
  HRESULT (__stdcall *GetContainingTypeLib)(ITypeInfo *This, ITypeLib **ppTLib, UINT *pIndex);
  void (__stdcall *ReleaseTypeAttr)(ITypeInfo *This, TYPEATTR *pTypeAttr);
  void (__stdcall *ReleaseFuncDesc)(ITypeInfo *This, FUNCDESC *pFuncDesc);
  void (__stdcall *ReleaseVarDesc)(ITypeInfo *This, VARDESC *pVarDesc);
};
#pragma pack(pop)

/* 147 */
#pragma pack(push, 8)
/* struct IUnknown
{
  IUnknownVtbl *lpVtbl;
}; */
#pragma pack(pop)

/* 149 */
#pragma pack(push, 8)
/* struct IDispatch
{
  IDispatchVtbl *lpVtbl;
}; */
#pragma pack(pop)

/* 158 */
#pragma pack(push, 8)
/* struct tagSAFEARRAYBOUND
{
  ULONG cElements;
  LONG lLbound;
}; */
#pragma pack(pop)

/* 157 */
typedef tagSAFEARRAYBOUND SAFEARRAYBOUND;

/* 156 */
#pragma pack(push, 8)
/* struct tagSAFEARRAY
{
  USHORT cDims;
  USHORT fFeatures;
  ULONG cbElements;
  ULONG cLocks;
  PVOID pvData;
  SAFEARRAYBOUND rgsabound[1];
}; */
#pragma pack(pop)

/* 168 */
#pragma pack(push, 8)
/* struct IRecordInfo
{
  IRecordInfoVtbl *lpVtbl;
}; */
#pragma pack(pop)

/* 106 */
/* enum tagTYPEKIND
{
  TKIND_ENUM = 0x0,
  TKIND_RECORD = 0x1,
  TKIND_MODULE = 0x2,
  TKIND_INTERFACE = 0x3,
  TKIND_DISPATCH = 0x4,
  TKIND_COCLASS = 0x5,
  TKIND_ALIAS = 0x6,
  TKIND_UNION = 0x7,
  TKIND_MAX = 0x8,
}; */

/* 105 */
typedef tagTYPEKIND TYPEKIND;

/* 109 */
#pragma pack(push, 8)
/* union tagTYPEDESC::$B05FCE5490B0CB857F8E7C0862C02AF4
{
  tagTYPEDESC *lptdesc;
  struct tagTYPEDESC::$B05FCE5490B0CB857F8E7C0862C02AF4::tagARRAYDESC *lpadesc;
  HREFTYPE hreftype;
}; */
#pragma pack(pop)

/* 108 */
#pragma pack(push, 8)
/* struct tagTYPEDESC
{
  #pragma pack(push, 8)
  union
  {
    tagTYPEDESC *lptdesc;
    struct tagTYPEDESC::$B05FCE5490B0CB857F8E7C0862C02AF4::tagARRAYDESC *lpadesc;
    HREFTYPE hreftype;
  };
  #pragma pack(pop)
  VARTYPE vt;
}; */
#pragma pack(pop)

/* 107 */
typedef tagTYPEDESC TYPEDESC;

/* 113 */
#pragma pack(push, 8)
/* struct tagIDLDESC
{
  ULONG dwReserved;
  USHORT wIDLFlags;
}; */
#pragma pack(pop)

/* 112 */
typedef tagIDLDESC IDLDESC;

/* 100 */
#pragma pack(push, 8)
/* struct tagTYPEATTR
{
  GUID guid;
  LCID lcid;
  DWORD dwReserved;
  MEMBERID memidConstructor;
  MEMBERID memidDestructor;
  LPOLESTR lpstrSchema;
  ULONG cbSizeInstance;
  TYPEKIND typekind;
  WORD cFuncs;
  WORD cVars;
  WORD cImplTypes;
  WORD cbSizeVft;
  WORD cbAlignment;
  WORD wTypeFlags;
  WORD wMajorVerNum;
  WORD wMinorVerNum;
  TYPEDESC tdescAlias;
  IDLDESC idldescType;
}; */
#pragma pack(pop)

/* 115 */
#pragma pack(push, 8)
/* struct ITypeComp
{
  ITypeCompVtbl *lpVtbl;
}; */
#pragma pack(pop)

/* 124 */
typedef tagELEMDESC ELEMDESC;

/* 172 */
/* enum tagFUNCKIND
{
  FUNC_VIRTUAL = 0x0,
  FUNC_PUREVIRTUAL = 0x1,
  FUNC_NONVIRTUAL = 0x2,
  FUNC_STATIC = 0x3,
  FUNC_DISPATCH = 0x4,
}; */

/* 171 */
typedef tagFUNCKIND FUNCKIND;

/* 176 */
/* enum tagCALLCONV
{
  CC_FASTCALL = 0x0,
  CC_CDECL = 0x1,
  CC_MSCPASCAL = 0x2,
  CC_PASCAL = 0x2,
  CC_MACPASCAL = 0x3,
  CC_STDCALL = 0x4,
  CC_FPFASTCALL = 0x5,
  CC_SYSCALL = 0x6,
  CC_MPWCDECL = 0x7,
  CC_MPWPASCAL = 0x8,
  CC_MAX = 0x9,
}; */

/* 175 */
typedef tagCALLCONV CALLCONV;

/* 129 */
typedef tagPARAMDESCEX *LPPARAMDESCEX;

/* 128 */
#pragma pack(push, 8)
/* struct tagPARAMDESC
{
  LPPARAMDESCEX pparamdescex;
  USHORT wParamFlags;
}; */
#pragma pack(pop)

/* 127 */
typedef tagPARAMDESC PARAMDESC;

/* 126 */
#pragma pack(push, 8)
/* union tagELEMDESC::$7C8F4CED1424251743D09680A1A0B07D
{
  IDLDESC idldesc;
  PARAMDESC paramdesc;
}; */
#pragma pack(pop)

/* 125 */
#pragma pack(push, 8)
/* struct tagELEMDESC
{
  TYPEDESC tdesc;
  #pragma pack(push, 8)
  union
  {
    IDLDESC idldesc;
    PARAMDESC paramdesc;
  };
  #pragma pack(pop)
}; */
#pragma pack(pop)

/* 122 */
#pragma pack(push, 8)
/* struct tagFUNCDESC
{
  MEMBERID memid;
  SCODE *lprgscode;
  ELEMDESC *lprgelemdescParam;
  FUNCKIND funckind;
  INVOKEKIND invkind;
  CALLCONV callconv;
  SHORT cParams;
  SHORT cParamsOpt;
  SHORT oVft;
  SHORT cScodes;
  ELEMDESC elemdescFunc;
  WORD wFuncFlags;
}; */
#pragma pack(pop)

/* 179 */
#pragma pack(push, 8)
/* union tagVARDESC::$E6274BD6A7149C9CC2413444FF769F0B
{
  ULONG oInst;
  VARIANT *lpvarValue;
}; */
#pragma pack(pop)

/* 181 */
/* enum tagVARKIND
{
  VAR_PERINSTANCE = 0x0,
  VAR_STATIC = 0x1,
  VAR_CONST = 0x2,
  VAR_DISPATCH = 0x3,
}; */

/* 180 */
typedef tagVARKIND VARKIND;

/* 178 */
#pragma pack(push, 8)
/* struct tagVARDESC
{
  MEMBERID memid;
  LPOLESTR lpstrSchema;
  #pragma pack(push, 8)
  union
  {
    ULONG oInst;
    VARIANT *lpvarValue;
  };
  #pragma pack(pop)
  ELEMDESC elemdescVar;
  WORD wVarFlags;
  VARKIND varkind;
}; */
#pragma pack(pop)

/* 182 */
#pragma pack(push, 8)
/* struct ITypeLib
{
  ITypeLibVtbl *lpVtbl;
}; */
#pragma pack(pop)

/* 148 */
#pragma pack(push, 8)
struct IUnknownVtbl
{
  HRESULT (__stdcall *QueryInterface)(IUnknown *This, const IID *const riid, void **ppvObject);
  ULONG (__stdcall *AddRef)(IUnknown *This);
  ULONG (__stdcall *Release)(IUnknown *This);
};
#pragma pack(pop)

/* 150 */
#pragma pack(push, 8)
struct IDispatchVtbl
{
  HRESULT (__stdcall *QueryInterface)(IDispatch *This, const IID *const riid, void **ppvObject);
  ULONG (__stdcall *AddRef)(IDispatch *This);
  ULONG (__stdcall *Release)(IDispatch *This);
  HRESULT (__stdcall *GetTypeInfoCount)(IDispatch *This, UINT *pctinfo);
  HRESULT (__stdcall *GetTypeInfo)(IDispatch *This, UINT iTInfo, LCID lcid, ITypeInfo **ppTInfo);
  HRESULT (__stdcall *GetIDsOfNames)(IDispatch *This, const IID *const riid, LPOLESTR *rgszNames, UINT cNames, LCID lcid, DISPID *rgDispId);
  HRESULT (__stdcall *Invoke)(IDispatch *This, DISPID dispIdMember, const IID *const riid, LCID lcid, WORD wFlags, DISPPARAMS *pDispParams, VARIANT *pVarResult, EXCEPINFO *pExcepInfo, UINT *puArgErr);
};
#pragma pack(pop)

/* 170 */
typedef const OLECHAR *LPCOLESTR;

/* 169 */
#pragma pack(push, 8)
struct IRecordInfoVtbl
{
  HRESULT (__stdcall *QueryInterface)(IRecordInfo *This, const IID *const riid, void **ppvObject);
  ULONG (__stdcall *AddRef)(IRecordInfo *This);
  ULONG (__stdcall *Release)(IRecordInfo *This);
  HRESULT (__stdcall *RecordInit)(IRecordInfo *This, PVOID pvNew);
  HRESULT (__stdcall *RecordClear)(IRecordInfo *This, PVOID pvExisting);
  HRESULT (__stdcall *RecordCopy)(IRecordInfo *This, PVOID pvExisting, PVOID pvNew);
  HRESULT (__stdcall *GetGuid)(IRecordInfo *This, GUID *pguid);
  HRESULT (__stdcall *GetName)(IRecordInfo *This, BSTR *pbstrName);
  HRESULT (__stdcall *GetSize)(IRecordInfo *This, ULONG *pcbSize);
  HRESULT (__stdcall *GetTypeInfo)(IRecordInfo *This, ITypeInfo **ppTypeInfo);
  HRESULT (__stdcall *GetField)(IRecordInfo *This, PVOID pvData, LPCOLESTR szFieldName, VARIANT *pvarField);
  HRESULT (__stdcall *GetFieldNoCopy)(IRecordInfo *This, PVOID pvData, LPCOLESTR szFieldName, VARIANT *pvarField, PVOID *ppvDataCArray);
  HRESULT (__stdcall *PutField)(IRecordInfo *This, ULONG wFlags, PVOID pvData, LPCOLESTR szFieldName, VARIANT *pvarField);
  HRESULT (__stdcall *PutFieldNoCopy)(IRecordInfo *This, ULONG wFlags, PVOID pvData, LPCOLESTR szFieldName, VARIANT *pvarField);
  HRESULT (__stdcall *GetFieldNames)(IRecordInfo *This, ULONG *pcNames, BSTR *rgBstrNames);
  BOOL (__stdcall *IsMatchingType)(IRecordInfo *This, IRecordInfo *pRecordInfo);
  PVOID (__stdcall *RecordCreate)(IRecordInfo *This);
  HRESULT (__stdcall *RecordCreateCopy)(IRecordInfo *This, PVOID pvSource, PVOID *ppvDest);
  HRESULT (__stdcall *RecordDestroy)(IRecordInfo *This, PVOID pvRecord);
};
#pragma pack(pop)

/* 118 */
/* enum tagDESCKIND
{
  DESCKIND_NONE = 0x0,
  DESCKIND_FUNCDESC = 0x1,
  DESCKIND_VARDESC = 0x2,
  DESCKIND_TYPECOMP = 0x3,
  DESCKIND_IMPLICITAPPOBJ = 0x4,
  DESCKIND_MAX = 0x5,
}; */

/* 117 */
typedef tagDESCKIND DESCKIND;

/* 119 */
typedef tagBINDPTR BINDPTR;

/* 116 */
#pragma pack(push, 8)
struct ITypeCompVtbl
{
  HRESULT (__stdcall *QueryInterface)(ITypeComp *This, const IID *const riid, void **ppvObject);
  ULONG (__stdcall *AddRef)(ITypeComp *This);
  ULONG (__stdcall *Release)(ITypeComp *This);
  HRESULT (__stdcall *Bind)(ITypeComp *This, LPOLESTR szName, ULONG lHashVal, WORD wFlags, ITypeInfo **ppTInfo, DESCKIND *pDescKind, BINDPTR *pBindPtr);
  HRESULT (__stdcall *BindType)(ITypeComp *This, LPOLESTR szName, ULONG lHashVal, ITypeInfo **ppTInfo, ITypeComp **ppTComp);
};
#pragma pack(pop)

/* 130 */
#pragma pack(push, 8)
/* struct tagPARAMDESCEX
{
  ULONG cBytes;
  VARIANTARG varDefaultValue;
}; */
#pragma pack(pop)

/* 184 */
typedef tagTLIBATTR TLIBATTR;

/* 183 */
#pragma pack(push, 8)
struct ITypeLibVtbl
{
  HRESULT (__stdcall *QueryInterface)(ITypeLib *This, const IID *const riid, void **ppvObject);
  ULONG (__stdcall *AddRef)(ITypeLib *This);
  ULONG (__stdcall *Release)(ITypeLib *This);
  UINT (__stdcall *GetTypeInfoCount)(ITypeLib *This);
  HRESULT (__stdcall *GetTypeInfo)(ITypeLib *This, UINT index, ITypeInfo **ppTInfo);
  HRESULT (__stdcall *GetTypeInfoType)(ITypeLib *This, UINT index, TYPEKIND *pTKind);
  HRESULT (__stdcall *GetTypeInfoOfGuid)(ITypeLib *This, const GUID *const guid, ITypeInfo **ppTinfo);
  HRESULT (__stdcall *GetLibAttr)(ITypeLib *This, TLIBATTR **ppTLibAttr);
  HRESULT (__stdcall *GetTypeComp)(ITypeLib *This, ITypeComp **ppTComp);
  HRESULT (__stdcall *GetDocumentation)(ITypeLib *This, INT index, BSTR *pBstrName, BSTR *pBstrDocString, DWORD *pdwHelpContext, BSTR *pBstrHelpFile);
  HRESULT (__stdcall *IsName)(ITypeLib *This, LPOLESTR szNameBuf, ULONG lHashVal, BOOL *pfName);
  HRESULT (__stdcall *FindName)(ITypeLib *This, LPOLESTR szNameBuf, ULONG lHashVal, ITypeInfo **ppTInfo, MEMBERID *rgMemId, USHORT *pcFound);
  void (__stdcall *ReleaseTLibAttr)(ITypeLib *This, TLIBATTR *pTLibAttr);
};
#pragma pack(pop)

/* 120 */
#pragma pack(push, 8)
/* union tagBINDPTR
{
  FUNCDESC *lpfuncdesc;
  VARDESC *lpvardesc;
  ITypeComp *lptcomp;
}; */
#pragma pack(pop)

/* 187 */
/* enum tagSYSKIND
{
  SYS_WIN16 = 0x0,
  SYS_WIN32 = 0x1,
  SYS_MAC = 0x2,
}; */

/* 186 */
typedef tagSYSKIND SYSKIND;

/* 185 */
#pragma pack(push, 8)
/* struct tagTLIBATTR
{
  GUID guid;
  LCID lcid;
  SYSKIND syskind;
  WORD wMajorVerNum;
  WORD wMinorVerNum;
  WORD wLibFlags;
}; */
#pragma pack(pop)

/* 191 */
struct TMenuItem
{
  int dwFlags;
  char *pszStr;
  void (__cdecl *fnMenu)();
};

/* 203 */
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 = 0xFF,
};

/* 192 */
struct ItemDataStruct
{
  int iRnd;
  unsigned char iClass;
  char iLoc;
  int iCurs;
  unsigned char itype;
  char iItemId;
  char *iName;
  char *iSName;
  int iMinMLvl;
  int iDurability;
  int iMinDam;
  int iMaxDam;
  int iMinAC;
  int iMaxAC;
  unsigned char iMinStr;
  unsigned char iMinMag;
  unsigned char iMinDex;
  int iFlags;
  int iMiscId;
  int iSpell;
  int iUsable;
  int iValue;
  int iMaxValue;
};

/* 319 */
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_NULL_10 = 0x10,
  MIS_NULL_11 = 0x11,
  MIS_NULL_12 = 0x12,
  MIS_NULL_13 = 0x13,
  MIS_RHINO = 0x14,
  MIS_MAGMABALL = 0x15,
  MIS_LIGHTCTRL2 = 0x16,
  MIS_LIGHTNING2 = 0x17,
  MIS_FLARE = 0x18,
  MIS_MISEXP2 = 0x19,
  MIS_TELEPORT = 0x1A,
  MIS_LARROW = 0x1B,
  MIS_DOOMSERP = 0x1C,
  MIS_NULL_1D = 0x1D,
  MIS_STONE = 0x1E,
  MIS_NULL_1F = 0x1F,
  MIS_INVISIBL = 0x20,
  MIS_GOLEM = 0x21,
  MIS_ETHEREALIZE = 0x22,
  MIS_NULL_23 = 0x23,
  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_NULL_32 = 0x32,
  MIS_NULL_33 = 0x33,
  MIS_CBOLT = 0x34,
  MIS_HBOLT = 0x35,
  MIS_RESURRECT = 0x36,
  MIS_TELEKINESIS = 0x37,
  MIS_LARROW2 = 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,
};

/* 200 */
enum missile_graphic_id
{
  MFILE_ARROWS = 0x0,
  MFILE_FIREBA = 0x1,
  MFILE_GUARD = 0x2,
  MFILE_LGHNING = 0x3,
  MFILE_FIREWAL = 0x4,
  MFILE_MAGBLOS = 0x5,
  MFILE_PORTAL = 0x6,
  MFILE_BLUEXFR = 0x7,
  MFILE_BLUEXBK = 0x8,
  MFILE_MANASHLD = 0x9,
  MFILE_BLOOD = 0xA,
  MFILE_BONE = 0xB,
  MFILE_METLHIT = 0xC,
  MFILE_FARROW = 0xD,
  MFILE_DOOM = 0xE,
  MFILE_0F = 0xF,
  MFILE_BLODBUR = 0x10,
  MFILE_NEWEXP = 0x11,
  MFILE_SHATTER1 = 0x12,
  MFILE_BIGEXP = 0x13,
  MFILE_INFERNO = 0x14,
  MFILE_THINLGHT = 0x15,
  MFILE_FLARE = 0x16,
  MFILE_FLAREEXP = 0x17,
  MFILE_MAGBALL = 0x18,
  MFILE_KRULL = 0x19,
  MFILE_MINILTNG = 0x1A,
  MFILE_HOLY = 0x1B,
  MFILE_HOLYEXPL = 0x1C,
  MFILE_LARROW = 0x1D,
  MFILE_FIRARWEX = 0x1E,
  MFILE_ACIDBF = 0x1F,
  MFILE_ACIDSPLA = 0x20,
  MFILE_ACIDPUD = 0x21,
  MFILE_ETHRSHLD = 0x22,
  MFILE_FIRERUN = 0x23,
  MFILE_RESSUR1 = 0x24,
  MFILE_SKLBALL = 0x25,
  MFILE_RPORTAL = 0x26,
  MFILE_FIREPLAR = 0x27,
  MFILE_SCUBMISB = 0x28,
  MFILE_SCBSEXPB = 0x29,
  MFILE_SCUBMISC = 0x2A,
  MFILE_SCBSEXPC = 0x2B,
  MFILE_SCUBMISD = 0x2C,
  MFILE_SCBSEXPD = 0x2D,
  MFILE_NULL = 0x2E,
  MFILE_INVALID = 0x2F,
  MFILE_NONE = 0xFF,
};

/* 193 */
struct MissileData
{
  char mName;
  void (__fastcall *mAddProc)(int, int, int, int, int, int, int, int, int);
  void (__fastcall *mProc)(int);
  int mDraw;
  unsigned char mType;
  unsigned char mResist;
  char mFileNum;
  int mlSFX;
  int miSFX;
};

/* 194 */
struct MisFileData
{
  char mAnimName;
  unsigned char mAnimFAmt;
  char *mName;
  int mFlags;
  int mAnimCel[16];
  unsigned char mAnimDelay[16];
  unsigned char mAnimLen[16];
  int mAnimWidth[16];
  int mAnimWidth2[16];
};

/* 323 */
enum _mai_id
{
  MG_ZOMBIE = 0,
  MG_FAT = 1,
  MG_SKELSD = 2,
  MG_SKELBOW = 3,
  MG_SCAV = 4,
  MG_RHINO = 5,
  MG_GOATMC = 6,
  MG_GOATBOW = 7,
  MG_FALLEN = 8,
  MG_MAGMA = 9,
  MG_SKELKING = 10,
  MG_BAT = 11,
  MG_GARG = 12,
  MG_CLEAVER = 13,
  MG_SUCC = 14,
  MG_SNEAK = 15,
  MG_STORM = 16,
  MG_FIREMAN = 17,
  MG_GARBUD = 18,
  MG_ACID = 19,
  MG_ACIDUNIQ = 20,
  MG_GOLUM = 21,
  MG_ZHAR = 22,
  MG_SNOTSPIL = 23,
  MG_SNAKE = 24,
  MG_COUNSELOR = 25,
  MG_MEGA = 26,
  MG_DIABLO = 27,
  MG_LAZURUS = 28,
  MG_LAZHELP = 29,
  MG_LACHDANAN = 30,
  MG_WARLORD = 31,
};

/* 324 */
enum _mc_id
{
  MC_UNDEAD = 0,
  MC_DEMON = 1,
  MC_ANIMAL = 2,
};

/* 195 */
struct MonsterData
{
  int flags;
  int mType;
  char *GraphicType;
  int has_special;
  char *sndfile;
  int snd_special;
  int has_trans;
  char *TransFile;
  int Frames[6];
  int Rate[6];
  char *mName;
  unsigned char mMinDLvl;
  unsigned char mMaxDLvl;
  unsigned char mLevel;
  int mMinHP;
  int mMaxHP;
  char mAi;
  int mFlags;
  unsigned char mInt;
  unsigned char mHit;
  unsigned char mAFNum;
  unsigned char mMinDamage;
  unsigned char mMaxDamage;
  unsigned char mHit2;
  unsigned char mAFNum2;
  unsigned char mMinDamage2;
  unsigned char mMaxDamage2;
  unsigned char mArmorClass;
  char mMonstClass;
  short mMagicRes;
  short mMagicRes2;
  short mTreasure;
  unsigned char mSelFlag;
  int mExp;
};

/* 325 */
enum _monster_id
{
  MON_ZOMBIEA = 0x0,
  MON_ZOMBIEB = 0x1,
  MON_ZOMBIEC = 0x2,
  MON_ZOMBIED = 0x3,
  MON_FALSPEARA = 0x4,
  MON_FALSPEARB = 0x5,
  MON_FALSPEARC = 0x6,
  MON_FALSPEARD = 0x7,
  MON_SKELAXEA = 0x8,
  MON_SKELAXEB = 0x9,
  MON_SKELAXEC = 0xA,
  MON_SKELAXED = 0xB,
  MON_FALSWORDA = 0xC,
  MON_FALSWORDB = 0xD,
  MON_FALSWORDC = 0xE,
  MON_FALSWORDD = 0xF,
  MON_SCAVA = 0x10,
  MON_SCAVB = 0x11,
  MON_SCAVC = 0x12,
  MON_SCAVD = 0x13,
  MON_SKELBOWA = 0x14,
  MON_SKELBOWB = 0x15,
  MON_SKELBOWC = 0x16,
  MON_SKELBOWD = 0x17,
  MON_SKELSDA = 0x18,
  MON_SKELSDB = 0x19,
  MON_SKELSDC = 0x1A,
  MON_SKELSDD = 0x1B,
  MON_TSNEAK = 0x1C,
  MON_SNEAKA = 0x1D,
  MON_SNEAKB = 0x1E,
  MON_SNEAKC = 0x1F,
  MON_SNEAKD = 0x20,
  MON_GOATLORD = 0x21,
  MON_GOATMACEA = 0x22,
  MON_GOATMACEB = 0x23,
  MON_GOATMACEC = 0x24,
  MON_GOATMACED = 0x25,
  MON_BATA = 0x26,
  MON_BATB = 0x27,
  MON_BATC = 0x28,
  MON_BATD = 0x29,
  MON_GOATBOWA = 0x2A,
  MON_GOATBOWB = 0x2B,
  MON_GOATBOWC = 0x2C,
  MON_GOATBOWD = 0x2D,
  MON_ACIDA = 0x2E,
  MON_ACIDB = 0x2F,
  MON_ACIDC = 0x30,
  MON_ACIDD = 0x31,
  MON_SKING = 0x32,
  MON_BUTCH = 0x33,
  MON_FATA = 0x34,
  MON_FATB = 0x35,
  MON_FATC = 0x36,
  MON_FATD = 0x37,
  MON_WORMA = 0x38,
  MON_WORMB = 0x39,
  MON_WORMC = 0x3A,
  MON_WORMD = 0x3B,
  MON_MAGMAA = 0x3C,
  MON_MAGMAB = 0x3D,
  MON_MAGMAC = 0x3E,
  MON_MAGMAD = 0x3F,
  MON_RHINOA = 0x40,
  MON_RHINOB = 0x41,
  MON_RHINOC = 0x42,
  MON_RHINOD = 0x43,
  MON_DEMSKEL = 0x44,
  MON_THINE = 0x45,
  MON_THINF = 0x46,
  MON_THING = 0x47,
  MON_FIREMANA = 0x48,
  MON_FIREMANB = 0x49,
  MON_FIREMANC = 0x4A,
  MON_FIREMAND = 0x4B,
  MON_THINA = 0x4C,
  MON_THINB = 0x4D,
  MON_THINC = 0x4E,
  MON_THIND = 0x4F,
  MON_BIGFALL = 0x50,
  MON_GARGOYLEA = 0x51,
  MON_GARGOYLEB = 0x52,
  MON_GARGOYLEC = 0x53,
  MON_GARGOYLED = 0x54,
  MON_MEGAA = 0x55,
  MON_MEGAB = 0x56,
  MON_MEGAC = 0x57,
  MON_MEGAD = 0x58,
  MON_SNAKEA = 0x59,
  MON_SNAKEB = 0x5A,
  MON_SNAKEC = 0x5B,
  MON_SNAKED = 0x5C,
  MON_BLACKA = 0x5D,
  MON_BLACKB = 0x5E,
  MON_BLACKC = 0x5F,
  MON_BLACKD = 0x60,
  MON_UNRAVA = 0x61,
  MON_UNRAVB = 0x62,
  MON_UNRAVC = 0x63,
  MON_UNRAVD = 0x64,
  MON_SUCCA = 0x65,
  MON_SUCCB = 0x66,
  MON_SUCCC = 0x67,
  MON_SUCCD = 0x68,
  MON_MAGEA = 0x69,
  MON_MAGEB = 0x6A,
  MON_MAGEC = 0x6B,
  MON_MAGED = 0x6C,
  MON_GOLEM = 0x6D,
  MON_DIABLO = 0x6E,
  MON_DARKMAGE = 0x6F,
  MON_NONE = 0xFF,
};

/* 326 */
enum _speech_id
{
  TEXT_STORY1 = 0x0,
  TEXT_TAVERN21 = 0x1,
  TEXT_TAVERN22 = 0x2,
  TEXT_TAVERN23 = 0x3,
  TEXT_HEALER1 = 0x4,
  TEXT_BMAID1 = 0x5,
  TEXT_SMITH1 = 0x6,
  TEXT_DRUNK1 = 0x7,
  TEXT_WITCH1 = 0x8,
  TEXT_PEGBOY1 = 0x9,
  TEXT_SKING1 = 0xA,
  TEXT_STORY2 = 0xB,
  TEXT_TAVERN24 = 0xC,
  TEXT_TAVERN25 = 0xD,
  TEXT_HEALER2 = 0xE,
  TEXT_BMAID2 = 0xF,
  TEXT_SMITH2 = 0x10,
  TEXT_DRUNK2 = 0x11,
  TEXT_WITCH2 = 0x12,
  TEXT_PEGBOY2 = 0x13,
  TEXT_SNOT1 = 0x14,
  TEXT_SNOT2 = 0x15,
  TEXT_SNOT3 = 0x16,
  TEXT_STORY36 = 0x17,
  TEXT_STORY37 = 0x18,
  TEXT_STORY38_1 = 0x19,
  TEXT_TAVERN1 = 0x1A,
  TEXT_STORY38_2 = 0x1B,
  TEXT_STORY38_3 = 0x1C,
  TEXT_HEALER3 = 0x1D,
  TEXT_BMAID3 = 0x1E,
  TEXT_SMITH3 = 0x1F,
  TEXT_DRUNK3 = 0x20,
  TEXT_WITCH3 = 0x21,
  TEXT_PEGBOY3 = 0x22,
  TEXT_LAZ1_1 = 0x23,
  TEXT_LAZ1_2 = 0x24,
  TEXT_STORY4 = 0x25,
  TEXT_TAVERN2 = 0x26,
  TEXT_HEALER20 = 0x27,
  TEXT_HEALER21 = 0x28,
  TEXT_HEALER22 = 0x29,
  TEXT_BMAID4 = 0x2A,
  TEXT_SMITH4 = 0x2B,
  TEXT_DRUNK4 = 0x2C,
  TEXT_WITCH4 = 0x2D,
  TEXT_PEGBOY4 = 0x2E,
  TEXT_STORY7 = 0x2F,
  TEXT_TAVERN5 = 0x30,
  TEXT_HEALER5 = 0x31,
  TEXT_BMAID6 = 0x32,
  TEXT_SMITH7 = 0x33,
  TEXT_DRUNK7 = 0x34,
  TEXT_WITCH7 = 0x35,
  TEXT_PEGBOY7 = 0x36,
  TEXT_STORY10 = 0x37,
  TEXT_TAVERN8 = 0x38,
  TEXT_HEALER8 = 0x39,
  TEXT_BMAID8 = 0x3A,
  TEXT_SMITH10 = 0x3B,
  TEXT_DRUNK10 = 0x3C,
  TEXT_WITCH10 = 0x3D,
  TEXT_PEGBOY10 = 0x3E,
  TEXT_WOUND = 0x3F,
  TEXT_CLEAVER = 0x40,
  TEXT_STORY12 = 0x41,
  TEXT_TAVERN10 = 0x42,
  TEXT_HEALER10 = 0x43,
  TEXT_BMAID10 = 0x44,
  TEXT_SMITH12 = 0x45,
  TEXT_DRUNK12 = 0x46,
  TEXT_WITCH12 = 0x47,
  TEXT_PEGBOY11 = 0x48,
  TEXT_STORY13 = 0x49,
  TEXT_TAVERN11 = 0x4A,
  TEXT_HEALER11 = 0x4B,
  TEXT_BMAID11 = 0x4C,
  TEXT_SMITH13 = 0x4D,
  TEXT_DRUNK13 = 0x4E,
  TEXT_WITCH13 = 0x4F,
  TEXT_PEGBOY12 = 0x50,
  TEXT_LACH1 = 0x51,
  TEXT_LACH2 = 0x52,
  TEXT_LACH3 = 0x53,
  TEXT_STORY14 = 0x54,
  TEXT_TAVERN12 = 0x55,
  TEXT_HEALER12 = 0x56,
  TEXT_BMAID12 = 0x57,
  TEXT_SMITH21 = 0x58,
  TEXT_SMITH22 = 0x59,
  TEXT_SMITH23 = 0x5A,
  TEXT_DRUNK14 = 0x5B,
  TEXT_WITCH14 = 0x5C,
  TEXT_PEGBOY13 = 0x5D,
  TEXT_STORY15 = 0x5E,
  TEXT_TAVERN13 = 0x5F,
  TEXT_HEALER13 = 0x60,
  TEXT_BMAID13 = 0x61,
  TEXT_SMITH14 = 0x62,
  TEXT_DRUNK15 = 0x63,
  TEXT_WITCH15 = 0x64,
  TEXT_PEGBOY14 = 0x65,
  TEXT_STORY18 = 0x66,
  TEXT_TAVERN16 = 0x67,
  TEXT_HEALER16 = 0x68,
  TEXT_BMAID16 = 0x69,
  TEXT_SMITH17 = 0x6A,
  TEXT_DRUNK17 = 0x6B,
  TEXT_WITCH18 = 0x6C,
  TEXT_PEGBOY17 = 0x6D,
  TEXT_WARLRD1 = 0x6E,
  TEXT_STORY20 = 0x6F,
  TEXT_TAVERN18 = 0x70,
  TEXT_HEALER18 = 0x71,
  TEXT_BMAID18 = 0x72,
  TEXT_SMITH24 = 0x73,
  TEXT_SMITH25 = 0x74,
  TEXT_SMITH26 = 0x75,
  TEXT_DRUNK19 = 0x76,
  TEXT_WITCH20 = 0x77,
  TEXT_PEGBOY18 = 0x78,
  TEXT_STORY21 = 0x79,
  TEXT_TAVERN19 = 0x7A,
  TEXT_HEALER26 = 0x7B,
  TEXT_HEALER27 = 0x7C,
  TEXT_BMAID19 = 0x7D,
  TEXT_SMITH19 = 0x7E,
  TEXT_DRUNK20 = 0x7F,
  TEXT_WITCH22 = 0x80,
  TEXT_WITCH23 = 0x81,
  TEXT_WITCH24 = 0x82,
  TEXT_WITCH25 = 0x83,
  TEXT_WITCH26 = 0x84,
  TEXT_PEGBOY19 = 0x85,
  TEXT_STORY22 = 0x86,
  TEXT_STORY23 = 0x87,
  TEXT_STORY24 = 0x88,
  TEXT_TAVERN20 = 0x89,
  TEXT_HEALER19 = 0x8A,
  TEXT_BMAID20 = 0x8B,
  TEXT_SMITH20 = 0x8C,
  TEXT_DRUNK21 = 0x8D,
  TEXT_WITCH21 = 0x8E,
  TEXT_PEGBOY20 = 0x8F,
  TEXT_GARBUD1 = 0x90,
  TEXT_GARBUD2 = 0x91,
  TEXT_GARBUD3 = 0x92,
  TEXT_GARBUD4 = 0x93,
  TEXT_ZHAR1 = 0x94,
  TEXT_ZHAR2 = 0x95,
  TEXT_STORY25 = 0x96,
  TEXT_STORY26 = 0x97,
  TEXT_STORY27 = 0x98,
  TEXT_STORY28 = 0x99,
  TEXT_STORY29 = 0x9A,
  TEXT_STORY30 = 0x9B,
  TEXT_STORY31 = 0x9C,
  TEXT_STORY33 = 0x9D,
  TEXT_STORY34 = 0x9E,
  TEXT_STORY35 = 0x9F,
  TEXT_TAVERN36 = 0xA0,
  TEXT_TAVERN37 = 0xA1,
  TEXT_TAVERN38 = 0xA2,
  TEXT_TAVERN39 = 0xA3,
  TEXT_TAVERN40 = 0xA4,
  TEXT_TAVERN41 = 0xA5,
  TEXT_TAVERN43 = 0xA6,
  TEXT_TAVERN44 = 0xA7,
  TEXT_TAVERN45 = 0xA8,
  TEXT_HEALER37 = 0xA9,
  TEXT_HEALER38 = 0xAA,
  TEXT_HEALER39 = 0xAB,
  TEXT_HEALER40 = 0xAC,
  TEXT_HEALER41 = 0xAD,
  TEXT_HEALER42 = 0xAE,
  TEXT_HEALER43 = 0xAF,
  TEXT_HEALER45 = 0xB0,
  TEXT_HEALER46 = 0xB1,
  TEXT_HEALER47 = 0xB2,
  TEXT_BMAID31 = 0xB3,
  TEXT_BMAID32 = 0xB4,
  TEXT_BMAID33 = 0xB5,
  TEXT_BMAID34 = 0xB6,
  TEXT_BMAID35 = 0xB7,
  TEXT_BMAID36 = 0xB8,
  TEXT_BMAID37 = 0xB9,
  TEXT_BMAID39 = 0xBA,
  TEXT_BMAID40 = 0xBB,
  TEXT_SMITH44 = 0xBC,
  TEXT_SMITH45 = 0xBD,
  TEXT_SMITH46 = 0xBE,
  TEXT_SMITH47 = 0xBF,
  TEXT_SMITH48 = 0xC0,
  TEXT_SMITH49 = 0xC1,
  TEXT_SMITH50 = 0xC2,
  TEXT_SMITH51 = 0xC3,
  TEXT_SMITH52 = 0xC4,
  TEXT_SMITH53 = 0xC5,
  TEXT_SMITH55 = 0xC6,
  TEXT_SMITH56 = 0xC7,
  TEXT_DRUNK27 = 0xC8,
  TEXT_DRUNK28 = 0xC9,
  TEXT_DRUNK29 = 0xCA,
  TEXT_DRUNK30 = 0xCB,
  TEXT_DRUNK31 = 0xCC,
  TEXT_DRUNK32 = 0xCD,
  TEXT_DRUNK34 = 0xCE,
  TEXT_DRUNK35 = 0xCF,
  TEXT_DRUNK23 = 0xD0,
  TEXT_DRUNK24 = 0xD1,
  TEXT_DRUNK25 = 0xD2,
  TEXT_DRUNK26 = 0xD3,
  TEXT_WITCH38 = 0xD4,
  TEXT_WITCH39 = 0xD5,
  TEXT_WITCH40 = 0xD6,
  TEXT_WITCH41 = 0xD7,
  TEXT_WITCH42 = 0xD8,
  TEXT_WITCH43 = 0xD9,
  TEXT_WITCH44 = 0xDA,
  TEXT_WITCH45 = 0xDB,
  TEXT_WITCH46 = 0xDC,
  TEXT_WITCH47 = 0xDD,
  TEXT_WITCH49 = 0xDE,
  TEXT_WITCH50 = 0xDF,
  TEXT_PEGBOY32 = 0xE0,
  TEXT_PEGBOY33 = 0xE1,
  TEXT_PEGBOY34 = 0xE2,
  TEXT_PEGBOY35 = 0xE3,
  TEXT_PEGBOY36 = 0xE4,
  TEXT_PEGBOY37 = 0xE5,
  TEXT_PEGBOY38 = 0xE6,
  TEXT_PEGBOY39 = 0xE7,
  TEXT_PEGBOY40 = 0xE8,
  TEXT_PEGBOY42 = 0xE9,
  TEXT_PEGBOY43 = 0xEA,
  TEXT_WARR1 = 0xEB,
  TEXT_WARR10 = 0xEC,
  TEXT_WARR11 = 0xED,
  TEXT_WARR12 = 0xEE,
  TEXT_MAGE1 = 0xEF,
  TEXT_MAGE10 = 0xF0,
  TEXT_MAGE11 = 0xF1,
  TEXT_MAGE12 = 0xF2,
  TEXT_ROGUE1 = 0xF3,
  TEXT_ROGUE10 = 0xF4,
  TEXT_ROGUE11 = 0xF5,
  TEXT_ROGUE12 = 0xF6,
  TEXT_COW1 = 0xF7,
  TEXT_COW2 = 0xF8,
  TEXT_NAR1 = 0xF9,
  TEXT_NAR2 = 0xFA,
  TEXT_NAR3 = 0xFB,
  TEXT_NAR4 = 0xFC,
  TEXT_NAR5 = 0xFD,
  TEXT_NAR6 = 0xFE,
  TEXT_NAR7 = 0xFF,
  TEXT_NAR8 = 0x100,
  TEXT_NAR9 = 0x101,
  TEXT_TAVERN0 = 0x102,
  TEXT_INVALID = 0xFFFFFFFF,
};

/* 196 */
struct UniqMonstStruct
{
  char mtype;
  char *mName;
  char *mMode;
  unsigned char mlevel;
  unsigned short mmaxhp;
  char mAi;
  unsigned char mint;
  unsigned char mMinDamage;
  unsigned char mMaxDamage;
  short mMagicRes;
  short mUnqAttr;
  unsigned char mUnqVar1;
  unsigned char mUnqVar2;
  int mtalkmsg;
};

/* 362 */
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,
};

/* 197 */
struct ObjDataStruct
{
  unsigned char oload;
  char ofindex;
  unsigned char ominlvl;
  unsigned char omaxlvl;
  unsigned char olvltype;
  unsigned char otheme;
  unsigned char oquest;
  int oAnimFlag;
  int oAnimDelay;
  int oAnimLen;
  int oAnimWidth;
  int oSolidFlag;
  int oMissFlag;
  int oLightFlag;
  unsigned char oBreak;
  unsigned char oSelFlag;
  int oTrapFlag;
};

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

/* 198 */
struct QuestData
{
  unsigned char _qdlvl;
  unsigned char _qdmultlvl;
  char _qlvlt;
  unsigned char _qdtype;
  unsigned char _qdrnd;
  unsigned char _qslvl;
  unsigned char _qflags; //__declspec(align(4)) 
  int _qdmsg;
  char *_qlstr;
};

/* 364 */
enum spell_id_small
{
  REM4X_SPL_NULL = 0x0,
  REM4X_SPL_FIREBOLT = 0x1,
  REM4X_SPL_HEAL = 0x2,
  REM4X_SPL_LIGHTNING = 0x3,
  REM4X_SPL_FLASH = 0x4,
  REM4X_SPL_IDENTIFY = 0x5,
  REM4X_SPL_FIREWALL = 0x6,
  REM4X_SPL_TOWN = 0x7,
  REM4X_SPL_STONE = 0x8,
  REM4X_SPL_INFRA = 0x9,
  REM4X_SPL_RNDTELEPORT = 0xA,
  REM4X_SPL_MANASHIELD = 0xB,
  REM4X_SPL_FIREBALL = 0xC,
  REM4X_SPL_GUARDIAN = 0xD,
  REM4X_SPL_CHAIN = 0xE,
  REM4X_SPL_WAVE = 0xF,
  REM4X_SPL_DOOMSERP = 0x10,
  REM4X_SPL_BLODRIT = 0x11,
  REM4X_SPL_NOVA = 0x12,
  REM4X_SPL_INVISIBIL = 0x13,
  REM4X_SPL_FLAME = 0x14,
  REM4X_SPL_GOLEM = 0x15,
  REM4X_SPL_BLODBOIL = 0x16,
  REM4X_SPL_TELEPORT = 0x17,
  REM4X_SPL_APOCA = 0x18,
  REM4X_SPL_ETHEREALIZE = 0x19,
  REM4X_SPL_REPAIR = 0x1A,
  REM4X_SPL_RECHARGE = 0x1B,
  REM4X_SPL_DISARM = 0x1C,
  REM4X_SPL_ELEMENT = 0x1D,
  REM4X_SPL_CBOLT = 0x1E,
  REM4X_SPL_HBOLT = 0x1F,
  REM4X_SPL_RESURRECT = 0x20,
  REM4X_SPL_TELEKINESIS = 0x21,
  REM4X_SPL_HEALOTHER = 0x22,
  REM4X_SPL_FLARE = 0x23,
  REM4X_SPL_BONESPIRIT = 0x24,
  REM4X_SPL_INVALID = 0xFF,
};

/* 357 */
enum magic_type
{
  STYPE_FIRE = 0x0,
  STYPE_LIGHTNING = 0x1,
  STYPE_MAGIC = 0x2,
};

/* 361 */
enum _spell_sfx
{
  REM4X_IS_CAST1 = 0x49,
  REM4X_IS_CAST10 = 0x4A,
  REM4X_IS_CAST12 = 0x4B,
  REM4X_IS_CAST2 = 0x4C,
  REM4X_IS_CAST3 = 0x4D,
  REM4X_IS_CAST4 = 0x4E,
  REM4X_IS_CAST5 = 0x4F,
  REM4X_IS_CAST6 = 0x50,
  REM4X_IS_CAST7 = 0x51,
  REM4X_IS_CAST8 = 0x52,
  REM4X_IS_CAST9 = 0x53,
};

/* 199 */
struct SpellData
{
  char sName;
  unsigned char sManaCost;
  char sType;
  char *sNameText;
  char *sSkillText;
  int sBookLvl;
  int sStaffLvl;
  int sTargeted;
  unsigned char sTownSpell;
  int sMinInt;
  char sSFX;
  char sMissiles[3];
  unsigned char sManaAdj;
  unsigned char sMinMana;
  int sStaffMin;
  int sStaffMax;
  int sBookCost;
  int sStaffCost;
};

/* 206 */
struct ActionFrame
{
  unsigned char NFrame;
  unsigned char AFrame;
  unsigned char WFrame;
  unsigned char BFrame;
  unsigned char DFrame;
  unsigned char SFrame;
  unsigned char HFrame;
  unsigned char TNFrame;
  unsigned char TWFrame;
  unsigned char A2Frame;
  unsigned char A3Frame;
};

/* 314 */
struct Coord
{
  unsigned char x;
  unsigned char y;
};

/* 208 */
struct RECT8
{
  Coord x;
  Coord y;
};

/* 209 */
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 = 0xFF,
};

/* 210 */
struct QuestTalkData
{
  int _qinfra;
  int _qblkm;
  int _qgarb;
  int _qzhar;
  int _qveil;
  int _qmod;
  int _qbutch;
  int _qbol;
  int _qblind;
  int _qblood;
  int _qanvil;
  int _qwarlrd;
  int _qking;
  int _qpw;
  int _qbone;
  int _qvb;
};

/* 211 */
struct ShadowStruct
{
  unsigned char strig;
  unsigned char s1;
  unsigned char s2;
  unsigned char s3;
  unsigned char nv1;
  unsigned char nv2;
  unsigned char nv3;
};

/* 213 */
struct POINT32
{
  int x;
  int y;
};

/* 214 */
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,
};

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

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

/* 219 */
struct ItemStruct
{
  int _iSeed;
  short _iCreateInfo;
  int _itype;
  int _ix;
  int _iy;
  int _iAnimFlag;
  int ItemFrame;
  int _iAnimLen;
  int _iAnimFrame;
  int _iAnimWidth;
  int _iAnimXOff;
  int inactive_2C;
  char _iSelFlag;
  int _iPostDraw;
  int _iIdentified;
  char _iMagical;
  char _iName[64];
  char _iIName[64];
  char _iLoc;
  unsigned char _iClass;
  int _iCurs;
  int _ivalue;
  int _iIvalue;
  int _iMinDam;
  int _iMaxDam;
  int _iAC;
  int _iFlags;
  int _iMiscId;
  int _iSpell;
  int _iCharges;
  int _iMaxCharges;
  int _iDurability;
  int _iMaxDur;
  int _iPLDam;
  int _iPLToHit;
  int _iPLAC;
  int _iPLStr;
  int _iPLMag;
  int _iPLDex;
  int _iPLVit;
  int _iPLFR;
  int _iPLLR;
  int _iPLMR;
  int _iPLMana;
  int _iPLHP;
  int _iPLDamMod;
  int _iPLGetHit;
  int _iPLLight;
  char _iSplLvlAdd;
  char _iRequest;
  int _iUid;
  int _iFMinDam;
  int _iFMaxDam;
  int _iLMinDam;
  int _iLMaxDam;
  int _iPLEnAc;
  char _iPrePower;
  char _iSufPower;
  int _iVAdd1;
  int _iVMult1;
  int _iVAdd2;
  int _iVMult2;
  char _iMinStr;
  char _iMinMag;
  char _iMinDex;
  int _iStatFlag;
  int IDidx;
  int inactive_16C;
};

/* 220 */
struct DeadStruct
{
  int _deadAnim[8];
  int _deadFrame;
  int field_24;
  int field_28;
  int _deadtrans;
};

/* 221 */
struct ScreenRow
{
  char col_unused_1[64];
  char pixels[640];
  char col_unused_2[64];
};

/* 222 */
struct Screen
{
  ScreenRow row_unused_1[160];
  ScreenRow row[480];
  ScreenRow row_unused_2[16];
};

/* 223 */
struct Tile
{
  short top;
  short right;
  short left;
  short bottom;
};

/* 224 */
struct DPiece
{
  short blocks;
};

/* 225 */
struct _SNETVERSIONDATA
{
  int size;
  char *versionstring;
  char *executablefile;
  char *originalarchivefile;
  char *patcharchivefile;
};

/* 226 */
struct LightListStruct
{
  int _lx;
  int _ly;
  int _lradius;
  int _lid;
  int _ldel;
  int _lunflag;
  int field_18;
  int _lunx;
  int _luny;
  int _lunr;
  int _xoff;
  int _yoff;
  int _lflags;
};

/* 227 */
struct MissileStruct
{
  int _mitype;
  int _mix;
  int _miy;
  int _mixoff;
  int _miyoff;
  int _mixvel;
  int _miyvel;
  int _misx;
  int _misy;
  int _mitxoff;
  int _mityoff;
  int _mimfnum;
  int _mispllvl;
  int _miDelFlag;
  int _miAnimType;
  int _miAnimFlags;
  int _miAnimCel;
  int _miAnimDelay;
  int _miAnimLen;
  int _miAnimWidth;
  int _miAnimWidth2;
  int _miAnimCnt;
  int _miAnimAdd;
  int _miAnimFrame;
  int _miDrawFlag;
  int _miLightFlag;
  int _miPreFlag;
  int _miUniqTrans;
  int _mirange;
  int _misource;
  int _micaster;
  int _midam;
  int _miHitFlag;
  int _midist;
  int _mlid;
  int _mirnd;
  int _miVar1;
  int _miVar2;
  int _miVar3;
  int _miVar4;
  int _miVar5;
  int _miVar6;
  int _miVar7;
  int _miVar8;
};

/* 347 */
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,
};

/* 228 */
struct MonsterStruct
{
  int _mMTidx;
  int _mmode;
  int _mgoal;
  int _mgoalvar1;
  int _mgoalvar2;
  int _mgoalvar3;
  int field_18;
  int _pathcount;
  int _mx;
  int _my;
  int _mfutx;
  int _mfuty;
  int _moldx;
  int _moldy;
  int _mxoff;
  int _myoff;
  int _mxvel;
  int _myvel;
  int _mdir;
  int _menemy;
  char _menemyx;
  char _menemyy;
  short falign_52;
  int _mAFNum;
  int _mAnimDelay;
  int _mAnimCnt;
  int _mAnimLen;
  int _mAnimFrame;
  int _meflag;
  int _mDelFlag;
  int _mVar1;
  int _mVar2;
  int _mVar3;
  int _mVar4;
  int _mVar5;
  int _mVar6;
  int _mVar7;
  int _mVar8;
  int _mmaxhp;
  int _mhitpoints;
  char _mAi;
  char _mint;
  short falign_9A;
  int _mFlags;
  int _msquelch;
  int falign_A4;
  int _lastx;
  int _lasty;
  int _mRndSeed;
  int _mAISeed;
  int falign_B8;
  char _uniqtype;
  char _uniqtrans;
  char _udeadval;
  char mWhoHit;
  short mLevel;
  short mExp;
  char mHit;
  char mMinDamage;
  char mMaxDamage;
  char mHit2;
  char mMinDamage2;
  char mMaxDamage2;
  char mArmorClass;
  char falign_CB;
  int mMagicRes;
  int mtalkmsg;
  char leader;
  char leaderflag;
  char unpackfilesize;
  char mlid;
  char *mName;
  CMonster *MType;
  MonsterData *MData;
};

/* 268 */
struct AnimStruct
{
  int Frames[9];
  int Rate;
  int Delay;
};

/* 229 */
struct CMonster
{
  char mtype;
  char mPlaceFlags;
  AnimStruct Anims[6];
  TSnd *Snds[8];
  int flags_1;
  int flags_2;
  char mMinHP;
  char mMaxHP;
  int has_special;
  char mAFNum;
  char mdeadval;
  MonsterData *MData;
  void *trans_file;
};

/* 285 */
#pragma pack(push, 1)
/* struct tWAVEFORMATEX
{
  WORD wFormatTag;
  WORD nChannels;
  DWORD nSamplesPerSec;
  DWORD nAvgBytesPerSec;
  WORD nBlockAlign;
  WORD wBitsPerSample;
  WORD cbSize;
}; */
#pragma pack(pop)

/* 284 */
typedef tWAVEFORMATEX WAVEFORMATEX;

/* 283 */
struct TSnd
{
  WAVEFORMATEX fmt;
  short field_12;
  int len;
  int offset;
  int sound_path;
  IDirectSoundBuffer *DSB;
  int start_tc;
};

/* 259 */
/* struct IDirectSoundBuffer
{
  struct IDirectSoundBuffer::IDirectSoundBufferVtbl *lpVtbl;
}; */

/* 232 */
struct DObjectStr
{
  char bCmd;
};

/* 233 __declspec(align(1))*/
struct  DMonsterStr
{
  char _mx;
  char _my;
  char _mdir;
  char _menemy;
  char _mactive;
  int _mhitpoints;
};

/* 302 __declspec(align(2))*/
struct  TCmdPItem
{
  char bCmd;
  char x;
  char y;
  short wIndx;
  short wCI;
  int dwSeed;
  char bId;
  char bDur;
  char bMDur;
  char bCh;
  char bMCh;
  short wValue;
  int dwBuff;
};

/* 234 __declspec(align(1))*/
struct  DLevel
{
  TCmdPItem item[127];
  DObjectStr object[127];
  DMonsterStr monster[200];
};

/* 316 */
struct DPortal
{
  char x;
  char y;
  char level;
  char ltype;
  char setlvl;
};

/* 317 */
struct MultiQuests
{
  char qstate;
  char qlog;
  char qvar1;
};

/* 235 */
struct DJunk
{
  DPortal portal[4];
  MultiQuests quests[4];
};

/* 236  __declspec(align(1)) */
struct PkItemStruct
{
  int iSeed;
  short iCreateInfo;
  short idx;
  char bId;
  char bDur;
  char bMDur;
  char bCh;
  char bMCh;
  short wValue;
  int dwBuff;
};

/* 237 __declspec(align(2)) */
struct PkPlayerStruct
{
  FILETIME archiveTime;
  char destAction;
  char destParam1;
  char destParam2;
  char plrlevel;
  char px;
  char py;
  char targx;
  char targy;
  char pName[32];
  char pClass;
  char pBaseStr;
  char pBaseMag;
  char pBaseDex;
  char pBaseVit;
  char pLevel;
  char pStatPts;
  int pExperience;
  int pGold;
  int pHPBase;
  int pMaxHPBase;
  int pManaBase;
  int pMaxManaBase;
  char pSplLvl[37];
  int pMemSpells;
  int pMemSpells2;
  PkItemStruct InvBody[7];
  PkItemStruct InvList[40];
  char InvGrid[40];
  char _pNumInv;
  PkItemStruct SpdList[8];
  char pTownWarps;
  char pDungMsgs;
  char pLvlLoad;
  char pBattleNet;
  char pManaShield;
  char bReserved[3];
  short wReserved[8];
  int pDiabloKillLevel;
  int dwReserved[7];
};

/* 238 */
struct ObjectStruct
{
  int _otype;
  int _ox;
  int _oy;
  int _oLight;
  int _oAnimFlag;
  int _oAnimCel;
  int _oAnimDelay;
  int _oAnimCnt;
  int _oAnimLen;
  int _oAnimFrame;
  int _oAnimWidth;
  int _oAnimWidth2;
  int _oDelFlag;
  int _oBreak;
  int _oSolidFlag;
  int _oMissFlag;
  int _oSelFlag;
  int _oPreFlag;
  int _oTrapFlag;
  int _oDoorFlag;
  int _olid;
  int _oRndSeed;
  int _oVar1;
  int _oVar2;
  int _oVar3;
  int _oVar4;
  int _oVar5;
  int _oVar6;
  int _oVar7;
  int _oVar8;
};

/* 239 */
typedef tagPALETTEENTRY PALETTEENTRY;

/* 240 */
struct PATHNODE
{
  char f;
  char h;
  short g;
  int x;
  int y;
  struct PATHNODE *Parent;
  struct PATHNODE *Child[8];
  struct PATHNODE *NextNode;
};

/* 346 */
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,
};

/* 241 */
struct PlayerStruct
{
  int _pmode;
  char walkpath[25];
  char plractive[3];
  int destAction;
  int destParam1;
  int destParam2;
  int destParam3;
  int destParam4;
  int plrlevel;
  int WorldX;
  int WorldY;
  int _px;
  int _py;
  int _ptargx;
  int _ptargy;
  int _pownerx;
  int _pownery;
  int _poldx;
  int _poldy;
  int _pxoff;
  int _pyoff;
  int _pxvel;
  int _pyvel;
  int _pdir;
  int _nextdir;
  int _pgfxnum;
  int _pAnimData;
  int _pAnimDelay;
  int _pAnimCnt;
  int _pAnimLen;
  int _pAnimFrame;
  int _pAnimWidth;
  int _pAnimWidth2;
  int _peflag;
  int _plid;
  int _pvid;
  int _pSpell;
  char _pSplType;
  char _pSplFrom;
  int _pTSpell;
  int _pTSplType;
  int _pRSpell;
  int _pRSplType;
  int _pSBkSpell;
  char _pSBkSplType;
  char _pSplLvl[64];
  int _pMemSpells[2]; // __declspec(align(8)) 
  int _pAblSpells[2];
  int _pScrlSpells[2];
  int _pSpellFlags;
  int _pSplHotKey[4];
  char _pSplTHotKey[4];
  int _pwtype;
  char _pBlockFlag;
  char _pInvincible;
  char _pLightRad;
  char _pLvlChanging;
  char _pName[32];
  int _pClass;
  int _pStrength;
  int _pBaseStr;
  int _pMagic;
  int _pBaseMag;
  int _pDexterity;
  int _pBaseDex;
  int _pVitality;
  int _pBaseVit;
  int _pStatPts;
  int _pDamageMod;
  int _pBaseToBlk;
  int _pHPBase;
  int _pMaxHPBase;
  int _pHitPoints;
  int _pMaxHP;
  int _pHPPer;
  int _pManaBase;
  int _pMaxManaBase;
  int _pMana;
  int _pMaxMana;
  int _pManaPer;
  char _pLevel;
  char _pMaxLvl;
  int _pExperience;
  int _pMaxExp;
  int _pNextExper;
  char _pArmorClass;
  char _pMagResist;
  char _pFireResist;
  char _pLghtResist;
  int _pGold;
  int _pInfraFlag;
  int _pVar1;
  int _pVar2;
  int _pVar3;
  int _pVar4;
  int _pVar5;
  int _pVar6;
  int _pVar7;
  int _pVar8;
  char _pLvlVisited[17];
  char _pSLvlVisited[10];
  char gap20F[9];
  int _pGFXLoad;
  int _peqN[8];
  int _pNFrames;
  int _pNFNum;
  int _peqW[8];
  int _pWFrames;
  int _pWFNum;
  int _peqA[8];
  int _pAFrames;
  int frame_9_unk;
  int _pAFNum;
  int _peqS2_LM[8];
  int _peqS1_FM[8];
  int _peqS3_QM[8];
  int _pSFrames;
  int frame_A_unk;
  int _pSFNum;
  int _peqH[8];
  int _pHFrames;
  int _pHFNum;
  int _peqD[8];
  int _pDFrames;
  int _pDFNum;
  int _peqB[8];
  int _pBFrames;
  int _pBFNum;
  ItemStruct InvBody[7];
  ItemStruct InvList[40];
  int _pNumInv;
  char InvGrid[40];
  ItemStruct SpdList[8];
  ItemStruct HoldItem;
  int _pIMinDam;
  int _pIMaxDam;
  int _pIAC;
  int _pIBonusDam;
  int _pIBonusToHit;
  int _pIBonusAC;
  int _pIBonusDamMod;
  int _pISpells[2]; //__declspec(align(8)) 
  int _pIFlags;
  int _pIGetHit;
  char _pISplLvlAdd;
  char _pISplCost;
  int _pISplDur;
  int _pIEnAc;
  int _pIFMinDam;
  int _pIFMaxDam;
  int _pILMinDam;
  int _pILMaxDam;
  int _pOilType;
  char pTownWarps;
  char pDungMsgs;
  char pLvlLoad;
  char pBattleNet;
  char pManaShield;
  char bReserved[3];
  short wReserved[8];
  int pDiabloKillLevel;
  int dwReserved[7];
  void *pSFrame;
  void *pWFrame;
  void *pAFrame;
  void *pLFrame;
  void *pFFrame;
  void *pQFrame;
  void *pHFrame;
  void *pDFrame;
  void *pBFrame;
  int unused_54D4;
};

/* 242 */
struct QuestStruct
{
  char _qlevel;
  char _qtype;
  char _qactive;
  char _qlvltype;
  int _qtx;
  int _qty;
  char _qslvl;
  char _qidx;
  char _qmsg;
  char _qvar1;
  char _qvar2;
  int _qlog;
};

/* 243 */
typedef _DDSURFACEDESC DDSURFACEDESC;

/* 245 */
/* union _DDSURFACEDESC::$091DBF7D405BE25E65B16620C008128B
{
  LONG lPitch;
  DWORD dwLinearSize;
}; */

/* 246 */
/* union _DDSURFACEDESC::$9AB659F8D6A45F8C7834A76B9C40973B
{
  DWORD dwMipMapCount;
  DWORD dwZBufferBitDepth;
  DWORD dwRefreshRate;
}; */

/* 248 */
/* struct _DDCOLORKEY
{
  DWORD dwColorSpaceLowValue;
  DWORD dwColorSpaceHighValue;
}; */

/* 247 */
/* typedef _DDCOLORKEY DDCOLORKEY;
 */
/* 251 */


/* 250 */
/* struct _DDPIXELFORMAT
{
  DWORD dwSize;
  DWORD dwFlags;
  DWORD dwFourCC;
  union
  {
    DWORD dwRGBBitCount;
    DWORD dwYUVBitCount;
    DWORD dwZBufferBitDepth;
    DWORD dwAlphaBitDepth;
  };
  union
  {
    DWORD dwRBitMask;
    DWORD dwYBitMask;
  };
  union
  {
    DWORD dwGBitMask;
    DWORD dwUBitMask;
  };
  union
  {
    DWORD dwBBitMask;
    DWORD dwVBitMask;
  };
  union
  {
    DWORD dwRGBAlphaBitMask;
    DWORD dwYUVAlphaBitMask;
    DWORD dwRGBZBitMask;
    DWORD dwYUVZBitMask;
  };
}; */

/* 249 */
typedef _DDPIXELFORMAT DDPIXELFORMAT;

/* 257 */
/* struct _DDSCAPS
{
  DWORD dwCaps;
}; */

/* 256 */
/* typedef _DDSCAPS DDSCAPS;
 */
/* 244 */
/* struct _DDSURFACEDESC
{
  DWORD dwSize;
  DWORD dwFlags;
  DWORD dwHeight;
  DWORD dwWidth;
  union
  {
    LONG lPitch;
    DWORD dwLinearSize;
  };
  DWORD dwBackBufferCount;
  union
  {
    DWORD dwMipMapCount;
    DWORD dwZBufferBitDepth;
    DWORD dwRefreshRate;
  };
  DWORD dwAlphaBitDepth;
  DWORD dwReserved;
  LPVOID lpSurface;
  DDCOLORKEY ddckCKDestOverlay;
  DDCOLORKEY ddckCKDestBlt;
  DDCOLORKEY ddckCKSrcOverlay;
  DDCOLORKEY ddckCKSrcBlt;
  DDPIXELFORMAT ddpfPixelFormat;
  DDSCAPS ddsCaps;
}; */

/* 258 */
struct SHA1Context
{
  int state[5];
  int count[2];
  char buffer[64];
};

/* 260 */
/* struct IDirectSound
{
  struct IDirectSound::IDirectSoundVtbl *lpVtbl;
};
 */
/* 261 */
struct ThemeStruct
{
  int ttype;
  int ttval;
};

/* 262 */
struct TMsgHeader
{
  char next;
  char start_tc;
  char len;
};

/* 263 */
struct TMsg
{
  TMsgHeader hdr;
  char data;
};

/* 265 */
struct TNQ
{
  char _qsttype;
  char _qstmsg;
  char _qstmsgact;
};

/* 264 */
struct TownerStruct
{
  int _tmode;
  int _ttype;
  int _tx;
  int _ty;
  int _txoff;
  int _tyoff;
  int _txvel;
  int _tyvel;
  int _tdir;
  void *_tAnimCel;
  int _tAnimDelay;
  int _tAnimCnt;
  int _tAnimLen;
  int _tAnimFrame;
  int _tAnimFrameCnt;
  int _tAnimOrder;
  int _tAnimWidth;
  int _tAnimWidth2;
  int _tTenPer;
  int _teflag;
  int _tbtcnt;
  int _tSelFlag;
  int _tMsgSaid;
  TNQ qsts[16];
  int _tSeed;
  int _tVar1;
  int _tVar2;
  int _tVar3;
  int _tVar4;
  char _tName[32];
  int _tNAnim[8];
  int _tNFrames;
  char *_tNData;
};

/* 266 */
struct _SNETUIDATA
{
  int size;
  int uiflags;
  HWND parentwindow;
  void (__cdecl *artcallback)();
  void (__cdecl *authcallback)();
  void (__cdecl *createcallback)();
  void (__cdecl *drawdesccallback)();
  void (__cdecl *selectedcallback)();
  void (__cdecl *messageboxcallback)();
  void (__cdecl *soundcallback)();
  void (__cdecl *statuscallback)();
  void (__cdecl *getdatacallback)();
  void (__cdecl *categorycallback)();
  void (__cdecl *field_34)();
  void (__cdecl *field_38)();
  void (__cdecl *profilecallback)();
  void (__cdecl *profilegetstring)();
  void (__cdecl *profiledraw)();
  void (__cdecl *selecthero)();
  void (__cdecl *createhero)();
};

/* 267 */
struct _SNETPROGRAMDATA
{
  int size;
  char *programname;
  char *programdescription;
  int programid;
  int versionid;
  int reserved1;
  int maxplayers;
  int multi_seed;
  void *initdata;
  int initdatabytes;
  void *reserved2;
  int optcategorybits;
  int reserved3;
  int reserved4;
  int languageid;
};

/* 269 */
struct _uiheroinfo
{
  _uiheroinfo *next;
  char name[16];
  short level;
  char heroclass;
  char herorank;
  short strength;
  short magic;
  short dexterity;
  short vitality;
  int gold;
  int hassaved;
  int spawned;
};

/* 270 */
enum template_id
{
  TEMPLATE_ERR_DX = 0x68,
  TEMPLATE_ERR_NOMEMORY = 0x69,
  TEMPLATE_ERR_NOFILE = 0x6A,
  TEMPLATE_ERR_DDRAW = 0x6B,
  TEMPLATE_ERR_DSOUND = 0x6C,
  TEMPLATE_ERR_DISKSPACE = 0x6E,
  TEMPLATE_ERR_VIDEOMODE = 0x6F,
  TEMPLATE_ERR_INSERTCD = 0x70,
  TEMPLATE_ERR_RESTRICTED = 0x71,
  TEMPLATE_ERR_READONLY = 0x72,
};

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

/* 272 */
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,
};

/* 273 */
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,
};

/* 274 */
enum interface_mode
{
  WM_DIABNEXTLVL = 0x402,
  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,
  WM_DIAVNEWLVL = 0x40D,
};

/* 275 */
/* struct MenuItem
{
  MenuItemVtbl *lpVtbl;
}; */

/* 276 */
typedef tagVS_FIXEDFILEINFO VS_FIXEDFILEINFO;

/* 277 */
/* struct tagVS_FIXEDFILEINFO
{
  DWORD dwSignature;
  DWORD dwStrucVersion;
  DWORD dwFileVersionMS;
  DWORD dwFileVersionLS;
  DWORD dwProductVersionMS;
  DWORD dwProductVersionLS;
  DWORD dwFileFlagsMask;
  DWORD dwFileFlags;
  DWORD dwFileOS;
  DWORD dwFileType;
  DWORD dwFileSubtype;
  DWORD dwFileDateMS;
  DWORD dwFileDateLS;
}; */

/* 278 */
struct _BLOCKENTRY
{
  int offset;
  int sizealloc;
  int sizefile;
  int flags;
};

/* 279 __declspec(align(2)) */
struct TCmdGItem
{
  char bCmd;
  char bMaster;
  char bPnum;
  char bCursitem;
  char bLevel;
  char x;
  char y;
  short wIndx;
  short wCI;
  int dwSeed;
  char bId;
  char bDur;
  char bMDur;
  char bCh;
  char bMCh;
  short wValue;
  int dwBuff;
  int dwTime;
};

/* 280 */
struct TCmdLoc
{
  char bCmd;
  char x;
  char y;
};

/* 281 __declspec(align(1)) */
struct TCmdParam1
{
  char bCmd;
  short wParam1;
};

/* 282 __declspec(align(1)) */
struct TCmdLocParam1
{
  char bCmd;
  char x;
  char y;
  short wParam1;
};

/* 286 __declspec(align(1)) */
struct TPktHdr
{
  char px;
  char py;
  char targx;
  char targy;
  int php;
  int pmhp;
  char bstr;
  char bmag;
  char bdex;
  short wCheck;
  short wLen;
};

/* 287 */
struct _SNETEVENT
{
  int eventid;
  int playerid;
  void *data;
  int databytes;
};

/* 288 */
enum game_info
{
  GAME_INFO_NAME = 1,
  GAME_INFO_PASS = 2,
};

/* 289 */
struct _SNETPLAYERDATA
{
  int size;
  char *playername;
  char *playerdescription;
  int field_C;
};

/* 290 */
struct _SNETCAPS
{
  int size;
  int flags;
  int maxmessagesize;
  int maxqueuesize;
  int maxplayers;
  int bytessec;
  int latencyms;
  int defaultturnssec;
  int defaultturnsintransit;
};

/* 293 */
struct TMPQHeader
{
  int dwID;
  int dwHeaderSize;
  int dwArchiveSize;
  short wFormatVersion;
  short wSectorSize;
  int dwHashTablePos;
  int dwBlockTablePos;
  int dwHashTableSize;
  int dwBlockTableSize;
  char field_20[72];
};

/* 294 */
struct _uidefaultstats
{
  short strength;
  short magic;
  short dexterity;
  short vitality;
};

/* 295 __declspec(align(1)) */
struct TCmdLocParam2
{
  char bCmd;
  char x;
  char y;
  short wParam1;
  short wParam2;
};

/* 296 __declspec(align(1)) */
struct TCmdLocParam3
{
  char bCmd;
  char x;
  char y;
  short wParam1;
  short wParam2;
  short wParam3;
};

/* 297 __declspec(align(1)) */
struct TCmdParam2
{
  char bCmd;
  short wParam1;
  short wParam2;
};

/* 298 __declspec(align(1)) */
struct TCmdParam3
{
  char bCmd;
  short wParam1;
  short wParam2;
  short wParam3;
};

/* 299 */
struct TCmd
{
  char bCmd;
};

/* 300 __declspec(align(2)) */
struct TCmdGolem
{
  char bCmd;
  char _mx;
  char _my;
  char _mdir;
  char _menemy;
  int _mhitpoints;
  char _currlevel;
};

/* 301 */
struct TCmdQuest
{
  char bCmd;
  char q;
  char qstate;
  char qlog;
  char qvar1;
};

/* 303 __declspec(align(1)) */
struct TCmdChItem
{
  char bCmd;
  char bLoc;
  short wIndx;
  short wCI;
  int dwSeed;
  char bId;
};

/* 304 */
struct TCmdDelItem
{
  char bCmd;
  char bLoc;
};

/* 305 __declspec(align(2)) */
struct TCmdDamage
{
  char bCmd;
  char bPlr;
  int dwDam;
};

/* 306 */
struct TFakeCmdPlr
{
  char bCmd;
  char bPlr;
};

/* 307 __declspec(align(2)) */
struct TFakeDropPlr
{
  char bCmd;
  char bPlr;
  int dwReason;
};

/* 308 */
struct TCmdString
{
  char bCmd;
  char str[80];
};

/* 309 __declspec(align(1)) */
struct TCmdPlrInfoHdr
{
  char bCmd;
  short wOffset;
  short wBytes;
};

/* 310 */
struct PortalStruct
{
  int open;
  int x;
  int y;
  int level;
  int ltype;
  int setlvl;
};

/* 313 */
struct CircleCoord
{
  unsigned char n_1;
  Coord delta_1[1];
  unsigned char n_4;
  Coord delta_4[4];
  unsigned char n_16;
  Coord delta_16[16];
  unsigned char n_24;
  Coord delta_24[24];
  unsigned char n_32;
  Coord delta_32[32];
  unsigned char n_40;
  Coord delta_40[40];
  unsigned char n_48;
  Coord delta_48[48];
  unsigned char n_56;
  Coord delta_56[56];
  unsigned char n_64;
  Coord delta_64[64];
  unsigned char n_72;
  Coord delta_72[72];
  unsigned char n_80;
  Coord delta_80[80];
  unsigned char n_88;
  Coord delta_88[88];
  unsigned char n_96;
  Coord delta_96[96];
  unsigned char n_104;
  Coord delta_104[104];
  unsigned char n_112;
  Coord delta_112[112];
  unsigned char n_120;
  Coord delta_120[120];
  unsigned char n_128;
  Coord delta_128[128];
  unsigned char n_136;
  Coord delta_136[136];
  unsigned char n_144;
  Coord delta_144[144];
};

/* 315 */
struct TriggerStruct
{
  int _tx;
  int _ty;
  int _tmsg;
  int _tlvl;
};

/* 318 */
struct THEME_LOC
{
  int x;
  int y;
  int ttval;
  int width;
  int height;
};

/* 320 */
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 = 0xFFFFFFFF,
};

/* 322 */
enum _cmd_id
{
  CMD_STAND = 0,
  CMD_WALKXY = 1,
  CMD_ACK_PLRINFO = 2,
  CMD_ADDSTR = 3,
  CMD_ADDMAG = 4,
  CMD_ADDDEX = 5,
  CMD_ADDVIT = 6,
  CMD_SBSPELL = 7,
  CMD_GETITEM = 8,
  CMD_AGETITEM = 9,
  CMD_PUTITEM = 10,
  CMD_RESPAWNITEM = 11,
  CMD_ATTACKXY = 12,
  CMD_RATTACKXY = 13,
  CMD_SPELLXY = 14,
  CMD_TSPELLXY = 15,
  CMD_OPOBJXY = 16,
  CMD_DISARMXY = 17,
  CMD_ATTACKID = 18,
  CMD_ATTACKPID = 19,
  CMD_RATTACKID = 20,
  CMD_RATTACKPID = 21,
  CMD_SPELLID = 22,
  CMD_SPELLPID = 23,
  CMD_TSPELLID = 24,
  CMD_TSPELLPID = 25,
  CMD_RESURRECT = 26,
  CMD_OPOBJT = 27,
  CMD_KNOCKBACK = 28,
  CMD_TALKXY = 29,
  CMD_NEWLVL = 30,
  CMD_WARP = 31,
  CMD_CHEAT_EXPERIENCE = 32,
  CMD_CHEAT_SPELL_LEVEL = 33,
  CMD_DEBUG = 34,
  CMD_SYNCDATA = 35,
  CMD_MONSTDEATH = 36,
  CMD_MONSTDAMAGE = 37,
  CMD_PLRDEAD = 38,
  CMD_REQUESTGITEM = 39,
  CMD_REQUESTAGITEM = 40,
  CMD_GOTOGETITEM = 41,
  CMD_GOTOAGETITEM = 42,
  CMD_OPENDOOR = 43,
  CMD_CLOSEDOOR = 44,
  CMD_OPERATEOBJ = 45,
  CMD_PLROPOBJ = 46,
  CMD_BREAKOBJ = 47,
  CMD_CHANGEPLRITEMS = 48,
  CMD_DELPLRITEMS = 49,
  CMD_PLRDAMAGE = 50,
  CMD_PLRLEVEL = 51,
  CMD_DROPITEM = 52,
  CMD_PLAYER_JOINLEVEL = 53,
  CMD_SEND_PLRINFO = 54,
  CMD_SATTACKXY = 55,
  CMD_ACTIVATEPORTAL = 56,
  CMD_DEACTIVATEPORTAL = 57,
  CMD_DLEVEL_0 = 58,
  CMD_DLEVEL_1 = 59,
  CMD_DLEVEL_2 = 60,
  CMD_DLEVEL_3 = 61,
  CMD_DLEVEL_4 = 62,
  CMD_DLEVEL_5 = 63,
  CMD_DLEVEL_6 = 64,
  CMD_DLEVEL_7 = 65,
  CMD_DLEVEL_8 = 66,
  CMD_DLEVEL_9 = 67,
  CMD_DLEVEL_10 = 68,
  CMD_DLEVEL_11 = 69,
  CMD_DLEVEL_12 = 70,
  CMD_DLEVEL_13 = 71,
  CMD_DLEVEL_14 = 72,
  CMD_DLEVEL_15 = 73,
  CMD_DLEVEL_16 = 74,
  CMD_DLEVEL_JUNK = 75,
  CMD_DLEVEL_END = 76,
  CMD_HEALOTHER = 77,
  CMD_STRING = 78,
  CMD_SETSTR = 79,
  CMD_SETMAG = 80,
  CMD_SETDEX = 81,
  CMD_SETVIT = 82,
  CMD_RETOWN = 83,
  CMD_SPELLXYD = 84,
  CMD_ITEMEXTRA = 85,
  CMD_SYNCPUTITEM = 86,
  CMD_KILLGOLEM = 87,
  CMD_SYNCQUEST = 88,
  CMD_ENDSHIELD = 89,
  CMD_AWAKEGOLEM = 90,
  CMD_NOVA = 91,
  CMD_SETSHIELD = 92,
  CMD_REMSHIELD = 93,
  FAKE_CMD_SETID = 94,
  FAKE_CMD_DROPID = 95,
  NUM_CMDS = 96,
};

/* 327 */
struct STextStruct
{
  int _sx;
  int _syoff;
  char _sstr[128];
  int _sjust;
  int _sclr;
  int _sline;
  int _ssel;
  int _sval;
};

/* 328 */
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,
};

/* 329 */
struct HALLNODE
{
  int nHallx1;
  int nHally1;
  int nHallx2;
  int nHally2;
  int nHalldir;
  HALLNODE *pNext;
};

/* 330 */
struct ROOMNODE
{
  int nRoomx1;
  int nRoomy1;
  int nRoomx2;
  int nRoomy2;
  int nRoomDest;
};

/* 331 */
struct LocalLevel
{
  char automapsv[40][40];
};

/* 332 */
struct TMegaPkt
{
  TMegaPkt *pNext;
  int dwSpaceLeft;
  char data[32000];
};

/* 333 */
struct ScrollStruct
{
  int _sxoff;
  int _syoff;
  int _sdx;
  int _sdy;
  int _sdir;
};

/* 334 */
struct _gamedata
{
  int dwSeed;
  int bDiff;
};

/* 335 */
struct TPkt
{
  TPktHdr hdr;
  char body[493];
};

/* 336 */
enum _music_id
{
  TMUSIC_TOWN = 0,
  TMUSIC_L1 = 1,
  TMUSIC_L2 = 2,
  TMUSIC_L3 = 3,
  TMUSIC_L4 = 4,
  TMUSIC_INTRO = 5,
  NUM_MUSIC = 6,
};

/* 337 */
struct DIABFILE
{
  int _cnt;
  char *_ptr;
  char *_base;
  int _bufsiz;
  int _flag;
  int _file;
  char *_name_to_remove;
};

/* 338 */
typedef pcmwaveformat_tag PCMWAVEFORMAT;

/* 341 */
#pragma pack(push, 1)
/* struct waveformat_tag
{
  WORD wFormatTag;
  WORD nChannels;
  DWORD nSamplesPerSec;
  DWORD nAvgBytesPerSec;
  WORD nBlockAlign;
}; */
#pragma pack(pop)

/* 340 */
typedef waveformat_tag WAVEFORMAT;

/* 339 */
#pragma pack(push, 1)
/* struct pcmwaveformat_tag
{
  WAVEFORMAT wf;
  WORD wBitsPerSample;
}; */
#pragma pack(pop)

/* 342 */
struct _plrmsg
{
  int time;
  char player;
  char msg[144];
  char falign_95[3];
};

/* 343 */
enum _copyprot_results
{
  COPYPROT_OK = 1,
  COPYPROT_CANCEL = 2,
};

/* 344 */
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,
};

/* 345 */
struct ItemGetRecordStruct
{
  int nSeed;
  short wCI;
  int nIndex;
  int dwTimestamp;
};

/* 348 */
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,
};

/* 349 */
enum attribute_id
{
  ATTRIB_STR = 0,
  ATTRIB_MAG = 1,
  ATTRIB_DEX = 2,
  ATTRIB_VIT = 3,
};

/* 350 */
/* enum _virtual_keys
{
  VK_LBUTTON = 0x1,
  VK_RBUTTON = 0x2,
  VK_CANCEL = 0x3,
  VK_MBUTTON = 0x4,
  VK_BACK = 0x8,
  VK_TAB = 0x9,
  VK_CLEAR = 0xC,
  VK_RETURN = 0xD,
  VK_SHIFT = 0x10,
  VK_CONTROL = 0x11,
  VK_MENU = 0x12,
  VK_PAUSE = 0x13,
  VK_CAPITAL = 0x14,
  VK_KANA = 0x15,
  VK_JUNJA = 0x17,
  VK_FINAL = 0x18,
  VK_KANJI = 0x19,
  VK_ESCAPE = 0x1B,
  VK_CONVERT = 0x1C,
  VK_NONCONVERT = 0x1D,
  VK_ACCEPT = 0x1E,
  VK_MODECHANGE = 0x1F,
  VK_SPACE = 0x20,
  VK_PRIOR = 0x21,
  VK_NEXT = 0x22,
  VK_END = 0x23,
  VK_HOME = 0x24,
  VK_LEFT = 0x25,
  VK_UP = 0x26,
  VK_RIGHT = 0x27,
  VK_DOWN = 0x28,
  VK_SELECT = 0x29,
  VK_PRINT = 0x2A,
  VK_EXECUTE = 0x2B,
  VK_SNAPSHOT = 0x2C,
  VK_INSERT = 0x2D,
  VK_DELETE = 0x2E,
  VK_HELP = 0x2F,
  VK_LWIN = 0x5B,
  VK_RWIN = 0x5C,
  VK_APPS = 0x5D,
  VK_NUMPAD0 = 0x60,
  VK_NUMPAD1 = 0x61,
  VK_NUMPAD2 = 0x62,
  VK_NUMPAD3 = 0x63,
  VK_NUMPAD4 = 0x64,
  VK_NUMPAD5 = 0x65,
  VK_NUMPAD6 = 0x66,
  VK_NUMPAD7 = 0x67,
  VK_NUMPAD8 = 0x68,
  VK_NUMPAD9 = 0x69,
  VK_MULTIPLY = 0x6A,
  VK_ADD = 0x6B,
  VK_SEPARATOR = 0x6C,
  VK_SUBTRACT = 0x6D,
  VK_DECIMAL = 0x6E,
  VK_DIVIDE = 0x6F,
  VK_F1 = 0x70,
  VK_F2 = 0x71,
  VK_F3 = 0x72,
  VK_F4 = 0x73,
  VK_F5 = 0x74,
  VK_F6 = 0x75,
  VK_F7 = 0x76,
  VK_F8 = 0x77,
  VK_F9 = 0x78,
  VK_F10 = 0x79,
  VK_F11 = 0x7A,
  VK_F12 = 0x7B,
  VK_F13 = 0x7C,
  VK_F14 = 0x7D,
  VK_F15 = 0x7E,
  VK_F16 = 0x7F,
  VK_F17 = 0x80,
  VK_F18 = 0x81,
  VK_F19 = 0x82,
  VK_F20 = 0x83,
  VK_F21 = 0x84,
  VK_F22 = 0x85,
  VK_F23 = 0x86,
  VK_F24 = 0x87,
  VK_NUMLOCK = 0x90,
  VK_SCROLL = 0x91,
  VK_LSHIFT = 0xA0,
  VK_RSHIFT = 0xA1,
  VK_LCONTROL = 0xA2,
  VK_RCONTROL = 0xA3,
  VK_LMENU = 0xA4,
  VK_RMENU = 0xA5,
  VK_PROCESSKEY = 0xE5,
  VK_ATTN = 0xF6,
  VK_CRSEL = 0xF7,
  VK_EXSEL = 0xF8,
  VK_EREOF = 0xF9,
  VK_PLAY = 0xFA,
  VK_ZOOM = 0xFB,
  VK_NONAME = 0xFC,
  VK_PA1 = 0xFD,
  VK_OEM_CLEAR = 0xFE,
}; */

/* 351 */
/* enum _window_messages
{
  WM_NULL = 0x0,
  WM_CREATE = 0x1,
  WM_DESTROY = 0x2,
  WM_MOVE = 0x3,
  WM_SIZE = 0x5,
  WM_ACTIVATE = 0x6,
  WM_SETFOCUS = 0x7,
  WM_KILLFOCUS = 0x8,
  WM_ENABLE = 0xA,
  WM_SETREDRAW = 0xB,
  WM_SETTEXT = 0xC,
  WM_GETTEXT = 0xD,
  WM_GETTEXTLENGTH = 0xE,
  WM_PAINT = 0xF,
  WM_CLOSE = 0x10,
  WM_QUERYENDSESSION = 0x11,
  WM_QUIT = 0x12,
  WM_QUERYOPEN = 0x13,
  WM_ERASEBKGND = 0x14,
  WM_SYSCOLORCHANGE = 0x15,
  WM_ENDSESSION = 0x16,
  WM_SHOWWINDOW = 0x18,
  WM_WININICHANGE = 0x1A,
  WM_DEVMODECHANGE = 0x1B,
  WM_ACTIVATEAPP = 0x1C,
  WM_FONTCHANGE = 0x1D,
  WM_TIMECHANGE = 0x1E,
  WM_CANCELMODE = 0x1F,
  WM_SETCURSOR = 0x20,
  WM_MOUSEACTIVATE = 0x21,
  WM_CHILDACTIVATE = 0x22,
  WM_QUEUESYNC = 0x23,
  WM_GETMINMAXINFO = 0x24,
  WM_PAINTICON = 0x26,
  WM_ICONERASEBKGND = 0x27,
  WM_NEXTDLGCTL = 0x28,
  WM_SPOOLERSTATUS = 0x2A,
  WM_DRAWITEM = 0x2B,
  WM_MEASUREITEM = 0x2C,
  WM_DELETEITEM = 0x2D,
  WM_VKEYTOITEM = 0x2E,
  WM_CHARTOITEM = 0x2F,
  WM_SETFONT = 0x30,
  WM_GETFONT = 0x31,
  WM_SETHOTKEY = 0x32,
  WM_GETHOTKEY = 0x33,
  WM_QUERYDRAGICON = 0x37,
  WM_COMPAREITEM = 0x39,
  WM_GETOBJECT = 0x3D,
  WM_COMPACTING = 0x41,
  WM_COMMNOTIFY = 0x44,
  WM_WINDOWPOSCHANGING = 0x46,
  WM_WINDOWPOSCHANGED = 0x47,
  WM_POWER = 0x48,
  WM_COPYDATA = 0x4A,
  WM_CANCELJOURNAL = 0x4B,
  WM_NOTIFY = 0x4E,
  WM_INPUTLANGCHANGEREQUEST = 0x50,
  WM_INPUTLANGCHANGE = 0x51,
  WM_TCARD = 0x52,
  WM_HELP = 0x53,
  WM_USERCHANGED = 0x54,
  WM_NOTIFYFORMAT = 0x55,
  WM_CONTEXTMENU = 0x7B,
  WM_STYLECHANGING = 0x7C,
  WM_STYLECHANGED = 0x7D,
  WM_DISPLAYCHANGE = 0x7E,
  WM_GETICON = 0x7F,
  WM_SETICON = 0x80,
  WM_NCCREATE = 0x81,
  WM_NCDESTROY = 0x82,
  WM_NCCALCSIZE = 0x83,
  WM_NCHITTEST = 0x84,
  WM_NCPAINT = 0x85,
  WM_NCACTIVATE = 0x86,
  WM_GETDLGCODE = 0x87,
  WM_SYNCPAINT = 0x88,
  WM_NCMOUSEMOVE = 0xA0,
  WM_NCLBUTTONDOWN = 0xA1,
  WM_NCLBUTTONUP = 0xA2,
  WM_NCLBUTTONDBLCLK = 0xA3,
  WM_NCRBUTTONDOWN = 0xA4,
  WM_NCRBUTTONUP = 0xA5,
  WM_NCRBUTTONDBLCLK = 0xA6,
  WM_NCMBUTTONDOWN = 0xA7,
  WM_NCMBUTTONUP = 0xA8,
  WM_NCMBUTTONDBLCLK = 0xA9,
  WM_KEYFIRST = 0x100,
  WM_KEYDOWN = 0x100,
  WM_KEYUP = 0x101,
  WM_CHAR = 0x102,
  WM_DEADCHAR = 0x103,
  WM_SYSKEYDOWN = 0x104,
  WM_SYSKEYUP = 0x105,
  WM_SYSCHAR = 0x106,
  WM_SYSDEADCHAR = 0x107,
  WM_KEYLAST = 0x108,
  WM_IME_STARTCOMPOSITION = 0x10D,
  WM_IME_ENDCOMPOSITION = 0x10E,
  WM_IME_COMPOSITION = 0x10F,
  WM_IME_KEYLAST = 0x10F,
  WM_INITDIALOG = 0x110,
  WM_COMMAND = 0x111,
  WM_SYSCOMMAND = 0x112,
  WM_TIMER = 0x113,
  WM_HSCROLL = 0x114,
  WM_VSCROLL = 0x115,
  WM_INITMENU = 0x116,
  WM_INITMENUPOPUP = 0x117,
  WM_MENUSELECT = 0x11F,
  WM_MENUCHAR = 0x120,
  WM_ENTERIDLE = 0x121,
  WM_MENURBUTTONUP = 0x122,
  WM_MENUDRAG = 0x123,
  WM_MENUGETOBJECT = 0x124,
  WM_UNINITMENUPOPUP = 0x125,
  WM_MENUCOMMAND = 0x126,
  WM_CTLCOLORMSGBOX = 0x132,
  WM_CTLCOLOREDIT = 0x133,
  WM_CTLCOLORLISTBOX = 0x134,
  WM_CTLCOLORBTN = 0x135,
  WM_CTLCOLORDLG = 0x136,
  WM_CTLCOLORSCROLLBAR = 0x137,
  WM_CTLCOLORSTATIC = 0x138,
  WM_MOUSEFIRST = 0x200,
  WM_MOUSEMOVE = 0x200,
  WM_LBUTTONDOWN = 0x201,
  WM_LBUTTONUP = 0x202,
  WM_LBUTTONDBLCLK = 0x203,
  WM_RBUTTONDOWN = 0x204,
  WM_RBUTTONUP = 0x205,
  WM_RBUTTONDBLCLK = 0x206,
  WM_MBUTTONDOWN = 0x207,
  WM_MBUTTONUP = 0x208,
  WM_MBUTTONDBLCLK = 0x209,
  WM_MOUSEWHEEL = 0x20A,
  WM_MOUSELAST = 0x20A,
  WM_PARENTNOTIFY = 0x210,
  WM_ENTERMENULOOP = 0x211,
  WM_EXITMENULOOP = 0x212,
  WM_NEXTMENU = 0x213,
  WM_SIZING = 0x214,
  WM_CAPTURECHANGED = 0x215,
  WM_MOVING = 0x216,
  WM_POWERBROADCAST = 0x218,
  WM_DEVICECHANGE = 0x219,
  WM_MDICREATE = 0x220,
  WM_MDIDESTROY = 0x221,
  WM_MDIACTIVATE = 0x222,
  WM_MDIRESTORE = 0x223,
  WM_MDINEXT = 0x224,
  WM_MDIMAXIMIZE = 0x225,
  WM_MDITILE = 0x226,
  WM_MDICASCADE = 0x227,
  WM_MDIICONARRANGE = 0x228,
  WM_MDIGETACTIVE = 0x229,
  WM_MDISETMENU = 0x230,
  WM_ENTERSIZEMOVE = 0x231,
  WM_EXITSIZEMOVE = 0x232,
  WM_DROPFILES = 0x233,
  WM_MDIREFRESHMENU = 0x234,
  WM_IME_SETCONTEXT = 0x281,
  WM_IME_NOTIFY = 0x282,
  WM_IME_CONTROL = 0x283,
  WM_IME_COMPOSITIONFULL = 0x284,
  WM_IME_SELECT = 0x285,
  WM_IME_CHAR = 0x286,
  WM_IME_REQUEST = 0x288,
  WM_IME_KEYDOWN = 0x290,
  WM_IME_KEYUP = 0x291,
  WM_MOUSEHOVER = 0x2A1,
  WM_MOUSELEAVE = 0x2A3,
  WM_CUT = 0x300,
  WM_COPY = 0x301,
  WM_PASTE = 0x302,
  WM_CLEAR = 0x303,
  WM_UNDO = 0x304,
  WM_RENDERFORMAT = 0x305,
  WM_RENDERALLFORMATS = 0x306,
  WM_DESTROYCLIPBOARD = 0x307,
  WM_DRAWCLIPBOARD = 0x308,
  WM_PAINTCLIPBOARD = 0x309,
  WM_VSCROLLCLIPBOARD = 0x30A,
  WM_SIZECLIPBOARD = 0x30B,
  WM_ASKCBFORMATNAME = 0x30C,
  WM_CHANGECBCHAIN = 0x30D,
  WM_HSCROLLCLIPBOARD = 0x30E,
  WM_QUERYNEWPALETTE = 0x30F,
  WM_PALETTEISCHANGING = 0x310,
  WM_PALETTECHANGED = 0x311,
  WM_HOTKEY = 0x312,
  WM_PRINT = 0x317,
  WM_PRINTCLIENT = 0x318,
  WM_HANDHELDFIRST = 0x358,
  WM_HANDHELDLAST = 0x35F,
  WM_AFXFIRST = 0x360,
  WM_AFXLAST = 0x37F,
  WM_PENWINFIRST = 0x380,
  WM_PENWINLAST = 0x38F,
}; */

/* 352 */
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,
};

/* 353 */
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_08 = 0x8,
  IMISC_09 = 0x9,
  IMISC_ELIXSTR = 0xA,
  IMISC_ELIXMAG = 0xB,
  IMISC_ELIXDEX = 0xC,
  IMISC_ELIXVIT = 0xD,
  IMISC_ELIXWEAK = 0xE,
  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_HEAL_1C = 0x1C,
  IMISC_1D = 0x1D,
  IMISC_1E = 0x1E,
  IMISC_1F = 0x1F,
  IMISC_20 = 0x20,
  IMISC_21 = 0x21,
  IMISC_22 = 0x22,
  IMISC_23 = 0x23,
  IMISC_24 = 0x24,
  IMISC_25 = 0x25,
  IMISC_26 = 0x26,
  IMISC_27 = 0x27,
  IMISC_28 = 0x28,
  IMISC_29 = 0x29,
  IMISC_MAPOFDOOM = 0x2A,
  IMISC_EAR = 0x2B,
  IMISC_SPECELIX = 0x2C,
  IMISC_INVALID = 0xFFFFFFFF,
};

/* 354 */
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_0E = 0xE,
  ITYPE_NONE = 0xFFFFFFFF,
};

/* 355 */
enum _item_indexes
{
  IDI_GOLD = 0x0,
  IDI_WARRIOR = 0x1,
  IDI_WARRSHLD = 0x2,
  IDI_WARRCLUB = 0x3,
  IDI_ROGUE = 0x4,
  IDI_SORCEROR = 0x5,
  IDI_CLEAVER = 0x6,
  IDI_FIRSTQUEST = 0x6,
  IDI_SKCROWN = 0x7,
  IDI_INFRARING = 0x8,
  IDI_ROCK = 0x9,
  IDI_OPTAMULET = 0xA,
  IDI_TRING = 0xB,
  IDI_BANNER = 0xC,
  IDI_HARCREST = 0xD,
  IDI_STEELVEIL = 0xE,
  IDI_GLDNELIX = 0xF,
  IDI_ANVIL = 0x10,
  IDI_MUSHROOM = 0x11,
  IDI_BRAIN = 0x12,
  IDI_FUNGALTM = 0x13,
  IDI_SPECELIX = 0x14,
  IDI_BLDSTONE = 0x15,
  IDI_LASTQUEST = 0x16,
  IDI_MAPOFDOOM = 0x16,
  IDI_EAR = 0x17,
  IDI_HEAL = 0x18,
  IDI_MANA = 0x19,
  IDI_IDENTIFY = 0x1A,
  IDI_PORTAL = 0x1B,
  IDI_ARMOFVAL = 0x1C,
  IDI_FULLHEAL = 0x1D,
  IDI_FULLMANA = 0x1E,
  IDI_GRISWOLD = 0x1F,
  IDI_LGTFORGE = 0x20,
  IDI_LAZSTAFF = 0x21,
  IDI_RESURRECT = 0x22,
};

/* 356 */
enum _setlevels
{
  SL_SKELKING = 0x1,
  SL_BONECHAMB = 0x2,
  SL_MAZE = 0x3,
  SL_POISONWATER = 0x4,
  SL_VILEBETRAYER = 0x5,
};

/* 358 */
enum quest_id
{
  QTYPE_INFRA = 0x0,
  QTYPE_BLKM = 0x1,
  QTYPE_GARB = 0x2,
  QTYPE_ZHAR = 0x3,
  QTYPE_VEIL = 0x4,
  QTYPE_MOD = 0x5,
  QTYPE_BUTCH = 0x6,
  QTYPE_BOL = 0x7,
  QTYPE_BLIND = 0x8,
  QTYPE_BLOOD = 0x9,
  QTYPE_ANVIL = 0xA,
  QTYPE_WARLRD = 0xB,
  QTYPE_KING = 0xC,
  QTYPE_PW = 0xD,
  QTYPE_BONE = 0xE,
  QTYPE_VB = 0xF,
  QTYPE_INVALID = 0xFFFFFFFF,
};

/* 359 */
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,
};

/* 360 */
/* enum _exception_id
{
  EXCEPTION_GUARD_PAGE = 0x80000001,
  EXCEPTION_DATATYPE_MISALIGNMENT = 0x80000002,
  EXCEPTION_BREAKPOINT = 0x80000003,
  EXCEPTION_SINGLE_STEP = 0x80000004,
  EXCEPTION_ACCESS_VIOLATION = 0xC0000005,
  EXCEPTION_IN_PAGE_ERROR = 0xC0000006,
  EXCEPTION_INVALID_HANDLE = 0xC0000008,
  EXCEPTION_ILLEGAL_INSTRUCTION = 0xC000001D,
  EXCEPTION_NONCONTINUABLE_EXCEPTION = 0xC0000025,
  EXCEPTION_INVALID_DISPOSITION = 0xC0000026,
  EXCEPTION_ARRAY_BOUNDS_EXCEEDED = 0xC000008C,
  EXCEPTION_FLT_DENORMAL_OPERAND = 0xC000008D,
  EXCEPTION_FLT_DIVIDE_BY_ZERO = 0xC000008E,
  EXCEPTION_FLT_INEXACT_RESULT = 0xC000008F,
  EXCEPTION_FLT_INVALID_OPERATION = 0xC0000090,
  EXCEPTION_FLT_OVERFLOW = 0xC0000091,
  EXCEPTION_FLT_STACK_CHECK = 0xC0000092,
  EXCEPTION_FLT_UNDERFLOW = 0xC0000093,
  EXCEPTION_INT_DIVIDE_BY_ZERO = 0xC0000094,
  EXCEPTION_INT_OVERFLOW = 0xC0000095,
  EXCEPTION_PRIV_INSTRUCTION = 0xC0000096,
  EXCEPTION_STACK_OVERFLOW = 0xC00000FD,
}; */

/* 363 */
struct unk_missile_struct
{
  int field_0;
  int field_4;
  int field_8;
};

/* 365 */
struct TSyncMonster
{
  char _mndx;
  char _mx;
  char _my;
  char _menemy;
  char _mdelta;
};

/* 366 */
struct TSyncHeader
{
  unsigned char bCmd;
  unsigned char bLevel;
  unsigned short wLen;
  unsigned char bObjId;
  unsigned char bObjCmd;
  unsigned char bItemI;
  unsigned char bItemX;
  unsigned char bItemY;
  unsigned short wItemIndx;
  unsigned short wItemCI;
  int dwItemSeed;
  unsigned char bItemId;
  unsigned char bItemDur;
  unsigned char bItemMDur;
  unsigned char bItemCh;
  unsigned char bItemMCh;
  unsigned short wItemVal;
  unsigned int dwItemBuff;
  unsigned char bPInvLoc;
  unsigned short wPInvIndx;
  unsigned short wPInvCI;
  int dwPInvSeed;
  unsigned char bPInvId;
};

/* 367 */
/* enum sys_commands
{
  SC_SIZE = 0xF000,
  SC_SEPARATOR = 0xF00F,
  SC_MOVE = 0xF010,
  SC_MINIMIZE = 0xF020,
  SC_MAXIMIZE = 0xF030,
  SC_NEXTWINDOW = 0xF040,
  SC_PREVWINDOW = 0xF050,
  SC_CLOSE = 0xF060,
  SC_VSCROLL = 0xF070,
  SC_HSCROLL = 0xF080,
  SC_MOUSEMENU = 0xF090,
  SC_KEYMENU = 0xF100,
  SC_ARRANGE = 0xF110,
  SC_RESTORE = 0xF120,
  SC_TASKLIST = 0xF130,
  SC_SCREENSAVE = 0xF140,
  SC_HOTKEY = 0xF150,
  SC_DEFAULT = 0xF160,
  SC_MONITORPOWER = 0xF170,
  SC_CONTEXTHELP = 0xF180,
}; */

/* 370 */
typedef IDirectDrawSurface *LPDIRECTDRAWSURFACE;

/* 371 */
typedef tagRECT *LPRECT;

/* 373 */
typedef _DDBLTFX DDBLTFX;

/* 372 */
typedef DDBLTFX *LPDDBLTFX;

/* 381 */
typedef _DDBLTBATCH DDBLTBATCH;

/* 380 */
typedef DDBLTBATCH *LPDDBLTBATCH;

/* 384 */
typedef _DDSURFACEDESC *LPDDSURFACEDESC;

/* 383 */
typedef HRESULT (__stdcall *LPDDENUMSURFACESCALLBACK)(LPDIRECTDRAWSURFACE, LPDDSURFACEDESC, LPVOID);

/* 385 */
typedef DDSCAPS *LPDDSCAPS;

/* 386 */
typedef IDirectDrawClipper *LPDIRECTDRAWCLIPPER;

/* 406 */
typedef DDCOLORKEY *LPDDCOLORKEY;

/* 407 */
typedef HDC__ *HDC;

/* 409 */
/* typedef int *LPLONG;
 */
/* 398 */
typedef IDirectDrawPalette *LPDIRECTDRAWPALETTE;

/* 410 */
typedef DDPIXELFORMAT *LPDDPIXELFORMAT;

/* 394 */
typedef IDirectDraw *LPDIRECTDRAW;

/* 412 */
typedef _DDOVERLAYFX DDOVERLAYFX;

/* 411 */
typedef DDOVERLAYFX *LPDDOVERLAYFX;

/* 368 */
struct IDirectDrawSurfaceVtbl
{
  HRESULT (__stdcall *QueryInterface)(IDirectDrawSurface *This, const IID *const riid, LPVOID *ppvObj);
  ULONG (__stdcall *AddRef)(IDirectDrawSurface *This);
  ULONG (__stdcall *Release)(IDirectDrawSurface *This);
  HRESULT (__stdcall *AddAttachedSurface)(IDirectDrawSurface *This, LPDIRECTDRAWSURFACE);
  HRESULT (__stdcall *AddOverlayDirtyRect)(IDirectDrawSurface *This, LPRECT);
  HRESULT (__stdcall *Blt)(IDirectDrawSurface *This, LPRECT, LPDIRECTDRAWSURFACE, LPRECT, DWORD, LPDDBLTFX);
  HRESULT (__stdcall *BltBatch)(IDirectDrawSurface *This, LPDDBLTBATCH, DWORD, DWORD);
  HRESULT (__stdcall *BltFast)(IDirectDrawSurface *This, DWORD, DWORD, LPDIRECTDRAWSURFACE, LPRECT, DWORD);
  HRESULT (__stdcall *DeleteAttachedSurface)(IDirectDrawSurface *This, DWORD, LPDIRECTDRAWSURFACE);
  HRESULT (__stdcall *EnumAttachedSurfaces)(IDirectDrawSurface *This, LPVOID, LPDDENUMSURFACESCALLBACK);
  HRESULT (__stdcall *EnumOverlayZOrders)(IDirectDrawSurface *This, DWORD, LPVOID, LPDDENUMSURFACESCALLBACK);
  HRESULT (__stdcall *Flip)(IDirectDrawSurface *This, LPDIRECTDRAWSURFACE, DWORD);
  HRESULT (__stdcall *GetAttachedSurface)(IDirectDrawSurface *This, LPDDSCAPS, LPDIRECTDRAWSURFACE *);
  HRESULT (__stdcall *GetBltStatus)(IDirectDrawSurface *This, DWORD);
  HRESULT (__stdcall *GetCaps)(IDirectDrawSurface *This, LPDDSCAPS);
  HRESULT (__stdcall *GetClipper)(IDirectDrawSurface *This, LPDIRECTDRAWCLIPPER *);
  HRESULT (__stdcall *GetColorKey)(IDirectDrawSurface *This, DWORD, LPDDCOLORKEY);
  HRESULT (__stdcall *GetDC)(IDirectDrawSurface *This, HDC *);
  HRESULT (__stdcall *GetFlipStatus)(IDirectDrawSurface *This, DWORD);
  HRESULT (__stdcall *GetOverlayPosition)(IDirectDrawSurface *This, LPLONG, LPLONG);
  HRESULT (__stdcall *GetPalette)(IDirectDrawSurface *This, LPDIRECTDRAWPALETTE *);
  HRESULT (__stdcall *GetPixelFormat)(IDirectDrawSurface *This, LPDDPIXELFORMAT);
  HRESULT (__stdcall *GetSurfaceDesc)(IDirectDrawSurface *This, LPDDSURFACEDESC);
  HRESULT (__stdcall *Initialize)(IDirectDrawSurface *This, LPDIRECTDRAW, LPDDSURFACEDESC);
  HRESULT (__stdcall *IsLost)(IDirectDrawSurface *This);
  HRESULT (__stdcall *Lock)(IDirectDrawSurface *This, LPRECT, LPDDSURFACEDESC, DWORD, HANDLE);
  HRESULT (__stdcall *ReleaseDC)(IDirectDrawSurface *This, HDC);
  HRESULT (__stdcall *Restore)(IDirectDrawSurface *This);
  HRESULT (__stdcall *SetClipper)(IDirectDrawSurface *This, LPDIRECTDRAWCLIPPER);
  HRESULT (__stdcall *SetColorKey)(IDirectDrawSurface *This, DWORD, LPDDCOLORKEY);
  HRESULT (__stdcall *SetOverlayPosition)(IDirectDrawSurface *This, LONG, LONG);
  HRESULT (__stdcall *SetPalette)(IDirectDrawSurface *This, LPDIRECTDRAWPALETTE);
  HRESULT (__stdcall *Unlock)(IDirectDrawSurface *This, LPVOID);
  HRESULT (__stdcall *UpdateOverlay)(IDirectDrawSurface *This, LPRECT, LPDIRECTDRAWSURFACE, LPRECT, DWORD, LPDDOVERLAYFX);
  HRESULT (__stdcall *UpdateOverlayDisplay)(IDirectDrawSurface *This, DWORD);
  HRESULT (__stdcall *UpdateOverlayZOrder)(IDirectDrawSurface *This, DWORD, LPDIRECTDRAWSURFACE);
};

/* 369 */
/* struct IDirectDrawSurface
{
  IDirectDrawSurfaceVtbl *lpVtbl;
}; */

/* 375 */

/* 374 */


/* 387 */
/* struct IDirectDrawClipper
{
  IDirectDrawClipperVtbl *lpVtbl;
}; */

/* 408 */
/* struct HDC__
{
  int unused;
}; */

/* 399 */
/* struct IDirectDrawPalette
{
  IDirectDrawPaletteVtbl *lpVtbl;
}; */

/* 395 */
/* struct IDirectDraw
{
  IDirectDrawVtbl *lpVtbl;
}; */

/* 414 */


/* 413 */
/* struct _DDOVERLAYFX
{
  DWORD dwSize;
  DWORD dwAlphaEdgeBlendBitDepth;
  DWORD dwAlphaEdgeBlend;
  DWORD dwReserved;
  DWORD dwAlphaDestConstBitDepth;
  union
  {
    DWORD dwAlphaDestConst;
    LPDIRECTDRAWSURFACE lpDDSAlphaDest;
  };
  DWORD dwAlphaSrcConstBitDepth;
  union
  {
    DWORD dwAlphaSrcConst;
    LPDIRECTDRAWSURFACE lpDDSAlphaSrc;
  };
  DDCOLORKEY dckDestColorkey;
  DDCOLORKEY dckSrcColorkey;
  DWORD dwDDFX;
  DWORD dwFlags;
}; */

/* 389 */
typedef _RGNDATA *LPRGNDATA;

/* 393 */
typedef DWORD *LPDWORD;

/* 388 */
struct IDirectDrawClipperVtbl
{
  HRESULT (__stdcall *QueryInterface)(IDirectDrawClipper *This, const IID *const riid, LPVOID *ppvObj);
  ULONG (__stdcall *AddRef)(IDirectDrawClipper *This);
  ULONG (__stdcall *Release)(IDirectDrawClipper *This);
  HRESULT (__stdcall *GetClipList)(IDirectDrawClipper *This, LPRECT, LPRGNDATA, LPDWORD);
  HRESULT (__stdcall *GetHWnd)(IDirectDrawClipper *This, HWND *);
  HRESULT (__stdcall *Initialize)(IDirectDrawClipper *This, LPDIRECTDRAW, DWORD);
  HRESULT (__stdcall *IsClipListChanged)(IDirectDrawClipper *This, BOOL *);
  HRESULT (__stdcall *SetClipList)(IDirectDrawClipper *This, LPRGNDATA, DWORD);
  HRESULT (__stdcall *SetHWnd)(IDirectDrawClipper *This, DWORD, HWND);
};

/* 397 */
typedef tagPALETTEENTRY *LPPALETTEENTRY;

/* 400 */
struct IDirectDrawPaletteVtbl
{
  HRESULT (__stdcall *QueryInterface)(IDirectDrawPalette *This, const IID *const riid, LPVOID *ppvObj);
  ULONG (__stdcall *AddRef)(IDirectDrawPalette *This);
  ULONG (__stdcall *Release)(IDirectDrawPalette *This);
  HRESULT (__stdcall *GetCaps)(IDirectDrawPalette *This, LPDWORD);
  HRESULT (__stdcall *GetEntries)(IDirectDrawPalette *This, DWORD, DWORD, DWORD, LPPALETTEENTRY);
  HRESULT (__stdcall *Initialize)(IDirectDrawPalette *This, LPDIRECTDRAW, DWORD, LPPALETTEENTRY);
  HRESULT (__stdcall *SetEntries)(IDirectDrawPalette *This, DWORD, DWORD, DWORD, LPPALETTEENTRY);
};

/* 401 */
typedef HRESULT (__stdcall *LPDDENUMMODESCALLBACK)(LPDDSURFACEDESC, LPVOID);

/* 403 */
typedef _DDCAPS DDCAPS;

/* 402 */
typedef DDCAPS *LPDDCAPS;

/* 405 */
typedef BOOL *LPBOOL;

/* 396 */
struct IDirectDrawVtbl
{
  HRESULT (__stdcall *QueryInterface)(IDirectDraw *This, const IID *const riid, LPVOID *ppvObj);
  ULONG (__stdcall *AddRef)(IDirectDraw *This);
  ULONG (__stdcall *Release)(IDirectDraw *This);
  HRESULT (__stdcall *Compact)(IDirectDraw *This);
  HRESULT (__stdcall *CreateClipper)(IDirectDraw *This, DWORD, LPDIRECTDRAWCLIPPER *, IUnknown *);
  HRESULT (__stdcall *CreatePalette)(IDirectDraw *This, DWORD, LPPALETTEENTRY, LPDIRECTDRAWPALETTE *, IUnknown *);
  HRESULT (__stdcall *CreateSurface)(IDirectDraw *This, LPDDSURFACEDESC, LPDIRECTDRAWSURFACE *, IUnknown *);
  HRESULT (__stdcall *DuplicateSurface)(IDirectDraw *This, LPDIRECTDRAWSURFACE, LPDIRECTDRAWSURFACE *);
  HRESULT (__stdcall *EnumDisplayModes)(IDirectDraw *This, DWORD, LPDDSURFACEDESC, LPVOID, LPDDENUMMODESCALLBACK);
  HRESULT (__stdcall *EnumSurfaces)(IDirectDraw *This, DWORD, LPDDSURFACEDESC, LPVOID, LPDDENUMSURFACESCALLBACK);
  HRESULT (__stdcall *FlipToGDISurface)(IDirectDraw *This);
  HRESULT (__stdcall *GetCaps)(IDirectDraw *This, LPDDCAPS, LPDDCAPS);
  HRESULT (__stdcall *GetDisplayMode)(IDirectDraw *This, LPDDSURFACEDESC);
  HRESULT (__stdcall *GetFourCCCodes)(IDirectDraw *This, LPDWORD, LPDWORD);
  HRESULT (__stdcall *GetGDISurface)(IDirectDraw *This, LPDIRECTDRAWSURFACE *);
  HRESULT (__stdcall *GetMonitorFrequency)(IDirectDraw *This, LPDWORD);
  HRESULT (__stdcall *GetScanLine)(IDirectDraw *This, LPDWORD);
  HRESULT (__stdcall *GetVerticalBlankStatus)(IDirectDraw *This, LPBOOL);
  HRESULT (__stdcall *Initialize)(IDirectDraw *This, GUID *);
  HRESULT (__stdcall *RestoreDisplayMode)(IDirectDraw *This);
  HRESULT (__stdcall *SetCooperativeLevel)(IDirectDraw *This, HWND, DWORD);
  HRESULT (__stdcall *SetDisplayMode)(IDirectDraw *This, DWORD, DWORD, DWORD);
  HRESULT (__stdcall *WaitForVerticalBlank)(IDirectDraw *This, DWORD, HANDLE);
};

/* 392 */
/* struct _RGNDATAHEADER
{
  DWORD dwSize;
  DWORD iType;
  DWORD nCount;
  DWORD nRgnSize;
  RECT rcBound;
}; */

/* 391 */
typedef _RGNDATAHEADER RGNDATAHEADER;

/* 390 */
/* struct _RGNDATA
{
  RGNDATAHEADER rdh;
  char Buffer[1];
}; */

/* 404 */

/* 416 */
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,
};

/* 417 */
enum _ui_classes
{
  UI_WARRIOR = 0x0,
  UI_ROGUE = 0x1,
  UI_SORCERER = 0x2,
  UI_NUM_CLASSES = 0x3,
};

/* 418 */
/* enum _win_error
{
  ERROR_FILE_NOT_FOUND = 0x2,
  ERROR_ALREADY_EXISTS = 0xB7,
}; */

/* 419 */
enum _walk_path
{
  WALK_NONE = 0x0,
  WALK_NE = 0x1,
  WALK_NW = 0x2,
  WALK_SE = 0x3,
  WALK_SW = 0x4,
  WALK_N = 0x5,
  WALK_E = 0x6,
  WALK_S = 0x7,
  WALK_W = 0x8,
};

