2002-04-21 17:46:42 +00:00
|
|
|
/* ScummVM - Scumm Interpreter
|
|
|
|
* Copyright (C) 2001 Ludvig Strigeus
|
|
|
|
* Copyright (C) 2001/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$
|
|
|
|
*
|
|
|
|
*/
|
|
|
|
|
2002-07-10 20:30:47 +00:00
|
|
|
#define SP_MAX_FONTS 5
|
|
|
|
|
2002-03-06 19:58:06 +00:00
|
|
|
struct PersistentCodecData37 {
|
|
|
|
byte *deltaBuf;
|
|
|
|
byte *deltaBufs[2];
|
|
|
|
uint32 deltaSize;
|
|
|
|
uint width, height;
|
|
|
|
int curtable;
|
|
|
|
int unk2,unk3;
|
|
|
|
|
|
|
|
uint16 flags;
|
|
|
|
|
|
|
|
int16 *table1;
|
|
|
|
int table_last_pitch;
|
|
|
|
byte table_last_flags;
|
|
|
|
};
|
|
|
|
|
|
|
|
struct CodecData {
|
|
|
|
byte *out,*src;
|
|
|
|
int x,y;
|
|
|
|
int outwidth,outheight;
|
|
|
|
int w,h,pitch;
|
|
|
|
|
|
|
|
int flags;
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
struct SmushPlayer {
|
|
|
|
FILE *_in;
|
|
|
|
bool _paletteChanged;
|
|
|
|
byte * _block;
|
|
|
|
uint32 _blockTag;
|
|
|
|
uint32 _blockSize;
|
|
|
|
byte *_cur;
|
|
|
|
byte *_renderBitmap;
|
|
|
|
uint32 _frameSize;
|
|
|
|
uint32 _frmeTag, _frmeSize;
|
|
|
|
|
|
|
|
byte *_deltaBuf;
|
|
|
|
int _deltaBufSize;
|
|
|
|
|
2002-07-10 20:30:47 +00:00
|
|
|
byte * _fonts[SP_MAX_FONTS];
|
|
|
|
byte * _buffer_tres;
|
|
|
|
|
2002-03-06 19:58:06 +00:00
|
|
|
PersistentCodecData37 pcd37;
|
|
|
|
|
|
|
|
byte _fluPalette[768];
|
|
|
|
uint16 _fluPalMul129[768];
|
|
|
|
uint16 _fluPalWords[768];
|
|
|
|
|
2002-07-10 20:30:47 +00:00
|
|
|
byte * loadTres();
|
|
|
|
void loadFonts();
|
2002-07-15 21:25:07 +00:00
|
|
|
uint32 getCharWidth(uint8 c_font, byte txt);
|
|
|
|
uint32 getFontHeight(uint8 c_font);
|
2002-07-10 20:30:47 +00:00
|
|
|
byte * getStringTRES(int32 number);
|
2002-07-12 05:25:32 +00:00
|
|
|
void drawStringTRES(uint32 x, uint32 y, byte * txt);
|
|
|
|
void drawCharTRES(uint32 * x, uint32 y, uint32 c_line, uint8 c_font, uint8 color, uint8 txt);
|
2002-07-10 20:30:47 +00:00
|
|
|
|
2002-05-12 11:47:50 +00:00
|
|
|
/* PSAD: Full Throttle audio */
|
|
|
|
uint32 _saudSize[8], _saudSubSize[8];
|
|
|
|
uint16 _psadTrk[8], _strkRate[8];
|
|
|
|
uint32 _saudSubTag[8];
|
|
|
|
|
2002-05-12 17:49:34 +00:00
|
|
|
/* IACT: The Dig audio */
|
|
|
|
uint32 _imusSize[8], _imusSubSize[8];
|
2002-05-23 23:25:34 +00:00
|
|
|
uint32 _imusTrk[8], _imusRate[8], _imusChan[8];
|
2002-05-12 17:49:34 +00:00
|
|
|
uint32 _imusSubTag[8];
|
|
|
|
byte _imusData[8][3];
|
|
|
|
uint32 _imusPos[8], _imusCodec[8];
|
|
|
|
|
2002-03-06 19:58:06 +00:00
|
|
|
void openFile(byte* fileName);
|
|
|
|
void nextBlock();
|
|
|
|
|
|
|
|
uint32 fileReadBE32();
|
|
|
|
uint32 fileReadLE32();
|
|
|
|
void go();
|
|
|
|
|
2002-05-12 11:47:50 +00:00
|
|
|
bool parseTag();
|
2002-03-06 19:58:06 +00:00
|
|
|
void parseAHDR();
|
|
|
|
void parseFRME();
|
|
|
|
|
|
|
|
void parseNPAL();
|
|
|
|
void parseFOBJ();
|
|
|
|
void parsePSAD();
|
|
|
|
void parseTRES();
|
|
|
|
void parseXPAL();
|
2002-05-06 15:32:32 +00:00
|
|
|
void parseIACT();
|
2002-03-06 19:58:06 +00:00
|
|
|
void fileRead(void *mem, int len);
|
|
|
|
|
|
|
|
uint32 nextBE32();
|
|
|
|
void init();
|
2002-07-10 20:50:44 +00:00
|
|
|
void deinit();
|
2002-03-06 19:58:06 +00:00
|
|
|
|
|
|
|
void startVideo(short int arg, byte* videofile);
|
|
|
|
|
|
|
|
void setPalette();
|
|
|
|
|
|
|
|
long fileSize;
|
|
|
|
|
|
|
|
Scumm *sm;
|
|
|
|
|
2002-03-25 22:46:32 +00:00
|
|
|
int _frameChanged;
|
|
|
|
|
2002-03-06 19:58:06 +00:00
|
|
|
};
|