1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
|
/* ScummVM - Scumm Interpreter
* Copyright (C) 2004 Ivan Dubrov
* Copyright (C) 2004-2005 The ScummVM project
*
* 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
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*
* $Header$
*
*/
#include "gob/gob.h"
#include "gob/global.h"
namespace Gob {
char pressedKeys[128];
char useMouse = UNDEF;
int16 mousePresent = UNDEF;
int16 presentCGA = UNDEF;
int16 presentEGA = UNDEF;
int16 presentVGA = UNDEF;
int16 presentHER = UNDEF;
int16 videoMode = 0;
int16 disableVideoCfg;
/* Sound */
uint16 presentSound = 0x8000; /* undefined values */
uint16 soundFlags = 0x8000;
int16 blasterPort = 0;
int16 disableSoundCfg = 0;
//char playingSound = 0;
/* Mouse */
int16 disableMouseCfg = 0;
int16 mouseXShift = 3;
int16 mouseYShift = 3;
int16 mouseMaxCol = 320;
int16 mouseMaxRow = 200;
/* Language */
uint16 disableLangCfg = 0x8000;
uint16 language = 0x8000;
/* Timer variables */
int32 startTime = 0;
int16 timer_delta = 1000;
int16 frameWaitTime = 0;
int32 startFrameTime = 0;
/* Timer and delays */
int16 delayTime = 0;
/* Joystick */
char useJoystick = 1;
/* Files */
Common::File filesHandles[MAX_FILES];
/* Data files */
struct 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 = 0;
int16 sprAllocated = 0;
SurfaceDesc primarySurfDesc;
SurfaceDesc *pPrimarySurfDesc;
int16 primaryWidth;
int16 primaryHeight;
int16 doRangeClamp = 0;
char redPalette[256];
char greenPalette[256];
char bluePalette[256];
int16 setAllPalette = 0;
int16 oldMode = 3;
char dontSetPalette = 0;
SurfaceDesc *curPrimaryDesc = 0;
SurfaceDesc *allocatedPrimary = 0;
PalDesc *pPaletteDesc = 0;
int16 unusedPalette1[18] = {
0, 0x0b, 0, (int16)0x5555, (int16)0xAAAA, (int16)0xFFFF, 0, (int16)0x5555,
(int16)0xAAAA, (int16)0xFFFF, 0, (int16)0x5555,
(int16)0xAAAA, (int16)0xFFFF, 0, (int16)0x5555, (int16)0xAAAA, (int16)0xFFFF
};
int16 unusedPalette2[] = {
0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15
};
Color vgaPalette[16] = {
{0x00, 0x00, 0x00},
{0x00, 0x00, 0x2a},
{0x00, 0x2a, 0x00},
{0x00, 0x2a, 0x2a},
{0x2a, 0x00, 0x00},
{0x2a, 0x00, 0x2a},
{0x2a, 0x15, 0x00},
{0x2a, 0x2a, 0x2a},
{0x15, 0x15, 0x15},
{0x15, 0x15, 0x3f},
{0x15, 0x3f, 0x15},
{0x15, 0x3f, 0x3f},
{0x3f, 0x15, 0x15},
{0x3f, 0x15, 0x3f},
{0x3f, 0x3f, 0x15},
{0x3f, 0x3f, 0x3f}
};
PalDesc paletteStruct;
int16 debugFlag = 0;
int16 inVM = 0;
int16 colorCount = 16;
char inter_resStr[200];
int32 inter_resVal = 0;
char *inter_variables = 0;
char *inter_execPtr = 0;
int16 inter_animDataSize = 10;
int16 inter_mouseX = 0;
int16 inter_mouseY = 0;
char *tmpPalBuffer = 0;
} // End of namespace Gob
|