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