aboutsummaryrefslogtreecommitdiff
path: root/saga/script.h
diff options
context:
space:
mode:
authorTorbjörn Andersson2004-10-03 17:11:23 +0000
committerTorbjörn Andersson2004-10-03 17:11:23 +0000
commitff1cf82089751a6b11d2397115acb91e2baa00c8 (patch)
treeb44c20ebd4aee93b9c812423a886264d68484ac1 /saga/script.h
parent80fd0d75f304fe17ec4ad7784ef5b749f1caf76d (diff)
downloadscummvm-rg350-ff1cf82089751a6b11d2397115acb91e2baa00c8.tar.gz
scummvm-rg350-ff1cf82089751a6b11d2397115acb91e2baa00c8.tar.bz2
scummvm-rg350-ff1cf82089751a6b11d2397115acb91e2baa00c8.zip
A few, mostly untested, fixes to the SAGA script engine:
* The frame pointer is updated. This won't make any difference since we don't actually *use* the frame pointer yet. * Return values from script functions are handled like in the original now, i.e. the function sets thread->retVal and lets the call instruction push it onto the stack. (There are two call instructions, one that handles return values and one that doesn't, so the script function doesn't know if it should push or not.) * Script return values are handled. None of this makes any noticeable difference to the ITE intro. svn-id: r15393
Diffstat (limited to 'saga/script.h')
-rw-r--r--saga/script.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/saga/script.h b/saga/script.h
index 003299b4ef..91f4317964 100644
--- a/saga/script.h
+++ b/saga/script.h
@@ -87,6 +87,8 @@ struct R_SCRIPT_THREAD {
int stackPtr;
int framePtr;
+ SDataWord_T retVal;
+
SDataWord_T stackTop() {
return stackBuf[stackPtr];
}