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
|
|
|
*
|
|
|
|
*/
|
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 {
|
|
|
|
|
2009-06-24 21:49:37 +00:00
|
|
|
#define VIDMODE_CGA 0x05
|
|
|
|
#define VIDMODE_EGA 0x0D
|
|
|
|
#define VIDMODE_VGA 0x13
|
|
|
|
#define VIDMODE_HER 0x07
|
|
|
|
|
|
|
|
#define MIDI_FLAG 0x4000
|
|
|
|
#define PROAUDIO_FLAG 0x0010
|
|
|
|
#define ADLIB_FLAG 0x0008
|
|
|
|
#define BLASTER_FLAG 0x0004
|
|
|
|
#define INTERSOUND_FLAG 0x0002
|
|
|
|
#define SPEAKER_FLAG 0x0001
|
|
|
|
|
2010-01-08 22:09:43 +00:00
|
|
|
//#define NO 0
|
|
|
|
//#define YES 1
|
2009-06-24 21:49:37 +00:00
|
|
|
#define UNDEF 2
|
|
|
|
|
|
|
|
#define F1_KEY 0x3B00
|
|
|
|
#define F2_KEY 0x3C00
|
|
|
|
#define F3_KEY 0x3D00
|
|
|
|
#define F4_KEY 0x3E00
|
|
|
|
#define F5_KEY 0x3F00
|
|
|
|
#define F6_KEY 0x4000
|
|
|
|
#define ESCAPE 0x001B
|
|
|
|
#define ENTER 0x000D
|
2005-04-05 15:07:40 +00:00
|
|
|
|
2006-01-03 23:14:39 +00:00
|
|
|
/* Video drivers */
|
2009-06-24 21:49:37 +00:00
|
|
|
#define UNK_DRIVER 0
|
|
|
|
#define VGA_DRIVER 1
|
|
|
|
#define EGA_DRIVER 2
|
|
|
|
#define CGA_DRIVER 3
|
|
|
|
#define HER_DRIVER 4
|
|
|
|
|
|
|
|
enum Language {
|
|
|
|
kLanguageFrench = 0,
|
|
|
|
kLanguageGerman = 1,
|
|
|
|
kLanguageBritish = 2,
|
|
|
|
kLanguageSpanish = 3,
|
|
|
|
kLanguageItalian = 4,
|
|
|
|
kLanguageAmerican = 5,
|
|
|
|
kLanguageDutch = 6,
|
|
|
|
kLanguageKorean = 7,
|
|
|
|
kLanguageHebrew = 8,
|
|
|
|
kLanguagePortuguese = 9,
|
|
|
|
kLanguageJapanese = 10
|
|
|
|
};
|
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
|
|
|
|
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;
|
2009-06-24 21:49:37 +00:00
|
|
|
bool _foundLanguage;
|
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;
|
|
|
|
|
2010-09-30 13:02:16 +00:00
|
|
|
SurfacePtr _primarySurfDesc;
|
2005-04-05 15:07:40 +00:00
|
|
|
|
2006-01-04 01:48:15 +00:00
|
|
|
int16 _debugFlag;
|
2005-04-05 15:07:40 +00:00
|
|
|
|
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;
|
|
|
|
|
2009-07-25 16:08:31 +00:00
|
|
|
bool _doSubtitles;
|
|
|
|
|
2009-07-05 11:29:54 +00:00
|
|
|
bool _noCd;
|
|
|
|
|
2009-09-29 22:43:30 +00:00
|
|
|
int16 _curWinId;
|
|
|
|
|
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
|