// global_0.cpp

#include "types.h"

// address: 0x8012CDC8
extern int NumOfMonsterListLevels;

// address: 0x800A9BE0
// size: 0x80
extern struct MonstLevel AllLevels[16];

// address: 0x8012CAAC
// size: 0x4
static unsigned char NumsLEV1M1A[4];

// address: 0x8012CAB0
// size: 0x4
static unsigned char NumsLEV1M1B[4];

// address: 0x8012CAB4
// size: 0x5
static unsigned char NumsLEV1M1C[5];

// address: 0x8012CABC
// size: 0x4
static unsigned char NumsLEV2M2A[4];

// address: 0x8012CAC0
// size: 0x4
static unsigned char NumsLEV2M2B[4];

// address: 0x8012CAC4
// size: 0x3
static unsigned char NumsLEV2M2C[3];

// address: 0x8012CAC8
// size: 0x4
static unsigned char NumsLEV2M2D[4];

// address: 0x8012CACC
// size: 0x4
static unsigned char NumsLEV2M2QA[4];

// address: 0x8012CAD0
// size: 0x4
static unsigned char NumsLEV2M2QB[4];

// address: 0x8012CAD4
// size: 0x4
static unsigned char NumsLEV3M3A[4];

// address: 0x8012CAD8
// size: 0x4
static unsigned char NumsLEV3M3QA[4];

// address: 0x8012CADC
// size: 0x4
static unsigned char NumsLEV3M3B[4];

// address: 0x8012CAE0
// size: 0x4
static unsigned char NumsLEV3M3C[4];

// address: 0x8012CAE4
// size: 0x4
static unsigned char NumsLEV4M4A[4];

// address: 0x8012CAE8
// size: 0x4
static unsigned char NumsLEV4M4QA[4];

// address: 0x8012CAEC
// size: 0x4
static unsigned char NumsLEV4M4B[4];

// address: 0x8012CAF0
// size: 0x5
static unsigned char NumsLEV4M4QB[5];

// address: 0x8012CAF8
// size: 0x4
static unsigned char NumsLEV4M4C[4];

// address: 0x8012CAFC
// size: 0x5
static unsigned char NumsLEV4M4QC[5];

// address: 0x8012CB04
// size: 0x4
static unsigned char NumsLEV4M4D[4];

// address: 0x8012CB08
// size: 0x4
static unsigned char NumsLEV5M5A[4];

// address: 0x8012CB0C
// size: 0x4
static unsigned char NumsLEV5M5B[4];

// address: 0x8012CB10
// size: 0x4
static unsigned char NumsLEV5M5C[4];

// address: 0x8012CB14
// size: 0x4
static unsigned char NumsLEV5M5D[4];

// address: 0x8012CB18
// size: 0x4
static unsigned char NumsLEV5M5E[4];

// address: 0x8012CB1C
// size: 0x3
static unsigned char NumsLEV5M5F[3];

// address: 0x8012CB20
// size: 0x4
static unsigned char NumsLEV5M5QA[4];

// address: 0x8012CB24
// size: 0x5
static unsigned char NumsLEV6M6A[5];

// address: 0x8012CB2C
// size: 0x3
static unsigned char NumsLEV6M6B[3];

// address: 0x8012CB30
// size: 0x4
static unsigned char NumsLEV6M6C[4];

// address: 0x8012CB34
// size: 0x3
static unsigned char NumsLEV6M6D[3];

// address: 0x8012CB38
// size: 0x3
static unsigned char NumsLEV6M6E[3];

// address: 0x8012CB3C
// size: 0x3
static unsigned char NumsLEV6M6QA[3];

// address: 0x8012CB40
// size: 0x4
static unsigned char NumsLEV7M7A[4];

// address: 0x8012CB44
// size: 0x4
static unsigned char NumsLEV7M7B[4];

// address: 0x8012CB48
// size: 0x4
static unsigned char NumsLEV7M7C[4];

// address: 0x8012CB4C
// size: 0x3
static unsigned char NumsLEV7M7D[3];

// address: 0x8012CB50
// size: 0x3
static unsigned char NumsLEV7M7E[3];

// address: 0x8012CB54
// size: 0x2
static unsigned char NumsLEV8M8QA[2];

// address: 0x8012CB58
// size: 0x2
static unsigned char NumsLEV8M8A[2];

// address: 0x8012CB5C
// size: 0x4
static unsigned char NumsLEV8M8B[4];

// address: 0x8012CB60
// size: 0x3
static unsigned char NumsLEV8M8C[3];

// address: 0x8012CB64
// size: 0x2
static unsigned char NumsLEV8M8D[2];

// address: 0x8012CB68
// size: 0x2
static unsigned char NumsLEV8M8E[2];

// address: 0x8012CB6C
// size: 0x4
static unsigned char NumsLEV9M9A[4];

// address: 0x8012CB70
// size: 0x3
static unsigned char NumsLEV9M9B[3];

// address: 0x8012CB74
// size: 0x2
static unsigned char NumsLEV9M9C[2];

// address: 0x8012CB78
// size: 0x2
static unsigned char NumsLEV9M9D[2];

// address: 0x8012CB7C
// size: 0x3
static unsigned char NumsLEV10M10A[3];

// address: 0x8012CB80
// size: 0x2
static unsigned char NumsLEV10M10B[2];

// address: 0x8012CB84
// size: 0x2
static unsigned char NumsLEV10M10C[2];

// address: 0x8012CB88
// size: 0x2
static unsigned char NumsLEV10M10D[2];

// address: 0x8012CB8C
// size: 0x3
static unsigned char NumsLEV10M10QA[3];

// address: 0x8012CB90
// size: 0x3
static unsigned char NumsLEV11M11A[3];

// address: 0x8012CB94
// size: 0x3
static unsigned char NumsLEV11M11B[3];

// address: 0x8012CB98
// size: 0x3
static unsigned char NumsLEV11M11C[3];

// address: 0x8012CB9C
// size: 0x3
static unsigned char NumsLEV11M11D[3];

// address: 0x8012CBA0
// size: 0x2
static unsigned char NumsLEV11M11E[2];

// address: 0x8012CBA4
// size: 0x3
static unsigned char NumsLEV12M12A[3];

// address: 0x8012CBA8
// size: 0x3
static unsigned char NumsLEV12M12B[3];

// address: 0x8012CBAC
// size: 0x3
static unsigned char NumsLEV12M12C[3];

// address: 0x8012CBB0
// size: 0x3
static unsigned char NumsLEV12M12D[3];

// address: 0x8012CBB4
// size: 0x3
static unsigned char NumsLEV13M13A[3];

// address: 0x8012CBB8
// size: 0x2
static unsigned char NumsLEV13M13B[2];

// address: 0x8012CBBC
// size: 0x3
static unsigned char NumsLEV13M13QB[3];

// address: 0x8012CBC0
// size: 0x3
static unsigned char NumsLEV13M13C[3];

// address: 0x8012CBC4
// size: 0x2
static unsigned char NumsLEV13M13D[2];

// address: 0x8012CBC8
// size: 0x3
static unsigned char NumsLEV14M14A[3];

// address: 0x8012CBCC
// size: 0x3
static unsigned char NumsLEV14M14B[3];

// address: 0x8012CBD0
// size: 0x3
static unsigned char NumsLEV14M14QB[3];

// address: 0x8012CBD4
// size: 0x3
static unsigned char NumsLEV14M14C[3];

// address: 0x8012CBD8
// size: 0x3
static unsigned char NumsLEV14M14D[3];

// address: 0x8012CBDC
// size: 0x2
static unsigned char NumsLEV14M14E[2];

// address: 0x8012CBE0
// size: 0x3
static unsigned char NumsLEV15M15A[3];

// address: 0x8012CBE4
// size: 0x3
static unsigned char NumsLEV15M15B[3];

// address: 0x8012CBE8
// size: 0x2
static unsigned char NumsLEV15M15C[2];

// address: 0x8012CBEC
// size: 0x2
static unsigned char NumsLEV15M15QA[2];

// address: 0x8012CBF0
// size: 0x3
static unsigned char NumsLEV16M16D[3];

// address: 0x800A9700
// size: 0x30
static struct MonstList ChoiceListLEV1[3];

// address: 0x800A9730
// size: 0x60
static struct MonstList ChoiceListLEV2[6];

// address: 0x800A9790
// size: 0x40
static struct MonstList ChoiceListLEV3[4];

// address: 0x800A97D0
// size: 0x70
static struct MonstList ChoiceListLEV4[7];

// address: 0x800A9840
// size: 0x70
static struct MonstList ChoiceListLEV5[7];

// address: 0x800A98B0
// size: 0x60
static struct MonstList ChoiceListLEV6[6];

// address: 0x800A9910
// size: 0x50
static struct MonstList ChoiceListLEV7[5];

// address: 0x800A9960
// size: 0x60
static struct MonstList ChoiceListLEV8[6];

// address: 0x800A99C0
// size: 0x40
static struct MonstList ChoiceListLEV9[4];

// address: 0x800A9A00
// size: 0x50
static struct MonstList ChoiceListLEV10[5];

// address: 0x800A9A50
// size: 0x50
static struct MonstList ChoiceListLEV11[5];

// address: 0x800A9AA0
// size: 0x40
static struct MonstList ChoiceListLEV12[4];

// address: 0x800A9AE0
// size: 0x50
static struct MonstList ChoiceListLEV13[5];

// address: 0x800A9B30
// size: 0x60
static struct MonstList ChoiceListLEV14[6];

// address: 0x800A9B90
// size: 0x40
static struct MonstList ChoiceListLEV15[4];

// address: 0x800A9BD0
// size: 0x10
static struct MonstList ChoiceListLEV16[1];

// address: 0x8012E688
// size: 0x5C
static struct TASK *GameTaskPtr;

// address: 0x800A9C60
// size: 0x348
extern struct LOAD_IMAGE_ARGS AllArgs[30];

// address: 0x8012CDD8
extern int ArgsSoFar;

// address: 0x8012CDE8
extern unsigned long *ThisOt;

// address: 0x8012CDEC
// size: 0x28
extern struct POLY_FT4 *ThisPrimAddr;

// address: 0x8012E68C
static long hndPrimBuffers;

// address: 0x8012E690
// size: 0x1C
static struct PRIM_BUFFER *PrimBuffers;

// address: 0x8012E694
static unsigned char BufferDepth;

// address: 0x8012E695
static unsigned char WorkRamId;

// address: 0x8012E696
static unsigned char ScrNum;

// address: 0x8012E698
// size: 0x70
static struct SCREEN_ENV *Screens;

// address: 0x8012E69C
// size: 0x1C
static struct PRIM_BUFFER *PbToClear;

// address: 0x8012E6A0
static unsigned char BufferNum;

// address: 0x8012CDF0
// size: 0x28
extern struct POLY_FT4 *AddrToAvoid;

// address: 0x8012E6A1
static unsigned char LastBuffer;

// address: 0x8012E6A4
// size: 0x14
static struct DISPENV *DispEnvToPut;

// address: 0x8012E6A8
static int ThisOtSize;

// address: 0x8012CDF4
// size: 0x8
static struct RECT ScrRect;

// address: 0x8012E6AC
static int VidWait;

// address: 0x8012EB28
// size: 0xE0
static struct SCREEN_ENV screen[2];

// address: 0x8012E6B0
static void (*VbFunc)();

// address: 0x8012E6B4
static unsigned long VidTick;

// address: 0x8012E6B8
static int VXOff;

// address: 0x8012E6BC
static int VYOff;

// address: 0x8012CE08
// size: 0x1C
extern struct LNK_OPTS *Gaz;

// address: 0x8012CE0C
extern int LastFmem;

// address: 0x8012CDFC
extern unsigned int GSYS_MemStart;

// address: 0x8012CE00
extern unsigned int GSYS_MemEnd;

// address: 0x800A9FA8
// size: 0x28
static struct MEM_INIT_INFO PsxMem;

// address: 0x800A9FD0
// size: 0x28
static struct MEM_INIT_INFO PsxFastMem;

// address: 0x8012CE04
extern int LowestFmem;

// address: 0x8012CE1C
extern int FileSYS;

// address: 0x8012E6C0
// size: 0x14
static struct FileIO *FileSystem;

// address: 0x8012E6C4
// size: 0x14
static struct FileIO *OverlayFileSystem;

// address: 0x8012CE36
extern short DavesPad;

// address: 0x8012CE38
extern short DavesPadDeb;

// address: 0x800A9FF8
// size: 0x32
extern char _6FileIO_FileToLoad[50];

// address: 0x8012EC08
// size: 0x28
static struct POLY_FT4 MyFT4;

// address: 0x800AA89C
// size: 0x5C0
extern struct TextDat *AllDats[368];

// address: 0x8012CE88
extern int TpW;

// address: 0x8012CE8C
extern int TpH;

// address: 0x8012CE90
extern int TpXDest;

// address: 0x8012CE94
extern int TpYDest;

// address: 0x8012CE98
// size: 0x8
extern struct RECT R;

