[Scummvm-cvs-logs] CVS: scummvm/saga scene.cpp,1.36,1.37

Torbjörn Andersson eriktorbjorn at users.sourceforge.net
Wed Sep 22 00:09:30 CEST 2004


Update of /cvsroot/scummvm/scummvm/saga
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv12846

Modified Files:
	scene.cpp 
Log Message:
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.


Index: scene.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/saga/scene.cpp,v
retrieving revision 1.36
retrieving revision 1.37
diff -u -d -r1.36 -r1.37
--- scene.cpp	27 Aug 2004 01:32:10 -0000	1.36
+++ scene.cpp	22 Sep 2004 07:05:23 -0000	1.37
@@ -947,6 +947,7 @@
 		_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 @@
 			_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:





More information about the Scummvm-git-logs mailing list