mirror of
https://github.com/libretro/scummvm.git
synced 2025-01-17 23:44:22 +00:00
Add key to toggle speech/subtitles
svn-id: r17082
This commit is contained in:
parent
a52de03324
commit
c39a92933d
@ -31,6 +31,8 @@ Simon games.
|
||||
Ctrl 0-9 and Alt 0-9 & Load and save game state\\
|
||||
Ctrl-g & Runs in really REALLY fast mode\\
|
||||
Ctrl-d & Starts the debugger\\
|
||||
Ctrl-t & Switch been 'Voice only', 'Text and Voice'\\
|
||||
& and 'Text Display only'\\
|
||||
Tilde \verb#~# & Show/hide the debugging console\\
|
||||
Ctrl-s & Shows memory consumption\\
|
||||
$[$ and $]$ & Music volume, down/up\\
|
||||
|
@ -77,6 +77,7 @@ The following keywords are recognized:
|
||||
\\
|
||||
language &string Specify language (en, de, fr, it, pt, es, jp,\\
|
||||
& zh, kr, se, gb, hb, cz, ru)\\
|
||||
speech\_mute &bool &If true, speech is muted\\
|
||||
subtitles &bool Set to true to enable subtitles.\\
|
||||
talkspeed &number Text speed\\
|
||||
\\
|
||||
@ -122,14 +123,12 @@ Broken Sword II adds the following non-standard keywords:\\
|
||||
object\_labels &bool &If true, object labels are enabled\\
|
||||
reverse\_stereo &bool &If true, stereo channels are reversed\\
|
||||
sfx\_mute &bool &If true, sound effects are muted\\
|
||||
speech\_mute &bool &If true, speech is muted\\
|
||||
\end{tabular}
|
||||
|
||||
Flight of the Amazon Queen adds the following non-standard keywords:\\
|
||||
\begin{tabular}[h]{lll}
|
||||
music\_mute &bool &If true, music is muted\\
|
||||
sfx\_mute &bool &If true, sound effects are muted\\
|
||||
speech\_mute &bool &If true, speech is muted\\
|
||||
\end{tabular}
|
||||
|
||||
Simon the Sorcerer 1 \& 2 add the following non-standard keywords:\\
|
||||
@ -138,6 +137,4 @@ Simon the Sorcerer 1 \& 2 add the following non-standard keywords:\\
|
||||
music\_mute &bool &If true, music is muted\\
|
||||
slow\_down &number &Makes games slower (1- 10)\\
|
||||
sfx\_mute &bool &If true, sound effects are muted\\
|
||||
speech\_mute &bool &If true, speech is muted\\
|
||||
& &[Simon the Sorcerer 2 only]\\
|
||||
\end{tabular}
|
||||
|
@ -422,6 +422,7 @@ ConfigDialog::ConfigDialog(ScummEngine *scumm)
|
||||
// Some misc options
|
||||
//
|
||||
subtitlesCheckbox = new GUI::CheckboxWidget(this, 15, 78, 200, 16, "Show subtitles", 0, 'S');
|
||||
speechCheckbox = new GUI::CheckboxWidget(this, 130, 78, 200, 16, "Enable speech", 0, 'E');
|
||||
|
||||
//
|
||||
// Create the sub dialog(s)
|
||||
@ -442,6 +443,7 @@ void ConfigDialog::open() {
|
||||
|
||||
// update checkboxes, too
|
||||
subtitlesCheckbox->setState(ConfMan.getBool("subtitles"));
|
||||
speechCheckbox->setState(!ConfMan.getBool("speech_mute"));
|
||||
}
|
||||
|
||||
void ConfigDialog::close() {
|
||||
@ -449,9 +451,15 @@ void ConfigDialog::close() {
|
||||
if (getResult()) {
|
||||
// Subtitles
|
||||
ConfMan.set("subtitles", subtitlesCheckbox->getState(), _domain);
|
||||
ConfMan.set("speech_mute", !subtitlesCheckbox->getState(), _domain);
|
||||
// Sync with current setting
|
||||
if (ConfMan.getBool("speech_mute"))
|
||||
_vm->_voiceMode = 2;
|
||||
else
|
||||
_vm->_voiceMode = ConfMan.getBool("subtitles");
|
||||
|
||||
if (_vm->_version >= 7)
|
||||
_vm->VAR(_vm->VAR_VOICE_MODE) = subtitlesCheckbox->getState();
|
||||
_vm->VAR(_vm->VAR_VOICE_MODE) = _vm->_voiceMode;
|
||||
}
|
||||
|
||||
GUI_OptionsDialog::close();
|
||||
|
@ -117,6 +117,7 @@ public:
|
||||
|
||||
protected:
|
||||
GUI::CheckboxWidget *subtitlesCheckbox;
|
||||
GUI::CheckboxWidget *speechCheckbox;
|
||||
};
|
||||
|
||||
/**
|
||||
|
@ -25,6 +25,9 @@
|
||||
#include "common/config-manager.h"
|
||||
#include "common/system.h"
|
||||
|
||||
#include "gui/message.h"
|
||||
#include "gui/newgui.h"
|
||||
|
||||
#include "scumm/debugger.h"
|
||||
#include "scumm/dialogs.h"
|
||||
#include "scumm/imuse.h"
|
||||
@ -337,6 +340,39 @@ void ScummEngine::processKbd(bool smushMode) {
|
||||
}
|
||||
#endif
|
||||
|
||||
if (_version >= 6 && _lastKeyHit == 20) {
|
||||
char buf[256];
|
||||
|
||||
_voiceMode++;
|
||||
if (_voiceMode == 3)
|
||||
_voiceMode = 0;
|
||||
|
||||
switch(_voiceMode) {
|
||||
case 0:
|
||||
sprintf(buf, "Speech Only");
|
||||
ConfMan.set("speech_mute", false);
|
||||
ConfMan.set("subtitles", false);
|
||||
break;
|
||||
case 1:
|
||||
sprintf(buf, "Speech and Subtitles");
|
||||
ConfMan.set("speech_mute", false);
|
||||
ConfMan.set("subtitles", true);
|
||||
break;
|
||||
case 2:
|
||||
sprintf(buf, "Subtitles Only");
|
||||
ConfMan.set("speech_mute", true);
|
||||
ConfMan.set("subtitles", true);
|
||||
break;
|
||||
}
|
||||
|
||||
if (_version >= 7)
|
||||
VAR(VAR_VOICE_MODE) = _voiceMode;
|
||||
|
||||
GUI::TimedMessageDialog dialog(buf, 1500);
|
||||
runDialog(dialog);
|
||||
return;
|
||||
}
|
||||
|
||||
if (VAR_RESTART_KEY != 0xFF && _lastKeyHit == VAR(VAR_RESTART_KEY) ||
|
||||
(((_version <= 2) || (_features & GF_FMTOWNS && _version == 3)) && _lastKeyHit == 8)) {
|
||||
confirmrestartDialog();
|
||||
|
@ -829,6 +829,7 @@ ScummEngine::ScummEngine(GameDetector *detector, OSystem *syst, const ScummGameS
|
||||
_copyProtection = false;
|
||||
_demoMode = false;
|
||||
_confirmExit = false;
|
||||
_voiceMode = 0;
|
||||
_talkDelay = 0;
|
||||
_keepText = false;
|
||||
_existLanguageFile = false;
|
||||
@ -1024,6 +1025,17 @@ ScummEngine::ScummEngine(GameDetector *detector, OSystem *syst, const ScummGameS
|
||||
if (!ConfMan.hasKey("subtitles"))
|
||||
ConfMan.set("subtitles", !ConfMan.getBool("nosubtitles"));
|
||||
}
|
||||
|
||||
// Make sure that at least subtitles are enabled
|
||||
if (ConfMan.getBool("speech_mute") && !ConfMan.getBool("subtitles"))
|
||||
ConfMan.set("subtitles", 1);
|
||||
|
||||
// TODO Detect subtitle only versions of scumm6 games
|
||||
if (ConfMan.getBool("speech_mute"))
|
||||
_voiceMode = 2;
|
||||
else
|
||||
_voiceMode = ConfMan.getBool("subtitles");
|
||||
|
||||
_confirmExit = ConfMan.getBool("confirm_exit");
|
||||
|
||||
if (ConfMan.hasKey("render_mode")) {
|
||||
|
@ -1043,6 +1043,7 @@ public:
|
||||
byte *_shadowPalette;
|
||||
bool _skipDrawObject, _skipProcessActors;
|
||||
int _timers[4];
|
||||
int _voiceMode;
|
||||
|
||||
protected:
|
||||
int _shadowPaletteSize;
|
||||
|
@ -989,6 +989,9 @@ void Sound::soundKludge(int *list, int num) {
|
||||
}
|
||||
|
||||
void Sound::talkSound(uint32 a, uint32 b, int mode, int channel) {
|
||||
if (_vm->_version >= 6 && ConfMan.getBool("speech_mute"))
|
||||
return;
|
||||
|
||||
if (mode == 1) {
|
||||
_talk_sound_a1 = a;
|
||||
_talk_sound_b1 = b;
|
||||
|
Loading…
x
Reference in New Issue
Block a user