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

drmccoy at users.sourceforge.net drmccoy at users.sourceforge.net
Thu Jan 27 14:26:35 CET 2011


Revision: 55562
          http://scummvm.svn.sourceforge.net/scummvm/?rev=55562&view=rev
Author:   drmccoy
Date:     2011-01-27 13:26:34 +0000 (Thu, 27 Jan 2011)

Log Message:
-----------
GOB: Some Addy gameflow stubs

Modified Paths:
--------------
    scummvm/trunk/engines/gob/game.cpp
    scummvm/trunk/engines/gob/inter_v2.cpp
    scummvm/trunk/engines/gob/inter_v6.cpp
    scummvm/trunk/engines/gob/map_v2.cpp

Modified: scummvm/trunk/engines/gob/game.cpp
===================================================================
--- scummvm/trunk/engines/gob/game.cpp	2011-01-27 10:49:11 UTC (rev 55561)
+++ scummvm/trunk/engines/gob/game.cpp	2011-01-27 13:26:34 UTC (rev 55562)
@@ -562,14 +562,19 @@
 void Game::totSub(int8 flags, const char *newTotFile) {
 	int8 curBackupPos;
 
-	if ((flags == 16) || (flags == 17))
-		warning("Urban Stub: Game::totSub(), flags == %d", flags);
+	if ((flags == 16) || (flags == 17)) {
+		// Prefetch tot data + delete prefetched data
+		return;
+	}
 
 	if (_numEnvironments >= Environments::kEnvironmentCount)
 		error("Game::totSub(): Environments overflow");
 
 	_environments->set(_numEnvironments);
 
+	if (flags == 18)
+		warning("Game::totSub(): Backup media");
+
 	curBackupPos = _curEnvironment;
 	_numEnvironments++;
 	_curEnvironment = _numEnvironments;
@@ -578,9 +583,9 @@
 	_resources = new Resources(_vm);
 
 	if (flags & 0x80)
-		warning("Urban Stub: Game::totSub(), flags & 0x80");
+		warning("Addy Stub: Game::totSub(), flags & 0x80");
 
-	if (flags & 1)
+	if (flags & 5)
 		_vm->_inter->_variables = 0;
 
 	Common::strlcpy(_curTotFile, newTotFile, 10);
@@ -591,9 +596,10 @@
 		return;
 	}
 
-	_hotspots->push(0, true);
+	if (!(flags & 0x20))
+		_hotspots->push(0, true);
 
-	if (flags & 2)
+	if ((flags == 18) || (flags & 0x06))
 		playTot(-1);
 	else
 		playTot(0);
@@ -601,18 +607,21 @@
 	if (_vm->_inter->_terminate != 2)
 		_vm->_inter->_terminate = 0;
 
-	_hotspots->clear();
-	_hotspots->pop();
+	if (!(flags & 0x20)) {
+		_hotspots->clear();
+		_hotspots->pop();
+	}
 
-	if ((flags & 1) && _vm->_inter->_variables) {
+	if ((flags & 5) && _vm->_inter->_variables)
 		_vm->_inter->delocateVars();
-	}
 
 	clearUnusedEnvironment();
 
 	_numEnvironments--;
 	_curEnvironment = curBackupPos;
 	_environments->get(_numEnvironments);
+
+	_vm->_global->_inter_animDataSize = _script->getAnimDataSize();
 }
 
 void Game::switchTotSub(int16 index, int16 skipPlay) {

Modified: scummvm/trunk/engines/gob/inter_v2.cpp
===================================================================
--- scummvm/trunk/engines/gob/inter_v2.cpp	2011-01-27 10:49:11 UTC (rev 55561)
+++ scummvm/trunk/engines/gob/inter_v2.cpp	2011-01-27 13:26:34 UTC (rev 55562)
@@ -597,6 +597,7 @@
 		strcpy(totFile, "EMAP2011");
 
 	flags = _vm->_game->_script->readByte();
+
 	_vm->_game->totSub(flags, totFile);
 }
 
@@ -693,7 +694,7 @@
 	Mult::Mult_AnimData &objAnim = *(obj.pAnimData);
 
 	objAnim.stateType = type;
-	if (!obj.goblinStates[state])
+	if (!obj.goblinStates || !obj.goblinStates[state])
 		return;
 
 	Scenery::AnimLayer *animLayer;

Modified: scummvm/trunk/engines/gob/inter_v6.cpp
===================================================================
--- scummvm/trunk/engines/gob/inter_v6.cpp	2011-01-27 10:49:11 UTC (rev 55561)
+++ scummvm/trunk/engines/gob/inter_v6.cpp	2011-01-27 13:26:34 UTC (rev 55562)
@@ -80,7 +80,7 @@
 
 	length = _vm->_game->_script->readByte();
 	if ((length & 0x7F) > 13)
-		error("Length in o2_totSub is greater than 13 (%d)", length);
+		error("Length in o6_totSub is greater than 13 (%d)", length);
 
 	if (length & 0x80) {
 		_vm->_game->_script->evalExpr(0);

Modified: scummvm/trunk/engines/gob/map_v2.cpp
===================================================================
--- scummvm/trunk/engines/gob/map_v2.cpp	2011-01-27 10:49:11 UTC (rev 55561)
+++ scummvm/trunk/engines/gob/map_v2.cpp	2011-01-27 13:26:34 UTC (rev 55562)
@@ -257,6 +257,9 @@
 }
 
 void Map_v2::optimizePoints(Mult::Mult_Object *obj, int16 x, int16 y) {
+	if (!_wayPoints)
+		return;
+
 	if (obj->nearestWayPoint < obj->nearestDest) {
 
 		for (int i = obj->nearestWayPoint; i <= obj->nearestDest; i++) {


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