mirror of
https://github.com/libretro/scummvm.git
synced 2025-01-24 11:36:22 +00:00
LASTEXPRESS: Fix loading of subtitles from sound name
This commit is contained in:
parent
a5d001fdef
commit
a5398bd663
@ -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
|
||||
|
@ -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);
|
||||
|
Loading…
x
Reference in New Issue
Block a user