diff options
author | Eugene Sandulenko | 2005-07-21 22:13:06 +0000 |
---|---|---|
committer | Eugene Sandulenko | 2005-07-21 22:13:06 +0000 |
commit | a641c3add768f4e6f648670f00f5f793bdbf3d34 (patch) | |
tree | 775f272f00164c1354eabbd6936e381d3a963322 | |
parent | 6c9f6e8def8027c1413a8ca5a4db42372caf0995 (diff) | |
download | scummvm-rg350-a641c3add768f4e6f648670f00f5f793bdbf3d34.tar.gz scummvm-rg350-a641c3add768f4e6f648670f00f5f793bdbf3d34.tar.bz2 scummvm-rg350-a641c3add768f4e6f648670f00f5f793bdbf3d34.zip |
More IHNM differences
svn-id: r18574
-rw-r--r-- | saga/script.h | 1 | ||||
-rw-r--r-- | saga/sfuncs.cpp | 9 | ||||
-rw-r--r-- | saga/sthread.cpp | 7 |
3 files changed, 13 insertions, 4 deletions
diff --git a/saga/script.h b/saga/script.h index d5f2ce1bb0..a6b6b6c096 100644 --- a/saga/script.h +++ b/saga/script.h @@ -533,6 +533,7 @@ private: void sfVstopFX(SCRIPTFUNC_PARAMS); void sfVstopLoopedFX(SCRIPTFUNC_PARAMS); void sfDemoIsInteractive(SCRIPTFUNC_PARAMS); + void sf94(SCRIPTFUNC_PARAMS); void sfDebugShowData(SCRIPTFUNC_PARAMS); void SF_stub(SCRIPTFUNC_PARAMS); void sfNull(SCRIPTFUNC_PARAMS); diff --git a/saga/sfuncs.cpp b/saga/sfuncs.cpp index ff23dd5692..c439a0fbe4 100644 --- a/saga/sfuncs.cpp +++ b/saga/sfuncs.cpp @@ -229,7 +229,7 @@ static const ScriptFunctionDescription IHNMscriptFunctionsList[IHNM_SCRIPT_FUNCT OPCODE(SF_stub), OPCODE(sfNull), OPCODE(sfDemoIsInteractive), - OPCODE(SF_stub), + OPCODE(sf94), OPCODE(SF_stub), OPCODE(SF_stub), OPCODE(SF_stub), @@ -2027,6 +2027,13 @@ void Script::sfDemoIsInteractive(SCRIPTFUNC_PARAMS) { thread->_returnValue = 0; } +void Script::sf94(SCRIPTFUNC_PARAMS) { + for (int i = 0; i < nArgs; i++) + thread->pop(); + + debug(0, "STUB: sf94(), %d args", nArgs); +} + void Script::sfDebugShowData(SCRIPTFUNC_PARAMS) { int16 param = thread->pop(); char buf[50]; diff --git a/saga/sthread.cpp b/saga/sthread.cpp index 209c6ebb6f..5cab14df9f 100644 --- a/saga/sthread.cpp +++ b/saga/sthread.cpp @@ -317,8 +317,8 @@ bool Script::runThread(ScriptThread *thread, uint instructionLimit) { CASEOP(opCcallV) argumentsCount = scriptS.readByte(); functionNumber = scriptS.readUint16LE(); - if (functionNumber >= (_vm->getGameType() == GType_IHNM) ? - IHNM_SCRIPT_FUNCTION_MAX : ITE_SCRIPT_FUNCTION_MAX) { + if (functionNumber >= ((_vm->getGameType() == GType_IHNM) ? + IHNM_SCRIPT_FUNCTION_MAX : ITE_SCRIPT_FUNCTION_MAX)) { error("Script::runThread() Invalid script function number (%d)", functionNumber); } @@ -330,7 +330,8 @@ bool Script::runThread(ScriptThread *thread, uint instructionLimit) { if (disContinue) { return true; } - if (scriptFunction == &Saga::Script::sfScriptGotoScene) { + if (scriptFunction == &Saga::Script::sfScriptGotoScene || + scriptFunction == &Saga::Script::sf94) { return true; // cause abortAllThreads called and _this_ thread destroyed } |