diff options
author | Andrew Kurushin | 2004-12-24 20:44:39 +0000 |
---|---|---|
committer | Andrew Kurushin | 2004-12-24 20:44:39 +0000 |
commit | 2289ea371b46a0696ae54923f32c1027b73afe34 (patch) | |
tree | e29bff22df0926a7a482fb82bcbb64d9daa33149 /saga/script.h | |
parent | f0bc27f11c5fb638623108df3700b182433df947 (diff) | |
download | scummvm-rg350-2289ea371b46a0696ae54923f32c1027b73afe34.tar.gz scummvm-rg350-2289ea371b46a0696ae54923f32c1027b73afe34.tar.bz2 scummvm-rg350-2289ea371b46a0696ae54923f32c1027b73afe34.zip |
- remove old stuff
- work on "walking" in progress
svn-id: r16298
Diffstat (limited to 'saga/script.h')
-rw-r--r-- | saga/script.h | 21 |
1 files changed, 12 insertions, 9 deletions
diff --git a/saga/script.h b/saga/script.h index 50dc69f739..7f230361f5 100644 --- a/saga/script.h +++ b/saga/script.h @@ -64,10 +64,6 @@ enum SCRIPT_VERBS { #define STHREAD_TIMESLICE 8 -struct SEMAPHORE { - int hold_count; -}; - enum { kVarObject = 0, kVarWithObject, @@ -109,6 +105,7 @@ enum CycleFlags { kCycleRandom = (1 << 2), kCycleReverse = (1 << 3) }; + struct SCRIPT_THREAD { int flags; // ThreadFlags int waitType; // ThreadWaitTypes @@ -119,8 +116,6 @@ struct SCRIPT_THREAD { unsigned long ep_offset; // Entrypoint offset unsigned long i_offset; // Instruction offset - SEMAPHORE sem; // FIXME: no equivalent. should be replaced with flags - // The scripts are allowed to access the stack like any other memory // area. It's therefore probably quite important that our stacks work // the same as in the original interpreter. @@ -157,6 +152,16 @@ struct SCRIPT_THREAD { flags |= kTFlagWaiting; } + void waitWalk(void *aThreadObj) { + wait(kWaitTypeWalk); + threadObj = aThreadObj; + } + + void waitDelay(int aSleepTime) { + wait(kWaitTypeDelay); + sleepTime = aSleepTime; + } + SCRIPT_THREAD() { memset(this, 0, sizeof(*this)); } }; @@ -257,8 +262,6 @@ public: SCRIPT_THREAD *SThreadCreate(); int SThreadExecute(SCRIPT_THREAD *thread, int ep_num); int executeThreads(uint msec); - int SThreadHoldSem(SEMAPHORE *sem); - int SThreadReleaseSem(SEMAPHORE *sem); int SThreadDebugStep(); void SThreadCompleteThread(void); int SThreadDestroy(SCRIPT_THREAD *thread); @@ -293,7 +296,7 @@ private: int SF_objectIsCarried(SCRIPTFUNC_PARAMS); int SF_setStatusText(SCRIPTFUNC_PARAMS); int SF_commandMode(SCRIPTFUNC_PARAMS); - int SF_actorWalkTo(SCRIPTFUNC_PARAMS); + int sfScriptWalkTo(SCRIPTFUNC_PARAMS); int SF_doAction(SCRIPTFUNC_PARAMS); int sfSetActorFacing(SCRIPTFUNC_PARAMS); int SF_startBgdAnim(SCRIPTFUNC_PARAMS); |