aboutsummaryrefslogtreecommitdiff
path: root/saga/script.h
diff options
context:
space:
mode:
authorTorbjörn Andersson2004-10-09 07:39:46 +0000
committerTorbjörn Andersson2004-10-09 07:39:46 +0000
commit64a91605a11152e2b1c54eba0e5ae9d514530028 (patch)
treed090c55c229e7aded7829780b0403891a5808109 /saga/script.h
parentc68b6323e502af2bc8af682dac17603091cd5240 (diff)
downloadscummvm-rg350-64a91605a11152e2b1c54eba0e5ae9d514530028.tar.gz
scummvm-rg350-64a91605a11152e2b1c54eba0e5ae9d514530028.tar.bz2
scummvm-rg350-64a91605a11152e2b1c54eba0e5ae9d514530028.zip
Initial attempt at fixing the SData problem. I'm still not sure exactly how
to fix the script "static" area, though. In addition, initialise a few variables, and test for NULL-ness of a few pointers. This fixes a few crashes I saw with yesterday's CVS snapshot. There's still an unexpected scene change in the intro (I think it triggers on Rhene walking too close to the exit), but at least it no longer crashes. svn-id: r15484
Diffstat (limited to 'saga/script.h')
-rw-r--r--saga/script.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/saga/script.h b/saga/script.h
index 91f4317964..1ca262d060 100644
--- a/saga/script.h
+++ b/saga/script.h
@@ -68,6 +68,13 @@ struct R_SEMAPHORE {
int hold_count;
};
+enum {
+ kVarObject = 0,
+ kVarWithObject,
+ kVarAction,
+ kVarActor
+};
+
struct R_SCRIPT_THREAD {
int executing;
@@ -87,6 +94,8 @@ struct R_SCRIPT_THREAD {
int stackPtr;
int framePtr;
+ SDataWord_T threadVars[4];
+
SDataWord_T retVal;
SDataWord_T stackTop() {
@@ -203,6 +212,7 @@ public:
int SThreadDestroy(R_SCRIPT_THREAD *thread);
private:
+ void setFramePtr(R_SCRIPT_THREAD *thread, int newPtr);
unsigned char *SThreadGetReadPtr(R_SCRIPT_THREAD *thread);
unsigned long SThreadGetReadOffset(const byte *read_p);
size_t SThreadGetReadLen(R_SCRIPT_THREAD *thread);