aboutsummaryrefslogtreecommitdiff
path: root/simon/vga.h
blob: e4e4ee2622f9c87f70fd0df4edfc1c4b60d3f0f8 (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
/* ScummVM - Scumm Interpreter
 * Copyright (C) 2002-2005 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
 *
 * $Header$
 *
 */

#ifndef SIMON_VGA_H
#define SIMON_VGA_H

namespace Simon {

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

// Feeble Files
struct VgaFileHeader_Feeble {
	uint16 x_1;
	uint16 hdr2_start;
	uint16 x_2, x_3;
} GCC_PACK;

struct VgaFileHeader2_Feeble {
	uint16 imageCount;
	uint16 x_2;
	uint16 animationCount;
	uint16 x_3;
	uint16 imageTable;
	uint16 x_4;
	uint16 animationTable;
	uint16 x_5;
} GCC_PACK;

struct ImageHeader_Feeble {
	uint16 id;
	uint16 x_1;
	uint16 scriptOffs;
	uint16 x_2;
} GCC_PACK;

struct AnimationHeader_Feeble {
	uint16 scriptOffs;
	uint16 x_2;
	uint16 id;
} GCC_PACK;

// Simon 1/2
struct VgaFileHeader_Simon {
	uint16 x_1, x_2;
	uint16 hdr2_start;
	uint16 x_3, x_4;
} GCC_PACK;

struct VgaFileHeader2_Simon {
	uint16 x_1;
	uint16 imageCount;
	uint16 x_2;
	uint16 animationCount;
	uint16 x_3;
	uint16 imageTable;
	uint16 x_4;
	uint16 animationTable;
	uint16 x_5;
} GCC_PACK;

struct ImageHeader_Simon {
	uint16 id;
	uint16 x_1;
	uint16 x_2;
	uint16 scriptOffs;
} GCC_PACK;

struct AnimationHeader_Simon {
	uint16 id;
	uint16 x_2;
	uint16 scriptOffs;
} GCC_PACK;


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

struct VC10_state {
	int image;
	uint16 flags;
	int x, y;

	byte palette;

	uint width, height;
	uint draw_width, draw_height;
	uint x_skip, y_skip;

	byte *surf2_addr;
	uint surf2_pitch;

	byte *surf_addr;
	uint surf_pitch;

	uint16 dl, dh;

	const byte *depack_src;
	int8 depack_cont;

	byte depack_dest[480];
};

byte *vc10_depack_column(VC10_state *vs);

} // End of namespace Simon

#endif