mirror of
https://github.com/libretro/scummvm.git
synced 2024-12-20 08:48:13 +00:00
Use correct method for subtitle speed.
svn-id: r12949
This commit is contained in:
parent
e0b723a54c
commit
dfe5828d4f
@ -543,9 +543,11 @@ void ScummEngine::writeVar(uint var, int value) {
|
||||
checkRange(_numVariables - 1, 0, var, "Variable %d out of range(w)");
|
||||
|
||||
// FIXME: Find some better place to put this.
|
||||
if (var == VAR_CHARINC)
|
||||
VAR(VAR_CHARINC) = _defaultTalkDelay / 20;
|
||||
else
|
||||
if (var == VAR_CHARINC && ConfMan.hasKey("talkspeed")) {
|
||||
int talkspeed = ConfMan.getInt("talkspeed") / 20;
|
||||
if (talkspeed >= 0 && talkspeed <= 180)
|
||||
VAR(VAR_CHARINC) = talkspeed;
|
||||
} else
|
||||
_scummVars[var] = value;
|
||||
|
||||
// stay in sync with loom cd subtitle var
|
||||
|
@ -422,8 +422,10 @@ void ScummEngine_v8::writeVar(uint var, int value) {
|
||||
if (!(var & 0xF0000000)) {
|
||||
checkRange(_numVariables - 1, 0, var, "Variable %d out of range(w)");
|
||||
|
||||
if (var == VAR_CHARINC) {
|
||||
VAR(VAR_CHARINC) = _defaultTalkDelay / 20;
|
||||
if (var == VAR_CHARINC && ConfMan.hasKey("talkspeed")) {
|
||||
int talkspeed = ConfMan.getInt("talkspeed") / 20;
|
||||
if (talkspeed >= 0 && talkspeed <= 180)
|
||||
VAR(VAR_CHARINC) = talkspeed;
|
||||
} else
|
||||
_scummVars[var] = value;
|
||||
|
||||
|
@ -642,7 +642,6 @@ ScummEngine::ScummEngine(GameDetector *detector, OSystem *syst, const ScummGameS
|
||||
ConfMan.set("subtitles", !ConfMan.getBool("nosubtitles"));
|
||||
}
|
||||
_confirmExit = ConfMan.getBool("confirm_exit");
|
||||
_defaultTalkDelay = ConfMan.getInt("talkspeed");
|
||||
_native_mt32 = ConfMan.getBool("native_mt32");
|
||||
// TODO: We shouldn't rely on the global Language values matching those COMI etc. expect.
|
||||
// Rather we should explicitly translate them.
|
||||
@ -1200,6 +1199,7 @@ void ScummEngine::initScummVars() {
|
||||
VAR(VAR_CURRENT_LIGHTS) = LIGHTMODE_actor_base | LIGHTMODE_actor_color | LIGHTMODE_screen;
|
||||
}
|
||||
|
||||
_defaultTalkDelay = 60;
|
||||
VAR(VAR_CHARINC) = 4;
|
||||
talkingActor(0);
|
||||
}
|
||||
@ -1884,17 +1884,11 @@ void ScummEngine::processKbd(bool smushMode) {
|
||||
if (_imuse)
|
||||
_imuse->set_music_volume (vol);
|
||||
} else if (_lastKeyHit == '-') { // - text speed down
|
||||
_defaultTalkDelay += 5;
|
||||
if (_defaultTalkDelay > 90)
|
||||
_defaultTalkDelay = 90;
|
||||
|
||||
VAR(VAR_CHARINC) = _defaultTalkDelay / 20;
|
||||
if (VAR(VAR_CHARINC) < 9)
|
||||
VAR(VAR_CHARINC) = + 1;
|
||||
} else if (_lastKeyHit == '+') { // + text speed up
|
||||
_defaultTalkDelay -= 5;
|
||||
if (_defaultTalkDelay < 5)
|
||||
_defaultTalkDelay = 5;
|
||||
|
||||
VAR(VAR_CHARINC) = _defaultTalkDelay / 20;
|
||||
if (VAR(VAR_CHARINC) > 0)
|
||||
VAR(VAR_CHARINC) -= 1;
|
||||
} else if (_lastKeyHit == '~' || _lastKeyHit == '#') { // Debug console
|
||||
_debugger->attach();
|
||||
} else if (_version <= 2) {
|
||||
|
@ -177,15 +177,6 @@ void ScummEngine::CHARSET_1() {
|
||||
_useTalkAnims = true;
|
||||
}
|
||||
|
||||
// HACK: Most of the audio sync in Loom is handled by the "MI1
|
||||
// timer", but some of it depends on text strings timing out at
|
||||
// the right moment.
|
||||
|
||||
if (_gameId == GID_LOOM256) {
|
||||
_defaultTalkDelay = 100;
|
||||
VAR(VAR_CHARINC) = 5;
|
||||
}
|
||||
|
||||
_talkDelay = _defaultTalkDelay;
|
||||
|
||||
if (!_keepText) {
|
||||
|
Loading…
Reference in New Issue
Block a user