view mm7_data.cpp @ 1222:b89a20cd8a54

m
author Ritor1
date Sun, 02 Jun 2013 22:02:26 +0600
parents aa706cde7fda
children 502b8b2e36b4
line wrap: on
line source

#include "mm7_data.h"

#include "GUIWindow.h"
#include "Party.h"



void ErrHR(HRESULT hr, const char *pAPI, const char *pFunction, const char *pFile, int line)
{
  if (SUCCEEDED(hr))
    return;

  char msg[4096];
  sprintf(msg, "%s error (%08X) in\n\t%s\nin\n\t%s:%u",
          pAPI, hr, pFunction, pFile, line);

  char caption[1024];
  sprintf(caption, "%s error", pAPI);

  MessageBoxA(nullptr, msg, caption, MB_ICONEXCLAMATION);
}




#include "Math.h"
struct stru193_math *stru_5C6E00 = new stru193_math;

#include "MapInfo.h"
struct MapStats *pMapStats;

#include "TurnEngine.h"
struct stru262_TurnBased *pTurnEngine = new stru262_TurnBased;

#include "CastSpellInfo.h"
CastSpellInfo pCastSpellInfo[10];
CastSpellInfo stru_50CDB4; // idb

#include "Viewport.h"
struct Viewport *pViewport = new Viewport;
struct ViewingParams *viewparams = new ViewingParams;



#include "stru123.h"
stru123 stru_5E4C90;

#include "stru298.h"
stru298 stru_50FE08; // weak

#include "Autonotes.h"
Autonote pAutonoteTxt[195]; // weak

#include "Awards.h"
Award pAwards[105];
AwardType achieved_awards[1000];
int num_achieved_awards;
int num_achieved_awards_2;

#include "stru159.h"

#include "stru160.h"
stru160 array_4EB8B8[66] =
{
  stru160( 0.0000000f,  0.0000000f,  1.0000000f),
  stru160( 0.0000000f,  0.3826830f,  0.9238799f),
  stru160( 0.3826830f,  0.0000000f,  0.9238799f),
  stru160( 0.4082480f,  0.4082480f,  0.8164970f),
  stru160( 0.0000000f,  0.7071070f,  0.7071070f),
  stru160( 0.7071070f,  0.0000000f,  0.7071070f),
  stru160( 0.4082480f,  0.8164970f,  0.4082480f),
  stru160( 0.8164970f,  0.4082480f,  0.4082480f),
  stru160( 0.7071070f,  0.7071070f,  0.0000000f),
  stru160( 0.0000000f,  0.9238799f,  0.3826830f),
  stru160( 0.3826830f,  0.9238799f,  0.0000000f),
  stru160( 0.0000000f,  1.0000000f,  0.0000000f),
  stru160( 0.9238799f,  0.3826830f,  0.0000000f),
  stru160( 0.9238799f,  0.0000000f,  0.3826830f),
  stru160( 1.0000000f,  0.0000000f,  0.0000000f),
  stru160( 0.0000000f, -0.3826830f,  0.9238799f),
  stru160( 0.4082480f, -0.4082480f,  0.8164970f),
  stru160( 0.0000000f, -0.7071070f,  0.7071070f),
  stru160( 0.8164970f, -0.4082480f,  0.4082480f),
  stru160( 0.4082480f, -0.8164970f,  0.4082480f),
  stru160( 0.7071070f, -0.7071070f,  0.0000000f),
  stru160( 0.9238799f, -0.3826830f,  0.0000000f),
  stru160( 0.3826830f, -0.9238799f,  0.0000000f),
  stru160( 0.0000000f, -0.9238799f,  0.3826830f),
  stru160( 0.0000000f, -1.0000000f,  0.0000000f),
  stru160(-0.3826830f,  0.0000000f,  0.9238799f),
  stru160(-0.4082480f, -0.4082480f,  0.8164970f),
  stru160(-0.7071070f,  0.0000000f,  0.7071070f),
  stru160(-0.4082480f, -0.8164970f,  0.4082480f),
  stru160(-0.8164970f, -0.4082480f,  0.4082480f),
  stru160(-0.7071070f, -0.7071070f,  0.0000000f),
  stru160(-0.3826830f, -0.9238799f,  0.0000000f),
  stru160(-0.9238799f, -0.3826830f,  0.0000000f),
  stru160(-0.9238799f,  0.0000000f,  0.3826830f),
  stru160(-1.0000000f,  0.0000000f,  0.0000000f),
  stru160(-0.4082480f,  0.4082480f,  0.8164970f),
  stru160(-0.8164970f,  0.4082480f,  0.4082480f),
  stru160(-0.4082480f,  0.8164970f,  0.4082480f),
  stru160(-0.7071070f,  0.7071070f,  0.0000000f),
  stru160(-0.9238799f,  0.3826830f,  0.0000000f),
  stru160(-0.3826830f,  0.9238799f,  0.0000000f),
  stru160( 0.0000000f,  0.0000000f, -1.0000000f),
  stru160( 0.0000000f,  0.3826830f, -0.9238799f),
  stru160( 0.3826830f,  0.0000000f, -0.9238799f),
  stru160( 0.4082480f,  0.4082480f, -0.8164970f),
  stru160( 0.0000000f,  0.7071070f, -0.7071070f),
  stru160( 0.7071070f,  0.0000000f, -0.7071070f),
  stru160( 0.4082480f,  0.8164970f, -0.4082480f),
  stru160( 0.8164970f,  0.4082480f, -0.4082480f),
  stru160( 0.0000000f,  0.9238799f, -0.3826830f),
  stru160( 0.9238799f,  0.0000000f, -0.3826830f),
  stru160( 0.0000000f, -0.3826830f, -0.9238799f),
  stru160( 0.4082480f, -0.4082480f, -0.8164970f),
  stru160( 0.0000000f, -0.7071070f, -0.7071070f),
  stru160( 0.8164970f, -0.4082480f, -0.4082480f),
  stru160( 0.4082480f, -0.8164970f, -0.4082480f),
  stru160( 0.0000000f, -0.9238799f, -0.3826830f),
  stru160(-0.3826830f,  0.0000000f, -0.9238799f),
  stru160(-0.4082480f, -0.4082480f, -0.8164970f),
  stru160(-0.7071070f,  0.0000000f, -0.7071070f),
  stru160(-0.4082480f, -0.8164970f, -0.4082480f),
  stru160(-0.8164970f, -0.4082480f, -0.4082480f),
  stru160(-0.9238799f,  0.0000000f, -0.3826830f),
  stru160(-0.4082480f,  0.4082480f, -0.8164970f),
  stru160(-0.8164970f,  0.4082480f, -0.4082480f),
  stru160(-0.4082480f,  0.8164970f, -0.4082480f)
};
stru160 array_4EBBD0[128];
__int32 array_4EBBD0_x[128*3] =
{
  0x00000000, 0x00000001, 0x00000002, 0x00000001,
  0x00000003, 0x00000002, 0x00000001, 0x00000004,
  0x00000003, 0x00000003, 0x00000005, 0x00000002,
  0x00000004, 0x00000006, 0x00000003, 0x00000006,
  0x00000007, 0x00000003, 0x00000006, 0x00000008,
  0x00000007, 0x00000007, 0x00000005, 0x00000003,
  0x00000004, 0x00000009, 0x00000006, 0x00000009,
  0x0000000A, 0x00000006, 0x00000009, 0x0000000B,
  0x0000000A, 0x0000000A, 0x00000008, 0x00000006,
  0x00000008, 0x0000000C, 0x00000007, 0x0000000C,
  0x0000000D, 0x00000007, 0x0000000C, 0x0000000E,
  0x0000000D, 0x0000000D, 0x00000005, 0x00000007,
  0x00000000, 0x00000002, 0x0000000F, 0x00000002,
  0x00000010, 0x0000000F, 0x00000002, 0x00000005,
  0x00000010, 0x00000010, 0x00000011, 0x0000000F,
  0x00000005, 0x00000012, 0x00000010, 0x00000012,
  0x00000013, 0x00000010, 0x00000012, 0x00000014,
  0x00000013, 0x00000013, 0x00000011, 0x00000010,
  0x00000005, 0x0000000D, 0x00000012, 0x0000000D,
  0x00000015, 0x00000012, 0x0000000D, 0x0000000E,
  0x00000015, 0x00000015, 0x00000014, 0x00000012,
  0x00000014, 0x00000016, 0x00000013, 0x00000016,
  0x00000017, 0x00000013, 0x00000016, 0x00000018,
  0x00000017, 0x00000017, 0x00000011, 0x00000013,
  0x00000000, 0x0000000F, 0x00000019, 0x0000000F,
  0x0000001A, 0x00000019, 0x0000000F, 0x00000011,
  0x0000001A, 0x0000001A, 0x0000001B, 0x00000019,
  0x00000011, 0x0000001C, 0x0000001A, 0x0000001C,
  0x0000001D, 0x0000001A, 0x0000001C, 0x0000001E,
  0x0000001D, 0x0000001D, 0x0000001B, 0x0000001A,
  0x00000011, 0x00000017, 0x0000001C, 0x00000017,
  0x0000001F, 0x0000001C, 0x00000017, 0x00000018,
  0x0000001F, 0x0000001F, 0x0000001E, 0x0000001C,
  0x0000001E, 0x00000020, 0x0000001D, 0x00000020,
  0x00000021, 0x0000001D, 0x00000020, 0x00000022,
  0x00000021, 0x00000021, 0x0000001B, 0x0000001D,
  0x00000000, 0x00000019, 0x00000001, 0x00000019,
  0x00000023, 0x00000001, 0x00000019, 0x0000001B,
  0x00000023, 0x00000023, 0x00000004, 0x00000001,
  0x0000001B, 0x00000024, 0x00000023, 0x00000024,
  0x00000025, 0x00000023, 0x00000024, 0x00000026,
  0x00000025, 0x00000025, 0x00000004, 0x00000023,
  0x0000001B, 0x00000021, 0x00000024, 0x00000021,
  0x00000027, 0x00000024, 0x00000021, 0x00000022,
  0x00000027, 0x00000027, 0x00000026, 0x00000024,
  0x00000026, 0x00000028, 0x00000025, 0x00000028,
  0x00000009, 0x00000025, 0x00000028, 0x0000000B,
  0x00000009, 0x00000009, 0x00000004, 0x00000025,
  0x00000029, 0x0000002A, 0x0000002B, 0x0000002A,
  0x0000002C, 0x0000002B, 0x0000002A, 0x0000002D,
  0x0000002C, 0x0000002C, 0x0000002E, 0x0000002B,
  0x0000002D, 0x0000002F, 0x0000002C, 0x0000002F,
  0x00000030, 0x0000002C, 0x0000002F, 0x00000008,
  0x00000030, 0x00000030, 0x0000002E, 0x0000002C,
  0x0000002D, 0x00000031, 0x0000002F, 0x00000031,
  0x0000000A, 0x0000002F, 0x00000031, 0x0000000B,
  0x0000000A, 0x0000000A, 0x00000008, 0x0000002F,
  0x00000008, 0x0000000C, 0x00000030, 0x0000000C,
  0x00000032, 0x00000030, 0x0000000C, 0x0000000E,
  0x00000032, 0x00000032, 0x0000002E, 0x00000030,
  0x00000029, 0x0000002B, 0x00000033, 0x0000002B,
  0x00000034, 0x00000033, 0x0000002B, 0x0000002E,
  0x00000034, 0x00000034, 0x00000035, 0x00000033,
  0x0000002E, 0x00000036, 0x00000034, 0x00000036,
  0x00000037, 0x00000034, 0x00000036, 0x00000014,
  0x00000037, 0x00000037, 0x00000035, 0x00000034,
  0x0000002E, 0x00000032, 0x00000036, 0x00000032,
  0x00000015, 0x00000036, 0x00000032, 0x0000000E,
  0x00000015, 0x00000015, 0x00000014, 0x00000036,
  0x00000014, 0x00000016, 0x00000037, 0x00000016,
  0x00000038, 0x00000037, 0x00000016, 0x00000018,
  0x00000038, 0x00000038, 0x00000035, 0x00000037,
  0x00000029, 0x00000033, 0x00000039, 0x00000033,
  0x0000003A, 0x00000039, 0x00000033, 0x00000035,
  0x0000003A, 0x0000003A, 0x0000003B, 0x00000039,
  0x00000035, 0x0000003C, 0x0000003A, 0x0000003C,
  0x0000003D, 0x0000003A, 0x0000003C, 0x0000001E,
  0x0000003D, 0x0000003D, 0x0000003B, 0x0000003A,
  0x00000035, 0x00000038, 0x0000003C, 0x00000038,
  0x0000001F, 0x0000003C, 0x00000038, 0x00000018,
  0x0000001F, 0x0000001F, 0x0000001E, 0x0000003C,
  0x0000001E, 0x00000020, 0x0000003D, 0x00000020,
  0x0000003E, 0x0000003D, 0x00000020, 0x00000022,
  0x0000003E, 0x0000003E, 0x0000003B, 0x0000003D,
  0x00000029, 0x00000039, 0x0000002A, 0x00000039,
  0x0000003F, 0x0000002A, 0x00000039, 0x0000003B,
  0x0000003F, 0x0000003F, 0x0000002D, 0x0000002A,
  0x0000003B, 0x00000040, 0x0000003F, 0x00000040,
  0x00000041, 0x0000003F, 0x00000040, 0x00000026,
  0x00000041, 0x00000041, 0x0000002D, 0x0000003F,
  0x0000003B, 0x0000003E, 0x00000040, 0x0000003E,
  0x00000027, 0x00000040, 0x0000003E, 0x00000022,
  0x00000027, 0x00000027, 0x00000026, 0x00000040,
  0x00000026, 0x00000028, 0x00000041, 0x00000028,
  0x00000031, 0x00000041, 0x00000028, 0x0000000B,
  0x00000031, 0x00000031, 0x0000002D, 0x00000041
};

