[Scummvm-git-logs] scummvm master -> 6be5b08c781a8b9ec025dd54f02bc74d080f620e
bluegr
noreply at scummvm.org
Sun Jan 30 11:30:31 UTC 2022
This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .
Summary:
6be5b08c78 SCUMM: Show subtitles on talkie versions without sound file
Commit: 6be5b08c781a8b9ec025dd54f02bc74d080f620e
https://github.com/scummvm/scummvm/commit/6be5b08c781a8b9ec025dd54f02bc74d080f620e
Author: Orgad Shaneh (orgads at gmail.com)
Date: 2022-01-30T13:30:27+02:00
Commit Message:
SCUMM: Show subtitles on talkie versions without sound file
If the game is a talkie version, on which the verbs reference sounds, but
it is missing the sound file, and the user chose Voice Only, a warning
appears for every playback attempt.
Force subtitles on this case, to avoid these warnings.
Fixes trac 13151
Changed paths:
engines/scumm/scumm.cpp
engines/scumm/sound.cpp
engines/scumm/sound.h
diff --git a/engines/scumm/scumm.cpp b/engines/scumm/scumm.cpp
index 71d4294b99c..43dc42f4531 100644
--- a/engines/scumm/scumm.cpp
+++ b/engines/scumm/scumm.cpp
@@ -1487,8 +1487,12 @@ Common::Error ScummEngine::init() {
resetScumm();
resetScummVars();
- if (_game.version >= 5 && _game.version <= 7)
+ if (_game.version >= 5 && _game.version <= 7) {
_sound->setupSound();
+ // In case of talkie edition without sfx file, enable subtitles
+ if (!_sound->hasSfxFile() && !ConfMan.getBool("subtitles"))
+ ConfMan.setBool("subtitles", true);
+ }
syncSoundSettings();
diff --git a/engines/scumm/sound.cpp b/engines/scumm/sound.cpp
index 0fbed7c2fd5..ead848da607 100644
--- a/engines/scumm/sound.cpp
+++ b/engines/scumm/sound.cpp
@@ -1002,6 +1002,11 @@ bool Sound::isSfxFileCompressed() {
return !(_soundMode == kVOCMode);
}
+bool Sound::hasSfxFile() const
+{
+ return !_sfxFilename.empty();
+}
+
ScummFile *Sound::restoreDiMUSESpeechFile(const char *fileName) {
Common::ScopedPtr<ScummFile> file;
file.reset(new ScummFile());
diff --git a/engines/scumm/sound.h b/engines/scumm/sound.h
index 1efab09aaa2..d4eb84682c6 100644
--- a/engines/scumm/sound.h
+++ b/engines/scumm/sound.h
@@ -121,6 +121,7 @@ public:
virtual void setupSound();
void pauseSounds(bool pause);
bool isSfxFileCompressed();
+ bool hasSfxFile() const;
ScummFile *restoreDiMUSESpeechFile(const char *fileName);
void startCDTimer();
More information about the Scummvm-git-logs
mailing list