aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
Diffstat (limited to 'engines')
-rw-r--r--engines/agos/animation.cpp9
-rw-r--r--engines/sword1/animation.cpp12
-rw-r--r--engines/sword2/animation.cpp13
3 files changed, 8 insertions, 26 deletions
diff --git a/engines/agos/animation.cpp b/engines/agos/animation.cpp
index c73f46fa93..3be552a083 100644
--- a/engines/agos/animation.cpp
+++ b/engines/agos/animation.cpp
@@ -273,10 +273,9 @@ void MoviePlayerDXA::stopVideo() {
void MoviePlayerDXA::startSound() {
byte *buffer;
- uint32 offset, size, tag;
+ uint32 offset, size;
- tag = _fileStream->readUint32BE();
- if (tag == MKID_BE('WAVE')) {
+ if (getSoundTag() == MKID_BE('WAVE')) {
size = _fileStream->readUint32BE();
if (_sequenceNum) {
@@ -322,7 +321,7 @@ void MoviePlayerDXA::nextFrame() {
}
if (_vm->_interactiveVideo == TYPE_LOOPING && getCurFrame() == getFrameCount()) {
- _fileStream->seek(_videoInfo.frameOffs);
+ _fileStream->seek(_videoInfo.firstframeOffset);
_videoInfo.currentFrame = 0;
startSound();
}
@@ -445,7 +444,7 @@ void MoviePlayerSMK::handleNextFrame() {
void MoviePlayerSMK::nextFrame() {
if (_vm->_interactiveVideo == TYPE_LOOPING && getCurFrame() == getFrameCount()) {
- _fileStream->seek(_videoInfo.frameOffs);
+ _fileStream->seek(_videoInfo.firstframeOffset);
_videoInfo.currentFrame = 0;
}
diff --git a/engines/sword1/animation.cpp b/engines/sword1/animation.cpp
index c97d04d1d9..2d0d081ef6 100644
--- a/engines/sword1/animation.cpp
+++ b/engines/sword1/animation.cpp
@@ -144,15 +144,7 @@ bool MoviePlayer::load(uint32 id) {
break;
}
- if (_decoder->loadFile(filename)) {
- // The DXA animations in the Broken Sword games always use external audio tracks.
- if (_decoderType == kVideoDecoderDXA && _decoder->readSoundHeader() != MKID_BE('NULL'))
- return false;
- } else {
- return false;
- }
-
- return true;
+ return _decoder->loadFile(filename);
}
void MoviePlayer::play(void) {
@@ -244,7 +236,7 @@ int32 DXADecoderWithSound::getAudioLag() {
int32 videoTime = _videoInfo.currentFrame * frameDelay;
int32 audioTime;
- audioTime = (int32) _mixer->getSoundElapsedTime(*_bgSoundHandle);
+ audioTime = (((int32) _mixer->getSoundElapsedTime(*_bgSoundHandle)) * 100);
return videoTime - audioTime;
}
diff --git a/engines/sword2/animation.cpp b/engines/sword2/animation.cpp
index 56f369a3eb..e0b8bcbe52 100644
--- a/engines/sword2/animation.cpp
+++ b/engines/sword2/animation.cpp
@@ -80,16 +80,7 @@ bool MoviePlayer::load(const char *name) {
break;
}
- if (_decoder->loadFile(filename)) {
- // The DXA animations in the Broken Sword games always use external audio tracks,
- // if they have any sound at all.
- if (_decoderType == kVideoDecoderDXA && _decoder->readSoundHeader() != MKID_BE('NULL'))
- return false;
- } else {
- return false;
- }
-
- return true;
+ return _decoder->loadFile(filename);
}
void MoviePlayer::play(MovieText *movieTexts, uint32 numMovieTexts, uint32 leadIn, uint32 leadOut) {
@@ -280,7 +271,7 @@ int32 DXADecoderWithSound::getAudioLag() {
int32 videoTime = _videoInfo.currentFrame * frameDelay;
int32 audioTime;
- audioTime = (int32) _mixer->getSoundElapsedTime(*_bgSoundHandle);
+ audioTime = (((int32) _mixer->getSoundElapsedTime(*_bgSoundHandle)) * 100);
return videoTime - audioTime;
}