#include "stru220.h"
stru220 stru_76E5C8[16384];

#include "stru176.h"
stru176 array_5B5928_timers[100];

#include "ObjectList.h"
struct ObjectList *pObjectList;

#include "IconFrameTable.h"
struct IconFrameTable *pIconsFrameTable;

struct
{
  struct UIAnimation _pUIAnim_Food;
  struct UIAnimation _pUIAnim_Gold;
  struct UIAnimation _pUIAnum_Torchlight;
  struct UIAnimation _pUIAnim_WizardEye;
} _uianim;

struct UIAnimation *pUIAnim_Food = &_uianim._pUIAnim_Food;
struct UIAnimation *pUIAnim_Gold = &_uianim._pUIAnim_Gold;
struct UIAnimation *pUIAnum_Torchlight = &_uianim._pUIAnum_Torchlight;
struct UIAnimation *pUIAnim_WizardEye = &_uianim._pUIAnim_WizardEye;

struct UIAnimation *pUIAnims[4] =
{
  &_uianim._pUIAnim_Food,
  &_uianim._pUIAnim_Gold,
  &_uianim._pUIAnum_Torchlight,
  &_uianim._pUIAnim_WizardEye
};



#include "PlayerFrameTable.h"
struct PlayerFrameTable *pPlayerFrameTable; // idb

#include "MM7.h"


stat_coord stat_string_coord[26] = //4E2940
{
  {0x1A, 0x39, 0xDC, 0x12},
  {0x1A, 0x4A, 0xDC, 0x12},
  {0x1A, 0x5B, 0xDC, 0x12},
  {0x1A, 0x6C, 0xDC, 0x12},
  {0x1A, 0x7D, 0xDC, 0x12},
  {0x1A, 0x8E, 0xDC, 0x12},
  {0x1A, 0x9F, 0xDC, 0x12},
  {0x1A, 0xC6, 0xDC, 0x12},
  {0x1A, 0xD7, 0xDC, 0x12},
  {0x1A, 0xE8, 0xDC, 0x12},
  {0x1A, 0x10C, 0xDC, 0x12},
  {0x1A, 0x11E, 0xDC, 0x12},
  {0x111, 0x36, 0xBA, 0x12},
  {0x111, 0x47, 0xBA, 0x12},
  {0x111, 0x58, 0xBA, 0x12},
  {0x111, 0x7E, 0xBA, 0x12},
  {0x111, 0x8F, 0xBA, 0x12},
  {0x111, 0xA0, 0xBA, 0x12},
  {0x111, 0xB1, 0xBA, 0x12},
  {0x111, 0xCA, 0xBA, 0x12},
  {0x111, 0xDD, 0xBA, 0x12},
  {0x111, 0xF0, 0xBA, 0x12},
  {0x111, 0x103, 0xBA, 0x12},
  {0x111, 0x116, 0xBA, 0x12},
  {0x111, 0x129, 0xBA, 0x12},
  {0x13E, 0x12, 0x89, 0x12},
};




namespace zlib
{
  #include "lib\zlib\zlib.h"
  int MemUnzip(void *dest, unsigned int *destLen, const void *source, unsigned int sourceLen)
  {
    //return uncompress((zlib::Bytef *)dest, (zlib::uLongf *)destLen, (zlib::Bytef *)source, sourceLen);
    return uncompress((Bytef *)dest, (uLongf *)destLen, (Bytef *)source, sourceLen);
    return 0;
  }

