ILLUSIONS: Implement talkitem pausing/unpausing

- Fix isActiveThread to check only non-paused and non-terminated threads
This commit is contained in:
johndoe123 2014-04-01 12:34:27 +02:00 committed by Eugene Sandulenko
parent d77d4ed4a6
commit d67021b32c
4 changed files with 73 additions and 26 deletions

View file

@ -31,6 +31,7 @@
#include "illusions/scriptresource.h"
#include "illusions/scriptthread.h"
#include "illusions/specialcode.h"
#include "illusions/talkresource.h"
namespace Illusions {
@ -296,7 +297,7 @@ void ScriptOpcodes::opStartModalScene(ScriptThread *scriptThread, OpCall &opCall
// NOTE Skipped checking for stalled resources
_vm->_input->discardButtons(0xFFFF);
_vm->_scriptMan->enterPause(opCall._callerThreadId);
// TODO _vm->_talkItems->pauseByTag(_vm->getCurrentScene());
_vm->_talkItems->pauseByTag(_vm->getCurrentScene());
_vm->_scriptMan->enterScene(sceneId, opCall._callerThreadId);
_vm->_scriptMan->startScriptThread(threadId, 0,
scriptThread->_value8, scriptThread->_valueC, scriptThread->_value10);
@ -308,7 +309,7 @@ void ScriptOpcodes::opExitModalScene(ScriptThread *scriptThread, OpCall &opCall)
_vm->_input->discardButtons(0xFFFF);
_vm->_scriptMan->exitScene(opCall._callerThreadId);
_vm->_scriptMan->leavePause(opCall._callerThreadId);
// TODO _vm->_talkItems->unpauseByTag(_vm->getCurrentScene());
_vm->_talkItems->unpauseByTag(_vm->getCurrentScene());
}
void ScriptOpcodes::opEnterCloseUpScene(ScriptThread *scriptThread, OpCall &opCall) {