// address: 0x800AAE5C
// size: 0x34
extern struct POLY_GT4 MyGT4;

// address: 0x800AAE90
// size: 0x28
extern struct POLY_GT3 MyGT3;

// address: 0x800AA02C
// size: 0x870
extern struct TextDat DatPool[20];

// address: 0x8012CEAC
static bool ChunkGot;

// address: 0x800AAEB8
// size: 0x10
extern char STREAM_DIR[16];

// address: 0x800AAEC8
// size: 0x10
extern char STREAM_BIN[16];

// address: 0x800AAED8
// size: 0x12C
extern unsigned char EAC_DirectoryCache[300];

// address: 0x8012CEC0
extern unsigned long BL_NoLumpFiles;

// address: 0x8012CEC4
extern unsigned long BL_NoStreamFiles;

// address: 0x8012CEC8
// size: 0x14
extern struct STRHDR *LFileTab;

// address: 0x8012CECC
// size: 0x14
extern struct STRHDR *SFileTab;

// address: 0x8012CED0
extern unsigned char FileLoaded;

// address: 0x8012CEF4
extern int NoTAllocs;

// address: 0x800AB004
// size: 0x190
extern struct MEMSTRUCT MemBlock[50];

// address: 0x8012E6D0
static bool CanPause;

// address: 0x8012E6D4
static bool Paused;

// address: 0x8012E6D8
static char InActivePad;

// address: 0x8012EC30
// size: 0x10
static struct Dialog PBack;

// address: 0x800AB26C
// size: 0x22
extern unsigned char RawPadData0[34];

// address: 0x800AB290
// size: 0x22
extern unsigned char RawPadData1[34];

// address: 0x800AB2B4
// size: 0x384
extern unsigned char demo_buffer[900];

// address: 0x8012CF10
extern int demo_pad_time;

// address: 0x8012CF14
extern int demo_pad_count;

// address: 0x800AB194
// size: 0x6C
extern struct CPad Pad0;

// address: 0x800AB200
// size: 0x6C
extern struct CPad Pad1;

// address: 0x8012CF18
extern unsigned long demo_finish;

// address: 0x8012CF1C
extern int cac_pad;

// address: 0x8012CF3C
// size: 0x28
extern struct POLY_FT4 *CharFt4;

// address: 0x8012CF40
extern int CharFrm;

// address: 0x8012CF29
extern unsigned char WHITER;

// address: 0x8012CF2A
extern unsigned char WHITEG;

// address: 0x8012CF2B
extern unsigned char WHITEB;

// address: 0x8012CF2C
extern unsigned char BLUER;

// address: 0x8012CF2D
extern unsigned char BLUEG;

// address: 0x8012CF2E
extern unsigned char BLUEB;

// address: 0x8012CF2F
extern unsigned char REDR;

// address: 0x8012CF30
extern unsigned char REDG;

// address: 0x8012CF31
extern unsigned char REDB;

// address: 0x8012CF32
extern unsigned char GOLDR;

// address: 0x8012CF33
extern unsigned char GOLDG;

// address: 0x8012CF34
extern unsigned char GOLDB;

// address: 0x800AB638
// size: 0x21C
extern struct CFont MediumFont;

// address: 0x800AB854
// size: 0x21C
extern struct CFont LargeFont;

// address: 0x8012CF38
extern bool buttoncol;

// address: 0x800ABA70
// size: 0xB4
extern struct FontItem LFontTab[90];

// address: 0x800ABB24
// size: 0x10
extern struct FontTab LFont;

// address: 0x800ABB34
// size: 0x136
extern struct FontItem MFontTab[155];

// address: 0x800ABC6C
// size: 0x10
extern struct FontTab MFont;

// address: 0x8012CF55
extern unsigned char DialogRed;

// address: 0x8012CF56
extern unsigned char DialogGreen;

// address: 0x8012CF57
extern unsigned char DialogBlue;

// address: 0x8012CF58
extern unsigned char DialogTRed;

// address: 0x8012CF59
extern unsigned char DialogTGreen;

// address: 0x8012CF5A
extern unsigned char DialogTBlue;

// address: 0x8012CF5C
// size: 0x6C
extern struct TextDat *DialogTData;

// address: 0x8012CF60
extern int DialogBackGfx;

// address: 0x8012CF64
extern int DialogBackW;

// address: 0x8012CF68
extern int DialogBackH;

// address: 0x8012CF6C
extern int DialogBorderGfx;

// address: 0x8012CF70
extern int DialogBorderTLW;

// address: 0x8012CF74
extern int DialogBorderTLH;

// address: 0x8012CF78
extern int DialogBorderTRW;

// address: 0x8012CF7C
extern int DialogBorderTRH;

// address: 0x8012CF80
extern int DialogBorderBLW;

// address: 0x8012CF84
extern int DialogBorderBLH;

// address: 0x8012CF88
extern int DialogBorderBRW;

// address: 0x8012CF8C
extern int DialogBorderBRH;

// address: 0x8012CF90
extern int DialogBorderTW;

// address: 0x8012CF94
extern int DialogBorderTH;

// address: 0x8012CF98
extern int DialogBorderBW;

// address: 0x8012CF9C
extern int DialogBorderBH;

// address: 0x8012CFA0
extern int DialogBorderLW;

// address: 0x8012CFA4
extern int DialogBorderLH;

// address: 0x8012CFA8
extern int DialogBorderRW;

// address: 0x8012CFAC
extern int DialogBorderRH;

// address: 0x8012CFB0
extern int DialogBevelGfx;

// address: 0x8012CFB4
extern int DialogBevelCW;

// address: 0x8012CFB8
extern int DialogBevelCH;

// address: 0x8012CFBC
extern int DialogBevelLRW;

// address: 0x8012CFC0
extern int DialogBevelLRH;

// address: 0x8012CFC4
extern int DialogBevelUDW;

// address: 0x8012CFC8
extern int DialogBevelUDH;

// address: 0x8012CFCC
extern int MY_DialogOTpos;

// address: 0x8012E6DC
static unsigned char DialogGBack;

// address: 0x8012E6DD
static char GShadeX;

// address: 0x8012E6DE
static char GShadeY;

// address: 0x8012E6E4
// size: 0x8
static unsigned char RandBTab[8];

// address: 0x800ABCBC
// size: 0x70
extern int Cxy[28];

// address: 0x8012CF4F
extern unsigned char BORDERR;

// address: 0x8012CF50
extern unsigned char BORDERG;

// address: 0x8012CF51
extern unsigned char BORDERB;

// address: 0x8012CF52
extern unsigned char BACKR;

// address: 0x8012CF53
extern unsigned char BACKG;

// address: 0x8012CF54
extern unsigned char BACKB;

// address: 0x800ABC7C
// size: 0x40
static char GShadeTab[64];

// address: 0x8012CF4D
static char GShadePX;

// address: 0x8012CF4E
static char GShadePY;

// address: 0x8012CFD9
extern unsigned char PlayDemoFlag;

// address: 0x8012EC40
// size: 0x30
static struct RGBPOLY rgbb;

// address: 0x8012EC70
// size: 0x30
static struct RGBPOLY rgbt;

// address: 0x8012E6EC
static int blockr;

// address: 0x8012E6F0
static int blockg;

// address: 0x8012E6F4
static int blockb;

// address: 0x8012E6F8
static int InfraFlag;

// address: 0x8012E6FC
static unsigned char blank_bit;

// address: 0x8012CFED
extern unsigned char P1ObjSelCount;

// address: 0x8012CFEE
extern unsigned char P2ObjSelCount;

// address: 0x8012CFEF
extern unsigned char P12ObjSelCount;

// address: 0x8012CFF0
extern unsigned char P1ItemSelCount;

// address: 0x8012CFF1
extern unsigned char P2ItemSelCount;

// address: 0x8012CFF2
extern unsigned char P12ItemSelCount;

// address: 0x8012CFF3
extern unsigned char P1MonstSelCount;

// address: 0x8012CFF4
extern unsigned char P2MonstSelCount;

// address: 0x8012CFF5
extern unsigned char P12MonstSelCount;

// address: 0x8012CFF6
static unsigned short P1ObjSelCol;

// address: 0x8012CFF8
static unsigned short P2ObjSelCol;

// address: 0x8012CFFA
static unsigned short P12ObjSelCol;

// address: 0x8012CFFC
static unsigned short P1ItemSelCol;

// address: 0x8012CFFE
static unsigned short P2ItemSelCol;

// address: 0x8012D000
static unsigned short P12ItemSelCol;

// address: 0x8012D002
static unsigned short P1MonstSelCol;

// address: 0x8012D004
static unsigned short P2MonstSelCol;

// address: 0x8012D006
static unsigned short P12MonstSelCol;

// address: 0x8012D008
// size: 0xE0
extern struct CBlocks *CurrentBlocks;

// address: 0x800ABD2C
// size: 0x16
extern struct TownToCreature TownConv[11];

// address: 0x8012D024
// size: 0x4
extern enum OVER_TYPE CurrentOverlay;

// address: 0x80122750
// size: 0xC
static unsigned long HaltTab[3];

// address: 0x8012ECA0
// size: 0x10
static struct Overlay FrontEndOver;

// address: 0x8012ECB0
// size: 0x10
static struct Overlay PregameOver;

// address: 0x8012ECC0
// size: 0x10
static struct Overlay GameOver;

// address: 0x8012ECD0
// size: 0x10
static struct Overlay FmvOver;

// address: 0x8012E700
static int OWorldX;

// address: 0x8012E704
static int OWorldY;

// address: 0x8012E708
static int WWorldX;

// address: 0x8012E70C
static int WWorldY;

// address: 0x801227CC
// size: 0x20
static short TxyAdd[16];

// address: 0x8012D048
extern int GXAdj2;

// address: 0x8012E710
static int TimePerFrame;

// address: 0x8012E714
static int CpuStart;

// address: 0x8012E718
static int CpuTime;

// address: 0x8012E71C
static int DrawTime;

// address: 0x8012E720
static int DrawStart;

// address: 0x8012E724
static int LastCpuTime;

// address: 0x8012E728
static int LastDrawTime;

// address: 0x8012E72C
static int DrawArea;

// address: 0x8012D050
extern bool ProfOn;

// address: 0x800ABD44
// size: 0x11
extern unsigned char LevPals[17];

// address: 0x80122928
// size: 0x32
static unsigned short Level2Bgdata[25];

// address: 0x800ABD58
// size: 0x54
extern struct PanelXY DefP1PanelXY;

// address: 0x800ABDAC
// size: 0x54
extern struct PanelXY DefP1PanelXY2;

// address: 0x800ABE00
// size: 0x54
extern struct PanelXY DefP2PanelXY;

// address: 0x800ABE54
// size: 0x54
extern struct PanelXY DefP2PanelXY2;

// address: 0x800ABEA8
// size: 0xC8
extern unsigned int SpeedBarGfxTable[50];

// address: 0x8012D078
extern int hof;

// address: 0x8012D07C
extern int mof;

// address: 0x800ABF70
// size: 0x100
extern struct SFXHDR SFXTab[2];

// address: 0x800AC070
// size: 0x12000
extern unsigned long STR_Buffer[18432];

// address: 0x8012D0B0
extern unsigned long Time;

// address: 0x8012D0B4
extern bool CDWAIT;

// address: 0x800BE070
// size: 0x40
extern struct SpuVoiceAttr voice_attr;

// address: 0x800BE0B0
// size: 0x80
extern struct SFXHDR STRSave;

// address: 0x8012E730
static bool SavePause;

// address: 0x8012D089
extern char NoActiveStreams;

// address: 0x8012D08C
static bool STRInit;

// address: 0x8012D090
static int frame_rate;

// address: 0x8012D094
static unsigned char CDAngle;

// address: 0x8012D0D8
extern char SFXNotPlayed;

// address: 0x8012D0D9
extern char SFXNotInBank;

// address: 0x8012ECE0
// size: 0x108
static char spu_management[264];

// address: 0x8012EDF0
// size: 0x14
static struct SpuReverbAttr rev_attr;

// address: 0x8012E738
static unsigned short NoSfx;

// address: 0x8012EE10
// size: 0x30
static unsigned short CHStatus[24];

// address: 0x8012D0C4
// size: 0xC
extern struct bank_entry *BankOffsets;

// address: 0x8012D0C8
static long OffsetHandle;

// address: 0x8012D0CC
static int BankBase;

// address: 0x8012D0D0
static unsigned char SPU_Done;

// address: 0x80122CD0
// size: 0x78
static unsigned short SFXRemapTab[60];

// address: 0x8012D0D4
static int NoSNDRemaps;

// address: 0x800BE130
// size: 0x1EC
extern struct PalCollection ThePals;

// address: 0x80122D7C
// size: 0x50
static struct InitPos InitialPositions[20];

// address: 0x8012D11C
extern int demo_level;

// address: 0x8012EE40
// size: 0x20
static int buff[8];

// address: 0x8012D120
extern int old_val;

// address: 0x8012D124
// size: 0x5C
extern struct TASK *DemoTask;