  int MemZip(void *dest, unsigned int *destLen, void *source, unsigned int sourceLen)
  {
    //return compress((zlib::Bytef *)dest, (zlib::uLongf *)destLen, (zlib::Bytef *)source, sourceLen);
    return compress((Bytef *)dest, (uLongf *)destLen, (Bytef *)source, sourceLen);
    return 0;
  }
};

#include "stru314.h"
#include "stru367.h"



//-------------------------------------------------------------------------
// Data declarations

int game_starting_year = 0;
int game_viewport_width;
int game_viewport_height;
int game_viewport_x;
int game_viewport_y;
int game_viewport_z;
int game_viewport_w;



unsigned int saveload_dlg_xs[2] = {82, 0};
unsigned int saveload_dlg_ys[2] = {60, 0};
unsigned int saveload_dlg_zs[2] = {460, 640};
unsigned int saveload_dlg_ws[2] = {344, 480};
int pWindowList_at_506F50_minus1_indexing[1];
int dword_4C9890[10]; // weak
int dword_4C9920[16]; // weak
_UNKNOWN unk_4D8548; // weak
char byte_4D864C; // weak
float flt_4D86CC = 1.0f; // weak
int dword_4D86D8; // weak
int dword_4DAFCC; // weak
int (__stdcall *off_4DAFDC)(char); // weak
char asc_4DB724[777]; // idb
int dword_4DBD94; // weak
int dword_4DF380[5]={0,1024,2560,5120,10240}; // weak
//int dword_4DF390; // weak
char Str2[777]; // idb
int dword_4DF3A4; // weak
char byte_4E185C; // weak
char am_byte_4E185D; // weak
char byte_4E185E; // weak
int amuint_4E1860; // weak
int amuint_4E1864; // weak
int amuint_4E1868; // weak
int amuint_4E186C; // weak
int amuint_4E1870; // weak
int dword_4E1874; // weak
int dword_4E1878; // weak
float flt_4D84E8 = 0.0f;
int dword_4E187C; // weak
int dword_4E1880; // weak
int dword_4E1884; // weak
int dword_4E1888; // weak
char pArcomagePlayer2Name[8];
char pArcomagePlayer1Name[8];
char pDeckMaster[12];
char aIxf[4]; // idb
_UNKNOWN unk_4E19FC; // weak
char aD[777]; // idb
char asc_4E1AB0[777]; // idb
char aWb_0[777]; // idb
char a24bitPcxOnly[777]; // idb
char Mode[777]; // idb
char a16bitPcx[777]; // idb
char aUnableToLoadS[777]; // idb
char aBitmaps[777]; // idb
char aIcons[777]; // idb
char aPending[777]; // idb
char aCanTFindS[777]; // idb
char *spellbook_texture_filename_suffices[9] = {"f", "a", "w", "e", "s", "m", "b", "l", "d"}; // weak
//__int16 word_4E1D3A[777]; // weak
__int16 pTownPortalBook_xs[6] = {260, 324, 147, 385, 390,  19};
__int16 pTownPortalBook_ys[6] = {206,  84, 182, 239,  17, 283};
__int16 pTownPortalBook_ws[6] = { 80,  66,  68,  72,  67,  74};
__int16 pTownPortalBook_hs[6] = { 55,  56,  65,  67,  67,  59};


unsigned int pLloydsBeaconsPreviewXs[5] = {61, 281,  61, 281, 171}; // 004E249C
unsigned int pLloydsBeaconsPreviewYs[5] = {84,  84, 228, 228, 155};
unsigned int pLloydsBeacons_SomeXs[5] = {59, 279, 59, 279, 169};
unsigned int pLloydsBeacons_SomeYs[5] = {82, 82, 226, 226, 153};
char aSbwb00[7]; // weak
char aW[2]; // idb
char aA[2]; // idb
char aSD[777]; // idb
char aSS03d03dS000S0[777]; // idb
char aLuS[777]; // idb
char aS_1[777]; // idb
char aSbSc02d[777]; // idb
char aSbSs02d[777]; // idb
char aTabDb[777]; // idb
char aTabDa[777]; // idb
char aIbM6D[777]; // idb
char aIbM6U[777]; // idb
char aIbM5D[777]; // idb
char aIbM5U[777]; // idb
char aPagemask[777]; // idb
char aBook[777]; // idb
char aSpell_fnt[777]; // idb
char aAutonote_fnt[777]; // idb
char aBook2_fnt[777]; // idb
char pFontFile[777]; // idb
char aFontpal[777]; // idb
char aMapbordr[777]; // idb
char aLloydDD_pcx[777]; // idb
char aDataLloydDD_pc[777]; // idb
char aLb_bordr[777]; // idb
char aTphell[777]; // idb
char aTpheaven[777]; // idb
char aTpisland[777]; // idb
char aTpwarlock[777]; // idb
char aTpelf[777]; // idb
char aTpharmndy[777]; // idb
char aTownport[777]; // idb
char aSbquiknot[777]; // idb
char aTabAn8a[777]; // idb
char aTabAn8b[777]; // idb
char aTabAn4a[777]; // idb
char aTabAn4b[777]; // idb
char aTabAn5a[777]; // idb
char aTabAn5b[777]; // idb
char aTabAn3a[777]; // idb
char aTabAn3b[777]; // idb
char aTabAn2a[777]; // idb
char aTabAn2b[777]; // idb
char aTabAn1a[777]; // idb
char aTabAn1b[777]; // idb
char aDivbar[777]; // idb
char aSbautnot[777]; // idb
char aTabwoff[777]; // idb
char aTabwon[777]; // idb
char aTabeoff[777]; // idb
char aTabeon[777]; // idb
char aTabsoff[777]; // idb
char aTabson[777]; // idb
char aTabnoff[777]; // idb
char aTabnon[777]; // idb
char aZootOff[777]; // idb
char aZoomOff[777]; // idb
char aZootOn[777]; // idb
char aZoomOn[777]; // idb
char aSbmap[777]; // idb
char aMoon_ful[777]; // idb
char aMoon_2[777]; // idb
char aMoon_4[777]; // idb
char aMoon_new[777]; // idb
char aSbdateTime[777]; // idb
char aTabAn7a[777]; // idb
char aTabAn6a[777]; // idb
char aTabAn7b[777]; // idb
char aTabAn6b[777]; // idb
char aSbplayrnot[777]; // idb
char aPending_0[777]; // idb
char aUnknown[8]; // weak
char aS100110S[777]; // idb
char aS100110D[777]; // idb
char aS100110DS[777]; // idb
char aS100110D02dSS[777]; // idb
int pCurrentScreen = SCREEN_VIDEO; // 004E28F8
unsigned int uGammaPos;
int BtnTurnCoord[8] = 
{
  0xA4, 0x5D, 0x16, 0xB, 0x5, 0xD, 0x7, 0x3B,
}; // weak
__int16 RightClickPortraitXmin[4]={0x14, 0x83, 0xF2, 0x165};
__int16 RightClickPortraitXmax[4]={0x53, 0xC6, 0x138, 0x1A7};
void *off_4E2A12; // stat_string_control_button_count

unsigned int pHealthBarPos[4] = {22, 137, 251, 366};
unsigned int pManaBarPos[4] = {102, 217, 331, 447};
char _4E2B21_buff_spell_tooltip_colors[80];
char monster_popup_y_offsets[88] =
{
  236,  20,   0, 216,   0,   0,   0,   0,   0,   0, 206,
   20,   0, 246, 246, 236,  10, 246,   0,   0,   0, 236,
   10, 246,   0,   0,   0, 236, 246,   0,   0,   0, 216,
  236,   0,   0,   0, 206, 226, 226, 226, 226, 226, 226,
    0,   0,   0,   0,   0,   0, 236, 236, 236,  20,  20,
   20,  10,  10,  10,  10,  10,  10, 166, 196, 216, 236,
  236, 176, 246,   0,   0, 216,   0,   0,   0, 236,  10,
    0,   0,   0,   0,   0,   0, 196,   0,   0,   0,   0
};
unsigned char hourglass_icon_idx = 12; // weak


const char *format_4E2D80 = "\f%05d%s\f00000\n";
//const char *format_4E2DC8 = "\f%05d";
const char *format_4E2DE8 = "\f%05d%s\f00000 - ";
const char *format_4E2E00 = "%s\f%05u\xD\r180%s\n"; // idb
const char *format_4E2E10 = "%s\f%05u\t110%d\f00000 / %d\n";
__int16 word_4E3C66[777]; // idb
int dword_4E455C; // weak
int dword_4E4560[6];
int dword_4E4578[6];
int dword_4E4590[6];
int dword_4E45A8[6];
_UNKNOWN dword_4E49D4; // idb
int dword_4E4A18[777]; // weak
int dword_4E4A1C[777]; // weak
int dword_4E4A40[777]; // weak
int dword_4E4A44[777]; // weak
float flt_4E4A80[10];


