[Scummvm-cvs-logs] CVS: scummvm/scumm scummvm.cpp,2.577.2.2,2.577.2.3

Travis Howell kirben at users.sourceforge.net
Tue Feb 24 03:15:08 CET 2004


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

Modified Files:
      Tag: branch-0-6-0
	scummvm.cpp 
Log Message:

Reset more for a restart
Prevent assert after x amount of restarts in some games
Make sure demo mode of maniac v1 is restart correctly.


Index: scummvm.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/scummvm.cpp,v
retrieving revision 2.577.2.2
retrieving revision 2.577.2.3
diff -u -d -r2.577.2.2 -r2.577.2.3
--- scummvm.cpp	24 Feb 2004 00:44:16 -0000	2.577.2.2
+++ scummvm.cpp	24 Feb 2004 11:00:49 -0000	2.577.2.3
@@ -2466,22 +2466,10 @@
 	for (i = 0; i < _numGlobalObjects; i++)
 		clearOwnerOf(i);
 
-	// Reallocate and Reinitialize actors
-	Actor::initActorClass(this);
-	_actors = new Actor[_numActors];
-	for (i = 0; i < _numActors; i++) {
-		_actors[i].number = i;
-		_actors[i].initActor(1);
-	
-		// this is from IDB
-		if (_version == 1)
-			_actors[i].setActorCostume(i);
-	}
-
 	// Reinit things
 	allocateArrays();                   // Reallocate arrays
 	readIndexFile();                    // Reread index (reset objectstate etc)
-	initScummVars();                    // Reinit scumm variables
+	scummInit();                        // Reinit scumm variables
 	if (_imuse) {
 		_imuse->setBase(res.address[rtSound]);
 	}
@@ -2491,7 +2479,13 @@
 		_scummVars[74] = 1225;
 
 	// Re-run bootscript
-	runScript(1, 0, 0, &_bootParam);
+	int args[16];
+	memset(args, 0, sizeof(args));
+	args[0] = _bootParam;	
+	if (_gameId == GID_MANIAC && _version == 1 && _demoMode)
+		runScript(9, 0, 0, args);
+	else
+		runScript(1, 0, 0, args);
 }
 
 void ScummEngine::startManiac() {





More information about the Scummvm-git-logs mailing list