diff options
Diffstat (limited to 'engines/sci/engine/vm.cpp')
-rw-r--r-- | engines/sci/engine/vm.cpp | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/engines/sci/engine/vm.cpp b/engines/sci/engine/vm.cpp index 9d8c5f7fc6..700b7d2a21 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 } } @@ -228,13 +235,13 @@ ExecStack *execute_method(EngineState *s, uint16 script, uint16 pubfunct, StackP scr = s->_segMan->getScript(seg); } + // Check if a breakpoint is set on this method + g_sci->checkExportBreakpoint(script, pubfunct); + uint32 exportAddr = scr->validateExportFunc(pubfunct, false); if (!exportAddr) return NULL; - // Check if a breakpoint is set on this method - g_sci->checkExportBreakpoint(script, pubfunct); - assert(argp[0].toUint16() == argc); // The first argument is argc ExecStack xstack(calling_obj, calling_obj, sp, argc, argp, seg, make_reg32(seg, exportAddr), -1, -1, -1, pubfunct, -1, |