int pPartySpellbuffsUI_XYs[14][2] =
{
  {477, 247}, {497, 247}, {522, 247}, {542, 247}, {564, 247}, {581, 247}, {614, 247},
  {477, 279}, {497, 279}, {522, 279}, {542, 279}, {564, 279}, {589, 279}, {612, 279}
};
unsigned char byte_4E5DD8[14] =
{
  PARTY_BUFF_FEATHER_FALL, PARTY_BUFF_RESIST_FIRE, PARTY_BUFF_RESIST_AIR, PARTY_BUFF_RESIST_WATER, PARTY_BUFF_RESIST_MIND,           PARTY_BUFF_RESIST_EARTH, PARTY_BUFF_RESIST_BODY,
  PARTY_BUFF_HEROISM,      PARTY_BUFF_HASTE,       PARTY_BUFF_SHIELD,     PARTY_BUFF_STONE_SKIN,   PARTY_BUFF_PROTECTION_FROM_MAGIC, PARTY_BUFF_IMMOLATION,   PARTY_BUFF_DAY_OF_GODS
};
unsigned __int8 pPartySpellbuffsUI_smthns[14] =
{
  14, 1, 10, 4, 7,  2, 9,
   3, 6, 15, 8, 3, 12, 0
};

int pNPCPortraits_x[6][6] =     // 004E5E50
{
  {521,   0,   0,   0,   0,  0},
  {521, 521,   0,   0,   0,  0},
  {521, 521, 521,   0,   0,  0},
  {521, 486, 564, 521,   0,  0},
  {521, 486, 564, 486, 564,  0},
  {486, 564, 486, 564, 486, 564}
};
int pNPCPortraits_y[6][6] =     // 004E5EE0
{
  {38,   0,   0,   0,   0,   0},
  {38, 165,   0,   0,   0,   0},
  {38, 133, 228,   0,   0,   0},
  {38, 133, 133, 228,   0,   0},
  {38, 133, 133, 228, 228,   0},
  {38,  38, 133, 133, 228, 228}
};
const char *pHouse_ExitPictures[11]=
{
	"",
	"ticon01",
	"ticon02",
	"ticon03",
	"ticon04",
	"ticon05",
	"istairup",
	"itrap",
	"outside",
	"idoor",
	"isecdoor"
};

int bWinNT4_0; // weak
__int16 word_4E8152[11] = {0, 0, 0, 90, 8, 2, 70, 20, 10, 50, 30};

stru355 stru_4E82A4 = {0x20, 0x41, 0, 0x20, 0xFF0000, 0xFF00, 0xFF, 0xFF000000};
stru355 stru_4EFCBC = {0x20, 0x41, 0, 0x10, 0x7C00, 0x3E0, 0x1F, 0x8000};
char byte_4E94D0 = 5; // weak
char byte_4E94D1 = 9; // weak
char _4E94D2_light_type = 6; // weak
char byte_4E94D3 = 10; // weak
int dword_4E98BC_bApplicationActive; // weak
//char *off_4EB080; // idb
char *pTransitionStrings[465] = {"", nullptr};  // 004EB080
const char *pPlayerPortraitsNames[25] =
{
  "pc01-", "pc02",  "pc03", "pc04",  "pc05-",
  "pc06",  "pc07",  "pc08", "pc09-", "pc10",
  "pc11-", "pc12",  "pc13", "pc14",  "pc15",
  "pc16",  "pc17-", "pc18", "pc19",  "pc20",
  "pc21-", "pc22-", "pc23", "pc24-", "pc25-"
};