// address: 0x8012D128
// size: 0x5C
extern struct TASK *DemoGameTask;

// address: 0x8012D12C
// size: 0x5C
extern struct TASK *tonys;

// address: 0x8012D104
extern int demo_load;

// address: 0x8012D108
extern int demo_record_load;

// address: 0x8012D10C
extern int level_record;

// address: 0x8012D110
extern char demo_fade_finished;

// address: 0x8012D113
extern unsigned char demo_which;

// address: 0x800BE35C
// size: 0x14
extern unsigned long demolevel[5];

// address: 0x8012D111
extern unsigned char quest_cheat_num;

// address: 0x8012D112
extern unsigned char cheat_quest_flag;

// address: 0x8012D100
extern int moo_moo;

// address: 0x800BE31C
// size: 0x40
extern unsigned long quest_seed[16];

// address: 0x8012D114
extern unsigned char demo_flash;

// address: 0x8012D118
extern int tonys_Task;

// address: 0x8012D288
extern bool DoShowPanel;

// address: 0x8012D28C
extern bool DoDrawBg;

// address: 0x8012E73C
static bool GlueFinished;

// address: 0x8012E740
static bool DoHomingScroll;

// address: 0x8012E744
// size: 0x6C
static struct TextDat *TownerGfx;

// address: 0x8012E748
static int CurrentMonsterList;

// address: 0x8012D139
extern char started_grtask;

// address: 0x800BE370
// size: 0x3CC
extern struct PInf PlayerInfo[81];

// address: 0x8012D290
// size: 0x4
static char ArmourChar[4];

// address: 0x80122E70
// size: 0xA
static char WepChar[10];

// address: 0x8012D294
// size: 0x4
static char CharChar[4];

// address: 0x8012E74C
static char ctrl_select_line;

// address: 0x8012E74D
static char ctrl_select_side;

// address: 0x8012E74E
static char ckeyheld;

// address: 0x8012E754
// size: 0x8
static struct RECT CtrlRect;

// address: 0x8012D2A8
extern unsigned char ctrlflag;

// address: 0x800BE7E4
// size: 0x130
extern struct KEY_ASSIGNS txt_actions[19];

// address: 0x800BE73C
// size: 0xA8
extern struct pad_assigns pad_txt[14];

// address: 0x8012D2A4
static int toppos;

// address: 0x8012EE60
// size: 0x10
static struct Dialog CtrlBack;

// address: 0x800BE914
// size: 0x98
static int controller_defaults[2][19];

// address: 0x8012D314
extern int gr_scrxoff;

// address: 0x8012D318
extern int gr_scryoff;

// address: 0x8012D320
extern unsigned short water_clut;

// address: 0x8012D323
extern char visible_level;

// address: 0x8012D311
extern char last_type;

// address: 0x8012D325
extern char daylight;

// address: 0x8012D322
extern char cow_in_sight;

// address: 0x8012D31C
extern unsigned int water_count;

// address: 0x8012D324
extern unsigned char lastrnd;

// address: 0x8012D328
static int call_clock;

// address: 0x8012D338
extern int TitleAnimCount;

// address: 0x8012D33C
static int flametick;

// address: 0x800BE9AC
// size: 0x18
static int ypos[6];

// address: 0x800BE9C4
// size: 0x18
static int frmlist[6];

// address: 0x800BE9DC
// size: 0x18
static int xoff[6];

// address: 0x8012D340
static int startx;

// address: 0x8012D344
extern bool hellomumflag;

// address: 0x800BEA14
// size: 0x90
extern struct SPELLFX_DAT SpellFXDat[2];

// address: 0x8012EE70
// size: 0x240
static struct Particle PartArray[16];

// address: 0x8012E75C
static int partOtPos;

// address: 0x8012D364
extern int SetParticle;

// address: 0x8012D368
static int p1partexecnum;

// address: 0x8012D36C
static int p2partexecnum;

// address: 0x800BE9F4
// size: 0x20
static int JumpArray[8];

// address: 0x8012D370
static int partjumpflag;

// address: 0x8012D374
static int partglowflag;

// address: 0x8012D378
static int partcolour;

// address: 0x8012D37C
static bool anyfuckingmenus;

// address: 0x800BEAA4
// size: 0x30
extern struct Spell_Target SplTarget[2];

// address: 0x8012D39D
extern unsigned char select_flag;

// address: 0x8012E760
// size: 0x8
static struct RECT SelectRect;

// address: 0x8012E768
static char item_select;

// address: 0x8012D3A0
// size: 0x2
extern char QSpell[2];

// address: 0x8012D3A4
// size: 0x2
extern char _spltotype[2];

// address: 0x8012D3A8
// size: 0x8
extern bool force_attack[2];

// address: 0x8012D390
// size: 0x84
extern struct CPlayer *gplayer;

// address: 0x8012F0B0
// size: 0x10
static struct Dialog SelectBack;

// address: 0x8012D394
// size: 0x4
extern char mana_order[4];

// address: 0x8012D398
// size: 0x4
extern char health_order[4];

// address: 0x8012D39C
extern unsigned char birdcheck;

// address: 0x8012F0C0
// size: 0x28
static struct TextDat *DecRequestors[10];

// address: 0x8012E76C
static unsigned short progress;

// address: 0x80122FFC
// size: 0x2A
static unsigned short Level2CutScreen[21];

// address: 0x8012F0E8
// size: 0x78
static struct CScreen Scr;

// address: 0x8012D3C8
// size: 0x5C
static struct TASK *CutScreenTSK;

// address: 0x8012D3CC
static bool GameLoading;

// address: 0x8012F168
// size: 0x10
static struct Dialog LBack;

// address: 0x800BEAD4
// size: 0x80
extern unsigned char block_buf[128];

// address: 0x8012D3E8
extern unsigned int card_ev0;

// address: 0x8012D3EC
extern unsigned int card_ev1;

// address: 0x8012D3F0
extern unsigned int card_ev2;

// address: 0x8012D3F4
extern unsigned int card_ev3;

// address: 0x8012D3F8
extern unsigned int card_ev10;

// address: 0x8012D3FC
extern unsigned int card_ev11;

// address: 0x8012D400
extern unsigned int card_ev12;

// address: 0x8012D404
extern unsigned int card_ev13;

// address: 0x8012D408
// size: 0x8
extern int card_dirty[2];

// address: 0x8012D410
// size: 0x5C
extern struct TASK *MemcardTask;

// address: 0x8012E770
static int card_event;

// address: 0x8012D3E4
extern void (*mem_card_event_handler)();

// address: 0x8012D3DC
extern bool MemCardActive;

// address: 0x8012D3E0
static int never_hooked_events;

// address: 0x8012D46C
extern unsigned long MasterVol;

// address: 0x8012D470
extern unsigned long MusicVol;

// address: 0x8012D474
extern unsigned long SoundVol;

// address: 0x8012D478
extern unsigned long VideoVol;

// address: 0x8012D47C
extern unsigned long SpeechVol;

// address: 0x8012E774
// size: 0x6C
static struct TextDat *Slider;

// address: 0x8012E778
static int sw;

// address: 0x8012E77C
static int sx;

// address: 0x8012E780
static int sy;

// address: 0x8012E784
static unsigned char Adjust;

// address: 0x8012E785
static unsigned char qspin;

// address: 0x8012E786
static unsigned char lqspin;

// address: 0x8012E788
// size: 0x4
static enum LANG_TYPE OrigLang;

// address: 0x8012E78C
// size: 0x4
static enum LANG_TYPE OldLang;

// address: 0x8012E790
// size: 0x4
static enum LANG_TYPE NewLang;

// address: 0x8012D480
extern int save_blocks;

// address: 0x8012D484
extern char *Savefilename;

// address: 0x8012D488
extern int ReturnMenu;

// address: 0x8012E794
// size: 0x8
static struct RECT ORect;

// address: 0x8012E79C
// size: 0x8
static char *McState[2];

// address: 0x8012D48C
extern int they_pressed;

// address: 0x8012E7A4
// size: 0x8
static unsigned char Seed[8];

// address: 0x8012D440
extern bool optionsflag;

// address: 0x8012D434
extern int cmenu;

// address: 0x8012D44C
extern int options_pad;

// address: 0x8012D43C
extern bool allspellsflag;

// address: 0x800BF5F4
// size: 0x80
extern short Circle[64];

// address: 0x8012D420
extern bool goldcheat;

// address: 0x8012D450
extern int OptionsSeed;

// address: 0x8012D454
extern bool OptionsSetSeed;

// address: 0x8012D424
extern unsigned char Qfromoptions;

// address: 0x8012D428
static int Spacing;

// address: 0x8012D42C
static int cs;

// address: 0x8012D430
static int lastcs;

// address: 0x8012D438
static bool MemcardOverlay;

// address: 0x8012D444
extern int saveflag;

// address: 0x8012D448
extern int loadflag;

// address: 0x8012D458
extern bool PadFrig;

// address: 0x800BEB54
// size: 0xD8
extern struct OMENUITEM MainMenu[9];

// address: 0x800BEC2C
// size: 0x108
extern struct OMENUITEM GameMenu[11];

// address: 0x800BED34
// size: 0x90
extern struct OMENUITEM SoundMenu[6];

// address: 0x800BEDC4
// size: 0xA8
extern struct OMENUITEM CentreMenu[7];

// address: 0x800BEE6C
// size: 0xA8
extern struct OMENUITEM LangMenu[7];

// address: 0x800BEF14
// size: 0x60
extern struct OMENUITEM QuitMenu[4];

// address: 0x800BEF74
// size: 0xA8
extern struct OMENUITEM MemcardMenu[7];

// address: 0x800BF01C
// size: 0x60
extern struct OMENUITEM MemcardLoadGameMenu[4];

// address: 0x800BF07C
// size: 0x60
extern struct OMENUITEM MemcardSaveGameMenu[4];

// address: 0x800BF0DC
// size: 0x60
extern struct OMENUITEM MemcardSaveOptionsMenu[4];

// address: 0x800BF13C
// size: 0x60
extern struct OMENUITEM MemcardLoadOptionsMenu[4];

// address: 0x800BF19C
// size: 0x60
extern struct OMENUITEM MemcardCharacterMenu[4];

// address: 0x800BF1FC
// size: 0xA8
extern struct OMENUITEM MemcardSelectCard1[7];

// address: 0x800BF2A4
// size: 0xA8
extern struct OMENUITEM MemcardSelectCard2[7];

// address: 0x800BF34C
// size: 0x60
extern struct OMENUITEM MemcardFormatMenu[4];

// address: 0x800BF3AC
// size: 0xF0
extern struct OMENUITEM CheatMenu[10];

// address: 0x800BF49C
// size: 0x30
extern struct OMENUITEM InfoMenu[2];

// address: 0x800BF4CC
// size: 0x48
extern struct OMENUITEM MonstViewMenu[3];

// address: 0x800BF514
// size: 0x48
extern struct OMENUITEM SeedMenu[3];

// address: 0x800BF55C
// size: 0x98
extern struct OMENULIST MenuList[19];

// address: 0x8012D45C
static bool debounce;

// address: 0x8012D460
static unsigned char KeyPos;

// address: 0x800BF674
// size: 0x14
static unsigned short KeyTab[10];

// address: 0x8012D464
static int SeedPos;

// address: 0x800BF688
// size: 0x180
extern struct BIRDSTRUCT BirdList[16];

// address: 0x8012E7AC
// size: 0x8
static int last_seenx[2];

// address: 0x8012E7B4
// size: 0x8
static int last_seeny[2];

// address: 0x8012D499
extern char hop_height;

// address: 0x8012D49C
// size: 0x8
static struct Perch perches[4];

// address: 0x800BF808
// size: 0x40
extern struct FMVDAT FmvTab[8];

// address: 0x8012D4B0
static int CurMons;

// address: 0x8012D4B4
static int Frame;

// address: 0x8012D4B8
static int Action;

// address: 0x8012D4BC
static int Dir;

// address: 0x8012D520
extern int indsize;

// address: 0x8012D500
static unsigned char *kanjbuff;

// address: 0x8012D504
// size: 0x4
static struct kindexS *kindex;

// address: 0x8012D508
static long hndKanjBuff;

// address: 0x8012D50C
static long hndKanjIndex;

// address: 0x8012E7BC
// size: 0x8
static struct RECT HelpRect;

// address: 0x8012E7C4
static unsigned char HelpTop;

// address: 0x8012F178
// size: 0x10
static struct Dialog HelpBack;

// address: 0x8012D530
static bool helpflag;

// address: 0x800BF848
// size: 0x108
static struct HelpStruct HelpList[33];

// address: 0x8012D580
extern int FeBackX;

// address: 0x8012D584
extern int FeBackY;

// address: 0x8012D588
extern int FeBackW;

// address: 0x8012D58C
extern int FeBackH;

// address: 0x8012D590
extern unsigned char FeFlag;

// address: 0x800BFE50
// size: 0x780
extern struct FeStruct FeBuffer[80];

// address: 0x8012D594
extern int FePlayerNo;

