ScummVM API documentation
global.h
1 /* ScummVM - Graphic Adventure Engine
2  *
3  * ScummVM is the legal property of its developers, whose names
4  * are too numerous to list here. Please refer to the COPYRIGHT
5  * file distributed with this source distribution.
6  *
7  * This program is free software: you can redistribute it and/or modify
8  * it under the terms of the GNU General Public License as published by
9  * the Free Software Foundation, either version 3 of the License, or
10  * (at your option) any later version.
11  *
12  * This program is distributed in the hope that it will be useful,
13  * but WITHOUT ANY WARRANTY; without even the implied warranty of
14  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15  * GNU General Public License for more details.
16  *
17  * You should have received a copy of the GNU General Public License
18  * along with this program. If not, see <http://www.gnu.org/licenses/>.
19  *
20  *
21  * This file is dual-licensed.
22  * In addition to the GPLv3 license mentioned above, this code is also
23  * licensed under LGPL 2.1. See LICENSES/COPYING.LGPL file for the
24  * full text of the license.
25  *
26  */
27 
28 #ifndef GOB_GLOBAL_H
29 #define GOB_GLOBAL_H
30 
31 #include "common/file.h"
32 #include "common/endian.h"
33 
34 #include "gob/video.h"
35 
36 namespace Gob {
37 
38 #define VIDMODE_CGA 0x05
39 #define VIDMODE_EGA 0x0D
40 #define VIDMODE_VGA 0x13
41 #define VIDMODE_HER 0x07
42 
43 #define MIDI_FLAG 0x4000
44 #define PROAUDIO_FLAG 0x0010
45 #define ADLIB_FLAG 0x0008
46 #define BLASTER_FLAG 0x0004
47 #define INTERSOUND_FLAG 0x0002
48 #define SPEAKER_FLAG 0x0001
49 
50 //#define NO 0
51 //#define YES 1
52 #define UNDEF 2
53 
54 #define F1_KEY 0x3B00
55 #define F2_KEY 0x3C00
56 #define F3_KEY 0x3D00
57 #define F4_KEY 0x3E00
58 #define F5_KEY 0x3F00
59 #define F6_KEY 0x4000
60 #define ESCAPE 0x001B
61 #define ENTER 0x000D
62 
63 /* Video drivers */
64 #define UNK_DRIVER 0
65 #define VGA_DRIVER 1
66 #define EGA_DRIVER 2
67 #define CGA_DRIVER 3
68 #define HER_DRIVER 4
69 
70 enum Language {
71  kLanguageFrench = 0,
72  kLanguageGerman = 1,
73  kLanguageBritish = 2,
74  kLanguageSpanish = 3,
75  kLanguageItalian = 4,
76  kLanguageAmerican = 5,
77  kLanguageDutch = 6,
78  kLanguageKorean = 7,
79  kLanguageHebrew = 8,
80  kLanguagePortuguese = 9,
81  kLanguageJapanese = 10
82 };
83 
84 class Global {
85 public:
86  char _pressedKeys[128];
87 
88  int16 _presentCGA;
89  int16 _presentEGA;
90  int16 _presentVGA;
91  int16 _presentHER;
92 
93  int16 _videoMode;
94  int16 _fakeVideoMode;
95  int16 _oldMode;
96 
97  uint16 _soundFlags;
98 
99  uint16 _language;
100  uint16 _languageWanted;
101  bool _foundLanguage;
102 
103  char _useMouse;
104  int16 _mousePresent;
105  int16 _mouseXShift;
106  int16 _mouseYShift;
107 
108  int16 _mouseMinX;
109  int16 _mouseMinY;
110  int16 _mouseMaxX;
111  int16 _mouseMaxY;
112 
113  char _useJoystick;
114 
115  int16 _primaryWidth;
116  int16 _primaryHeight;
117 
118  int16 _colorCount;
119  char _redPalette[256];
120  char _greenPalette[256];
121  char _bluePalette[256];
122 
123  int16 _unusedPalette1[18];
124  int16 _unusedPalette2[16];
125  Video::Color _vgaPalette[16];
126  Video::PalDesc _paletteStruct;
127  Video::PalDesc *_pPaletteDesc;
128 
129  bool _setAllPalette;
130  bool _dontSetPalette;
131 
132  SurfacePtr _primarySurfDesc;
133 
134  int16 _debugFlag;
135 
136  int16 _inter_animDataSize;
137 
138  int16 _inter_mouseX;
139  int16 _inter_mouseY;
140 
141  // Can be 1, 2 or 3 for normal, double and triple speed, respectively
142  uint8 _speedFactor;
143 
144  bool _doSubtitles;
145 
146  bool _noCd;
147 
148  int16 _curWinId;
149 
150  Global(GobEngine *vm);
151  ~Global();
152 
153 protected:
154  GobEngine *_vm;
155 };
156 
157 } // End of namespace Gob
158 
159 #endif // GOB_GLOBAL_H
Definition: gob.h:163
Definition: video.h:86
Definition: anifile.h:40
Definition: video.h:94
Definition: global.h:84
Language
Definition: language.h:45