unsigned char byte_4ECF08[48][25] =      // 4ECF08
{
  {2, 1, 2, 1, 2, 2, 2, 2, 2, 2, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 1, 2, 1, 1},//1
  {2, 1, 2, 1, 2, 2, 2, 2, 2, 2, 2, 1, 1, 1, 2, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2},//2
  {2, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2,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 1, 2, 1, 2, 1, 1},//42
  {1, 2, 1, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1},//43
  {1, 2, 1, 2, 2, 2, 2, 2, 1, 1, 1, 1, 1, 2, 1, 1, 2, 1, 2, 1, 1, 2, 1, 2, 2},//44
  {2, 1, 1, 1, 2, 2, 1, 1, 2, 1, 2, 1, 2, 1, 2, 2, 1, 2, 2, 2, 1, 2, 1, 2, 2},//45
  {1, 1, 1, 2, 2, 2, 1, 1, 2, 1, 2, 1, 2, 2, 2, 2, 2, 1, 1, 2, 1, 2, 1, 2, 2},//46
  {1, 1, 1, 1, 1, 1, 2, 1, 2, 1, 1, 2, 2, 2, 1, 1, 2, 1, 1, 1, 1, 1, 1, 1, 1},//47
  {1, 1, 1, 1, 1, 1, 2, 1, 2, 1, 1, 2, 2, 2, 1, 1, 2, 1, 1, 1, 1, 1, 1, 1, 1},//48
};
unsigned char SoundSetAction[110][8] = // 4ED3D8
{
  { 0,  0,  0,  0,  0,  0,  0,  0},
  {38,  0,  0, 37, 38, 45,  0,  0},
  {37,  0,  0, 47, 53,  0,  0,  0},
  { 2,  0,  0, 25,  0,  0,  0,  0},
  { 1,  0,  0, 47,  0,  0,  0,  0},
  { 3,  0,  0, 41, 42,  0,  0,  0},
  { 0,  0,  0, 33,  0,  0,  0,  0},
  { 5,  0,  0, 21, 22, 23, 24, 45},
  { 6,  0,  0, 47,  0,  0,  0,  0},
  { 7,  0,  0, 43, 48,  0,  0,  0},
  { 8,  0,  0, 38,  0,  0,  0,  0},
  { 9,  0,  0, 39,  0,  0,  0,  0},
  {13,  0,  0, 37, 38,  0,  0,  0},
  {23,  0,  0, 25,  0,  0,  0,  0},
  { 0,  0,  0, 37, 38, 45,  0,  0},
  {25,  0,  0, 25,  0,  0,  0,  0},
  {26,  0,  0, 38, 47,  0,  0,  0},
  {27,  0,  0, 41, 42,  0,  0,  0},
  {28,  0,  0, 25,  0,  0,  0,  0},
  { 0,  0,  0, 51,  0,  0,  0,  0},
  {30,  0,  0, 25,  0,  0,  0,  0},
  {29,  0,  0, 27,  0,  0,  0,  0},
  {32, 33,  0, 37, 38,  0,  0,  0},
  {34,  0,  0, 53,  0,  0,  0,  0},
  {15,  0,  0, 34, 35, 36,  0,  0},
  { 0,  0,  0,  3,  0,  0,  0,  0},
  {22,  0,  0,  5,  0,  0,  0,  0},
  {20,  0,  0,  8,  0,  0,  0,  0},
  {20,  0,  0,  9,  0,  0,  0,  0},
  {19,  0,  0,  7,  0,  0,  0,  0},
  {21,  0,  0,  2,  0,  0,  0,  0},
  {18,  0,  0,  6,  0,  0,  0,  0},
  { 0,  0,  0, 11,  0,  0,  0,  0},
  {17,  0,  0,  0,  0,  0,  0,  0},
  { 0,  0,  0, 12,  0,  0,  0,  0},
  {17,  0,  0,  0,  0,  0,  0,  0},
  { 0,  0,  0, 37,  0,  0,  0,  0},
  { 0,  0,  0, 49,  0,  0,  0,  0},
  {24,  0,  0, 25,  0,  0,  0,  0},
  {31,  0,  0, 25,  0,  0,  0,  0},
  { 0,  0,  0, 41, 42,  0,  0,  0},
  { 0,  0,  0, 39, 48,  0,  0,  0},
  { 0,  0,  0, 46,  0,  0,  0,  0}, 
  { 0,  0,  0, 39, 48,  0,  0,  0},
  { 0,  0,  0, 41, 42,  0,  0,  0},
  { 0,  0,  0, 39, 48,  0,  0,  0},
  {41,  0,  0, 21,  0,  0,  0,  0},
  {40,  0,  0, 21,  0,  0,  0,  0},
  {16,  0,  0, 46,  0,  0,  0,  0},
  { 0,  0,  0, 40,  0,  0,  0,  0},
  { 0,  0,  0, 39,  0,  0,  0,  0},
  { 0,  0,  0, 37, 38,  0,  0,  0},
  { 0,  0,  0, 48, 49, 50,  0,  0},
  { 0,  0,  0, 44,  0,  0,  0,  0},
  { 0,  0,  0, 48,  0,  0,  0,  0},
  { 0,  0,  0, 37, 38, 45,  0,  0},
  { 0,  0,  0, 41, 42,  0,  0,  0},
  { 0,  0,  0, 47,  0,  0,  0,  0},
  { 0,  0,  0, 39, 48,  0,  0,  0},
  { 0,  0,  0, 39, 48,  0,  0,  0},
  { 0,  0,  0, 37, 38,  0,  0,  0},
  { 0,  0,  0, 37, 38,  0,  0,  0},
  { 0,  0,  0, 37, 38,  0,  0,  0},
  { 0,  0,  0, 31,  0,  0,  0,  0},
  { 0,  0,  0, 32,  0,  0,  0,  0},
  {47,  0,  0, 46,  0,  0,  0,  0},
  {22,  0,  0,  5,  0,  0,  0,  0},
  { 0,  0,  0, 25,  0,  0,  0,  0},
  { 0,  0,  0, 37,  0,  0,  0,  0},
  { 0,  0,  0, 52,  0,  0,  0,  0},
  { 0,  0,  0, 45,  0,  0,  0,  0},
  { 0,  0,  0, 27,  0,  0,  0,  0},
  { 0,  0,  0, 37, 38,  0,  0,  0},
  { 0,  0,  0, 49,  0,  0,  0,  0},
  { 0,  0,  0, 48,  0,  0,  0,  0},
  { 0,  0,  0, 37, 38, 45,  0,  0},
  { 0,  0,  0, 48,  0,  0,  0,  0},
  { 0,  0,  0, 37, 38, 45,  0,  0},
  { 0,  0,  0, 47,  0,  0,  0,  0},
  { 0,  0,  0, 48,  0,  0,  0,  0},
  {44,  0,  0, 39, 48,  0,  0,  0},
  { 0,  0,  0, 48, 49,  0,  0,  0},
  { 0,  0,  0, 38,  0,  0,  0,  0},
  { 0,  0,  0, 31,  0,  0,  0,  0},
  {32, 33,  0, 37, 38,  0,  0,  0},
  { 0,  0,  0, 37, 38,  0,  0,  0},
  { 0,  0,  0, 37, 38,  0,  0,  0},
  { 0,  0,  0, 47,  0,  0,  0,  0},
  { 0,  0,  0, 38,  0,  0,  0,  0},
  { 0,  0,  0, 48,  0,  0,  0,  0},
  { 0,  0,  0,  0,  0,  0,  0,  0},
  { 0,  0,  0, 38,  0,  0,  0,  0},
  { 0,  0,  0, 47,  0,  0,  0,  0},
  { 0,  0,  0, 38,  0,  0,  0,  0},
  { 0,  0,  0,  0,  0,  0,  0,  0},
  { 0,  0,  0,  0,  0,  0,  0,  0},
  { 0,  0,  0, 38,  0,  0,  0,  0},
  { 0,  0,  0, 38,  0,  0,  0,  0},
  { 0,  0,  0,  5,  0,  0,  0,  0},
  { 0,  0,  0, 37, 38,  0,  0,  0},
  { 0,  0,  0, 44,  0,  0,  0,  0},
  { 0,  0,  0, 48,  0,  0,  0,  0},
  { 4,  0,  0,  0,  0,  0,  0,  0},
  { 0,  0,  0, 58,  0,  0,  0,  0},
  {10,  0,  0, 45,  0,  0,  0,  0},
  {11,  0,  0, 47,  0,  0,  0,  0},
  {12,  0,  0, 43, 48,  0,  0,  0},
  {39,  0,  0, 48,  0,  0,  0,  0},
  {14,  0,  0, 48,  0,  0,  0,  0},
  {17,  0,  0,  0,  0,  0,  0,  0}
};
__int16 pPlayerPortraitsXCoords_For_PlayerBuffAnimsDrawing[4] = {34, 149, 264, 379};
char byte_4ED970_skill_learn_ability_by_class_table[36][37] = 
{
 2, 3, 2, 3, 3, 2, 3, 4, 3, 3, 3, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 3, 3, 0, 2, 1, 0, 1, 2, 2, 0, 3, 0, 0, 1,//Knight
 2, 3, 2, 3, 3, 2, 3, 4, 3, 3, 3, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 3, 3, 0, 2, 1, 0, 1, 2, 2, 0, 3, 0, 0, 1,
 2, 4, 2, 3, 4, 2, 3, 4, 4, 3, 3, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 4, 4, 0, 2, 1, 0, 1, 2, 2, 0, 4, 0, 0, 1,
 2, 4, 2, 3, 4, 2, 3, 4, 4, 3, 3, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 4, 4, 0, 2, 1, 0, 1, 2, 2, 0, 4, 0, 0, 1,
 
 0, 3, 3, 0, 0, 2, 2, 4, 1, 3, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 3, 1, 2, 0, 3, 0, 0, 3, 3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3,

 3, 0, 2, 0, 0, 1, 0, 4, 0, 2, 0, 0, 2, 2, 2, 2, 0, 0, 0, 0, 0, 3, 1, 2, 0, 3, 2, 1, 0, 0, 0, 0, 3, 0, 0, 3, 3,//Sorcerer
 3, 0, 2, 0, 0, 1, 0, 4, 0, 2, 0, 0, 3, 3, 3, 3, 0, 0, 0, 0, 0, 3, 1, 2, 0, 3, 2, 1, 0, 0, 0, 0, 3, 0, 0, 3, 3,
 3, 0, 2, 0, 0, 1, 0, 4, 0, 2, 0, 0, 4, 4, 4, 4, 0, 0, 0, 4, 0, 4, 1, 2, 0, 3, 2, 1, 0, 0, 0, 0, 4, 0, 0, 3, 3,
 3, 0, 2, 0, 0, 1, 0, 4, 0, 2, 0, 0, 4, 4, 4, 4, 0, 0, 0, 0, 4, 4, 1, 2, 0, 3, 2, 1, 0, 0, 0, 0, 4, 0, 0, 3, 3,
};
int dword_4EDEA0[777]; // weak
int dword_4EDEB4[777]; // weak
int dword_4EDEC4[777]; // weak
_UNKNOWN unk_4EDF40; // weak
unsigned int pHiredNPCsIconsOffsetsX[2] = {489, 559};
unsigned int pHiredNPCsIconsOffsetsY[2] = {152, 152};
int dword_4EE07C[2]; // weak
_UNKNOWN unk_4EE084; // weak
__int16 word_4EE088_sound_ids[100] =
{
      0, 10000, 10010, 10020, 10030, 10040, 10050, 10060, 10070, 10080,
  10090, 10100, 11000, 11010, 11020, 11030, 11040, 11050, 11060, 11070,
  11080, 11090, 11100, 12000, 12010, 12020, 12030, 12040, 12050, 12060,
  12070, 12080, 12090, 12100, 13000, 13010, 13020, 13030, 13040, 13050,
  13060, 13070, 13080, 13090, 13100, 14000, 14010, 14020, 14030, 14040,
  14050, 14060, 14070, 14080, 14090, 14100, 15000, 15010, 15020, 15030,
  15040, 15050, 15060, 15070, 15080, 15090, 15100, 16000, 16010, 16020,
  16030, 16040, 16050, 16060, 16070, 16080, 16090, 16100, 17000, 17010,
  17020, 17030, 17040, 17050, 17060, 17070, 17080, 17090, 17100, 18000,
  18010, 18020, 18030, 18040, 18050, 18060, 18070, 18080, 18090, 18100
};
short word_4EE150[28] =
{
   1,  2,  3,  4,  5,  7, 32, 33, 36, 37, 38, 40, 41, 42, 43, 45, 46,
  47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 60
};

int dword_4EED78; // weak
_UNKNOWN unk_4EED80; // weak
int dword_4EFA80; // weak
int dword_4EFA84; // weak
void *off_4EFDB0; // weak
int dword_4F031C[777]; // weak
const char *off_4F03B8[19] =
{
  "",         "WEPNTABL", "ARMORY",   "MAGSHELF",
  "MAGSHELF", "MAGSHELF", "MAGSHELF", "MAGSHELF",
  "MAGSHELF", "MAGSHELF", "MAGSHELF", "MAGSHELF",
  "MAGSHELF", "MAGSHELF", "MAGSHELF", "MAGSHELF",
  "MAGSHELF", "MAGSHELF", "MAGSHELF"
};

int guild_mambership_flags[32]={
   54, 54, 54, 54, 52, 52, 52, 52, 55, 55, 55, 55, 53, 53,
	   53, 53, 58, 58, 58, 58, 57, 57, 57, 57, 56, 56,
	   56, 56, 59, 59, 60, 60};