// address: 0x8012E7C8
// size: 0x24
static struct FE_CREATE *CStruct;

// address: 0x8012D598
extern int FeBufferCount;

// address: 0x8012D59C
extern int FeNoOfPlayers;

// address: 0x8012D5A0
// size: 0x8
extern int FeChrClass[2];

// address: 0x800C05D0
// size: 0x16
extern char FePlayerName[11][2];

// address: 0x8012D5A8
// size: 0x1C
extern struct FeTable *FeCurMenu;

// address: 0x8012D5AC
// size: 0x2
extern unsigned char FePlayerNameFlag[2];

// address: 0x8012D5B0
extern unsigned long FeCount;

// address: 0x8012D5B4
extern int fileselect;

// address: 0x8012D5B8
extern int BookMenu;

// address: 0x8012D5BC
extern int FeAttractMode;

// address: 0x8012D5C0
extern int FMVPress;

// address: 0x8012D54C
// size: 0x6C
extern struct TextDat *FeTData;

// address: 0x8012D554
// size: 0x8
extern bool LoadedChar[2];

// address: 0x8012D550
// size: 0x6C
extern struct TextDat *FlameTData;

// address: 0x8012D55C
extern unsigned char FeIsAVirgin;

// address: 0x8012D560
extern int FeMenuDelay;

// address: 0x800BF950
// size: 0x1C
extern struct FeTable DummyMenu;

// address: 0x800BF96C
// size: 0x1C
extern struct FeTable FeMainMenu;

// address: 0x800BF988
// size: 0x1C
extern struct FeTable FeNewGameMenu;

// address: 0x800BF9A4
// size: 0x1C
extern struct FeTable FeNewP1ClassMenu;

// address: 0x800BF9C0
// size: 0x1C
extern struct FeTable FeNewP1NameMenu;

// address: 0x800BF9DC
// size: 0x1C
extern struct FeTable FeNewP2ClassMenu;

// address: 0x800BF9F8
// size: 0x1C
extern struct FeTable FeNewP2NameMenu;

// address: 0x800BFA14
// size: 0x1C
extern struct FeTable FeDifficultyMenu;

// address: 0x800BFA30
// size: 0x1C
extern struct FeTable FeBackgroundMenu;

// address: 0x800BFA4C
// size: 0x1C
extern struct FeTable FeBook1Menu;

// address: 0x800BFA68
// size: 0x1C
extern struct FeTable FeBook2Menu;

// address: 0x800BFA84
// size: 0x1C
extern struct FeTable FeLoadCharMenu;

// address: 0x800BFAA0
// size: 0x1C
extern struct FeTable FeLoadChar1Menu;

// address: 0x800BFABC
// size: 0x1C
extern struct FeTable FeLoadChar2Menu;

// address: 0x8012D564
static int fadeval;

// address: 0x800BFAD8
// size: 0x78
extern struct FeMenuTable FeMainMenuTable[5];

// address: 0x800BFB50
// size: 0x48
extern struct FeMenuTable FeNewGameMenuTable[3];

// address: 0x800BFB98
// size: 0x78
extern struct FeMenuTable FePlayerClassMenuTable[5];

// address: 0x800BFC10
// size: 0x46
extern unsigned char FeNameEngMenuTable[70];

// address: 0x800BFC58
// size: 0x48
extern struct FeMenuTable FeMemcardMenuTable[3];

// address: 0x800BFCA0
// size: 0x60
extern struct FeMenuTable FeDifficultyMenuTable[4];

// address: 0x800BFD00
// size: 0x60
extern struct FeMenuTable FeBackgroundMenuTable[4];

// address: 0x800BFD60
// size: 0x78
extern struct FeMenuTable FeBook1MenuTable[5];

// address: 0x800BFDD8
// size: 0x78
extern struct FeMenuTable FeBook2MenuTable[5];

// address: 0x8012D570
static bool DrawBackOn;

// address: 0x8012D574
extern unsigned long AttractTitleDelay;

// address: 0x8012D578
extern unsigned long AttractMainDelay;

// address: 0x8012D57C
extern int FMVEndPad;

// address: 0x8012D5F4
extern int InCredits;

// address: 0x8012D5F8
extern int CreditTitleNo;

// address: 0x8012D5FC
extern int CreditSubTitleNo;

// address: 0x8012D610
// size: 0x8
extern int card_status[2];

// address: 0x8012D618
// size: 0x8
extern int card_usable[2];

// address: 0x8012D620
// size: 0x8
extern int card_files[2];

// address: 0x8012D628
// size: 0x8
extern int card_changed[2];

// address: 0x8012D66C
extern int AlertTxt;

// address: 0x8012D670
extern int current_card;

// address: 0x8012D674
extern int LoadType;

// address: 0x8012D678
extern int McMenuPos;

// address: 0x8012D67C
// size: 0x1C
extern struct FeTable *McCurMenu;

// address: 0x8012D668
extern bool fileinfoflag;

// address: 0x8012D63C
extern char *DiabloGameFile;

// address: 0x8012D640
extern char *DiabloOptionFile;

// address: 0x8012D660
// size: 0x8
extern char *McState_addr_8012D660[2];

// address: 0x8012D758
// size: 0x8
extern int mdec_audio_buffer[2];

// address: 0x8012D760
extern int mdec_audio_sec;

// address: 0x8012D764
extern int mdec_audio_offs;

// address: 0x8012D768
extern int mdec_audio_playing;

// address: 0x8012D76C
extern int mdec_audio_rate_shift;

// address: 0x8012D770
// size: 0x8
extern char *vlcbuf[2];

// address: 0x8012D778
extern int slice_size;

// address: 0x8012D77C
// size: 0x8
extern struct RECT slice;

// address: 0x8012D784
extern int slice_inc;

// address: 0x8012D788
extern int area_pw;

// address: 0x8012D78C
extern int area_ph;

// address: 0x8012D790
// size: 0x2
extern char tmdc_pol_dirty[2];

// address: 0x8012D794
// size: 0x8
extern int num_pol[2];

// address: 0x8012D79C
extern int mdec_cx;

// address: 0x8012D7A0
extern int mdec_cy;

// address: 0x8012D7A4
extern int mdec_w;

// address: 0x8012D7A8
extern int mdec_h;

// address: 0x8012D7AC
// size: 0x8
extern int mdec_pw[2];

// address: 0x8012D7B4
// size: 0x8
extern int mdec_ph[2];

// address: 0x8012D7BC
extern int move_x;

// address: 0x8012D7C0
extern int move_y;

// address: 0x8012D7C4
extern int move_scale;

// address: 0x8012D7C8
extern int stream_frames;

// address: 0x8012D7CC
extern int last_stream_frame;

// address: 0x8012D7D0
extern int mdec_framecount;

// address: 0x8012D7D4
extern int mdec_speed;

// address: 0x8012D7D8
extern int mdec_stream_starting;

// address: 0x8012D7DC
extern int mdec_last_frame;

// address: 0x8012D7E0
extern int mdec_sectors_per_frame;

// address: 0x8012D7E4
extern unsigned short *vlctab;

// address: 0x8012D7E8
extern unsigned char *mdc_buftop;

// address: 0x8012D7EC
extern unsigned char *mdc_bufstart;

// address: 0x8012D7F0
extern int mdc_bufleft;

// address: 0x8012D7F4
extern int mdc_buftotal;

// address: 0x8012D7F8
extern int ordertab_length;

// address: 0x8012D7FC
extern int time_in_frames;

// address: 0x8012D800
extern int stream_chunksize;

// address: 0x8012D804
extern int stream_bufsize;

// address: 0x8012D808
extern int stream_subsec;

// address: 0x8012D80C
extern int stream_secnum;

// address: 0x8012D810
extern int stream_last_sector;

// address: 0x8012D814
extern int stream_startsec;

// address: 0x8012D818
extern int stream_opened;

// address: 0x8012D81C
extern int stream_last_chunk;

// address: 0x8012D820
extern int stream_got_chunks;

// address: 0x8012D824
extern int last_sector;

// address: 0x8012D828
extern int cdstream_resetsec;

// address: 0x8012D82C
extern int last_handler_event;

// address: 0x8012D6F4
extern bool user_start;

// address: 0x8012D68C
extern unsigned char *vlc_tab;

// address: 0x8012D690
extern unsigned char *vlc_buf;

// address: 0x8012D694
extern unsigned char *img_buf;

// address: 0x8012D698
extern int vbuf;

// address: 0x8012D69C
extern int last_fn;

// address: 0x8012D6A0
extern int last_mdc;

// address: 0x8012D6A4
extern int slnum;

// address: 0x8012D6A8
extern int slices_to_do;

// address: 0x8012D6AC
extern int mbuf;

// address: 0x8012D6B0
extern int mfn;

// address: 0x8012D6B4
extern int last_move_mbuf;

// address: 0x8012D6B8
extern int move_request;

// address: 0x8012D6BC
extern int mdec_scale;

// address: 0x8012D6C0
extern int do_brightness;

// address: 0x8012D6C4
extern int frame_decoded;

// address: 0x8012D6C8
extern int mdec_streaming;

// address: 0x8012D6CC
extern int mdec_stream_size;

// address: 0x8012D6D0
extern int first_stream_frame;

// address: 0x8012D6D4
extern int stream_frames_played;

// address: 0x8012D6D8
extern int num_mdcs;

// address: 0x8012D6DC
extern int mdec_head;

// address: 0x8012D6E0
extern int mdec_tail;

// address: 0x8012D6E4
extern int mdec_waiting_tail;

// address: 0x8012D6E8
extern int mdecs_queued;

// address: 0x8012D6EC
extern int mdecs_waiting;

// address: 0x8012D6F0
extern int sfx_volume;

// address: 0x8012D6F8
static unsigned char DiabEnd;

// address: 0x8012D6FC
extern int stream_chunks_in;

// address: 0x8012D700
extern int stream_chunks_total;

// address: 0x8012D704
extern int stream_in;

// address: 0x8012D708
extern int stream_out;

// address: 0x8012D70C
extern int stream_stalled;

// address: 0x8012D710
extern int stream_ending;

// address: 0x8012D714
extern int stream_open;

// address: 0x8012D718
extern int stream_handler_installed;

// address: 0x8012D71C
extern int stream_chunks_borrowed;

// address: 0x8012D720
extern int _get_count;

// address: 0x8012D724
extern int _discard_count;

// address: 0x8012D728
// size: 0x5C
extern struct TASK *CDTask;

// address: 0x8012D72C
// size: 0x98
static struct cdstreamstruct *CDStream;

// address: 0x8012D730
extern int cdready_calls;

// address: 0x8012D734
extern int cdready_errors;

// address: 0x8012D738
extern int cdready_out_of_sync;

// address: 0x8012D73C
extern int cdstream_resetting;

// address: 0x8012D740
extern int sector_dma;

// address: 0x8012D744
extern int sector_dma_in;

// address: 0x8012D748
extern unsigned long *chkaddr;

// address: 0x8012D74C
// size: 0x8
extern struct chunkhdrstruct *chunk;

// address: 0x8012D750
extern int first_handler_event;

// address: 0x8012D754
static bool DOSLEEP;

// address: 0x8012D8AC
extern unsigned char *pStatusPanel;

// address: 0x8012D8B0
extern unsigned char *pGBoxBuff;

// address: 0x8012D8B4
extern unsigned char dropGoldFlag;

// address: 0x8012D8B8
// size: 0x2
extern unsigned char _pinfoflag[2];

// address: 0x800C0AE8
// size: 0x200
extern char _infostr[256][2];

// address: 0x8012D8BC
// size: 0x2
extern char _infoclr[2];

// address: 0x800C0CE8
// size: 0x100
extern char tempstr[256];

// address: 0x8012D8BE
extern unsigned char drawhpflag;

// address: 0x8012D8BF
extern unsigned char drawmanaflag;

// address: 0x8012D8C0
extern unsigned char chrflag;

// address: 0x8012D8C1
extern unsigned char drawbtnflag;

// address: 0x8012D8C2
extern unsigned char panbtndown;

// address: 0x8012D8C3
extern unsigned char panelflag;

// address: 0x8012D8C4
extern unsigned char chrbtndown;

// address: 0x8012D8C5
extern unsigned char lvlbtndown;

// address: 0x8012D8C6
extern unsigned char sbookflag;

// address: 0x8012D8C7
extern unsigned char talkflag;

// address: 0x8012D8C8
extern int dropGoldValue;

// address: 0x8012D8CC
extern int initialDropGoldValue;

// address: 0x8012D8D0
extern int initialDropGoldIndex;

// address: 0x8012D8D4
extern unsigned char *pPanelButtons;

// address: 0x8012D8D8
extern unsigned char *pPanelText;

// address: 0x8012D8DC
extern unsigned char *pManaBuff;

// address: 0x8012D8E0
extern unsigned char *pLifeBuff;

// address: 0x8012D8E4
extern unsigned char *pChrPanel;

// address: 0x8012D8E8
extern unsigned char *pChrButtons;

// address: 0x8012D8EC
extern unsigned char *pSpellCels;

