[Scummvm-cvs-logs] SF.net SVN: scummvm:[42128] scummvm/trunk/engines/gob

drmccoy at users.sourceforge.net drmccoy at users.sourceforge.net
Sun Jul 5 13:29:13 CEST 2009


Revision: 42128
          http://scummvm.svn.sourceforge.net/scummvm/?rev=42128&view=rev
Author:   drmccoy
Date:     2009-07-05 11:29:13 +0000 (Sun, 05 Jul 2009)

Log Message:
-----------
Merging Game's and Game_v6's totSub()

Modified Paths:
--------------
    scummvm/trunk/engines/gob/game.cpp
    scummvm/trunk/engines/gob/game.h
    scummvm/trunk/engines/gob/game_v6.cpp

Modified: scummvm/trunk/engines/gob/game.cpp
===================================================================
--- scummvm/trunk/engines/gob/game.cpp	2009-07-05 11:28:57 UTC (rev 42127)
+++ scummvm/trunk/engines/gob/game.cpp	2009-07-05 11:29:13 UTC (rev 42128)
@@ -409,6 +409,9 @@
 void Game::totSub(int8 flags, const char *newTotFile) {
 	int8 curBackupPos;
 
+	if ((flags == 16) || (flags == 17))
+		warning("Urban Stub: Game::totSub(), flags == %d", flags);
+
 	if (_numEnvironments >= Environments::kEnvironmentCount)
 		return;
 
@@ -420,13 +423,14 @@
 
 	_script = new Script(_vm);
 	_resources = new Resources(_vm);
+
+	if (flags & 0x80)
+		warning("Urban Stub: Game::totSub(), flags & 0x80");
+
 	if (flags & 1)
 		_vm->_inter->_variables = 0;
 
 	strncpy0(_curTotFile, newTotFile, 9);
-//	if (_vm->getGameType() == kGameTypeGeisha)
-//		strcat(_curTotFile, ".0OT");
-//	else
 	strcat(_curTotFile, ".TOT");
 
 	if (_vm->_inter->_terminate != 0) {
@@ -444,6 +448,7 @@
 	if (_vm->_inter->_terminate != 2)
 		_vm->_inter->_terminate = 0;
 
+	_hotspots->clear();
 	_hotspots->pop();
 
 	if ((flags & 1) && _vm->_inter->_variables) {

Modified: scummvm/trunk/engines/gob/game.h
===================================================================
--- scummvm/trunk/engines/gob/game.h	2009-07-05 11:28:57 UTC (rev 42127)
+++ scummvm/trunk/engines/gob/game.h	2009-07-05 11:29:13 UTC (rev 42128)
@@ -105,8 +105,8 @@
 			MouseButtons *pButtons = 0, char handleMouse = 0);
 	void start(void);
 
-	virtual void totSub(int8 flags, const char *newTotFile);
-	virtual void switchTotSub(int16 index, int16 skipPlay);
+	void totSub(int8 flags, const char *newTotFile);
+	void switchTotSub(int16 index, int16 skipPlay);
 
 	virtual void playTot(int16 skipPlay) = 0;
 
@@ -150,8 +150,6 @@
 	Game_v6(GobEngine *vm);
 	virtual ~Game_v6() {}
 
-	virtual void totSub(int8 flags, const char *newTotFile);
-
 	virtual void prepareStart(void);
 };
 

Modified: scummvm/trunk/engines/gob/game_v6.cpp
===================================================================
--- scummvm/trunk/engines/gob/game_v6.cpp	2009-07-05 11:28:57 UTC (rev 42127)
+++ scummvm/trunk/engines/gob/game_v6.cpp	2009-07-05 11:29:13 UTC (rev 42128)
@@ -42,63 +42,6 @@
 Game_v6::Game_v6(GobEngine *vm) : Game_v2(vm) {
 }
 
-// flagbits: 5 = freeInterVariables, 6 = skipPlay
-void Game_v6::totSub(int8 flags, const char *newTotFile) {
-	int8 curBackupPos;
-
-	if ((flags == 16) || (flags == 17))
-		warning("Urban Stub: Game_v6::totSub(), flags == %d", flags);
-
-	if (_numEnvironments >= Environments::kEnvironmentCount)
-		return;
-
-	_environments->set(_numEnvironments);
-
-	curBackupPos = _curEnvironment;
-	_numEnvironments++;
-	_curEnvironment = _numEnvironments;
-
-	_script = new Script(_vm);
-	_resources = new Resources(_vm);
-
-	if (flags & 0x80)
-		warning("Urban Stub: Game_v6::totSub(), flags & 0x80");
-
-	if (flags & 5)
-		_vm->_inter->_variables = 0;
-
-	strncpy0(_curTotFile, newTotFile, 9);
-	strcat(_curTotFile, ".TOT");
-
-	if (_vm->_inter->_terminate != 0) {
-		clearUnusedEnvironment();
-		return;
-	}
-
-	_hotspots->push(0, true);
-
-	if (flags & 6)
-		playTot(-1);
-	else
-		playTot(0);
-
-	if (_vm->_inter->_terminate < 2)
-		_vm->_inter->_terminate = 0;
-
-	_hotspots->clear();
-	_hotspots->pop();
-
-	if ((flags & 5) && _vm->_inter->_variables) {
-		_vm->_inter->delocateVars();
-	}
-
-	clearUnusedEnvironment();
-
-	_numEnvironments--;
-	_curEnvironment = curBackupPos;
-	_environments->get(_numEnvironments);
-}
-
 void Game_v6::prepareStart(void) {
 	_noCd = false;
 


This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.




More information about the Scummvm-git-logs mailing list