__int16 word_4F0754[49];
__int16 _4F0882_evt_VAR_PlayerItemInHands_vals[54] =
{
	0x0D4, 0x270, 0x0D5, 0x21C, 0x0D6, 0x2BE, 0x0D7, 0x2BD, 0x0D8, 0x289, 
	0x0D9, 0x258, 0x0DA, 0x2AB, 0x0DB, 0x281, 0x0DC, 0x280, 0x0DD,
	0x284, 0x0DE, 0x285, 0x0DF, 0x283, 0x0E0, 0x282, 0x0E1, 0x27F,
	0x0E2, 0x1E7, 0x0E3, 0x287, 0x0E4, 0x272, 0x0E5, 0x267, 0x0E6,
	0x275, 0x0E7, 0x25A, 0x0E8, 0x2A4, 0x0E9, 0x2A5, 0x0EA, 0x2A3,
	0x0EB, 0x25C, 0x0EC, 0x25D, 0x0ED, 0x259, 0x0F1, 0x21E
};
unsigned short pMaxLevelPerTrainingHallType[6] = {5, 15, 25, 25, 200, 200};

int price_for_membership[11]={100, 100, 50, 50, 50, 50, 50, 50, 50, 1000, 1000}; // weak


Vec2_int_ pMonsterArenaPlacements[20];
__int16 word_4F0F30[32] ={ 4, 7, 10, 11,                                              
						   4, 7, 10, 11,
					       4, 7, 10, 11,
						   4, 7, 10, 11,
					       4, 7, 10, 11,
					       4, 7, 10, 11,
					       4, 7, 10, 11,
					       7, 11,
						   7, 11};
double dbl_4F2870; // weak
int dword_4F288C; // weak
double dbl_4F5372; // weak
int dword_4F5428[777]; // weak
int dword_4F542C[777]; // weak
_UNKNOWN crtunk_4F54B8; // weak
int dword_4F5B24_ys[777]; // idb
int dword_4F5BF4_xs[777]; // idb
int dword_4F5CC4_ys[777]; // idb
int dword_4F5D98_xs[777]; // idb
int ai_array_4F5E68[500];
int ai_array_4F6638_actor_ids[500];
int ai_near_actors_targets_pid[500];
int ai_arrays_size; // weak
int ai_near_actors_distances[500];
unsigned int ai_near_actors_ids[500];
int dword_4F8580[121]; // weak
int dword_4FA9B0[777]; // weak
int dword_4FA9B4[777]; // weak
char byte_4FAA00; // weak
__int16 am_sounds[12];
_UNKNOWN unk_4FAA20; // weak
char byte_4FAA24; // weak
HWND dword_4FAA28; // idb
char byte_4FAA2C; // weak
char byte_4FAA2D; // weak
char byte_4FAA2E; // weak
int amuint_4FAA34; // weak
int amuint_4FAA38; // weak
int amuint_4FAA3C_blt_xy[2];
int am_uint_4FAA44_blt_xy[2];
int amuint_4FAA4C; // weak
unsigned int uCardID; // idb
int amuint_4FAA54_blt_xy[2];
int amuint_4FAA5C_blt_xy[2];
int dword_4FAA64; // weak
int dword_4FAA68; // weak
int amuint_4FAA6C; // idb
int dword_4FAA70; // weak
char byte_4FAA74; // weak
char am_byte_4FAA75; // weak
char am_byte_4FAA76; // weak
char am_byte_4FAA77; // weak
int amuint_4FAA78[777]; // weak
char am_byte_4FAA7C[777]; // weak
int amuint_4FAA80[777]; // weak
int amuint_4FAA84[777]; // weak
int amuint_4FAA88[777]; // weak
int amuint_4FAA8C[777]; // weak
int amuint_4FAA90[777][2];
int dword_4FABB8; // weak
signed int dword_4FABBC; // idb
unsigned int amuint_4FABC0; // idb
int amuint_4FABC4; // weak
int dword_4FABC8; // weak
char byte_4FABD0[777]; // weak
char byte_4FABD1[777]; // weak
_UNKNOWN unk_4FABD4; // weak
int dword_4FABD8[777]; // weak
int dword_4FABDC[777]; // weak
int dword_4FABE0[777]; // weak
int dword_4FABE4[777]; // weak
int dword_4FABE8[777]; // weak
int dword_4FABEC[777]; // weak
int dword_4FABF0[777]; // weak
int dword_4FABF4[777]; // weak
int dword_4FABF8[777]; // weak
int dword_4FABFC[777]; // weak
int dword_4FAC00[777]; // weak
int dword_4FAC04[777]; // weak
int dword_4FAC08[777]; // weak
int dword_4FAC0C[777]; // weak
_UNKNOWN unk_5052C8; // weak
int dword_505314[777]; // weak
char byte_5054C8[32]; // idb
char byte_5054E8[108];
int dword_505554[777]; // weak
_UNKNOWN unk_505704; // weak
char byte_505880; // weak
char byte_505881; // weak
int amuint_505884; // weak
int amuint_505888; // weak
int amuint_50588C; // weak
int dword_505890; // weak
unsigned int pSRZBufferLineOffsets[480];
int areWeLoadingTexture; // weak
char byte_506130[777]; // weak
int dword_506338; // weak
int dword_50633C; // idb
signed int sRecoveryTime; // idb
unsigned int uRequiredMana; // idb
int _506348_current_lloyd_playerid; // weak
__int64 qword_506350; // weak
char byte_506360; // weak
int dword_506364; // weak
Texture *dword_506404[12]; // weak
Texture *dword_50640C[12]; // weak
unsigned int uExitCancelTextureId;
int dword_50651C; // weak
int dword_506528; // weak
int Autonotes_Instructors_page_flag; // dword_50652C
int Autonotes_Misc_page_flag; //dword_506530
int Book_PageBtn6_flag; //dword_506534
int Book_PageBtn5_flag; //dword_506538
int Book_PageBtn4_flag; // dword_50653C
int Book_PageBtn3_flag; //dword_506540
int BtnDown_flag; //BtnDown_flag
int BtnUp_flag; //BtnUp_flag
int quick_spell_at_page; // weak
char byte_506550; // weak
char *aMoonPhaseNames[5];
int _506568_autonote_type; // weak
char bRecallingBeacon; // weak
int uLastPointedObjectID; // weak
//unsigned __int8 bMonsterInfoUI_bDollInitialized;
char *aSpellNames[44];
int pMainScreenNum; // weak
int dword_506980_uW; // weak
int dword_506984_uZ; // weak
int dword_506988_uY; // weak
int dword_50698C_uX; // weak
int uGameMenuUI_CurentlySelectedKeyIdx; // 506E68
unsigned int pPrevVirtualCidesMapping[27];
int KeyboardPageNum; // weak
int dword_506F0C[777]; // idb
int uRestUI_FoodRequiredToRest;
int dword_506F14; // weak
int _506F18_num_hours_to_sleep; // weak
int dword_506F1C; // weak
int pVisibleWindowsIdxs[20]; // weak
int uNumVisibleWindows;
char bFlashHistoryBook; // weak
char bFlashAutonotesBook; // weak
char bFlashQuestBook; // weak
int uTextureID_PlayerBuff_PainReflection; // weak
int uTextureID_PlayerBuff_Hammerhands; // weak
int uTextureID_PlayerBuff_Preservation; // weak
int uTextureID_PlayerBuff_Bless; // weak
int uTextureID_Btn_QuickReference; // weak
int dword_5079B4; // weak
int dword_5079C8; // weak
int dword_5079CC; // weak
int dword_5079D0; // weak
int dword_5079D8; // weak
struct GUIButton *pBtn_ZoomOut; // idb
struct GUIButton *pBtn_ZoomIn; // idb
unsigned int uGameUIFontShadow;
unsigned int uGameUIFontMain;
int dword_507B00_spell_info_to_draw_in_popup; // weak
char *aMonthNames[12];
char *aDayNames[7];
char *aSpellSchoolNames[9];
char *aAttributeNames[7];
int dword_507B94; // weak
int dword_507B98_ctrl_pressed; // weak
unsigned int uActiveCharacter;
int dword_507BF0_is_there_popup_onscreen; // weak
int dword_507CBC; // weak
int dword_507CC0_activ_ch; // weak
__int64 GameUI_RightPanel_BookFlashTimer; // weak
int _507CD4_RestUI_hourglass_anim_controller; // weak
int dword_507CD8; // weak
int dword_50B570[50]; // weak
int dword_50B638[50]; // weak
stru367 stru_50B700;
/*int stru_50B700.field_0; // weak
int stru_50B700.field_38[777]; // idb
int stru_50B700._view_transformed_ys[45];
int stru_50B700.field_128[777];
int stru_50B700._view_transformed_zs[45];
int stru_50B700.field_218[777];
int stru_50B700._view_transformed_xs[45];
int stru_50B700._screen_space_y[777];
int stru_50B700.field_3E4[777];
int stru_50B700.field_2F0[2]; // idb
int stru_50B700._ys[3 + 45];
int stru_50B700._ys2[48]; // idb
int stru_50B700._screen_space_x[777]; // idb
int stru_50B700.field_3D4[777]; // weak
int stru_50B700._xs[777]; // weak
int dword_50BAE8[777]; // weak
int stru_50B700._xs2[3 + 45]; // weak
int stru_50B700._xs3[48]; // weak*/
int dword_50BC10[100]; // weak
int dword_50BDA0[100]; // weak
int dword_50BF30[100]; // weak
char town_portal_caster_id; // weak
int some_active_character; // weak
//_UNKNOWN unk_50C190; // weak
int dword_50C968; // weak
unsigned int pIconIDs_Turn[5];
unsigned int uIconID_TurnStop;
unsigned int uIconID_TurnHour;
int uIconID_CharacterFrame; // idb
unsigned int uIconID_TurnStart;
int dword_50C994; // weak
int dword_50C998_turnbased_icon_1A; // weak
int uSpriteID_Spell11; // idb
_UNKNOWN unk_50C9A0; // weak
int _50C9A8_item_enchantment_timer = 0; // weak
int dword_50C9AC; // weak
int dword_50C9D0; // weak
int dword_50C9D4; // weak
int dword_50C9D8; // weak
int dword_50C9DC; // weak
struct NPCData *ptr_50C9E0;
//int dword_50C9E8; // idb
//int dword_50C9EC[120]; // weak
int dword_50CDC8;
int dword_50CDCC; // weak
int bProcessorIsNotIntel; // weak
Vec3_int_ layingitem_vel_50FDFC;
char pStartingMapName[777]; // idb
unsigned __int8 IsPlayerWearingWatersuit[5];
char party_has_equipment[54];
char byte_5111F6[16];