// address: 0x8012F1C8
// size: 0x400
static char _panelstr[64][8][2];

// address: 0x8012F5C8
// size: 0x40
static int _pstrjust[8][2];

// address: 0x8012E7D8
// size: 0x8
static int _pnumlines[2];

// address: 0x8012D8F0
// size: 0x8
extern struct RECT *InfoBoxRect;

// address: 0x8012D8F4
// size: 0x8
extern struct RECT CSRect;

// address: 0x8012E7E8
// size: 0x8
static int _pSpell[2];

// address: 0x8012E7F0
// size: 0x8
static int _pSplType[2];

// address: 0x8012D8FC
extern int numpanbtns;

// address: 0x8012D900
extern unsigned char *pDurIcons;

// address: 0x8012D904
extern unsigned char drawdurflag;

// address: 0x8012E7F8
// size: 0x8
static unsigned char chrbtn[4][2];

// address: 0x8012D905
extern unsigned char chrbtnactive;

// address: 0x8012D908
extern unsigned char *pSpellBkCel;

// address: 0x8012D90C
extern unsigned char *pSBkBtnCel;

// address: 0x8012D910
extern unsigned char *pSBkIconCels;

// address: 0x8012D914
extern int sbooktab;

// address: 0x8012D918
extern int cur_spel;

// address: 0x8012E800
static long talkofs;

// address: 0x8012F618
// size: 0x50
static char sgszTalkMsg[80];

// address: 0x8012E804
static unsigned char sgbTalkSavePos;

// address: 0x8012E805
static unsigned char sgbNextTalkSave;

// address: 0x8012E806
// size: 0x2
static unsigned char sgbPlrTalkTbl[2];

// address: 0x8012E808
static unsigned char *pTalkPanel;

// address: 0x8012E80C
static unsigned char *pMultiBtns;

// address: 0x8012E810
static unsigned char *pTalkBtns;

// address: 0x8012E814
// size: 0x3
static unsigned char talkbtndown[3];

// address: 0x800C05FC
// size: 0x25
extern char SpellITbl[37];

// address: 0x8012D839
extern unsigned char DrawLevelUpFlag;

// address: 0x8012D860
// size: 0x8
extern struct TASK *_spselflag[2];

// address: 0x8012D85C
extern unsigned char spspelstate;

// address: 0x8012D87C
extern bool initchr;

// address: 0x8012D83C
static int SPLICONNO;

// address: 0x8012D840
static int SPLICONY;

// address: 0x8012E7E0
static int SPLICONRIGHT;

// address: 0x8012D844
static int scx;

// address: 0x8012D848
static int scy;

// address: 0x8012D84C
static int scx1;

// address: 0x8012D850
static int scy1;

// address: 0x8012D854
static int scx2;

// address: 0x8012D858
static int scy2;

// address: 0x8012D868
extern char SpellCol;

// address: 0x800C05E8
// size: 0x12
extern unsigned char SpellColors[18];

// address: 0x800C0624
// size: 0x64
extern int SpellPages[5][5];

// address: 0x8012D86C
static int lus;

// address: 0x8012D870
static int CsNo;

// address: 0x8012D874
static char plusanim;

// address: 0x8012F608
// size: 0x10
static struct Dialog CSBack;

// address: 0x8012D878
static int CS_XOFF;

// address: 0x800C0688
// size: 0x460
extern struct CSDATA CS_Tab[28];

// address: 0x8012D880
extern int NoCSEntries;

// address: 0x8012D884
static int SPALOFF;

// address: 0x8012D888
static int paloffset1;

// address: 0x8012D88C
static int paloffset2;

// address: 0x8012D890
static int paloffset3;

// address: 0x8012D894
static int paloffset4;

// address: 0x8012D898
static int pinc1;

// address: 0x8012D89C
static int pinc2;

// address: 0x8012D8A0
static int pinc3;

// address: 0x8012D8A4
static int pinc4;

// address: 0x8012D92C
// size: 0x8
extern int _pcurs[2];

// address: 0x8012D934
extern int cursW;

// address: 0x8012D938
extern int cursH;

// address: 0x8012D93C
extern int icursW;

// address: 0x8012D940
extern int icursH;

// address: 0x8012D944
extern int icursW28;

// address: 0x8012D948
extern int icursH28;

// address: 0x8012D94C
extern int cursmx;

// address: 0x8012D950
extern int cursmy;

// address: 0x8012D954
// size: 0x8
extern int _pcursmonst[2];

// address: 0x8012D95C
// size: 0x2
extern char _pcursobj[2];

// address: 0x8012D960
// size: 0x2
extern char _pcursitem[2];

// address: 0x8012D964
// size: 0x2
extern char _pcursinvitem[2];

// address: 0x8012D968
// size: 0x2
extern char _pcursplr[2];

// address: 0x8012D928
extern int sel_data;

// address: 0x800C0DE8
// size: 0x174
extern struct DeadStruct dead[31];

// address: 0x8012D96C
extern int spurtndx;

// address: 0x8012D970
extern int stonendx;

// address: 0x8012D974
extern unsigned char *pSquareCel;

// address: 0x8012D9B4
extern unsigned long ghInst;

// address: 0x8012D9B8
extern unsigned char svgamode;

// address: 0x8012D9BC
extern int MouseX;

// address: 0x8012D9C0
extern int MouseY;

// address: 0x8012D9C4
extern long gv1;

// address: 0x8012D9C8
extern long gv2;

// address: 0x8012D9CC
extern long gv3;

// address: 0x8012D9D0
extern long gv4;

// address: 0x8012D9D4
extern long gv5;

// address: 0x8012D9D8
extern unsigned char gbProcessPlayers;

// address: 0x800C0F5C
// size: 0x28
extern int DebugMonsters[10];

// address: 0x800C0F84
// size: 0x44
extern unsigned long glSeedTbl[17];

// address: 0x800C0FC8
// size: 0x44
extern int gnLevelTypeTbl[17];

// address: 0x8012D9D9
extern unsigned char gbDoEnding;

// address: 0x8012D9DA
extern unsigned char gbRunGame;

// address: 0x8012D9DB
extern unsigned char gbRunGameResult;

// address: 0x8012D9DC
extern unsigned char gbGameLoopStartup;

// address: 0x8012F668
// size: 0x44
static int glEndSeed[17];

// address: 0x8012F6B8
// size: 0x44
static int glMid1Seed[17];

// address: 0x8012F708
// size: 0x44
static int glMid2Seed[17];

// address: 0x8012F758
// size: 0x44
static int glMid3Seed[17];

// address: 0x8012E818
static long *sg_previousFilter;

// address: 0x800C100C
// size: 0x30
extern int CreateEnv[12];

// address: 0x8012D9E0
extern int Passedlvldir;

// address: 0x8012D9E4
extern unsigned char *TempStack;

// address: 0x8012D984
extern unsigned long ghMainWnd;

// address: 0x8012D988
extern unsigned char fullscreen;

// address: 0x8012D98C
extern int force_redraw;

// address: 0x8012D9A0
extern unsigned char PauseMode;

// address: 0x8012D9A1
extern unsigned char FriendlyMode;

// address: 0x8012D991
extern unsigned char visiondebug;

// address: 0x8012D993
extern unsigned char light4flag;

// address: 0x8012D994
extern unsigned char leveldebug;

// address: 0x8012D995
extern unsigned char monstdebug;

// address: 0x8012D99C
extern int debugmonsttypes;

// address: 0x8012D990
static unsigned char cineflag;

// address: 0x8012D992
extern unsigned char scrollflag;

// address: 0x8012D996
extern unsigned char trigdebug;

// address: 0x8012D998
extern int setseed;

// address: 0x8012D9A4
static int sgnTimeoutCurs;

// address: 0x8012D9A8
extern unsigned char sgbMouseDown;

// address: 0x800C16D8
// size: 0xE00
extern struct TownerStruct towner[16];

// address: 0x8012D9FC
extern int numtowners;

// address: 0x8012DA00
extern unsigned char storeflag;

// address: 0x8012DA01
extern unsigned char boyloadflag;

// address: 0x8012DA02
extern unsigned char bannerflag;

// address: 0x8012DA04
extern unsigned char *pCowCels;

// address: 0x8012E81C
static unsigned long sgdwCowClicks;

// address: 0x8012E820
static int sgnCowMsg;

// address: 0x800C1418
// size: 0x2C0
extern int Qtalklist[16][11];

// address: 0x8012D9F4
extern unsigned long CowPlaying;

// address: 0x800C103C
// size: 0x378
extern char AnimOrder[148][6];

// address: 0x800C13B4
// size: 0xC
extern int TownCowX[3];

// address: 0x800C13C0
// size: 0xC
extern int TownCowY[3];

// address: 0x800C13CC
// size: 0xC
extern int TownCowDir[3];

// address: 0x800C13D8
// size: 0x20
extern int cowoffx[8];

// address: 0x800C13F8
// size: 0x20
extern int cowoffy[8];

// address: 0x8012DA1C
extern int sfxdelay;

// address: 0x8012DA20
extern int sfxdnum;

// address: 0x8012DA14
// size: 0x80
extern struct SFXHDR *sghStream;

// address: 0x800C24D8
// size: 0xF78
extern struct TSFX sgSFX[990];

// address: 0x8012DA18
// size: 0x4
extern struct TSFX *sgpStreamSFX;

// address: 0x8012DA24
extern long orgseed;

// address: 0x8012E824
static long sglGameSeed;

// address: 0x8012DA28
extern int SeedCount;

// address: 0x8012E828
// size: 0x4
static struct CCritSect sgMemCrit;

// address: 0x8012E82C
static int sgnWidth;

// address: 0x8012DA36
extern char msgflag;

// address: 0x8012DA37
extern char msgdelay;

// address: 0x800C3500
// size: 0x50
extern char msgtable[80];

// address: 0x800C3450
// size: 0xB0
extern int MsgStrings[44];

// address: 0x8012DA35
extern char msgcnt;

// address: 0x8012E830
static unsigned long sgdwProgress;

// address: 0x8012E834
static unsigned long sgdwXY;

// address: 0x800C3550
// size: 0x9D
extern unsigned char AllItemsUseable[157];

// address: 0x80123788
// size: 0x13A0
extern struct ItemDataStruct AllItemsList[157];

// address: 0x80124B28
// size: 0xD20
extern struct PLStruct PL_Prefix[84];

// address: 0x80125848
// size: 0xF00
extern struct PLStruct PL_Suffix[96];

// address: 0x80126748
// size: 0x1DDC
extern struct UItemStruct UniqueItemList[91];

// address: 0x800C3764
// size: 0x4C00
extern struct ItemStruct item[128];

// address: 0x800C8364
// size: 0x7F
extern char itemactive[127];

// address: 0x800C83E4
// size: 0x7F
extern char itemavail[127];

// address: 0x800C8464
// size: 0x80
extern unsigned char UniqueItemFlag[128];

// address: 0x8012DA70
extern unsigned char uitemflag;

// address: 0x8012E838
static int tem;

// address: 0x8012F7A0
// size: 0x98
static struct ItemStruct curruitem;

// address: 0x8012F840
// size: 0x9
static unsigned char itemhold[3][3];

// address: 0x8012DA74
extern int ScrollType;

// address: 0x800C84E4
// size: 0x40
extern char ItemStr[64];

// address: 0x800C8524
// size: 0x40
extern char SufStr[64];

// address: 0x8012DA50
extern long numitems;

// address: 0x8012DA54
extern int gnNumGetRecords;

// address: 0x800C36C0
// size: 0x8C
extern int ItemInvSnds[35];

// address: 0x800C35F0
// size: 0xA9
extern unsigned char ItemCAnimTbl[169];

// address: 0x80128570
// size: 0x40
extern short SinTab[32];

// address: 0x801285B0
// size: 0x46
static short Item2Frm[35];

// address: 0x800C369C
// size: 0x23
extern unsigned char ItemAnimLs[35];

// address: 0x8012DA58
extern int *ItemAnimSnds;

// address: 0x8012DA5C
extern int idoppely;

// address: 0x8012DA60
extern int ScrollFlag;

// address: 0x800C374C
// size: 0x18
extern int premiumlvladd[6];

// address: 0x800C9310
// size: 0x140
extern struct LightListStruct2 LightList[40];

// address: 0x800C9450
// size: 0x28
extern unsigned char lightactive[40];

// address: 0x8012DA88
extern int numlights;

// address: 0x8012DA8C
extern char lightmax;

// address: 0x800C9478
// size: 0x1C0
extern struct LightListStruct VisionList[32];

// address: 0x8012DA90
extern int numvision;

// address: 0x8012DA94
extern unsigned char dovision;

// address: 0x8012DA98
extern int visionid;

// address: 0x8012E83C
static int disp_mask;

// address: 0x8012E840
static int weird;

// address: 0x8012E844
static int disp_tab_r;

// address: 0x8012E848
static int dispy_r;

// address: 0x8012E84C
static int disp_tab_g;

// address: 0x8012E850
static int dispy_g;

// address: 0x8012E854
static int disp_tab_b;

