aboutsummaryrefslogtreecommitdiff
path: root/engines/lure/scripts.cpp
diff options
context:
space:
mode:
authorPaul Gilbert2008-04-19 00:34:02 +0000
committerPaul Gilbert2008-04-19 00:34:02 +0000
commit76b1f4bcea6a89e37087f61d672cd55b47e6f719 (patch)
tree35c6437584ac8c709629364591461209b59d2423 /engines/lure/scripts.cpp
parent5b742734ab6e4402cc321f207e9b359125d8748c (diff)
downloadscummvm-rg350-76b1f4bcea6a89e37087f61d672cd55b47e6f719.tar.gz
scummvm-rg350-76b1f4bcea6a89e37087f61d672cd55b47e6f719.tar.bz2
scummvm-rg350-76b1f4bcea6a89e37087f61d672cd55b47e6f719.zip
Added a debugger command 'script' to allow execution of script engine methods
svn-id: r31568
Diffstat (limited to 'engines/lure/scripts.cpp')
-rw-r--r--engines/lure/scripts.cpp13
1 files changed, 13 insertions, 0 deletions
diff --git a/engines/lure/scripts.cpp b/engines/lure/scripts.cpp
index babbe0280f..7490f05b24 100644
--- a/engines/lure/scripts.cpp
+++ b/engines/lure/scripts.cpp
@@ -1171,6 +1171,19 @@ uint16 Script::execute(uint16 startOffset) {
return result;
}
+void Script::executeMethod(int methodIndex, uint16 v1, uint16 v2, uint16 v3) {
+ const SequenceMethodRecord *rec = &scriptMethods[0];
+ while ((rec->methodIndex != 0xff) && (rec->methodIndex != methodIndex))
+ ++rec;
+
+ if (rec->methodIndex == 0xff)
+ warning("Undefined script method %d", methodIndex);
+ else {
+ SequenceMethodPtr ptr = rec->proc;
+ ptr(v1, v2, v3);
+ }
+}
+
/*------------------------------------------------------------------------*/
/*- Hotspot Script Handler -*/
/*- -*/