int _unused000; // weak

unsigned __int16 pOdmMinimap[117][137];
unsigned int uNumBlueFacesInBLVMinimap;
unsigned __int16 pBlueFacesInBLVMinimapIDs[50];
int pTextureIDs_PartyBuffIcons[14];
unsigned int uIconIdx_FlySpell;
unsigned int uIconIdx_WaterWalk;
int dword_576E28; // weak
int _576E2C_current_minimap_zoom; // weak
__int64 _5773B8_event_timer; // weak
int _5773C0_unused; // weak


int dword_591084; // weak
struct Actor *pDialogue_SpeakingActor;
unsigned int uDialogueType;
int sDialogue_SpeakingActorNPC_ID;
struct LevelDecoration *_591094_decoration;
char sHouseName[200]; // idb
int uCurrentHouse_Animation; // weak
char *dword_591164_teleport_map_name; // idb
int dword_591168_teleport_speedz; // weak
int dword_59116C_teleport_directionx; // weak
int dword_591170_teleport_directiony; // weak
int dword_591174_teleportz; // weak
int dword_591178_teleporty; // weak
int dword_59117C_teleportx; // weak
char byte_591180[6][100]; // idb
struct NPCData *HouseNPCData[6];//array_5913D8

struct Texture *pTexture_591428;
struct Texture *pTexture_outside; // idb
struct Texture *pTexture_Dialogue_Background;
_UNKNOWN unk_597F10; // weak
char byte_5B0938[2000];
int EvtTargetObj; // 0x5B5920
int _unused_5B5924_is_travel_ui_drawn = false; // 005B5924
int _5B65A8_npcdata_uflags_or_other; // weak
int _5B65AC_npcdata_fame_or_other; // weak
int _5B65B0_npcdata_rep_or_other; // weak
int _5B65B4_npcdata_loword_house_or_other; // weak
int _5B65B8_npcdata_hiword_house_or_other; // weak
int dword_5B65BC; // weak
int dword_5B65C0; // weak
int dword_5B65C4; // weak
int dword_5B65C8_timers_count; // weak
int dword_5B65CC; // weak
signed int dword_5B65D0_dialogue_actor_npc_id; // weak
int dword_5C3418; // weak
int dword_5C341C; // weak
int _5C3420_pDecoration;
char byte_5C3427[777]; // weak
char GameUI_Footer_TimedString[200];
char pFooterString[200];
unsigned int GameUI_Footer_TimeLeft;
int bForceDrawFooter; // weak
int dword_5C35C0; // weak
int bDialogueUI_InitializeActor_NPC_ID; // weak
int dword_5C35C8; // weak
char *p2DEventsTXT_Raw;

int dword_5C35D4; // weak
char *aAMPMNames[2];
char byte_5C45AF[777]; // weak

char pFinalMessage[4096]; // idb
char pTmpBuf[2000];
char pTmpBuf2[2000];
char byte_5C6D50[777]; // weak
int ui_current_text_color; // weak
__int64 qword_5C6DF0; // weak
int dword_5C6DF8; // weak
char item__getname_buffer[104]; // idb
char *pClassDescriptions[36];
char *pAttributeDescriptions[7];
char *pGrandSkillDesc[38];
char *pMasterSkillDesc[38];
char *pExpertSkillDesc[38];
char *pNormalSkillDesc[38];
char *pSkillDesc[38];
char *pHealthPointsAttributeDescription;
char *pSpellPointsAttributeDescription;
char *pArmourClassAttributeDescription;
char *pPlayerConditionAttributeDescription; // idb
char *pFastSpellAttributeDescription;
char *pPlayerAgeAttributeDescription;
char *pPlayerLevelAttributeDescription;
char *pPlayerExperienceAttributeDescription;
char *pAttackBonusAttributeDescription;
char *pAttackDamageAttributeDescription;
char *pMissleBonusAttributeDescription;
char *pMissleDamageAttributeDescription;
char *pFireResistanceAttributeDescription;
char *pAirResistanceAttributeDescription;
char *pWaterResistanceAttributeDescription;
char *pEarthResistanceAttributeDescription;
char *pMindResistanceAttributeDescription;
char *pBodyResistanceAttributeDescription;
char *pSkillPointsAttributeDescription;
char *pClassTXT_Raw;
char *pStatsTXT_Raw;
char *pSkillDescTXT_Raw;

struct FactionTable *pFactionTable;
char byte_5C8D1A[777]; // weak

char byte_5E4C15[777]; // weak
char *pSomeItemsNames[14];

char *pMonstersTXT_Raw;
char *pMonsterPlacementTXT_Raw;
char *pSpellsTXT_Raw;
char *pMapStatsTXT_Raw;
char *pHostileTXT_Raw;
char *pPotionsTXT_Raw;
char *pPotionNotesTXT_Raw;

int _6807B8_level_decorations_ids[777]; // idb
int _6807E0_num_decorations_with_sounds_6807B8; // weak
int _6807E8_level_decorations_ids[777]; // idb
int _6836C8_num_decorations_6807E8; // weak
int dword_69B010[64];
float flt_69B138_dist; // weak
char byte_69BD41_unused; // weak
unsigned int uTextureID_x_u;
unsigned int uTextureID_LS_saveU;
unsigned int uTextureID_LS_loadU;
unsigned int uTextureID_AR_DN_DN;
unsigned int uTextureID_AR_UP_DN;
unsigned int uTextureID_LS_;
unsigned int uTextureID_x_d;
unsigned int uTextureID_save_up;
unsigned int uTextureID_load_up;
unsigned int uTextureID_loadsave;
_UNKNOWN _69FBB4_ptr_iterator_end; // weak
_UNKNOWN unk_6A0758; // weak
int pSaveListPosition; // weak
unsigned int uLoadGameUI_SelectedSlot;
HWND hInsertCDWindow; // idb
int uCPUSpeed; // weak
char cMM7GameCDDriveLetter; // idb
void *ptr_6A0D08;
int _6A0D0C_txt_lod_loading; // weak
int _6A0D10_txt_lod_loading__unused; // weak
MENU_STATE uCurrentMenuID;
unsigned int uGameState;
int uDefaultTravelTime_ByFoot; // weak
int day_attrib; // weak
int day_fogrange_1; // weak
int day_fogrange_2; // weak
struct TileTable *pTileTable; // idb
int texmapping_terrain_subdivsize; // weak
int texmapping_terrain_subdivpow2; // weak
int texmapping_building_subdivsize; // weak
int texmapping_building_subdivpow2; // weak
int unnamed_6BE060[2] = {0, 1};
int mipmapping_building_mm1; // weak
int mipmapping_building_mm2; // weak
int mipmapping_building_mm3; // weak
int mipmapping_terrain_mm1; // weak
int mipmapping_terrain_mm2; // weak
int mipmapping_terrain_mm3; // weak
int outdoor_grid_band_1; // idb
int outdoor_grid_band_2; // idb
int outdoor_grid_band_3; // idb
char outdoor_day_top_r; // weak
char outdoor_day_top_g; // weak
char outdoor_day_top_b; // weak
char outdoor_day_bottom_r; // weak
char outdoor_day_bottom_g; // weak
char outdoor_day_bottom_b; // weak
char outdoor_night_top_r; // weak
char outdoor_night_top_g; // weak
char outdoor_night_top_b; // weak
char outdoor_night_bottom_r; // weak
char outdoor_night_bottom_g; // weak
char outdoor_night_bottom_b; // weak
char pDefaultSkyTexture[777]; // idb
char byte_6BE124_cfg_textures_DefaultGroundTexture[16]; // idb
int _6BE134_odm_main_tile_group; // weak
int dword_6BE138; // weak
int dword_6BE13C_uCurrentlyLoadedLocationID; // weak
float fWalkSpeedMultiplier = 1.0f; // weak
float fBackwardWalkSpeedMultiplier = 1.0f; // weak
float fTurnSpeedMultiplier = 1.0f; // weak
float flt_6BE150_look_up_down_dangle = 1.0f; // weak
HWND hWnd; // idb
int uWindowWidth; // idb
int uWindowHeight; // idb
int uWindowX; // idb
int uWindowY; // idb
LONG uWindowStyle; // idb
HMENU hOSMenu; // idb
int dword_6BE340; // weak
char pCurrentMapName[20]; // idb
unsigned int uLevelMapStatsID;
int dword_6BE364_game_settings_1 = 0; // weak
int dword_6BE368_debug_settings_2 = 0; // weak
unsigned __int8 bUseLoResSprites = false;
unsigned __int8 bUseRegistry = true;
unsigned __int8 bCanLoadFromCD = false;
int bShowDamage; // idb
unsigned int bAlwaysRun;
unsigned int bFlipOnExit;
int dword_6BE384_2dacceloff; // weak
char byte_6BE388_graphicsmode; // weak
unsigned int uTurnSpeed;
float flt_6BE3A0; // weak
float flt_6BE3A4_debug_recmod1;
float flt_6BE3A8_debug_recmod2;
float flt_6BE3AC_debug_recmod1_x_1_6;
char byte_6BE3B0[20]; // idb
char bUnderwater = false; // weak
char bNoNPCHiring = false; // weak
int _702AC0_unused = 0; // weak
int _702AC4_unused = 0; // weak
char _702ACC_unused = 0; // weak
int bDebugResouces; // weak
unsigned int bNoVideo = false;
bool bNoIntro = false;
bool bNoLogo = false;
bool bNoCD = false;
bool bNoSound = false;
int aborting_app; // weak
int dword_720020_zvalues[100];
int dword_7201B0_zvalues[299];
int uTextureID_720980; // weak
int _720984_unused; // weak
char _72098C_unused; // weak
__int16 word_7209A0_intercepts_ys_plus_ys[104];
__int16 word_720A70_intercepts_xs_plus_xs[104];
__int16 word_720B40_intercepts_zs[104];
__int16 word_720C10_intercepts_xs[102];
int dword_720CDC;
__int16 word_720CE0_ys[777]; // idb
__int16 word_720DB0_xs[777]; // idb
int dword_720E80[20];
int dword_720ED0[20];
int dword_720F20[20];
__int16 word_720F70[777]; // idb
__int16 word_721040[777]; // idb
int dword_721110[777]; // idb
int dword_721160[777]; // idb
int odm_floor_level[20]; // idb
int blv_prev_party_x; // weak
int blv_prev_party_z; // weak
int blv_prev_party_y; // weak
char *dword_721660; // idb
char *dword_721664; // idb
NPCTopic pNPCTopics[789];
char *dword_722F10; // idb
const char *pQuestTable[512];
_UNKNOWN unk_723714; // weak
char *dword_723718_autonote_related; // idb
int dword_72371C[777]; // weak
const char *pScrolls[82];
int dword_723E80_award_related[777]; // weak
int dword_723E84[777]; // weak
int dword_7241C8; // weak
struct unk_F7B60C stru_73C834; // struct @ MM7.exe::0073C834

char *aNPCProfessionNames[59];
char *pAwardsTXT_Raw;
char *pScrollsTXT_Raw;
char *pMerchantsTXT_Raw;
const char *pMerchantsBuyPhrases[7];
const char *pMerchantsSellPhrases[7];
const char *pMerchantsRepairPhrases[7];
const char *pMerchantsIdentifyPhrases[7];
char *pTransitionsTXT_Raw;
char *pAutonoteTXT_Raw;
char *pQuestsTXT_Raw;
 unsigned int    uNumTerrainNormals;
 struct Vec3_float_ *pTerrainNormals;
 unsigned short  pTerrainNormalIndices[128 * 128 * 2];
 unsigned int    pTerrainSomeOtherData[128 * 128 * 2];
struct unk_F7B60C stru_76D578; // struct @ MM7.exe::0076D578
struct unk_F7B60C stru_76D590; // struct @ MM7.exe::0076D590
struct unk_F7B60C stru_76D5A8; // struct @ MM7.exe::0076D5A8
char byte_76D5C0; // weak
int terrain_76D5C8[128];
int terrain_76D7C8[128];
int terrain_76D9C8[128];
int terrain_76DBC8[128];
int terrain_76DDC8[128];
int terrain_76DFC8[128];
int terrain_76E1C8[128];
int terrain_76E3C8[128];

_UNKNOWN unk_801A00; // weak
_UNKNOWN unk_801A0C; // weak
char byte_80AA10; // weak
int dword_80AA14; // weak
int dword_80AA18; // weak
int dword_80AA1C; // weak
int dword_80AA20; // weak
unsigned int uNumElementsIn80AA28;
struct stru148 *ptr_80AA28[2000];
struct Edge *pNewEdges;
struct Surf *pSurfs;
struct Edge *pEdges;
struct Span *pSpans;
struct Edge *ptr_80C978_Edges;
struct Surf *ptr_80C97C_Surfs;
struct Edge *ptr_80CA10[480];
_UNKNOWN unk_80D190; // weak
int dword_A74C88; // weak
unsigned int uPlayerCreationUI_SkySliderPos;
int uPlayerCreationUI_ArrowAnim;
unsigned int uPlayerCreationUI_SelectedCharacter;
int dword_A74CDC; // weak
struct Texture *pTexture_PlayerFaceMask;
struct Texture *pTexture_PlayerFaceEradicated;
struct Texture *pTexture_PlayerFaceDead;
struct Texture *pTextures_PlayerFaces[4][56];
struct Player *pPlayers[5];
__int64 qword_A750D8; // weak
__int16 word_A750E0; // weak
__int16 word_A750E2; // weak
char *pClassNames[36];
char *aCharacterConditionNames[19];
char *pSkillNames[38];
char byte_AE3368[777]; // weak
char byte_AE3369; // weak
char byte_AE336A; // weak
char byte_AE336B; // weak
int dword_AE336C; // weak
int dword_AE3370; // weak
char byte_AE5B91; // weak
int dword_F1B430[32]; // weak
//int dword_F8B144; // nexindex [-1] to the following
int player_levels[4] = {1, 1, 1, 1};
__int16 word_F8B158[777]; // weak
struct Texture *ShopTexture; // idb
struct Texture *ItemsInShopTexture[12];
__int16 word_F8B1A0; // weak
const char *dword_F8B1A4; // idb
int contract_approved; // weak
int dword_F8B1AC_award_bit_number; // idb
int dword_F8B1B0; // weak
int gold_transaction_amount; // F8B1B4
char *pShopOptions[4];
_UNKNOWN unk_F8B1C8; // weak
int dword_F8B1D8; // weak
int dword_F8B1DC; // weak
int dword_F8B1E0; // weak
int dword_F8B1E4; // weak
const char *current_npc_text; // idb
char dialogue_show_profession_details = false; // F8B1EC
char byte_F8B1EF[777]; // weak
char byte_F8B1F0[4];
int dword_F8B1F4; // weak



//_UNKNOWN unk_F8BA50; // weak
char byte_F8BC0C; // weak
int bGameoverLoop = 0; // weak
__int16 intersect_face_vertex_coords_list_a[104]; // word_F8BC48
__int16 intersect_face_vertex_coords_list_b[104]; // word_F8BD18
int dword_F93F20; // weak
int dword_F93F70; // weak

volatile bool initing;

//int crt_F94004; // weak
//int crtdword_F9400C; // weak
FARPROC lpfn; // idb