diff options
author | Tobia Tesan | 2016-02-28 20:56:53 +0100 |
---|---|---|
committer | Tobia Tesan | 2016-02-29 14:51:58 +0100 |
commit | 06021d1aab3213b36015c39361c9f5d14536383a (patch) | |
tree | f83562c0b0d2ebd808e948f5b740b9e425845843 /engines/wintermute | |
parent | 19267e0c5e9d36857b8eef2e14ddd7883b3f5faa (diff) | |
download | scummvm-rg350-06021d1aab3213b36015c39361c9f5d14536383a.tar.gz scummvm-rg350-06021d1aab3213b36015c39361c9f5d14536383a.tar.bz2 scummvm-rg350-06021d1aab3213b36015c39361c9f5d14536383a.zip |
WINTERMUTE: Add post instruction hook to DebuggableScript
Diffstat (limited to 'engines/wintermute')
-rw-r--r-- | engines/wintermute/base/scriptables/debuggable/debuggable_script.cpp | 17 |
1 files changed, 15 insertions, 2 deletions
diff --git a/engines/wintermute/base/scriptables/debuggable/debuggable_script.cpp b/engines/wintermute/base/scriptables/debuggable/debuggable_script.cpp index 71f78a8d28..670a6d4045 100644 --- a/engines/wintermute/base/scriptables/debuggable/debuggable_script.cpp +++ b/engines/wintermute/base/scriptables/debuggable/debuggable_script.cpp @@ -21,8 +21,11 @@ */ #include "debuggable_script.h" -#include "debuggable_script_engine.h" +#include "engines/wintermute/base/scriptables/debuggable/debuggable_script_engine.h" #include "engines/wintermute/base/scriptables/script_stack.h" +#include "engines/wintermute/base/scriptables/script_value.h" +#include "engines/wintermute/debugger/breakpoint.h" +#include "engines/wintermute/debugger/script_monitor.h" namespace Wintermute { @@ -32,7 +35,17 @@ DebuggableScript::~DebuggableScript() {} void DebuggableScript::preInstHook(uint32 inst) {} -void DebuggableScript::postInstHook(uint32 inst) {} +void DebuggableScript::postInstHook(uint32 inst) { + if (inst == II_DBG_LINE) { + for (uint j = 0; j < _engine->_breakpoints.size(); j++) { + _engine->_breakpoints[j]->evaluate(this); + } + + if (_callStack->_sP <= _stepDepth) { + _engine->_monitor->notifyStep(this); + } + } +} void DebuggableScript::setStepDepth(int depth) { _stepDepth = depth; |