// address: 0x8012E858
static int dispy_b;

// address: 0x8012E85C
static int radius;

// address: 0x8012E860
static int bright;

// address: 0x8012F850
// size: 0x80
static unsigned char mult_tab[128];

// address: 0x8012DA78
extern int lightflag;

// address: 0x800C9024
// size: 0x2B2
extern unsigned char vCrawlTable[30][23];

// address: 0x800C92D8
// size: 0x17
extern unsigned char RadiusAdj[23];

// address: 0x800C8564
// size: 0xABD
extern char CrawlTable[2749];

// address: 0x8012DA7C
extern int restore_r;

// address: 0x8012DA80
extern int restore_g;

// address: 0x8012DA84
extern int restore_b;

// address: 0x800C92F0
// size: 0x10
static char radius_tab[16];

// address: 0x800C9300
// size: 0x10
static char bright_tab[16];

// address: 0x8012DAB9
extern unsigned char qtextflag;

// address: 0x8012DABC
extern int qtextSpd;

// address: 0x8012E864
static unsigned char *pMedTextCels;

// address: 0x8012E868
static unsigned char *pTextBoxCels;

// address: 0x8012E86C
static char *qtextptr;

// address: 0x8012E870
static int qtexty;

// address: 0x8012E874
static unsigned long qtextDelay;

// address: 0x8012E878
static unsigned long sgLastScroll;

// address: 0x8012E87C
static unsigned long scrolltexty;

// address: 0x8012E880
static long sglMusicVolumeSave;

// address: 0x8012DAA8
static bool qtbodge;

// address: 0x800C9638
// size: 0x10
extern struct Dialog QBack;

// address: 0x800C9648
// size: 0x660
extern struct MissileData missiledata[68];

// address: 0x800C9DB8
// size: 0xEB
extern struct MisFileData misfiledata[47];

// address: 0x800C9CA8
// size: 0x110
extern void (*MissPrintRoutines[68])();

// address: 0x800C9EA4
// size: 0x13D4C
extern struct DLevel sgLevels[21];

// address: 0x800DDBF0
// size: 0x1068
extern struct LocalLevel sgLocals[21];

// address: 0x8012F8D0
// size: 0x16
static struct DJunk sgJunk;

// address: 0x8012E885
static unsigned char sgbRecvCmd;

// address: 0x8012E888
static unsigned long sgdwRecvOffset;

// address: 0x8012E88C
static unsigned char sgbDeltaChunks;

// address: 0x8012E88D
static unsigned char sgbDeltaChanged;

// address: 0x8012E890
static unsigned long sgdwOwnerWait;

// address: 0x8012E894
// size: 0x7D08
static struct TMegaPkt *sgpMegaPkt;

// address: 0x8012E898
// size: 0x7D08
static struct TMegaPkt *sgpCurrPkt;

// address: 0x8012E89C
static int sgnCurrMegaPlayer;

// address: 0x8012DAD5
extern unsigned char deltaload;

// address: 0x8012DAD6
extern unsigned char gbBufferMsgs;

// address: 0x8012DAD8
extern unsigned long dwRecCount;

// address: 0x8012DADC
extern bool LevelOut;

// address: 0x8012DAF2
extern unsigned char gbMaxPlayers;

// address: 0x8012DAF3
extern unsigned char gbActivePlayers;

// address: 0x8012DAF4
extern unsigned char gbGameDestroyed;

// address: 0x8012DAF5
extern unsigned char gbDeltaSender;

// address: 0x8012DAF6
extern unsigned char gbSelectProvider;

// address: 0x8012DAF7
extern unsigned char gbSomebodyWonGameKludge;

// address: 0x8012E8A0
static unsigned char sgbSentThisCycle;

// address: 0x8012E8A4
static unsigned long sgdwGameLoops;

// address: 0x8012E8A8
// size: 0x4
static unsigned short sgwPackPlrOffsetTbl[2];

// address: 0x8012E8AC
// size: 0x2
static unsigned char sgbPlayerLeftGameTbl[2];

// address: 0x8012E8B0
// size: 0x8
static unsigned long sgdwPlayerLeftReasonTbl[2];

// address: 0x8012E8B8
// size: 0x2
static unsigned char sgbSendDeltaTbl[2];

// address: 0x8012E8C0
// size: 0x8
static struct _gamedata sgGameInitInfo;

// address: 0x8012E8C8
static unsigned char sgbTimeout;

// address: 0x8012E8CC
static long sglTimeoutStart;

// address: 0x8012DAEC
// size: 0x5
extern char gszVersionNumber[5];

// address: 0x8012DAF1
static unsigned char sgbNetInited;

// address: 0x800DEC58
// size: 0x1C4
extern int ObjTypeConv[113];

// address: 0x800DEE1C
// size: 0x6F6
extern struct ObjDataStruct AllObjects[99];

// address: 0x80128CD8
// size: 0xE0
extern struct OBJ_LOAD_INFO ObjMasterLoadList[56];

// address: 0x800DF5FC
// size: 0x15D4
extern struct ObjectStruct object[127];

// address: 0x8012DB18
extern long numobjects;

// address: 0x800E0BD0
// size: 0x7F
extern char objectactive[127];

// address: 0x800E0C50
// size: 0x7F
extern char objectavail[127];

// address: 0x8012DB1C
extern unsigned char InitObjFlag;

// address: 0x8012DB20
extern int trapid;

// address: 0x800E0CD0
// size: 0x28
extern char ObjFileList[40];

// address: 0x8012DB24
extern int trapdir;

// address: 0x8012DB28
extern int leverid;

// address: 0x8012DB10
extern int numobjfiles;

// address: 0x800DF514
// size: 0x20
extern int bxadd[8];

// address: 0x800DF534
// size: 0x20
extern int byadd[8];

// address: 0x800DF5BC
// size: 0x1A
extern char shrineavail[26];

// address: 0x800DF554
// size: 0x68
extern int shrinestrs[26];

// address: 0x800DF5D8
// size: 0x24
extern int StoryBookName[9];

// address: 0x8012DB14
extern int myscale;

// address: 0x8012DB3C
extern unsigned char gbValidSaveFile;

// address: 0x8012DB38
extern bool DoLoadedChar;

// address: 0x800E0EF0
// size: 0x4750
extern struct PlayerStruct plr[2];

// address: 0x8012DB5C
extern int myplr;

// address: 0x8012DB60
extern int deathdelay;

// address: 0x8012DB64
extern unsigned char deathflag;

// address: 0x8012DB65
extern char light_rad;

// address: 0x8012DB54
// size: 0x5
extern char light_level[5];

// address: 0x800E0DE8
// size: 0x30
extern int MaxStats[4][3];

// address: 0x8012DB4C
static int PlrStructSize;

// address: 0x8012DB50
static int ItemStructSize;

// address: 0x800E0CF8
// size: 0x24
extern int plrxoff[9];

// address: 0x800E0D1C
// size: 0x24
extern int plryoff[9];

// address: 0x800E0D40
// size: 0x24
extern int plrxoff2[9];

// address: 0x800E0D64
// size: 0x24
extern int plryoff2[9];

// address: 0x800E0D88
// size: 0x21
extern char PlrGFXAnimLens[11][3];

// address: 0x800E0DAC
// size: 0xC
extern int StrengthTbl[3];

// address: 0x800E0DB8
// size: 0xC
extern int MagicTbl[3];

// address: 0x800E0DC4
// size: 0xC
extern int DexterityTbl[3];

// address: 0x800E0DD0
// size: 0xC
extern int VitalityTbl[3];

// address: 0x800E0DDC
// size: 0xC
extern int ToBlkTbl[3];

// address: 0x800E0E18
// size: 0xCC
extern long ExpLvlsTbl[51];

// address: 0x800E5778
// size: 0x140
extern struct QuestStruct quests[16];

// address: 0x8012DB94
extern unsigned char *pQLogCel;

// address: 0x8012DB98
extern int ReturnLvlX;

// address: 0x8012DB9C
extern int ReturnLvlY;

// address: 0x8012DBA0
extern int ReturnLvl;

// address: 0x8012DBA4
extern int ReturnLvlT;

// address: 0x8012DBA8
extern unsigned char rporttest;

// address: 0x8012DBAC
extern int qline;

// address: 0x8012DBB0
extern int numqlines;

// address: 0x8012DBB4
extern int qtopline;

// address: 0x8012F8E8
// size: 0x40
static int qlist[16];

// address: 0x8012E8D0
// size: 0x8
static struct RECT QSRect;

// address: 0x8012DB71
extern unsigned char questlog;

// address: 0x800E5640
// size: 0x100
extern struct QuestData questlist[16];

// address: 0x8012DB74
extern int ALLQUESTS;

// address: 0x800E5754
// size: 0xC
extern int QuestGroup1[3];

// address: 0x800E5760
// size: 0xC
extern int QuestGroup2[3];

// address: 0x800E576C
// size: 0xC
extern int QuestGroup3[3];

// address: 0x8012DB78
// size: 0x8
extern int QuestGroup4[2];

// address: 0x8012DB90
extern bool WaterDone;

// address: 0x800E5740
// size: 0x14
extern int questtrigstr[5];

// address: 0x8012DB80
static int QS_PX;

// address: 0x8012DB84
static int QS_PY;

// address: 0x8012DB88
static int QS_PW;

// address: 0x8012DB8C
static int QS_PH;

// address: 0x8012F928
// size: 0x10
static struct Dialog QSBack;

// address: 0x800E58B8
// size: 0x784
extern struct SpellData spelldata[37];

// address: 0x8012DBEF
extern char stextflag;

// address: 0x800E6160
// size: 0xBE0
extern struct ItemStruct smithitem[20];

// address: 0x800E6D40
// size: 0x390
extern struct ItemStruct premiumitem[6];

// address: 0x8012DBF0
extern int numpremium;

// address: 0x8012DBF4
extern int premiumlevel;

// address: 0x800E70D0
// size: 0xBE0
extern struct ItemStruct witchitem[20];

// address: 0x800E7CB0
// size: 0x98
extern struct ItemStruct boyitem;

// address: 0x8012DBF8
extern int boylevel;

// address: 0x800E7D48
// size: 0x98
extern struct ItemStruct golditem;

// address: 0x800E7DE0
// size: 0xBE0
extern struct ItemStruct healitem[20];

// address: 0x8012DBFC
extern char stextsize;

// address: 0x8012DBFD
extern unsigned char stextscrl;

// address: 0x8012E8D8
static int stextsel;

// address: 0x8012E8DC
static int stextlhold;

// address: 0x8012E8E0
static int stextshold;

// address: 0x8012E8E4
static int stextvhold;

// address: 0x8012E8E8
static int stextsval;

// address: 0x8012E8EC
static int stextsmax;

// address: 0x8012E8F0
static int stextup;

// address: 0x8012E8F4
static int stextdown;

// address: 0x8012E8F8
static char stextscrlubtn;

// address: 0x8012E8F9
static char stextscrldbtn;

// address: 0x8012E8FA
static char SItemListFlag;

// address: 0x8012F938
// size: 0xD20
static struct STextStruct stext[24];

// address: 0x800E89C0
// size: 0x1C80
extern struct ItemStruct storehold[48];

// address: 0x800EA640
// size: 0x30
extern char storehidx[48];

// address: 0x8012E8FC
static int storenumh;

// address: 0x8012E900
static int gossipstart;

// address: 0x8012E904
static int gossipend;

// address: 0x8012E908
// size: 0x8
static struct RECT StoreBackRect;

// address: 0x8012E910
static int talker;

// address: 0x8012DBDC
extern unsigned char *pSTextBoxCels;

// address: 0x8012DBE0
extern unsigned char *pSTextSlidCels;

// address: 0x8012DBE4
extern int *SStringY;

// address: 0x800E603C
// size: 0x10
extern struct Dialog SBack;

// address: 0x800E604C
// size: 0x50
extern int SStringYNorm[20];

// address: 0x800E609C
// size: 0x50
extern int SStringYBuy0[20];

// address: 0x800E60EC
// size: 0x50
extern int SStringYBuy1[20];

// address: 0x800E613C
// size: 0x24
extern int talkname[9];

// address: 0x8012DBEE
extern unsigned char InStoreFlag;

// address: 0x8012A024
// size: 0xC9C
extern struct TextDataStruct alltext[269];

// address: 0x8012DC0C
extern unsigned long gdwAllTextEntries;

// address: 0x8012E914
static unsigned char *P3Tiles;

// address: 0x8012DC1C
extern int tile;

// address: 0x8012DC2C
// size: 0x2
extern unsigned char _trigflag[2];

// address: 0x800EA8A8
// size: 0x50
extern struct TriggerStruct trigs[5];

// address: 0x8012DC30
extern int numtrigs;

// address: 0x8012DC34
// size: 0x3
extern unsigned char townwarps[3];

// address: 0x8012DC38
extern int TWarpFrom;

// address: 0x800EA670
// size: 0x2C
extern int TownDownList[11];

// address: 0x800EA69C
// size: 0x34
extern int TownWarp1List[13];

