aboutsummaryrefslogtreecommitdiff
path: root/saga/sthread.cpp
diff options
context:
space:
mode:
authorEugene Sandulenko2004-08-12 01:11:11 +0000
committerEugene Sandulenko2004-08-12 01:11:11 +0000
commitf2c3731f7b0539a06e30868606e5e569be3d2936 (patch)
treec1ce16747d2943065bc7947444af3a2c41608500 /saga/sthread.cpp
parenta8ea40756fbd2e7d01751373ef64a3d0599f1811 (diff)
downloadscummvm-rg350-f2c3731f7b0539a06e30868606e5e569be3d2936.tar.gz
scummvm-rg350-f2c3731f7b0539a06e30868606e5e569be3d2936.tar.bz2
scummvm-rg350-f2c3731f7b0539a06e30868606e5e569be3d2936.zip
Launch scene start script.
svn-id: r14561
Diffstat (limited to 'saga/sthread.cpp')
-rw-r--r--saga/sthread.cpp9
1 files changed, 8 insertions, 1 deletions
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: