[Scummvm-git-logs] scummvm master -> 67acdb628bf371f04b7387c61dc0f669360abe40
csnover
csnover at users.noreply.github.com
Sat Oct 1 03:08:22 CEST 2016
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:
67acdb628b SCI32: Sync subtitle text speed with ScummVM GUI
Commit: 67acdb628bf371f04b7387c61dc0f669360abe40
https://github.com/scummvm/scummvm/commit/67acdb628bf371f04b7387c61dc0f669360abe40
Author: Colin Snover (github.com at zetafleet.com)
Date: 2016-09-30T20:08:09-05:00
Commit Message:
SCI32: Sync subtitle text speed with ScummVM GUI
Changed paths:
engines/sci/engine/vm.cpp
engines/sci/engine/vm.h
engines/sci/sci.cpp
diff --git a/engines/sci/engine/vm.cpp b/engines/sci/engine/vm.cpp
index 9d8c5f7..82de957 100644
--- a/engines/sci/engine/vm.cpp
+++ b/engines/sci/engine/vm.cpp
@@ -20,6 +20,7 @@
*
*/
+#include "common/config-manager.h"
#include "common/debug.h"
#include "common/debug-channels.h"
@@ -209,6 +210,12 @@ static void write_var(EngineState *s, int type, int index, reg_t value) {
g_sci->updateScummVMAudioOptions();
}
}
+
+#ifdef ENABLE_SCI32
+ if (type == VAR_GLOBAL && index == kGlobalVarTextSpeed && getSciVersion() >= SCI_VERSION_2) {
+ ConfMan.setInt("talkspeed", (8 - value.toSint16()) * 255 / 8);
+ }
+#endif
}
}
diff --git a/engines/sci/engine/vm.h b/engines/sci/engine/vm.h
index a4ac16e..dd66d9d 100644
--- a/engines/sci/engine/vm.h
+++ b/engines/sci/engine/vm.h
@@ -148,6 +148,7 @@ enum GlobalVar {
kGlobalVarScore = 15,
kGlobalVarFastCast = 84, // SCI16
kGlobalVarMessageType = 90,
+ kGlobalVarTextSpeed = 94, // SCI32; 0 is fastest, 8 is slowest
kGlobalVarShivers1Score = 349
};
diff --git a/engines/sci/sci.cpp b/engines/sci/sci.cpp
index 168e3c4..246c031 100644
--- a/engines/sci/sci.cpp
+++ b/engines/sci/sci.cpp
@@ -1121,6 +1121,12 @@ void SciEngine::syncIngameAudioOptions() {
bool subtitlesOn = ConfMan.getBool("subtitles");
bool speechOn = !ConfMan.getBool("speech_mute");
+#ifdef ENABLE_SCI32
+ if (getSciVersion() >= SCI_VERSION_2) {
+ _gamestate->variables[VAR_GLOBAL][kGlobalVarTextSpeed] = make_reg(0, 8 - ConfMan.getInt("talkspeed") * 8 / 255);
+ }
+#endif
+
if (useGlobal90) {
if (subtitlesOn && !speechOn) {
_gamestate->variables[VAR_GLOBAL][kGlobalVarMessageType] = make_reg(0, 1); // subtitles
More information about the Scummvm-git-logs
mailing list