// address: 0x800EA6D0
// size: 0x30
extern int L1UpList[12];

// address: 0x800EA700
// size: 0x28
extern int L1DownList[10];

// address: 0x800EA728
// size: 0xC
extern int L2UpList[3];

// address: 0x800EA734
// size: 0x14
extern int L2DownList[5];

// address: 0x800EA748
// size: 0xC
extern int L2TWarpUpList[3];

// address: 0x800EA754
// size: 0x3C
extern int L3UpList[15];

// address: 0x800EA790
// size: 0x24
extern int L3DownList[9];

// address: 0x800EA7B4
// size: 0x38
extern int L3TWarpUpList[14];

// address: 0x800EA7EC
// size: 0x10
extern int L4UpList[4];

// address: 0x800EA7FC
// size: 0x18
extern int L4DownList[6];

// address: 0x800EA814
// size: 0x10
extern int L4TWarpUpList[4];

// address: 0x800EA824
// size: 0x84
extern int L4PentaList[33];

// address: 0x8012DC51
extern unsigned char gbSndInited;

// address: 0x8012DC54
extern long sglMasterVolume;

// address: 0x8012DC58
extern long sglMusicVolume;

// address: 0x8012DC5C
extern long sglSoundVolume;

// address: 0x8012DC60
extern long sglSpeechVolume;

// address: 0x8012DC64
extern int sgnMusicTrack;

// address: 0x8012DC52
extern unsigned char gbDupSounds;

// address: 0x8012DC68
// size: 0x80
extern struct SFXHDR *sghMusic;

// address: 0x8012AE58
// size: 0xC
static unsigned short sgszMusicTracks[6];

// address: 0x8012DC80
// size: 0x8
extern int _pcurr_inv[2];

// address: 0x800EA8F8
// size: 0x50
extern struct found_objects _pfind_list[10][2];

// address: 0x8012DC88
// size: 0x2
extern char _pfind_index[2];

// address: 0x8012DC8C
// size: 0x2
extern char _pfindx[2];

// address: 0x8012DC90
// size: 0x2
extern char _pfindy[2];

// address: 0x8012DC92
extern unsigned char automapmoved;

// address: 0x8012DC75
extern unsigned char flyflag;

// address: 0x8012DC76
static char seen_combo;

// address: 0x80130658
// size: 0x94
static struct GamePad GPad1;

// address: 0x801306F8
// size: 0x94
static struct GamePad GPad2;

// address: 0x8012E918
static unsigned long (*CurrentProc)();

// address: 0x8012AFEC
// size: 0x60
static struct MESSAGE_STR AllMsgs[12];

// address: 0x8012DCCC
extern int NumOfStrings;

// address: 0x8012DCA0
// size: 0x4
extern enum LANG_TYPE LanguageType;

// address: 0x8012DCA4
extern long hndText;

// address: 0x8012DCA8
extern char **TextPtr;

// address: 0x8012DCAC
// size: 0x4
extern enum LANG_DB_NO LangDbNo;

// address: 0x8012DCDC
// size: 0x6C
extern struct TextDat *MissDat;

// address: 0x8012DCE0
extern int CharFade;

// address: 0x8012DCE4
extern int rotateness;

// address: 0x8012DCE8
extern int spiralling_shape;

// address: 0x8012DCEC
extern int down;

// address: 0x800EA948
// size: 0x10
extern char MlTab[16];

// address: 0x800EA958
// size: 0x10
extern char QlTab[16];

// address: 0x800EA968
// size: 0x188
extern struct POLY_FT4 *(*ObjPrintFuncs[98])();

// address: 0x8012DD08
extern int MyXoff1;

// address: 0x8012DD0C
extern int MyYoff1;

// address: 0x8012DD10
extern int MyXoff2;

// address: 0x8012DD14
extern int MyYoff2;

// address: 0x8012DD24
extern bool iscflag;

// address: 0x8012DD31
static unsigned char sgbFadedIn;

// address: 0x8012DD32
static unsigned char screenbright;

// address: 0x8012DD34
static int faderate;

// address: 0x8012DD38
static bool fading;

// address: 0x8012DD44
// size: 0x8
static unsigned char FadeCoords[8];

// address: 0x8012DD3C
extern int st;

// address: 0x8012DD40
extern int mode;

// address: 0x800EAAF0
// size: 0x18
extern struct PortalStruct portal[2];

// address: 0x8012DD76
extern char portalindex;

// address: 0x8012DD70
// size: 0x2
static char WarpDropX[2];

// address: 0x8012DD74
// size: 0x2
static char WarpDropY[2];

// address: 0x800EAB08
// size: 0x78
extern char MyVerString[120];

// address: 0x8012DED4
extern int Year;

// address: 0x8012DED8
extern int Day;

// address: 0x8012E91C
static unsigned char *tbuff;

// address: 0x800EAB80
// size: 0x300
extern unsigned char IconBuffer[768];

// address: 0x8012E920
static unsigned char HR1;

// address: 0x8012E921
static unsigned char HR2;

// address: 0x8012E922
static unsigned char HR3;

// address: 0x8012E923
static unsigned char VR1;

// address: 0x8012E924
static unsigned char VR2;

// address: 0x8012E925
static unsigned char VR3;

// address: 0x8012DF48
// size: 0x18
extern struct NODE *pHallList;

// address: 0x8012DF4C
extern int nRoomCnt;

// address: 0x8012DF50
extern int nSx1;

// address: 0x8012DF54
extern int nSy1;

// address: 0x8012DF58
extern int nSx2;

// address: 0x8012DF5C
extern int nSy2;

// address: 0x8012DF00
extern int Area_Min;

// address: 0x8012DF04
extern int Room_Max;

// address: 0x8012DF08
extern int Room_Min;

// address: 0x8012DF0C
// size: 0x6
extern unsigned char BIG3[6];

// address: 0x8012DF14
// size: 0x6
extern unsigned char BIG4[6];

// address: 0x8012DF1C
// size: 0x6
extern unsigned char BIG6[6];

// address: 0x8012DF24
// size: 0x6
extern unsigned char BIG7[6];

// address: 0x8012DF2C
// size: 0x4
extern unsigned char RUINS1[4];

// address: 0x8012DF30
// size: 0x4
extern unsigned char RUINS2[4];

// address: 0x8012DF34
// size: 0x4
extern unsigned char RUINS3[4];

// address: 0x8012DF38
// size: 0x4
extern unsigned char RUINS4[4];

// address: 0x8012DF3C
// size: 0x4
extern unsigned char RUINS5[4];

// address: 0x8012DF40
// size: 0x4
extern unsigned char RUINS6[4];

// address: 0x8012DF44
// size: 0x4
extern unsigned char RUINS7[4];

// address: 0x8012E928
static int abyssx;

// address: 0x8012E92C
static unsigned char lavapool;

// address: 0x8012DFE8
extern int lockoutcnt;

// address: 0x8012DF6C
// size: 0x6
static unsigned char L3TITE12[6];

// address: 0x8012DF74
// size: 0x6
static unsigned char L3TITE13[6];

// address: 0x8012DF7C
// size: 0x6
static unsigned char L3CREV1[6];

// address: 0x8012DF84
// size: 0x6
static unsigned char L3CREV2[6];

// address: 0x8012DF8C
// size: 0x6
static unsigned char L3CREV3[6];

// address: 0x8012DF94
// size: 0x6
static unsigned char L3CREV4[6];

// address: 0x8012DF9C
// size: 0x6
static unsigned char L3CREV5[6];

// address: 0x8012DFA4
// size: 0x6
static unsigned char L3CREV6[6];

// address: 0x8012DFAC
// size: 0x6
static unsigned char L3CREV7[6];

// address: 0x8012DFB4
// size: 0x6
static unsigned char L3CREV8[6];

// address: 0x8012DFBC
// size: 0x6
static unsigned char L3CREV9[6];

// address: 0x8012DFC4
// size: 0x6
static unsigned char L3CREV10[6];

// address: 0x8012DFCC
// size: 0x6
static unsigned char L3CREV11[6];

// address: 0x8012DFD4
// size: 0x4
static unsigned char L3XTRA1[4];

// address: 0x8012DFD8
// size: 0x4
static unsigned char L3XTRA2[4];

// address: 0x8012DFDC
// size: 0x4
static unsigned char L3XTRA3[4];

// address: 0x8012DFE0
// size: 0x4
static unsigned char L3XTRA4[4];

// address: 0x8012DFE4
// size: 0x4
static unsigned char L3XTRA5[4];

// address: 0x8012DFEC
extern int diabquad1x;

// address: 0x8012DFF0
extern int diabquad2x;

// address: 0x8012DFF4
extern int diabquad3x;

// address: 0x8012DFF8
extern int diabquad4x;

// address: 0x8012DFFC
extern int diabquad1y;

// address: 0x8012E000
extern int diabquad2y;

// address: 0x8012E004
extern int diabquad3y;

// address: 0x8012E008
extern int diabquad4y;

// address: 0x8012E00C
extern int SP4x1;

// address: 0x8012E010
extern int SP4y1;

// address: 0x8012E014
extern int SP4x2;

// address: 0x8012E018
extern int SP4y2;

// address: 0x8012E01C
extern int l4holdx;

// address: 0x8012E020
extern int l4holdy;

// address: 0x8012E930
static unsigned char *lpSetPiece1;

// address: 0x8012E934
static unsigned char *lpSetPiece2;

// address: 0x8012E938
static unsigned char *lpSetPiece3;

// address: 0x8012E93C
static unsigned char *lpSetPiece4;

// address: 0x8012E940
static unsigned char *lppSetPiece2;

// address: 0x8012E944
static unsigned char *lppSetPiece3;

// address: 0x8012E948
static unsigned char *lppSetPiece4;

// address: 0x8012E030
// size: 0x8
static unsigned char SkelKingTrans1[8];

// address: 0x8012E038
// size: 0x8
static unsigned char SkelKingTrans2[8];

// address: 0x800EAE80
// size: 0x14
static unsigned char SkelKingTrans3[20];

// address: 0x800EAE94
// size: 0x1C
static unsigned char SkelKingTrans4[28];

// address: 0x800EAEB0
// size: 0x14
static unsigned char SkelChamTrans1[20];

// address: 0x8012E040
// size: 0x8
static unsigned char SkelChamTrans2[8];

// address: 0x800EAEC4
// size: 0x24
static unsigned char SkelChamTrans3[36];

// address: 0x8012E134
static bool DoUiForChooseMonster;

// address: 0x800EAEE8
// size: 0x88
static char *MgToText[34];

// address: 0x800EAF70
// size: 0x24
extern int StoryText[3][3];

// address: 0x800EAF94
// size: 0x1200
extern unsigned short dungeon[48][48];

// address: 0x800EC194
// size: 0x640
extern unsigned char pdungeon[40][40];

// address: 0x800EC7D4
// size: 0x640
extern unsigned char dflags[40][40];

// address: 0x8012E158
extern int setpc_x;

// address: 0x8012E15C
extern int setpc_y;

// address: 0x8012E160
extern int setpc_w;

// address: 0x8012E164
extern int setpc_h;

// address: 0x8012E168
extern unsigned char setloadflag;

// address: 0x8012E16C
extern unsigned char *pMegaTiles;

// address: 0x800ECE14
// size: 0x801
extern unsigned char nBlockTable[2049];

// address: 0x800ED618
// size: 0x801
extern unsigned char nSolidTable[2049];

// address: 0x800EDE1C
// size: 0x801
extern unsigned char nTransTable[2049];

// address: 0x800EE620
// size: 0x801
extern unsigned char nMissileTable[2049];

// address: 0x800EEE24
// size: 0x801
extern unsigned char nTrapTable[2049];

// address: 0x8012E170
extern int dminx;

// address: 0x8012E174
extern int dminy;

// address: 0x8012E178
extern int dmaxx;

// address: 0x8012E17C
extern int dmaxy;

// address: 0x8012E180
extern int gnDifficulty;

// address: 0x8012E184
extern unsigned char currlevel;

// address: 0x8012E185
extern unsigned char leveltype;

// address: 0x8012E186
extern unsigned char setlevel;

// address: 0x8012E187
extern unsigned char setlvlnum;

// address: 0x8012E188
extern unsigned char setlvltype;

// address: 0x8012E18C
extern int ViewX;

// address: 0x8012E190
extern int ViewY;

// address: 0x8012E194
extern int ViewDX;

// address: 0x8012E198
extern int ViewDY;

// address: 0x8012E19C
extern int ViewBX;

// address: 0x8012E1A0
extern int ViewBY;

// address: 0x800EF628
// size: 0x14
extern struct ScrollStruct ScrollInfo;

// address: 0x8012E1A4
extern int LvlViewX;

// address: 0x8012E1A8
extern int LvlViewY;

// address: 0x8012E1AC
extern int btmbx;

// address: 0x8012E1B0
extern int btmby;

// address: 0x8012E1B4
extern int btmdx;

// address: 0x8012E1B8
extern int btmdy;

// address: 0x8012E1BC
extern int MicroTileLen;

