2002-03-22 03:31:55 +00:00
|
|
|
/* ScummVM - Scumm Interpreter
|
|
|
|
* Copyright (C) 2001 Ludvig Strigeus
|
2004-01-06 12:45:34 +00:00
|
|
|
* Copyright (C) 2001-2004 The ScummVM project
|
2002-03-22 03:31:55 +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.
|
|
|
|
|
|
|
|
* 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$
|
|
|
|
*
|
|
|
|
*/
|
|
|
|
|
2003-01-05 23:53:16 +00:00
|
|
|
#ifndef AKOS_H
|
|
|
|
#define AKOS_H
|
2002-04-12 10:34:46 +00:00
|
|
|
|
2003-10-03 18:33:57 +00:00
|
|
|
#include "scumm/base-costume.h"
|
|
|
|
|
|
|
|
namespace Scumm {
|
2002-03-31 02:01:14 +00:00
|
|
|
|
2003-06-19 16:03:12 +00:00
|
|
|
#ifdef __PALM_OS__
|
|
|
|
extern const byte *defaultScaleTable;
|
|
|
|
#else
|
|
|
|
extern const byte defaultScaleTable[768];
|
|
|
|
#endif
|
|
|
|
|
2002-05-14 23:35:28 +00:00
|
|
|
struct CostumeData;
|
2003-01-07 17:35:20 +00:00
|
|
|
struct AkosHeader;
|
|
|
|
struct AkosOffset;
|
2002-04-12 10:34:46 +00:00
|
|
|
|
2003-01-07 17:35:20 +00:00
|
|
|
class AkosRenderer : public BaseCostumeRenderer {
|
2003-01-05 23:53:16 +00:00
|
|
|
protected:
|
|
|
|
uint16 codec;
|
|
|
|
|
2003-01-07 17:35:20 +00:00
|
|
|
// actor palette
|
|
|
|
byte palette[256];
|
2002-07-07 19:31:51 +00:00
|
|
|
|
2003-01-07 17:35:20 +00:00
|
|
|
// pointer to various parts of the costume resource
|
2003-05-28 20:01:47 +00:00
|
|
|
const byte *akos;
|
|
|
|
const AkosHeader *akhd;
|
2002-03-22 03:30:57 +00:00
|
|
|
|
2003-05-28 20:01:47 +00:00
|
|
|
const byte *akpl, *akci, *aksq;
|
|
|
|
const AkosOffset *akof;
|
|
|
|
const byte *akcd;
|
2002-10-22 12:18:17 +00:00
|
|
|
|
2002-10-22 11:47:45 +00:00
|
|
|
struct {
|
|
|
|
byte unk5;
|
|
|
|
int unk6;
|
|
|
|
byte mask;
|
|
|
|
byte color;
|
|
|
|
byte shift;
|
|
|
|
uint16 bits;
|
|
|
|
byte numbits;
|
2003-05-28 20:01:47 +00:00
|
|
|
const byte *dataptr;
|
2002-10-22 11:47:45 +00:00
|
|
|
byte buffer[336];
|
|
|
|
} akos16;
|
|
|
|
|
2002-05-23 00:37:00 +00:00
|
|
|
public:
|
2003-10-02 22:42:03 +00:00
|
|
|
AkosRenderer(ScummEngine *scumm) : BaseCostumeRenderer(scumm) {
|
2003-01-07 17:35:20 +00:00
|
|
|
akos = 0;
|
|
|
|
akhd = 0;
|
|
|
|
akpl = 0;
|
|
|
|
akci = 0;
|
|
|
|
aksq = 0;
|
|
|
|
akof = 0;
|
|
|
|
akcd = 0;
|
2003-06-16 15:11:24 +00:00
|
|
|
_actorHitMode = false;
|
2002-10-22 12:18:17 +00:00
|
|
|
}
|
2003-01-05 23:53:16 +00:00
|
|
|
|
2003-06-16 15:11:24 +00:00
|
|
|
bool _actorHitMode;
|
|
|
|
int16 _actorHitX, _actorHitY;
|
|
|
|
bool _actorHitResult;
|
|
|
|
|
2002-05-23 00:37:00 +00:00
|
|
|
void setPalette(byte *palette);
|
2003-01-05 23:53:16 +00:00
|
|
|
void setFacing(Actor *a);
|
2002-05-23 00:37:00 +00:00
|
|
|
void setCostume(int costume);
|
2003-01-05 23:53:16 +00:00
|
|
|
|
2002-10-22 11:47:45 +00:00
|
|
|
protected:
|
2003-01-07 17:35:20 +00:00
|
|
|
byte drawLimb(const CostumeData &cost, int limb);
|
2003-01-05 23:53:16 +00:00
|
|
|
|
2003-05-30 17:52:17 +00:00
|
|
|
byte codec1(int xmoveCur, int ymoveCur);
|
2002-10-22 12:18:17 +00:00
|
|
|
void codec1_genericDecode();
|
|
|
|
|
2003-05-30 17:52:17 +00:00
|
|
|
byte codec5(int xmoveCur, int ymoveCur);
|
2002-10-22 12:18:17 +00:00
|
|
|
|
2003-05-30 17:52:17 +00:00
|
|
|
byte codec16(int xmoveCur, int ymoveCur);
|
2003-05-28 20:01:47 +00:00
|
|
|
void akos16SetupBitReader(const byte *src);
|
2002-10-21 06:01:04 +00:00
|
|
|
void akos16SkipData(int32 numskip);
|
|
|
|
void akos16DecodeLine(byte *buf, int32 numbytes, int32 dir);
|
2004-04-04 01:11:27 +00:00
|
|
|
void akos16Decompress(byte *dest, int32 pitch, const byte *src, int32 t_width, int32 t_height, int32 dir, int32 numskip_before, int32 numskip_after, byte transparency, int maskLeft, int maskTop, int zBuf);
|
2002-03-22 03:30:57 +00:00
|
|
|
};
|
|
|
|
|
2003-10-03 18:33:57 +00:00
|
|
|
} // End of namespace Scumm
|
|
|
|
|
2003-01-05 23:53:16 +00:00
|
|
|
#endif
|