aboutsummaryrefslogtreecommitdiff
path: root/sky/struc.h
blob: 06c43718f4c5ca6f376cc2d32521e0ca8c9ca777 (plain)
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
/* ScummVM - Scumm Interpreter
 * Copyright (C) 2003 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$
 *
 */

#ifndef SKYSTRUC_H
#define SKYSTRUC_H

struct dataFileHeader {
	uint16 flag; // bit 0: set for colour data, clear for not
	// bit 1: set for compressed, clear for uncompressed
	// bit 2: set for 32 colours, clear for 16 colours
	uint16 s_x;
	uint16 s_y;
	uint16 s_width;
	uint16 s_height;
	uint16 s_sp_size;
	uint16 s_tot_size;
	uint16 s_n_sprites;
	uint16 s_offset_x;
	uint16 s_offset_y;
	uint16 s_compressed_size;
};

#if !defined(__GNUC__)
#pragma START_PACK_STRUCTS
#endif

struct ExtCompact {
	uint16 actionSub;
	uint16 actionSub_off;
	uint16 getToSub;
	uint16 getToSub_off;
	uint16 extraSub;
	uint16 extraSub_off;

	uint16 dir;

	uint16 stopScript;
	uint16 miniBump;
	uint16 leaving;
	uint16 atWatch; // pointer to script variable
	uint16 atWas; // pointer to script variable
	uint16 alt; // alternate script
	uint16 request;

	uint16 spWidth_xx;
	uint16 spColour;
	uint16 spTextId;
	uint16 spTime;

	uint16 arAnimIndex;
	void *turnProg;

	uint16 waitingFor;

	uint16 arTargetX;
	uint16 arTargetY;

	void *animScratch; // data area for AR

	uint16 megaSet;

	uint16 gridWidth;
	uint16 colOffset;
	uint16 colWidth;
	uint16 lastChr;

	uint16 *animUp;
	uint16 *animDown;
	uint16 *animLeft;
	uint16 *animRight;

	uint16 *standUp;
	uint16 *standDown;
	uint16 *standLeft;
	uint16 *standRight;
	uint16 *standTalk;
} GCC_PACK;

struct UnknownStuff {
	uint16 unknownStuff_1_1[4];
	uint16 *unknownStuff_1_2[34];
	uint16 unknownStuff_2_1[4];
	uint16 *unknownStuff_2_2[34];
	uint16 unknownStuff_3_1[4];
	uint16 *unknownStuff_3_2[34];
} GCC_PACK;

struct Compact {
	uint16 logic; // Entry in logic table to run (byte as <256entries in logic table
	uint16 status;
	uint16 sync; // flag sent to compacts by other things

	uint16 screen; // current screen
	uint16 place; // so's this one
	uint16 *getToTable; // Address of how to get to things table

	uint16 xcood;
	uint16 ycood;

	uint16 frame;

	uint16 cursorText;
	uint16 mouseOn;
	uint16 mouseOff;
	uint16 mouseClick; // dword script

	uint16 mouseRelX;
	uint16 mouseRelY;
	uint16 mouseSizeX;
	uint16 mouseSizeY;

	uint16 actionScript;

	uint16 upFlag; // usually holds the Action Mode
	uint16 downFlag; // used for passing back
	uint16 getToFlag; // used by action script for get to attempts, also frame store (hence word)
	uint16 flag; // a use any time flag

	uint16 mood; // high level - stood or not
	uint16 *grafixProg;
	uint16 offset;

	uint16 mode; // which mcode block

	uint16 baseSub; // 1st mcode block relative to start of compact
	uint16 baseSub_off;

	ExtCompact *extCompact;
	void *turnTable;
	UnknownStuff *unknownStuff;
} GCC_PACK;

#if !defined(__GNUC__)
#pragma END_PACK_STRUCTS
#endif

#endif