Added a debugger command 'script' to allow execution of script engine methods
svn-id: r31568
This commit is contained in:
parent
5b742734ab
commit
76b1f4bcea
4 changed files with 42 additions and 0 deletions
|
@ -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 -*/
|
||||
/*- -*/
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue