ScummVM API documentation
overlay.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
22#ifndef CRUISE_OVERLAY_H
23#define CRUISE_OVERLAY_H
24
25namespace Cruise {
26
28 uint16 var0;
29 uint16 var1;
30 uint16 type;
31 uint16 offset;
32 uint16 offsetToName;
33};
34
36 uint16 var0;
37 uint16 var2;
38 uint16 var4;
39 uint16 idx;
40 uint16 offsetToName;
41};
42
44 uint8 *dataPtr; //0
45 short int sizeOfData; //4
46 short int offsetToSubData3; //6
47 short int offsetToImportData; //8
48 short int offsetToSubData2;
49 short int offsetToImportName;
50 short int offsetToSubData5;
51 short int sysKey;
52 short int var12;
53 short int numRelocGlob;
54 short int subData2Size;
55 short int var18;
56 short int var1A;
57};
58
60 char *string;
61 short int length;
62 short int idx;
63};
64
66 int16 type;
67 int16 id;
68 int16 offsetVerbeName;
69 int16 verbOverlay;
70 int16 verbNumber;
71
72 int16 obj1Overlay;
73 int16 obj1Number;
74 int16 obj2Overlay;
75 int16 obj2Number;
76
77 int16 trackX;
78 int16 trackY;
79
80 int16 obj1NewState;
81 int16 obj2NewState;
82
83 int16 obj1OldState;
84 int16 obj2OldState;
85
86 int16 trackDirection;
87 int16 dialog;
88};
89
91 uint16 var0; // 0
92 uint16 var1; // 2
93 uint16 linkType; // 4
94 uint16 linkIdx; // 6
95 uint16 nameOffset;
96};
97
98enum eClass {
99 MULTIPLE = 0,
100 VARIABLE = 1,
101 UNIQUE = 2,
102 THEME = 3
103};
104
106 int16 _type;
107 eClass _class;
108 int16 _nameOffset;
109 int16 _numStates;
110 int16 _varTableIdx;
111 int16 _firstStateIdx;
112 int16 _stateTableIdx;
113};
114
116 int16 X;
117 int16 Y;
118 int16 Z;
119 int16 frame;
120 int16 scale;
121 int16 state;
122};
123
125
126 ovlData3Struct *arrayProc;
127 ovlData3Struct *ptr1;
128 objDataStruct *arrayObject;
129 objectParams *arrayStates;
130 objectParams *arrayObjVar;
131 stringEntryStruct *stringTable;
132 exportEntryStruct *arraySymbGlob;
133 importDataStruct *arrayRelocGlob;
134 linkDataStruct *arrayMsgRelHeader;
135
136 char *nameVerbGlob;
137 char *arrayNameObj;
138 char *arrayNameRelocGlob;
139 char *arrayNameSymbGlob;
140
141 uint8 *data4Ptr;
142 uint8 *ptr8;
143
144 unsigned short int numProc;
145 unsigned short int numRel;
146 unsigned short int numSymbGlob;
147 unsigned short int numRelocGlob;
148 unsigned short int numMsgRelHeader;
149 unsigned short int numObj;
150 unsigned short int numStrings;
151 unsigned short int size8;
152 unsigned short int size9;
153
154 unsigned short int nameExportSize;
155 unsigned short int exportNamesSize;
156 unsigned short int specialString2Length;
157 unsigned short int sizeOfData4;
158 unsigned short int size12;
159 unsigned short int specialString1Length;
160 unsigned short int scriptNumber;
161};
162
164 char overlayName[13];
165 ovlDataStruct *ovlData;
166 short int alreadyLoaded;
167 short int state;
168 char* pDebug;
169 long int debugSize;
170 char* pSource;
171 long int sourceSize;
172 short int executeScripts;
173};
174
175extern overlayStruct overlayTable[90];
176extern int numOfLoadedOverlay;
177
178void initOverlayTable();
179int loadOverlay(const char * scriptName);
180int32 findOverlayByName2(const char * name);
181int findOverlayByName(const char *overlayName);
182int releaseOverlay(const char *name);
183int freeOverlay(int overlayIdx);
184void freeOverlayTable();
185
186} // End of namespace Cruise
187
188#endif
Definition: actor.h:25
Definition: overlay.h:35
Definition: overlay.h:90
Definition: overlay.h:27
Definition: overlay.h:105
Definition: overlay.h:115
Definition: overlay.h:163
Definition: overlay.h:43
Definition: overlay.h:124
Definition: overlay.h:59