aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
Diffstat (limited to 'engines')
-rw-r--r--engines/titanic/core/game_object.cpp3
-rw-r--r--engines/titanic/sound/sound.cpp5
-rw-r--r--engines/titanic/support/avi_surface.cpp4
3 files changed, 6 insertions, 6 deletions
diff --git a/engines/titanic/core/game_object.cpp b/engines/titanic/core/game_object.cpp
index 4b88f07478..07358b8115 100644
--- a/engines/titanic/core/game_object.cpp
+++ b/engines/titanic/core/game_object.cpp
@@ -42,7 +42,7 @@ int CGameObject::_soundHandles[4];
void CGameObject::init() {
_credits = nullptr;
- _soundHandles[0] = _soundHandles[1] = 0;
+ _soundHandles[0] = _soundHandles[1] = -1;
_soundHandles[2] = _soundHandles[3] = -1;
}
@@ -521,7 +521,6 @@ void CGameObject::stopGlobalSound(bool transition, int handleIndex) {
sound.stopSound(_soundHandles[handleIndex]);
_soundHandles[handleIndex] = -1;
}
- warning("CGameObject::soundFn4");
}
void CGameObject::setGlobalSoundVolume(int mode, uint seconds, int handleIndex) {
diff --git a/engines/titanic/sound/sound.cpp b/engines/titanic/sound/sound.cpp
index 30772e780c..6d27d1de49 100644
--- a/engines/titanic/sound/sound.cpp
+++ b/engines/titanic/sound/sound.cpp
@@ -94,10 +94,11 @@ void CSound::checkSounds() {
if (_soundManager.isActive(soundItem->_waveFile)) {
i = _sounds.erase(i);
delete soundItem;
+ continue;
}
- } else {
- ++i;
}
+
+ ++i;
}
}
diff --git a/engines/titanic/support/avi_surface.cpp b/engines/titanic/support/avi_surface.cpp
index 79c1badf61..ac6cc6dbe7 100644
--- a/engines/titanic/support/avi_surface.cpp
+++ b/engines/titanic/support/avi_surface.cpp
@@ -339,9 +339,9 @@ bool AVISurface::addEvent(int frameNumber, CGameObject *obj) {
}
void AVISurface::setFrameRate(double rate) {
- _decoders[0]->setRate(Common::Rational(rate));
+ _decoders[0]->setRate(Common::Rational((int)rate));
if (_decoders[1])
- _decoders[1]->setRate(Common::Rational(rate));
+ _decoders[1]->setRate(Common::Rational((int)rate));
}
Graphics::ManagedSurface *AVISurface::getSecondarySurface() {