ScummVM API documentation
struc.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 SKY_STRUC_H
23#define SKY_STRUC_H
24
25namespace Sky {
26
28 byte *textData;
29 uint32 textWidth;
30 uint16 compactNum;
31};
32
33#include "common/pack-start.h" // START STRUCT PACKING
34
36 uint16 flag; // bit 0: set for color data, clear for not
37 // bit 1: set for compressed, clear for uncompressed
38 // bit 2: set for 32 colors, clear for 16 colors
39 uint16 s_x;
40 uint16 s_y;
41 uint16 s_width;
42 uint16 s_height;
43 uint16 s_sp_size;
44 uint16 s_tot_size;
45 uint16 s_n_sprites;
46 int16 s_offset_x;
47 int16 s_offset_y;
48 uint16 s_compressed_size;
49} PACKED_STRUCT;
50
51struct Animation;
52
53struct Icon {
54 int _x;
55 int _y;
56 bool _visible;
57 bool _animating;
58 Animation *_anim;
59 int _curFrame;
60 int _tick;
61 float _alpha;
62
63 Icon() {
64 reset();
65 }
66
67 void reset(void) {
68 _visible = false;
69 _animating = true;
70 _anim = 0;
71 _curFrame = 0;
72 _tick = 0;
73 _x = _y = 0;
74 _alpha = 0.0f;
75 }
76
77 void set(int xPos, int yPos, float alphaVal = 1.0f) {
78 _x = xPos;
79 _y = yPos;
80 _visible = true;
81 _alpha = alphaVal;
82 }
83};
84
85struct TurnTable {
86 uint16 turnTableUp[5];
87 uint16 turnTableDown[5];
88 uint16 turnTableLeft[5];
89 uint16 turnTableRight[5];
90 uint16 turnTableTalk[5];
91} PACKED_STRUCT;
92
93struct MegaSet {
94 uint16 gridWidth; // 0
95 uint16 colOffset; // 1
96 uint16 colWidth; // 2
97 uint16 lastChr; // 3
98
99 uint16 animUpId; // 4
100 uint16 animDownId; // 5
101 uint16 animLeftId; // 6
102 uint16 animRightId; // 7
103
104 uint16 standUpId; // 8
105 uint16 standDownId; // 9
106 uint16 standLeftId; // 10
107 uint16 standRightId; // 11
108 uint16 standTalkId; // 12
109 uint16 turnTableId; // 13
110} PACKED_STRUCT;
111
112struct Compact {
113 uint16 logic; // 0: Entry in logic table to run (byte as <256entries in logic table
114 uint16 status; // 1
115 uint16 sync; // 2: flag sent to compacts by other things
116
117 uint16 screen; // 3: current screen
118 uint16 place; // 4: so's this one
119 uint16 getToTableId; // 5: Address of how to get to things table
120
121 uint16 xcood; // 6
122 uint16 ycood; // 7
123
124 uint16 frame; // 8
125
126 uint16 cursorText; // 9
127 uint16 mouseOn; // 10
128 uint16 mouseOff; // 11
129 uint16 mouseClick; // 12
130
131 int16 mouseRelX; // 13
132 int16 mouseRelY; // 14
133 uint16 mouseSizeX; // 15
134 uint16 mouseSizeY; // 16
135
136 uint16 actionScript; // 17
137
138 uint16 upFlag; // 18: usually holds the Action Mode
139 uint16 downFlag; // 19: used for passing back
140 uint16 getToFlag; // 20: used by action script for get to attempts, also frame store (hence word)
141 uint16 flag; // 21: a use any time flag
142
143 uint16 mood; // 22: high level - stood or not
144
145 uint16 grafixProgId; // 23
146 uint16 grafixProgPos;// 24
147
148 uint16 offset; // 25
149
150 uint16 mode; // 26: which mcode block
151
152 uint16 baseSub; // 27: 1st mcode block relative to start of compact
153 uint16 baseSub_off; // 28
154 uint16 actionSub; // 29
155 uint16 actionSub_off;// 30
156 uint16 getToSub; // 31
157 uint16 getToSub_off; // 32
158 uint16 extraSub; // 33
159 uint16 extraSub_off; // 34
160
161 uint16 dir; // 35
162
163 uint16 stopScript; // 36
164 uint16 miniBump; // 37
165 uint16 leaving; // 38
166 uint16 atWatch; // 39: pointer to script variable
167 uint16 atWas; // 40: pointer to script variable
168 uint16 alt; // 41: alternate script
169 uint16 request; // 42
170
171 uint16 spWidth_xx; // 43
172 uint16 spColor; // 44
173 uint16 spTextId; // 45
174 uint16 spTime; // 46
175
176 uint16 arAnimIndex; // 47
177 uint16 turnProgId; // 48
178 uint16 turnProgPos; // 49
179
180 uint16 waitingFor; // 50
181
182 uint16 arTargetX; // 51
183 uint16 arTargetY; // 52
184
185 uint16 animScratchId;// 53: data area for AR
186
187 uint16 megaSet; // 54
188
189 MegaSet megaSet0; // 55
190 MegaSet megaSet1; //
191 MegaSet megaSet2; //
192 MegaSet megaSet3; //
193} PACKED_STRUCT;
194
195#include "common/pack-end.h" // END STRUCT PACKING
196
197} // End of namespace Sky
198
199#endif
Definition: autoroute.h:28
Definition: disk.h:52
Definition: struc.h:112
Definition: struc.h:35
Definition: struc.h:27
Definition: struc.h:53
Definition: struc.h:93
Definition: struc.h:85