From 2289ea371b46a0696ae54923f32c1027b73afe34 Mon Sep 17 00:00:00 2001 From: Andrew Kurushin Date: Fri, 24 Dec 2004 20:44:39 +0000 Subject: - remove old stuff - work on "walking" in progress svn-id: r16298 --- saga/script.h | 21 ++++++++++++--------- 1 file changed, 12 insertions(+), 9 deletions(-) (limited to 'saga/script.h') 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); -- cgit v1.2.3