diff options
author | Torbjörn Andersson | 2004-09-22 07:05:23 +0000 |
---|---|---|
committer | Torbjörn Andersson | 2004-09-22 07:05:23 +0000 |
commit | 7389ca8884701eccc3992de52901b1a52a5fbd7e (patch) | |
tree | 7f5a0ee73fb324f34d6492f8d4d50e95ec8d9215 | |
parent | 08856609f3db4fdf5d18d1cd8c7c2e6bebcdc9ea (diff) | |
download | scummvm-rg350-7389ca8884701eccc3992de52901b1a52a5fbd7e.tar.gz scummvm-rg350-7389ca8884701eccc3992de52901b1a52a5fbd7e.tar.bz2 scummvm-rg350-7389ca8884701eccc3992de52901b1a52a5fbd7e.zip |
Start the scene script as well, just to make things more interesting. This
doesn't do anything to fix any of the underlying problems, but it still
runs pretty well.
svn-id: r15232
-rw-r--r-- | saga/scene.cpp | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/saga/scene.cpp b/saga/scene.cpp index d7246e0473..658d05a7f5 100644 --- a/saga/scene.cpp +++ b/saga/scene.cpp @@ -947,6 +947,7 @@ int Scene::defaultScene(int param, R_SCENE_INFO *scene_info) { _vm->_anim->setFlag(0, ANIM_LOOP); _vm->_anim->play(0, 0); + // Start scene scripts if (_desc.startScriptNum > 0) { R_SCRIPT_THREAD *_startScriptThread; @@ -961,6 +962,23 @@ int Scene::defaultScene(int param, R_SCENE_INFO *scene_info) { _vm->_script->SThreadCompleteThread(); } + if (_desc.sceneScriptNum > 0) { + R_SCRIPT_THREAD *_sceneScriptThread; + + debug(0, "Starting scene script #%d", _desc.sceneScriptNum); + + _sceneScriptThread = _vm->_script->SThreadCreate(); + if (_sceneScriptThread == NULL) { + _vm->_console->print("Thread creation failed."); + break; + } + + // TODO: Set up thread variables. First we'll need to + // add the concept of thread variables... + + _vm->_script->SThreadExecute(_sceneScriptThread, _desc.sceneScriptNum); + } + debug(0, "Scene started"); break; case SCENE_END: |