From f2c3731f7b0539a06e30868606e5e569be3d2936 Mon Sep 17 00:00:00 2001 From: Eugene Sandulenko Date: Thu, 12 Aug 2004 01:11:11 +0000 Subject: Launch scene start script. svn-id: r14561 --- saga/sthread.cpp | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'saga/sthread.cpp') diff --git a/saga/sthread.cpp b/saga/sthread.cpp index 5de0d81a06..3eaeca0113 100644 --- a/saga/sthread.cpp +++ b/saga/sthread.cpp @@ -95,6 +95,11 @@ int STHREAD_ExecThreads(int msec) { return R_SUCCESS; } +void STHREAD_completeThread(void) { + for (int i = 0; i < 40 && (ys_dll_head(_vm->_script->threadList()) != NULL); i++) + STHREAD_ExecThreads(0); +} + int STHREAD_SetEntrypoint(R_SCRIPT_THREAD *thread, int ep_num) { R_SCRIPT_BYTECODE *bytecode; int max_entrypoint; @@ -218,11 +223,13 @@ int STHREAD_Run(R_SCRIPT_THREAD *thread, int instr_limit, int msec) { } saved_offset = thread->i_offset; - debug(2, "Executing thread offset: %lu", thread->i_offset); + MemoryReadStream readS(GetReadPtr(thread), GetReadLen(thread)); in_char = readS.readByte(); + debug(0, "Executing thread offset: %lu (%x)", thread->i_offset, in_char); + switch (in_char) { // Align (ALGN) case 0x01: -- cgit v1.2.3