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.
|
2005-10-06 11:58:03 +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
|
2005-10-18 01:30:26 +00:00
|
|
|
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
2005-10-06 11:58:03 +00:00
|
|
|
*
|
2006-02-09 12:19:53 +00:00
|
|
|
* $URL$
|
|
|
|
* $Id$
|
2005-10-06 11:58:03 +00:00
|
|
|
*
|
|
|
|
*/
|
|
|
|
|
2007-02-20 17:33:54 +00:00
|
|
|
#ifndef KYRA_SEQPLAYER_H
|
|
|
|
#define KYRA_SEQPLAYER_H
|
2005-10-06 11:58:03 +00:00
|
|
|
|
2008-05-11 22:32:37 +00:00
|
|
|
#include "kyra/kyra_lok.h"
|
2007-07-29 16:31:29 +00:00
|
|
|
|
2005-10-06 11:58:03 +00:00
|
|
|
namespace Kyra {
|
|
|
|
|
|
|
|
class SeqPlayer {
|
|
|
|
public:
|
2008-05-11 22:32:37 +00:00
|
|
|
SeqPlayer(KyraEngine_LoK *vm, OSystem *system);
|
2005-10-06 11:58:03 +00:00
|
|
|
~SeqPlayer();
|
|
|
|
|
|
|
|
void setCopyViewOffs(bool offs) {
|
|
|
|
_copyViewOffs = offs;
|
|
|
|
}
|
|
|
|
|
|
|
|
void makeHandShapes();
|
|
|
|
void freeHandShapes();
|
|
|
|
|
|
|
|
bool playSequence(const uint8 *seqData, bool skipSeq);
|
2008-01-27 19:47:41 +00:00
|
|
|
|
2006-01-06 10:45:42 +00:00
|
|
|
uint8 *setPanPages(int pageNum, int shape);
|
2005-10-06 11:58:03 +00:00
|
|
|
protected:
|
2008-05-11 22:32:37 +00:00
|
|
|
KyraEngine_LoK *_vm;
|
2005-10-06 11:58:03 +00:00
|
|
|
OSystem *_system;
|
|
|
|
Screen *_screen;
|
2006-01-13 23:06:04 +00:00
|
|
|
Sound *_sound;
|
2005-10-06 11:58:03 +00:00
|
|
|
Resource *_res;
|
|
|
|
|
|
|
|
uint8 *_handShapes[3];
|
|
|
|
bool _copyViewOffs;
|
|
|
|
|
|
|
|
typedef void (SeqPlayer::*SeqProc)();
|
|
|
|
struct SeqEntry {
|
|
|
|
uint8 len;
|
|
|
|
SeqProc proc;
|
|
|
|
const char* desc;
|
|
|
|
};
|
|
|
|
|
|
|
|
// the sequence procs
|
|
|
|
void s1_wsaOpen();
|
|
|
|
void s1_wsaClose();
|
|
|
|
void s1_wsaPlayFrame();
|
|
|
|
void s1_wsaPlayNextFrame();
|
|
|
|
void s1_wsaPlayPrevFrame();
|
|
|
|
void s1_drawShape();
|
|
|
|
void s1_waitTicks();
|
|
|
|
void s1_copyWaitTicks();
|
|
|
|
void s1_shuffleScreen();
|
|
|
|
void s1_copyView();
|
|
|
|
void s1_loopInit();
|
|
|
|
void s1_loopInc();
|
|
|
|
void s1_skip();
|
|
|
|
void s1_loadPalette();
|
|
|
|
void s1_loadBitmap();
|
|
|
|
void s1_fadeToBlack();
|
|
|
|
void s1_printText();
|
|
|
|
void s1_printTalkText();
|
|
|
|
void s1_restoreTalkText();
|
|
|
|
void s1_clearCurrentScreen();
|
|
|
|
void s1_break();
|
|
|
|
void s1_fadeFromBlack();
|
|
|
|
void s1_copyRegion();
|
|
|
|
void s1_copyRegionSpecial();
|
|
|
|
void s1_fillRect();
|
2005-10-13 21:12:47 +00:00
|
|
|
void s1_playEffect();
|
|
|
|
void s1_playTrack();
|
2005-10-06 11:58:03 +00:00
|
|
|
void s1_allocTempBuffer();
|
|
|
|
void s1_textDisplayEnable();
|
|
|
|
void s1_textDisplayDisable();
|
|
|
|
void s1_endOfScript();
|
2006-01-07 23:55:50 +00:00
|
|
|
void s1_loadIntroVRM();
|
2005-10-12 19:15:32 +00:00
|
|
|
void s1_playVocFile();
|
2006-01-07 23:55:50 +00:00
|
|
|
void s1_miscUnk3();
|
2005-10-12 19:15:32 +00:00
|
|
|
void s1_prefetchVocFile();
|
2005-10-06 11:58:03 +00:00
|
|
|
|
|
|
|
struct SeqMovie {
|
2006-01-02 13:20:02 +00:00
|
|
|
Movie *movie;
|
2005-10-06 11:58:03 +00:00
|
|
|
int32 page;
|
|
|
|
int16 frame;
|
|
|
|
int16 numFrames;
|
|
|
|
Common::Point pos;
|
|
|
|
};
|
|
|
|
|
|
|
|
const uint8 *_seqData;
|
2006-01-07 23:55:50 +00:00
|
|
|
uint8 *_specialBuffer;
|
2005-10-06 11:58:03 +00:00
|
|
|
SeqMovie _seqMovies[12];
|
|
|
|
SeqLoop _seqLoopTable[20];
|
|
|
|
uint16 _seqWsaCurDecodePage;
|
|
|
|
uint32 _seqDisplayedTextTimer;
|
|
|
|
bool _seqDisplayTextFlag;
|
|
|
|
uint8 _seqDisplayedText;
|
|
|
|
uint8 _seqDisplayedChar;
|
|
|
|
uint16 _seqDisplayedTextX;
|
|
|
|
bool _seqTalkTextPrinted;
|
|
|
|
bool _seqTalkTextRestored;
|
|
|
|
bool _seqQuitFlag;
|
|
|
|
};
|
|
|
|
|
|
|
|
} // End of namespace Kyra
|
|
|
|
|
|
|
|
#endif
|
2007-04-15 16:41:20 +00:00
|
|
|
|