// address: 0x8012E1C0
extern char TransVal;

// address: 0x800EF63C
// size: 0x20
extern bool TransList[8];

// address: 0x8012E1C4
extern int themeCount;

// address: 0x800EF65C
// size: 0x222C0
extern struct map_info dung_map[108][108];

// address: 0x8011191C
// size: 0xB64
extern unsigned char dung_map_r[54][54];

// address: 0x80112480
// size: 0xB64
extern unsigned char dung_map_g[54][54];

// address: 0x80112FE4
// size: 0xB64
extern unsigned char dung_map_b[54][54];

// address: 0x80113B48
// size: 0xAA
extern struct MINIXY MinisetXY[17];

// address: 0x8012E150
extern unsigned char *pSetPiece;

// address: 0x8012E154
extern int DungSize;

// address: 0x80113D14
// size: 0x190
extern struct ThemeStruct theme[50];

// address: 0x8012E204
extern int numthemes;

// address: 0x8012E208
extern int zharlib;

// address: 0x8012E20C
extern unsigned char armorFlag;

// address: 0x8012E20D
extern unsigned char bCrossFlag;

// address: 0x8012E20E
extern unsigned char weaponFlag;

// address: 0x8012E210
extern int themex;

// address: 0x8012E214
extern int themey;

// address: 0x8012E218
extern int themeVar1;

// address: 0x8012E21C
extern unsigned char bFountainFlag;

// address: 0x8012E21D
extern unsigned char cauldronFlag;

// address: 0x8012E21E
extern unsigned char mFountainFlag;

// address: 0x8012E21F
extern unsigned char pFountainFlag;

// address: 0x8012E220
extern unsigned char tFountainFlag;

// address: 0x8012E221
extern unsigned char treasureFlag;

// address: 0x8012E224
// size: 0x4
extern unsigned char ThemeGoodIn[4];

// address: 0x80113BF4
// size: 0x10
extern int ThemeGood[4];

// address: 0x80113C04
// size: 0x64
extern int trm5x[25];

// address: 0x80113C68
// size: 0x64
extern int trm5y[25];

// address: 0x80113CCC
// size: 0x24
extern int trm3x[9];

// address: 0x80113CF0
// size: 0x24
extern int trm3y[9];

// address: 0x8012E2FC
extern int nummissiles;

// address: 0x80113F2C
// size: 0x1F4
extern int missileactive[125];

// address: 0x80114120
// size: 0x1F4
extern int missileavail[125];

// address: 0x8012E300
extern unsigned char MissilePreFlag;

// address: 0x80114314
// size: 0x2710
extern struct MissileStruct missile[125];

// address: 0x8012E301
extern unsigned char ManashieldFlag;

// address: 0x8012E302
extern unsigned char ManashieldFlag2;

// address: 0x80113EA4
// size: 0x20
extern int XDirAdd[8];

// address: 0x80113EC4
// size: 0x20
extern int YDirAdd[8];

// address: 0x8012E2C9
extern unsigned char fadetor;

// address: 0x8012E2CA
extern unsigned char fadetog;

// address: 0x8012E2CB
extern unsigned char fadetob;

// address: 0x80113EE4
// size: 0x10
extern unsigned char ValueTable[16];

// address: 0x80113EF4
// size: 0x36
extern unsigned char StringTable[9][6];

// address: 0x80116BC4
// size: 0x5780
extern struct MonsterStruct monster[200];

// address: 0x8012E364
extern long nummonsters;

// address: 0x8011C344
// size: 0x190
extern short monstactive[200];

// address: 0x8011C4D4
// size: 0x190
extern short monstkills[200];

// address: 0x8011C664
// size: 0x1C0
extern struct CMonster Monsters[16];

// address: 0x8012E368
extern long monstimgtot;

// address: 0x8012E36C
extern char totalmonsters;

// address: 0x8012E370
extern int uniquetrans;

// address: 0x8012E94C
static unsigned char sgbSaveSoundOn;

// address: 0x8012E334
// size: 0x8
extern char offset_x[8];

// address: 0x8012E33C
// size: 0x8
extern char offset_y[8];

// address: 0x8012E31C
// size: 0x8
extern char left[8];

// address: 0x8012E324
// size: 0x8
extern char right[8];

// address: 0x8012E32C
// size: 0x8
extern char opposite[8];

// address: 0x8012E310
extern int nummtypes;

// address: 0x8012E314
// size: 0x7
extern char animletter[7];

// address: 0x80116A24
// size: 0x120
extern int MWVel[3][24];

// address: 0x8012E344
// size: 0x4
extern char rnd5[4];

// address: 0x8012E348
// size: 0x4
extern char rnd10[4];

// address: 0x8012E34C
// size: 0x4
extern char rnd20[4];

// address: 0x8012E350
// size: 0x4
extern char rnd60[4];

// address: 0x80116B44
// size: 0x80
extern void (*AiProc[32])();

// address: 0x8011CB3C
// size: 0x1A40
extern struct MonsterData monsterdata[112];

// address: 0x8011E57C
// size: 0x80
extern char MonstConvTbl[128];

// address: 0x8011E5FC
// size: 0x70
extern char MonstAvailTbl[112];

// address: 0x8011E66C
// size: 0x930
extern struct UniqMonstStruct UniqMonst[98];

// address: 0x8011C924
// size: 0x218
extern int TransPals[134];

// address: 0x8011C824
// size: 0x100
extern struct STONEPAL StonePals[32];

// address: 0x8012E3A8
extern unsigned char invflag;

// address: 0x8012E3A9
extern unsigned char drawsbarflag;

// address: 0x8012E3AC
extern int InvBackY;

// address: 0x8012E3B0
extern int InvCursPos;

// address: 0x8011F614
// size: 0x49
extern unsigned char InvSlotTable[73];

// address: 0x8012E3B4
extern int InvBackAY;

// address: 0x8012E3B8
extern int InvSel;

// address: 0x8012E3BC
extern int ItemW;

// address: 0x8012E3C0
extern int ItemH;

// address: 0x8012E3C4
extern int ItemNo;

// address: 0x8012E3C8
// size: 0x8
extern struct RECT BRect;

// address: 0x8012E390
// size: 0x6C
extern struct TextDat *InvPanelTData;

// address: 0x8012E394
// size: 0x6C
extern struct TextDat *InvGfxTData;

// address: 0x8012E38C
extern int InvPageNo;

// address: 0x8011EF9C
// size: 0x28
extern int AP2x2Tbl[10];

// address: 0x8011EFC4
// size: 0x248
extern struct InvXY InvRect[73];

// address: 0x8011F20C
// size: 0x2A0
extern int InvGfxTable[168];

// address: 0x8011F4AC
// size: 0xB4
extern unsigned char InvItemWidth[180];

// address: 0x8011F560
// size: 0xB4
extern unsigned char InvItemHeight[180];

// address: 0x8012E3A0
static bool InvOn;

// address: 0x8012E3A4
static unsigned long sgdwLastTime;

// address: 0x8012E3FF
extern unsigned char automapflag;

// address: 0x8011F678
// size: 0xC8
extern unsigned char automapview[40][5];

// address: 0x8011F740
// size: 0x400
extern unsigned short automaptype[512];

// address: 0x8012E400
extern unsigned char AMLWallFlag;

// address: 0x8012E401
extern unsigned char AMRWallFlag;

// address: 0x8012E402
extern unsigned char AMLLWallFlag;

// address: 0x8012E403
extern unsigned char AMLRWallFlag;

// address: 0x8012E404
extern unsigned char AMDirtFlag;

// address: 0x8012E405
extern unsigned char AMColumnFlag;

// address: 0x8012E406
extern unsigned char AMStairFlag;

// address: 0x8012E407
extern unsigned char AMLDoorFlag;

// address: 0x8012E408
extern unsigned char AMLGrateFlag;

// address: 0x8012E409
extern unsigned char AMLArchFlag;

// address: 0x8012E40A
extern unsigned char AMRDoorFlag;

// address: 0x8012E40B
extern unsigned char AMRGrateFlag;

// address: 0x8012E40C
extern unsigned char AMRArchFlag;

// address: 0x8012E410
extern int AutoMapX;

// address: 0x8012E414
extern int AutoMapY;

// address: 0x8012E418
extern int AutoMapXOfs;

// address: 0x8012E41C
extern int AutoMapYOfs;

// address: 0x8012E420
extern int AMPlayerX;

// address: 0x8012E424
extern int AMPlayerY;

// address: 0x8012E3DC
extern int AutoMapScale;

// address: 0x8012E3E0
extern unsigned char AutoMapPlayerR;

// address: 0x8012E3E1
extern unsigned char AutoMapPlayerG;

// address: 0x8012E3E2
extern unsigned char AutoMapPlayerB;

// address: 0x8012E3E3
extern unsigned char AutoMapWallR;

// address: 0x8012E3E4
extern unsigned char AutoMapWallG;

// address: 0x8012E3E5
extern unsigned char AutoMapWallB;

// address: 0x8012E3E6
extern unsigned char AutoMapDoorR;

// address: 0x8012E3E7
extern unsigned char AutoMapDoorG;

// address: 0x8012E3E8
extern unsigned char AutoMapDoorB;

// address: 0x8012E3E9
extern unsigned char AutoMapColumnR;

// address: 0x8012E3EA
extern unsigned char AutoMapColumnG;

// address: 0x8012E3EB
extern unsigned char AutoMapColumnB;

// address: 0x8012E3EC
extern unsigned char AutoMapArchR;

// address: 0x8012E3ED
extern unsigned char AutoMapArchG;

// address: 0x8012E3EE
extern unsigned char AutoMapArchB;

// address: 0x8012E3EF
extern unsigned char AutoMapStairR;

// address: 0x8012E3F0
extern unsigned char AutoMapStairG;

// address: 0x8012E3F1
extern unsigned char AutoMapStairB;

// address: 0x8011F660
// size: 0x18
static int SetLevelName[6];

// address: 0x8012EAA8
extern unsigned long GazTick;

// address: 0x80135560
// size: 0x18
extern unsigned long RndTabs[6];

// address: 0x800A89D4
// size: 0x18
extern unsigned long DefaultRnd[6];

// address: 0x8012EAD0
extern void (*PollFunc)();

// address: 0x8012EAB4
extern void (*MsgFunc)();

// address: 0x8012EB00
extern void (*ErrorFunc)();

// address: 0x8012E9D4
// size: 0x5C
static struct TASK *ActiveTasks;

// address: 0x8012E9D8
// size: 0x5C
static struct TASK *CurrentTask;

// address: 0x8012E9DC
// size: 0x5C
static struct TASK *T;

// address: 0x8012E9E0
static unsigned long MemTypeForTasker;

// address: 0x80132D90
// size: 0x30
static int SchEnv[12];

// address: 0x8012E9E4
static unsigned long ExecId;

// address: 0x8012E9E8
static unsigned long ExecMask;

// address: 0x8012E9EC
static int TasksActive;

// address: 0x8012E9F0
static void (*EpiFunc)();

// address: 0x8012E9F4
static void (*ProFunc)();

// address: 0x8012E9F8
static unsigned long EpiProId;

// address: 0x8012E9FC
static unsigned long EpiProMask;

// address: 0x8012EA00
static void (*DoTasksPrologue)();

// address: 0x8012EA04
static void (*DoTasksEpilogue)();

// address: 0x8012EA08
static void (*StackFloodCallback)();

// address: 0x8012EA0C
static unsigned char ExtraStackProtection;

// address: 0x8012EA10
static int ExtraStackSizeLongs;

// address: 0x8012EABC
extern void *LastPtr;

// address: 0x800A8A0C
// size: 0x8
extern struct MEM_INFO WorkMemInfo;

// address: 0x8012EA14
// size: 0x28
static struct MEM_INIT_INFO *MemInitBlocks;

// address: 0x80132DC0
// size: 0x1180
static struct MEM_HDR MemHdrBlocks[140];

// address: 0x8012EA18
// size: 0x20
static struct MEM_HDR *FreeBlocks;

// address: 0x8012EA1C
// size: 0x4
static enum GAL_ERROR_CODE LastError;

// address: 0x8012EA20
static int TimeStamp;

// address: 0x8012EA24
static unsigned char FullErrorChecking;

// address: 0x8012EA28
static unsigned long LastAttemptedAlloc;

// address: 0x8012EA2C
static unsigned long LastDeallocedBlock;

// address: 0x8012EA30
// size: 0x4
static enum GAL_VERB_LEV VerbLev;

// address: 0x8012EA34
static int NumOfFreeHdrs;

// address: 0x8012EA38
static unsigned long LastTypeAlloced;

// address: 0x8012EA3C
static void (*AllocFilter)();

// address: 0x800A8A14
// size: 0x28
extern char *GalErrors[10];

// address: 0x800A8A3C
// size: 0x28
extern struct MEM_INIT_INFO PhantomMem;

// address: 0x80133F40
// size: 0x1380
static char buf[4992];

// address: 0x800A8A64
// size: 0x7
static char NULL_REP[7];

