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
|
/* ScummVM - Scumm Interpreter
* Copyright (C) 2002 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 OBJECT_H
#define OBJECT_H
#if !defined(__GNUC__)
#pragma START_PACK_STRUCTS
#endif
struct RoomHeader {
union {
struct {
uint32 version;
uint16 width, height;
uint16 numObjects;
} GCC_PACK v7;
struct {
uint16 width, height;
uint16 numObjects;
} GCC_PACK old;
} GCC_PACK;
} GCC_PACK;
struct CodeHeader {
union {
struct {
uint16 obj_id;
byte x, y, w, h;
byte flags;
byte parent;
int16 walk_x;
int16 walk_y;
byte actordir;
} GCC_PACK v5;
struct {
uint16 obj_id;
int16 x, y;
uint16 w, h;
byte flags, parent;
uint16 unk1;
uint16 unk2;
byte actordir;
} GCC_PACK v6;
struct {
uint32 version;
uint16 obj_id;
byte parent;
byte parentstate;
} GCC_PACK v7;
} GCC_PACK;
} GCC_PACK;
struct ImageHeader { /* file format */
union {
struct {
uint16 obj_id;
uint16 unk[5];
uint16 width;
uint16 height;
uint16 unk_2;
struct {
int16 x, y;
} GCC_PACK hotspot[15];
} GCC_PACK old;
struct {
uint32 version;
uint16 obj_id;
uint16 unk[1];
int16 x_pos, y_pos;
uint16 width, height;
byte unk2[3];
byte actordir;
uint16 unk_2;
struct {
int16 x, y;
} GCC_PACK hotspot[15];
} GCC_PACK v7;
} GCC_PACK;
} GCC_PACK;
#if !defined(__GNUC__)
#pragma END_PACK_STRUCTS
#endif
struct FindObjectInRoom {
CodeHeader *cdhd;
byte *obcd;
ImageHeader *imhd;
byte *obim;
byte *roomptr;
};
enum FindObjectWhat {
foCodeHeader = 1,
foImageHeader = 2,
foCheckAlreadyLoaded = 4
};
#endif
|