aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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);