2007-05-30 21:56:52 +00:00
|
|
|
/* ScummVM - Graphic Adventure Engine
|
|
|
|
*
|
|
|
|
* ScummVM is the legal property of its developers, whose names
|
|
|
|
* are too numerous to list here. Please refer to the COPYRIGHT
|
|
|
|
* file distributed with this source distribution.
|
2005-04-05 15:53:16 +00:00
|
|
|
*
|
|
|
|
* This program is free software; you can redistribute it and/or
|
|
|
|
* modify it under the terms of the GNU General Public License
|
|
|
|
* as published by the Free Software Foundation; either version 2
|
|
|
|
* of the License, or (at your option) any later version.
|
|
|
|
|
|
|
|
* This program is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
2008-01-05 12:45:14 +00:00
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
2005-04-05 15:53:16 +00:00
|
|
|
* GNU General Public License for more details.
|
|
|
|
|
|
|
|
* You should have received a copy of the GNU General Public License
|
2005-04-09 19:19:54 +00:00
|
|
|
* along with this program; if not, write to the Free Software
|
2005-10-18 01:30:26 +00:00
|
|
|
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
2005-04-05 15:53:16 +00:00
|
|
|
*
|
2006-02-11 10:11:37 +00:00
|
|
|
* $URL$
|
|
|
|
* $Id$
|
2005-04-05 15:53:16 +00:00
|
|
|
*
|
|
|
|
*/
|
2007-03-20 14:51:57 +00:00
|
|
|
|
2005-04-05 18:08:02 +00:00
|
|
|
#ifndef GOB_GLOBAL_H
|
|
|
|
#define GOB_GLOBAL_H
|
2005-04-05 15:07:40 +00:00
|
|
|
|
|
|
|
#include "common/file.h"
|
2007-10-19 23:00:43 +00:00
|
|
|
#include "common/endian.h"
|
2005-04-05 15:07:40 +00:00
|
|
|
|
2007-03-20 14:51:57 +00:00
|
|
|
#include "gob/video.h"
|
|
|
|
|
2005-04-05 15:07:40 +00:00
|
|
|
namespace Gob {
|
|
|
|
|
|
|
|
#define VIDMODE_CGA 0x05
|
2007-03-20 14:51:57 +00:00
|
|
|
#define VIDMODE_EGA 0x0D
|
2005-08-08 20:20:00 +00:00
|
|
|
#define VIDMODE_VGA 0x13
|
2005-04-05 15:07:40 +00:00
|
|
|
#define VIDMODE_HER 7
|
|
|
|
|
|
|
|
#define PROAUDIO_FLAG 0x10
|
|
|
|
#define ADLIB_FLAG 0x08
|
|
|
|
#define BLASTER_FLAG 0x04
|
|
|
|
#define INTERSOUND_FLAG 0x02
|
|
|
|
#define SPEAKER_FLAG 0x01
|
|
|
|
#define MIDI_FLAG 0x4000
|
|
|
|
|
|
|
|
#define NO 0
|
|
|
|
#define YES 1
|
|
|
|
#define UNDEF 2
|
|
|
|
|
2007-03-20 14:51:57 +00:00
|
|
|
#define F1_KEY 0x3B00
|
|
|
|
#define F2_KEY 0x3C00
|
|
|
|
#define F3_KEY 0x3D00
|
|
|
|
#define F4_KEY 0x3E00
|
|
|
|
#define F5_KEY 0x3F00
|
2005-04-05 15:07:40 +00:00
|
|
|
#define F6_KEY 0x4000
|
2007-03-20 14:51:57 +00:00
|
|
|
#define ESCAPE 0x001B
|
|
|
|
#define ENTER 0x000D
|
2005-04-05 15:07:40 +00:00
|
|
|
|
2006-01-03 23:14:39 +00:00
|
|
|
/* Video drivers */
|
|
|
|
#define UNK_DRIVER 0
|
|
|
|
#define VGA_DRIVER 1
|
|
|
|
#define EGA_DRIVER 2
|
|
|
|
#define CGA_DRIVER 3
|
|
|
|
#define HER_DRIVER 4
|
2005-04-05 15:07:40 +00:00
|
|
|
|
2006-01-03 23:14:39 +00:00
|
|
|
class Global {
|
|
|
|
public:
|
2006-01-04 01:48:15 +00:00
|
|
|
char _pressedKeys[128];
|
2005-04-05 15:07:40 +00:00
|
|
|
|
2006-01-04 01:48:15 +00:00
|
|
|
int16 _presentCGA;
|
|
|
|
int16 _presentEGA;
|
|
|
|
int16 _presentVGA;
|
|
|
|
int16 _presentHER;
|
2005-04-05 15:07:40 +00:00
|
|
|
|
2006-01-04 01:48:15 +00:00
|
|
|
int16 _videoMode;
|
2007-02-12 12:53:28 +00:00
|
|
|
int16 _fakeVideoMode;
|
2007-03-20 14:51:57 +00:00
|
|
|
int16 _oldMode;
|
2005-04-05 15:07:40 +00:00
|
|
|
|
2007-03-20 14:51:57 +00:00
|
|
|
int16 _frameWaitTime;
|
|
|
|
int32 _startFrameTime;
|
2005-04-05 15:07:40 +00:00
|
|
|
|
2006-01-04 01:48:15 +00:00
|
|
|
uint16 _soundFlags;
|
2005-04-05 15:07:40 +00:00
|
|
|
|
2006-01-04 01:48:15 +00:00
|
|
|
uint16 _language;
|
2007-02-12 14:37:27 +00:00
|
|
|
uint16 _languageWanted;
|
2005-04-05 15:07:40 +00:00
|
|
|
|
2007-03-20 14:51:57 +00:00
|
|
|
char _useMouse;
|
|
|
|
int16 _mousePresent;
|
2006-01-04 01:48:15 +00:00
|
|
|
int16 _mouseXShift;
|
|
|
|
int16 _mouseYShift;
|
2008-05-03 20:08:46 +00:00
|
|
|
|
|
|
|
int16 _mouseMinX;
|
|
|
|
int16 _mouseMinY;
|
|
|
|
int16 _mouseMaxX;
|
|
|
|
int16 _mouseMaxY;
|
2006-01-03 23:14:39 +00:00
|
|
|
|
2006-01-04 01:48:15 +00:00
|
|
|
char _useJoystick;
|
2006-01-03 23:14:39 +00:00
|
|
|
|
2006-01-04 01:48:15 +00:00
|
|
|
int16 _primaryWidth;
|
|
|
|
int16 _primaryHeight;
|
2005-04-05 15:07:40 +00:00
|
|
|
|
2007-03-20 14:51:57 +00:00
|
|
|
int16 _colorCount;
|
2006-01-04 01:48:15 +00:00
|
|
|
char _redPalette[256];
|
|
|
|
char _greenPalette[256];
|
|
|
|
char _bluePalette[256];
|
2005-04-05 15:07:40 +00:00
|
|
|
|
2006-01-04 01:48:15 +00:00
|
|
|
int16 _unusedPalette1[18];
|
|
|
|
int16 _unusedPalette2[16];
|
|
|
|
Video::Color _vgaPalette[16];
|
|
|
|
Video::PalDesc _paletteStruct;
|
2007-03-20 14:51:57 +00:00
|
|
|
Video::PalDesc *_pPaletteDesc;
|
|
|
|
|
|
|
|
bool _setAllPalette;
|
|
|
|
bool _dontSetPalette;
|
|
|
|
|
|
|
|
SurfaceDesc::Ptr _primarySurfDesc;
|
2005-04-05 15:07:40 +00:00
|
|
|
|
2006-01-04 01:48:15 +00:00
|
|
|
int16 _debugFlag;
|
|
|
|
int16 _inVM;
|
2005-04-05 15:07:40 +00:00
|
|
|
|
2006-01-04 01:48:15 +00:00
|
|
|
char _inter_resStr[200];
|
|
|
|
int32 _inter_resVal;
|
2005-04-05 15:07:40 +00:00
|
|
|
|
2007-04-02 11:05:09 +00:00
|
|
|
byte *_inter_execPtr;
|
2006-01-04 01:48:15 +00:00
|
|
|
int16 _inter_animDataSize;
|
2005-04-05 15:07:40 +00:00
|
|
|
|
2006-01-04 01:48:15 +00:00
|
|
|
int16 _inter_mouseX;
|
|
|
|
int16 _inter_mouseY;
|
2005-04-05 15:07:40 +00:00
|
|
|
|
2007-04-13 19:55:09 +00:00
|
|
|
// Can be 1, 2 or 3 for normal, double and triple speed, respectively
|
|
|
|
uint8 _speedFactor;
|
|
|
|
|
2006-01-03 23:14:39 +00:00
|
|
|
Global(GobEngine *vm);
|
2007-02-04 15:45:15 +00:00
|
|
|
~Global();
|
2005-04-05 15:07:40 +00:00
|
|
|
|
2006-01-03 23:14:39 +00:00
|
|
|
protected:
|
|
|
|
GobEngine *_vm;
|
|
|
|
};
|
2005-04-05 15:07:40 +00:00
|
|
|
|
2005-08-08 20:20:00 +00:00
|
|
|
} // End of namespace Gob
|
2005-04-05 15:07:40 +00:00
|
|
|
|
2007-03-20 14:51:57 +00:00
|
|
|
#endif // GOB_GLOBAL_H
|