aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
authorTorbjörn Andersson2009-05-20 04:29:09 +0000
committerTorbjörn Andersson2009-05-20 04:29:09 +0000
commitcaf9bf0941babc523be7c37bb10bfbb2213f5c0b (patch)
treeec81abcd8617b575fdc6c698d8a5192c66455d01 /engines
parent358b1a7c7ea08e60c88e7318345494d3e775cda2 (diff)
downloadscummvm-rg350-caf9bf0941babc523be7c37bb10bfbb2213f5c0b.tar.gz
scummvm-rg350-caf9bf0941babc523be7c37bb10bfbb2213f5c0b.tar.bz2
scummvm-rg350-caf9bf0941babc523be7c37bb10bfbb2213f5c0b.zip
Removed the rest of the hard-coded cutscene information. It was only needed to
get the number of frames of a cutscene (to find the "lead out frame"), but this information is already provided by both the DXA and the SMK players. (It wasn't provided by the now obsolete MPEG player.) svn-id: r40735
Diffstat (limited to 'engines')
-rw-r--r--engines/sword2/animation.cpp39
-rw-r--r--engines/sword2/animation.h7
2 files changed, 3 insertions, 43 deletions
diff --git a/engines/sword2/animation.cpp b/engines/sword2/animation.cpp
index 52f2376dc5..56f369a3eb 100644
--- a/engines/sword2/animation.cpp
+++ b/engines/sword2/animation.cpp
@@ -46,28 +46,6 @@ namespace Sword2 {
// Basic movie player
///////////////////////////////////////////////////////////////////////////////
-static const MovieInfo sequenceList[19] = {
- { "carib", 222 },
- { "escape", 187 },
- { "eye", 248 },
- { "finale", 1485 },
- { "guard", 75 },
- { "intro", 1800 },
- { "jungle", 186 },
- { "museum", 167 },
- { "pablo", 75 },
- { "pyramid", 60 },
- { "quaram", 184 },
- { "river", 656 },
- { "sailing", 138 },
- { "shaman", 788 },
- { "stone1", 34 },
- { "stone2", 282 },
- { "stone3", 65 },
- { "demo", 60 },
- { "enddemo", 110 }
-};
-
MoviePlayer::MoviePlayer(Sword2Engine *vm, Audio::Mixer *snd, OSystem *system, Audio::SoundHandle *bgSoundHandle, Graphics::VideoDecoder *decoder, DecoderType decoderType)
: _vm(vm), _snd(snd), _bgSoundHandle(bgSoundHandle), _system(system), VideoPlayer(decoder) {
_bgSoundStream = NULL;
@@ -84,15 +62,6 @@ MoviePlayer:: ~MoviePlayer(void) {
* @param id the id of the file
*/
bool MoviePlayer::load(const char *name) {
- _id = -1;
-
- for (int i = 0; i < ARRAYSIZE(sequenceList); i++) {
- if (scumm_stricmp(name, sequenceList[i].name) == 0) {
- _id = i;
- break;
- }
- }
-
if (_decoderType == kVideoDecoderDXA) {
_bgSoundStream = Audio::AudioStream::openStreamFile(name);
} else {
@@ -128,11 +97,9 @@ void MoviePlayer::play(MovieText *movieTexts, uint32 numMovieTexts, uint32 leadI
if (_vm->shouldQuit())
return;
- if (_id >= 0) {
- _numFrames = sequenceList[_id].frames;
- if (_numFrames > 60)
- _leadOutFrame = _numFrames - 60;
- }
+ _leadOutFrame = _decoder->getFrameCount();
+ if (_leadOutFrame > 60)
+ _leadOutFrame -= 60;
_movieTexts = movieTexts;
_numMovieTexts = numMovieTexts;
diff --git a/engines/sword2/animation.h b/engines/sword2/animation.h
index 9586b24c47..9a60af2c26 100644
--- a/engines/sword2/animation.h
+++ b/engines/sword2/animation.h
@@ -58,11 +58,6 @@ struct MovieText {
}
};
-struct MovieInfo {
- const char *name;
- int frames;
-};
-
class DXADecoderWithSound : public Graphics::DXADecoder {
public:
DXADecoderWithSound(Audio::Mixer *mixer, Audio::SoundHandle *bgSoundHandle);
@@ -97,9 +92,7 @@ protected:
Audio::SoundHandle *_bgSoundHandle;
Audio::AudioStream *_bgSoundStream;
- int _id;
uint32 _leadOut;
- int _numFrames;
int _leadOutFrame;
void performPostProcessing(byte *screen);