aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
authorSimei Yin2018-04-27 19:20:09 +0200
committerSimei Yin2018-04-27 19:48:29 +0200
commit7e7d8d769ad55a996ac8f465ee6656ba30719f51 (patch)
treeba2aefc3e0568c425425aec1c2f7ecc97c7c813f /engines
parentda491601d4fca4deebe8d1a4a18e67fe48dff55d (diff)
downloadscummvm-rg350-7e7d8d769ad55a996ac8f465ee6656ba30719f51.tar.gz
scummvm-rg350-7e7d8d769ad55a996ac8f465ee6656ba30719f51.tar.bz2
scummvm-rg350-7e7d8d769ad55a996ac8f465ee6656ba30719f51.zip
SLUDGE: Remove global variable speechMode
Diffstat (limited to 'engines')
-rw-r--r--engines/sludge/builtin.cpp4
-rw-r--r--engines/sludge/speech.h1
2 files changed, 3 insertions, 2 deletions
diff --git a/engines/sludge/builtin.cpp b/engines/sludge/builtin.cpp
index bc635f88cd..42fcfcf988 100644
--- a/engines/sludge/builtin.cpp
+++ b/engines/sludge/builtin.cpp
@@ -54,8 +54,6 @@
namespace Sludge {
-int speechMode = 0;
-
Variable *launchResult = NULL;
extern int lastFramesPerSecond;
@@ -1280,6 +1278,7 @@ builtIn(setLightMap) {
builtIn(setSpeechMode) {
UNUSEDALL
+ int speechMode;
if (!getValueType(speechMode, SVT_INT, fun->stack->thisVar))
return BR_ERROR;
trimStack(fun->stack);
@@ -1287,6 +1286,7 @@ builtIn(setSpeechMode) {
fatal("Valid parameters are be SPEECHANDTEXT, SPEECHONLY or TEXTONLY");
return BR_ERROR;
}
+ g_sludge->_speechMan->setSpeechMode(speechMode);
return BR_CONTINUE;
}
diff --git a/engines/sludge/speech.h b/engines/sludge/speech.h
index 98b6035cb0..cd2a6dd596 100644
--- a/engines/sludge/speech.h
+++ b/engines/sludge/speech.h
@@ -60,6 +60,7 @@ public:
void setObjFontColour(ObjectType *t);
void setSpeechSpeed(float speed) { _speechSpeed = speed; }
float getSpeechSpeed() { return _speechSpeed; }
+ void setSpeechMode(int speechMode) { _speechMode = speechMode; }
// load & save
void save(Common::WriteStream *stream);