2007-05-30 21:56:52 +00:00
|
|
|
/* ScummVM - Graphic Adventure Engine
|
|
|
|
*
|
|
|
|
* ScummVM is the legal property of its developers, whose names
|
|
|
|
* are too numerous to list here. Please refer to the COPYRIGHT
|
|
|
|
* file distributed with this source distribution.
|
2002-10-22 12:05:04 +00:00
|
|
|
*
|
|
|
|
* 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.
|
2014-02-18 01:34:17 +00:00
|
|
|
*
|
2002-10-22 12:05:04 +00:00
|
|
|
* 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.
|
2014-02-18 01:34:17 +00:00
|
|
|
*
|
2002-10-22 12:05:04 +00:00
|
|
|
* You should have received a copy of the GNU General Public License
|
|
|
|
* along with this program; if not, write to the Free Software
|
2005-10-18 01:30:26 +00:00
|
|
|
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
2002-10-22 12:05:04 +00:00
|
|
|
*
|
|
|
|
*/
|
|
|
|
|
2006-09-29 08:14:27 +00:00
|
|
|
#ifndef AGOS_VGA_H
|
|
|
|
#define AGOS_VGA_H
|
2002-10-22 12:05:04 +00:00
|
|
|
|
2006-09-29 09:44:30 +00:00
|
|
|
namespace AGOS {
|
2003-10-03 19:42:27 +00:00
|
|
|
|
2006-07-23 16:13:26 +00:00
|
|
|
#include "common/pack-start.h" // START STRUCT PACKING
|
2005-04-23 14:00:51 +00:00
|
|
|
|
2005-10-07 06:59:49 +00:00
|
|
|
// Feeble Files
|
2009-02-07 03:36:36 +00:00
|
|
|
struct VgaFile1Header_Feeble {
|
2005-10-09 12:12:24 +00:00
|
|
|
uint16 imageCount;
|
2005-10-07 06:59:49 +00:00
|
|
|
uint16 x_2;
|
2005-10-09 12:12:24 +00:00
|
|
|
uint16 animationCount;
|
2005-10-07 06:59:49 +00:00
|
|
|
uint16 x_3;
|
2005-10-09 12:12:24 +00:00
|
|
|
uint16 imageTable;
|
2005-10-07 06:59:49 +00:00
|
|
|
uint16 x_4;
|
2005-10-09 12:12:24 +00:00
|
|
|
uint16 animationTable;
|
2005-10-07 06:59:49 +00:00
|
|
|
uint16 x_5;
|
2007-07-01 18:18:43 +00:00
|
|
|
} PACKED_STRUCT;
|
2005-10-07 06:59:49 +00:00
|
|
|
|
2005-10-09 12:12:24 +00:00
|
|
|
struct ImageHeader_Feeble {
|
2005-10-07 06:59:49 +00:00
|
|
|
uint16 id;
|
|
|
|
uint16 x_1;
|
2005-10-09 12:12:24 +00:00
|
|
|
uint16 scriptOffs;
|
2005-10-07 06:59:49 +00:00
|
|
|
uint16 x_2;
|
2007-07-01 18:18:43 +00:00
|
|
|
} PACKED_STRUCT;
|
2005-10-07 06:59:49 +00:00
|
|
|
|
2005-10-09 12:12:24 +00:00
|
|
|
struct AnimationHeader_Feeble {
|
|
|
|
uint16 scriptOffs;
|
|
|
|
uint16 x_2;
|
|
|
|
uint16 id;
|
2007-07-01 18:18:43 +00:00
|
|
|
} PACKED_STRUCT;
|
2005-10-09 12:12:24 +00:00
|
|
|
|
2005-10-07 06:59:49 +00:00
|
|
|
// Simon 1/2
|
2005-10-09 12:12:24 +00:00
|
|
|
struct ImageHeader_Simon {
|
2002-10-22 12:05:04 +00:00
|
|
|
uint16 id;
|
2007-05-09 15:36:05 +00:00
|
|
|
uint16 color;
|
2002-10-22 12:05:04 +00:00
|
|
|
uint16 x_2;
|
2005-10-09 12:12:24 +00:00
|
|
|
uint16 scriptOffs;
|
2007-07-01 18:18:43 +00:00
|
|
|
} PACKED_STRUCT;
|
2002-10-22 12:05:04 +00:00
|
|
|
|
2005-10-09 12:12:24 +00:00
|
|
|
struct AnimationHeader_Simon {
|
2002-10-22 12:05:04 +00:00
|
|
|
uint16 id;
|
|
|
|
uint16 x_2;
|
2005-10-09 12:12:24 +00:00
|
|
|
uint16 scriptOffs;
|
2007-07-01 18:18:43 +00:00
|
|
|
} PACKED_STRUCT;
|
2005-04-23 14:00:51 +00:00
|
|
|
|
|
|
|
|
2006-10-07 03:43:51 +00:00
|
|
|
// Elvira 1/2 and Waxworks
|
2006-09-19 11:59:13 +00:00
|
|
|
struct ImageHeader_WW {
|
|
|
|
uint16 id;
|
2006-10-11 12:03:47 +00:00
|
|
|
uint16 color;
|
2006-09-19 11:59:13 +00:00
|
|
|
uint16 x_2;
|
|
|
|
uint16 scriptOffs;
|
2007-07-01 18:18:43 +00:00
|
|
|
} PACKED_STRUCT;
|
2006-09-19 11:59:13 +00:00
|
|
|
|
|
|
|
struct AnimationHeader_WW {
|
|
|
|
uint16 id;
|
|
|
|
uint16 x_1;
|
|
|
|
uint16 x_2;
|
|
|
|
uint16 scriptOffs;
|
2007-07-01 18:18:43 +00:00
|
|
|
} PACKED_STRUCT;
|
2006-09-19 11:59:13 +00:00
|
|
|
|
2006-10-07 03:43:51 +00:00
|
|
|
// Common
|
2009-02-07 03:36:36 +00:00
|
|
|
struct VgaFile1Header_Common {
|
2006-10-07 03:43:51 +00:00
|
|
|
uint16 x_1;
|
|
|
|
uint16 imageCount;
|
|
|
|
uint16 x_2;
|
|
|
|
uint16 animationCount;
|
|
|
|
uint16 x_3;
|
|
|
|
uint16 imageTable;
|
|
|
|
uint16 x_4;
|
|
|
|
uint16 animationTable;
|
|
|
|
uint16 x_5;
|
2007-07-01 18:18:43 +00:00
|
|
|
} PACKED_STRUCT;
|
2006-09-19 11:59:13 +00:00
|
|
|
|
2006-07-23 16:13:26 +00:00
|
|
|
#include "common/pack-end.h" // END STRUCT PACKING
|
2002-10-22 12:05:04 +00:00
|
|
|
|
2006-03-16 03:48:42 +00:00
|
|
|
enum DrawFlags {
|
|
|
|
kDFFlip = 0x1,
|
|
|
|
kDFNonTrans = 0x2,
|
2007-05-15 13:01:36 +00:00
|
|
|
kDFSkipStoreBG = 0x4,
|
2006-03-16 03:48:42 +00:00
|
|
|
kDFCompressed = 0x8,
|
|
|
|
kDFCompressedFlip = 0x10,
|
|
|
|
kDFMasked = 0x20,
|
|
|
|
|
|
|
|
// Feeble specific
|
|
|
|
kDFOverlayed = 0x10,
|
|
|
|
kDFScaled = 0x40,
|
|
|
|
kDFShaded = 0x80
|
|
|
|
};
|
|
|
|
|
2002-10-22 12:05:04 +00:00
|
|
|
struct VC10_state {
|
2007-05-07 03:40:37 +00:00
|
|
|
int16 image;
|
2005-05-06 12:23:19 +00:00
|
|
|
uint16 flags;
|
2005-10-05 11:37:26 +00:00
|
|
|
byte palette;
|
2007-05-09 15:36:05 +00:00
|
|
|
byte paletteMod;
|
2002-10-22 12:05:04 +00:00
|
|
|
|
2007-05-07 03:40:37 +00:00
|
|
|
int16 x, y;
|
|
|
|
uint16 width, height;
|
|
|
|
uint16 draw_width, draw_height;
|
|
|
|
uint16 x_skip, y_skip;
|
2002-10-22 12:05:04 +00:00
|
|
|
|
|
|
|
byte *surf2_addr;
|
|
|
|
uint surf2_pitch;
|
|
|
|
|
|
|
|
byte *surf_addr;
|
|
|
|
uint surf_pitch;
|
|
|
|
|
2005-11-13 11:53:57 +00:00
|
|
|
uint16 dl, dh;
|
2002-10-22 12:05:04 +00:00
|
|
|
|
2007-04-15 00:55:16 +00:00
|
|
|
const byte *srcPtr;
|
2002-10-22 12:05:04 +00:00
|
|
|
int8 depack_cont;
|
|
|
|
|
2005-11-11 02:56:36 +00:00
|
|
|
byte depack_dest[480];
|
2007-04-15 00:12:09 +00:00
|
|
|
|
|
|
|
VC10_state() { memset(this, 0, sizeof(*this)); }
|
2002-10-22 12:05:04 +00:00
|
|
|
};
|
|
|
|
|
2006-04-14 09:57:43 +00:00
|
|
|
byte *vc10_depackColumn(VC10_state *vs);
|
2002-10-22 12:05:04 +00:00
|
|
|
|
2006-09-29 09:44:30 +00:00
|
|
|
} // End of namespace AGOS
|
2002-10-22 12:05:04 +00:00
|
|
|
|
|
|
|
#endif
|