diff options
Diffstat (limited to 'engines/lastexpress')
-rw-r--r-- | engines/lastexpress/sound/entry.cpp | 10 | ||||
-rw-r--r-- | engines/lastexpress/sound/sound.cpp | 3 |
2 files changed, 7 insertions, 6 deletions
diff --git a/engines/lastexpress/sound/entry.cpp b/engines/lastexpress/sound/entry.cpp index 4bdb9f7f96..2840d85ca7 100644 --- a/engines/lastexpress/sound/entry.cpp +++ b/engines/lastexpress/sound/entry.cpp @@ -752,7 +752,7 @@ void SubtitleEntry::load(Common::String filename, SoundEntry *soundEntry) { _sound = soundEntry; // Load subtitle data - if (_engine->getResourceManager()->hasFile(filename)) { + if (_engine->getResourceManager()->hasFile(_filename)) { if (getSoundQueue()->getSubtitleFlag() & 2) return; @@ -786,6 +786,8 @@ void SubtitleEntry::setupAndDraw() { } getSoundQueue()->setCurrentSubtitle(this); + + // TODO Missing code } void SubtitleEntry::draw() { @@ -801,13 +803,11 @@ void SubtitleEntry::draw() { } void SubtitleEntry::drawOnScreen() { - getSoundQueue()->setSubtitleFlag(getSoundQueue()->getSubtitleFlag() & -1); - if (_data == NULL) return; - if (getSoundQueue()->getSubtitleFlag() & 1) - _engine->getGraphicsManager()->draw(_data, GraphicsManager::kBackgroundOverlay); + getSoundQueue()->setSubtitleFlag(getSoundQueue()->getSubtitleFlag() & -2); + _engine->getGraphicsManager()->draw(_data, GraphicsManager::kBackgroundOverlay); } } // End of namespace LastExpress diff --git a/engines/lastexpress/sound/sound.cpp b/engines/lastexpress/sound/sound.cpp index ff9e7e5aac..c04b6d361f 100644 --- a/engines/lastexpress/sound/sound.cpp +++ b/engines/lastexpress/sound/sound.cpp @@ -162,7 +162,8 @@ bool SoundManager::playSoundWithSubtitles(Common::String filename, SoundFlag fla entry->setStatus(entry->getStatus().status | kSoundStatus_8000); } else { // Get subtitles name - while (filename.size() > 4) + uint32 size = filename.size(); + while (filename.size() > size - 4) filename.deleteLastChar(); entry->showSubtitle(filename); |