Added a debugger command 'script' to allow execution of script engine methods

svn-id: r31568
This commit is contained in:
Paul Gilbert 2008-04-19 00:34:02 +00:00
parent 5b742734ab
commit 76b1f4bcea
4 changed files with 42 additions and 0 deletions

View file

@ -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 -*/
/*- -*/