diff options
Diffstat (limited to 'gob/global.h')
-rw-r--r-- | gob/global.h | 177 |
1 files changed, 93 insertions, 84 deletions
diff --git a/gob/global.h b/gob/global.h index a8a3d45fb8..d6b9fd8d4c 100644 --- a/gob/global.h +++ b/gob/global.h @@ -29,29 +29,11 @@ namespace Gob { -extern char pressedKeys[128]; - -extern char useMouse; -extern int16 mousePresent; - -extern int16 presentCGA; -extern int16 presentEGA; -extern int16 presentVGA; -extern int16 presentHER; - -extern int16 videoMode; - -extern int16 disableVideoCfg; - #define VIDMODE_CGA 0x05 #define VIDMODE_EGA 0x0d #define VIDMODE_VGA 0x13 #define VIDMODE_HER 7 -extern uint16 presentSound; -extern uint16 soundFlags; -extern int16 disableSoundCfg; - #define PROAUDIO_FLAG 0x10 #define ADLIB_FLAG 0x08 #define BLASTER_FLAG 0x04 @@ -59,9 +41,6 @@ extern int16 disableSoundCfg; #define SPEAKER_FLAG 0x01 #define MIDI_FLAG 0x4000 -extern uint16 disableLangCfg; -extern uint16 language; - #define NO 0 #define YES 1 #define UNDEF 2 @@ -75,92 +54,122 @@ extern uint16 language; #define ESCAPE 0x001b #define ENTER 0x000d -/* Timer variables */ -extern int32 startTime; -extern int16 timer_delta; +#define MAX_FILES 30 -extern int16 frameWaitTime; -extern int32 startFrameTime; +/* Video drivers */ +#define UNK_DRIVER 0 +#define VGA_DRIVER 1 +#define EGA_DRIVER 2 +#define CGA_DRIVER 3 +#define HER_DRIVER 4 -/* Mouse */ -extern int16 disableMouseCfg; +class Global { +public: + char pressedKeys[128]; -extern int16 mouseXShift; -extern int16 mouseYShift; -extern int16 mouseMaxCol; -extern int16 mouseMaxRow; + char useMouse; + int16 mousePresent; -/* Timer and delays */ -extern int16 delayTime; + int16 presentCGA; + int16 presentEGA; + int16 presentVGA; + int16 presentHER; -/* Joystick */ -extern char useJoystick; + int16 videoMode; -/* Files */ -#define MAX_FILES 30 + int16 disableVideoCfg; -extern Common::File filesHandles[MAX_FILES]; + uint16 presentSound; + uint16 soundFlags; + int16 disableSoundCfg; + int16 blasterPort; -/* Data files */ -extern struct ChunkDesc *dataFiles[MAX_DATA_FILES]; -extern int16 numDataChunks[MAX_DATA_FILES]; -extern int16 dataFileHandles[MAX_DATA_FILES]; -extern int32 chunkPos[MAX_SLOT_COUNT * MAX_DATA_FILES]; -extern int32 chunkOffset[MAX_SLOT_COUNT * MAX_DATA_FILES]; -extern int32 chunkSize[MAX_SLOT_COUNT * MAX_DATA_FILES]; -extern char isCurrentSlot[MAX_SLOT_COUNT * MAX_DATA_FILES]; -extern int32 packedSize; + uint16 disableLangCfg; + uint16 language; -/* Video drivers */ -#define UNK_DRIVER 0 -#define VGA_DRIVER 1 -#define EGA_DRIVER 2 -#define CGA_DRIVER 3 -#define HER_DRIVER 4 + // Timer variables + int32 startTime; + int16 timer_delta; + + int16 frameWaitTime; + int32 startFrameTime; + + // Mouse + int16 disableMouseCfg; + + int16 mouseXShift; + int16 mouseYShift; + int16 mouseMaxCol; + int16 mouseMaxRow; + + // Timer and delays + int16 delayTime; + + // Joystick + char useJoystick; + + // Files + Common::File filesHandles[MAX_FILES]; + + // Data files + struct DataIO::ChunkDesc *dataFiles[MAX_DATA_FILES]; + int16 numDataChunks[MAX_DATA_FILES]; + int16 dataFileHandles[MAX_DATA_FILES]; + int32 chunkPos[MAX_SLOT_COUNT * MAX_DATA_FILES]; + int32 chunkOffset[MAX_SLOT_COUNT * MAX_DATA_FILES]; + int32 chunkSize[MAX_SLOT_COUNT * MAX_DATA_FILES]; + char isCurrentSlot[MAX_SLOT_COUNT * MAX_DATA_FILES]; + int32 packedSize; + + int16 sprAllocated; + + int16 primaryWidth; + int16 primaryHeight; -extern SurfaceDesc primarySurfDesc; -extern SurfaceDesc *pPrimarySurfDesc; -extern int16 sprAllocated; + int16 doRangeClamp; -extern int16 primaryWidth; -extern int16 primaryHeight; + char redPalette[256]; + char greenPalette[256]; + char bluePalette[256]; -extern int16 doRangeClamp; + int16 setAllPalette; -extern char redPalette[256]; -extern char greenPalette[256]; -extern char bluePalette[256]; + Video::SurfaceDesc *curPrimaryDesc; + Video::SurfaceDesc *allocatedPrimary; + Video::SurfaceDesc_t primarySurfDesc; + Video::SurfaceDesc *pPrimarySurfDesc; -extern int16 setAllPalette; + int16 oldMode; + char dontSetPalette; -extern SurfaceDesc *curPrimaryDesc; -extern SurfaceDesc *allocatedPrimary; + Video::PalDesc *pPaletteDesc; -extern int16 oldMode; -extern char dontSetPalette; + int16 unusedPalette1[18]; + int16 unusedPalette2[16]; + Video::Color vgaPalette[16]; + Video::PalDesc paletteStruct; -extern PalDesc *pPaletteDesc; + int16 debugFlag; + int16 inVM; + int16 colorCount; -extern int16 unusedPalette1[18]; -extern int16 unusedPalette2[16]; -extern Color vgaPalette[16]; -extern PalDesc paletteStruct; + char inter_resStr[200]; + int32 inter_resVal; -extern int16 debugFlag; -extern int16 inVM; -extern int16 colorCount; + char *inter_variables; + char *inter_execPtr; + int16 inter_animDataSize; -extern char inter_resStr[200]; -extern int32 inter_resVal; + int16 inter_mouseX; + int16 inter_mouseY; -extern char *inter_variables; -extern char *inter_execPtr; -extern int16 inter_animDataSize; + char *tmpPalBuffer; -extern int16 inter_mouseX; -extern int16 inter_mouseY; + Global(GobEngine *vm); -extern char *tmpPalBuffer; +protected: + GobEngine *_vm; +}; } // End of namespace Gob |