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

drmccoy at users.sourceforge.net drmccoy at users.sourceforge.net
Sat Jan 29 23:45:17 CET 2011


Revision: 55629
          http://scummvm.svn.sourceforge.net/scummvm/?rev=55629&view=rev
Author:   drmccoy
Date:     2011-01-29 22:45:15 +0000 (Sat, 29 Jan 2011)

Log Message:
-----------
GOB: Change _curTotFile and _totToLoad into Common::String

Modified Paths:
--------------
    scummvm/trunk/engines/gob/draw_v2.cpp
    scummvm/trunk/engines/gob/game.cpp
    scummvm/trunk/engines/gob/game.h
    scummvm/trunk/engines/gob/init.cpp
    scummvm/trunk/engines/gob/inter.cpp
    scummvm/trunk/engines/gob/inter_fascin.cpp
    scummvm/trunk/engines/gob/inter_v1.cpp
    scummvm/trunk/engines/gob/inter_v5.cpp
    scummvm/trunk/engines/gob/inter_v6.cpp
    scummvm/trunk/engines/gob/sound/sound.cpp
    scummvm/trunk/engines/gob/util.cpp

Modified: scummvm/trunk/engines/gob/draw_v2.cpp
===================================================================
--- scummvm/trunk/engines/gob/draw_v2.cpp	2011-01-29 22:44:36 UTC (rev 55628)
+++ scummvm/trunk/engines/gob/draw_v2.cpp	2011-01-29 22:45:15 UTC (rev 55629)
@@ -196,7 +196,7 @@
 	// WORKAROUND: In the scripts of some Gobliins 2 versions, the dialog text IDs
 	// for Fingus and the mayor are swapped.
 	if ((_vm->getGameType() == kGameTypeGob2) && !_vm->isCD() &&
-	    (!scumm_stricmp(_vm->_game->_curTotFile, "gob07.tot"))) {
+	    _vm->_game->_curTotFile.equalsIgnoreCase("gob07.tot")) {
 
 		if (id == 24) {
 			if (_mayorWorkaroundStatus == 1) {

Modified: scummvm/trunk/engines/gob/game.cpp
===================================================================
--- scummvm/trunk/engines/gob/game.cpp	2011-01-29 22:44:36 UTC (rev 55628)
+++ scummvm/trunk/engines/gob/game.cpp	2011-01-29 22:45:15 UTC (rev 55629)
@@ -53,7 +53,6 @@
 		e.variables      = 0;
 		e.script         = 0;
 		e.resources      = 0;
-		e.curTotFile[0]  = '\0';
 
 		for (int j = 0; j < 17; j++)
 			m.fonts[j] = 0;
@@ -112,7 +111,7 @@
 	e.script         = _vm->_game->_script;
 	e.resources      = _vm->_game->_resources;
 	e.variables      = _vm->_inter->_variables;
-	strncpy(e.curTotFile, _vm->_game->_curTotFile, 14);
+	e.totFile        = _vm->_game->_curTotFile;
 }
 
 void Environments::get(uint8 env) const {
@@ -126,14 +125,13 @@
 	_vm->_game->_script            = e.script;
 	_vm->_game->_resources         = e.resources;
 	_vm->_inter->_variables        = e.variables;
-	strncpy(_vm->_game->_curTotFile, e.curTotFile, 14);
+	_vm->_game->_curTotFile        = e.totFile;
 }
 
-const char *Environments::getTotFile(uint8 env) const {
-	if (env >= kEnvironmentCount)
-		return "";
+const Common::String &Environments::getTotFile(uint8 env) const {
+	assert(env < kEnvironmentCount);
 
-	return _environments[env].curTotFile;
+	return _environments[env].totFile;
 }
 
 bool Environments::has(Variables *variables, uint8 startEnv, int16 except) const {
@@ -252,9 +250,6 @@
 Game::Game(GobEngine *vm) : _vm(vm) {
 	_captureCount = 0;
 
-	_curTotFile[0] = 0;
-	_totToLoad[0] = 0;
-
 	_startTimeKey = 0;
 	_mouseButtons = kMouseButtonsNone;
 
@@ -322,25 +317,21 @@
 }
 
 void Game::playTot(int16 function) {
-	char savedTotName[20];
-	int16 *oldCaptureCounter;
-	int16 *oldBreakFrom;
-	int16 *oldNestLevel;
-	int16 captureCounter = 0;
-	int16 breakFrom;
-	int16 nestLevel;
+	int16 *oldNestLevel      = _vm->_inter->_nestLevel;
+	int16 *oldBreakFrom      = _vm->_inter->_breakFromLevel;
+	int16 *oldCaptureCounter = _vm->_scenery->_pCaptureCounter;
 
-	oldNestLevel = _vm->_inter->_nestLevel;
-	oldBreakFrom = _vm->_inter->_breakFromLevel;
-	oldCaptureCounter = _vm->_scenery->_pCaptureCounter;
-
 	_script->push();
 
-	_vm->_inter->_nestLevel = &nestLevel;
-	_vm->_inter->_breakFromLevel = &breakFrom;
+	int16 captureCounter = 0;
+	int16 breakFrom;
+	int16 nestLevel;
+	_vm->_inter->_nestLevel         = &nestLevel;
+	_vm->_inter->_breakFromLevel    = &breakFrom;
 	_vm->_scenery->_pCaptureCounter = &captureCounter;
-	strcpy(savedTotName, _curTotFile);
 
+	Common::String oldTotFile;
+
 	if (function <= 0) {
 		while (!_vm->shouldQuit()) {
 			if (_vm->_inter->_variables)
@@ -372,9 +363,9 @@
 				_vm->_inter->initControlVars(0);
 
 			_vm->_draw->_cursorHotspotXVar = -1;
-			_totToLoad[0] = 0;
+			_totToLoad.clear();
 
-			if ((_curTotFile[0] == 0) && (!_script->isLoaded()))
+			if ((_curTotFile.empty()) && (!_script->isLoaded()))
 				break;
 
 			if (function == -2) {
@@ -411,7 +402,7 @@
 
 			_vm->_inter->callSub(2);
 
-			if (_totToLoad[0] != 0)
+			if (!_totToLoad.empty())
 				_vm->_inter->_terminate = 0;
 
 			_vm->_draw->blitInvalidated();
@@ -439,10 +430,10 @@
 
 			_vm->_draw->closeAllWin();
 
-			if (_totToLoad[0] == 0)
+			if (_totToLoad.empty())
 				break;
 
-			Common::strlcpy(_curTotFile, _totToLoad, 14);
+			_curTotFile = _totToLoad;
 
 		}
 	} else {
@@ -461,10 +452,10 @@
 			_vm->_inter->_terminate = 2;
 	}
 
-	Common::strlcpy(_curTotFile, savedTotName, 14);
+	_curTotFile = oldTotFile;
 
-	_vm->_inter->_nestLevel = oldNestLevel;
-	_vm->_inter->_breakFromLevel = oldBreakFrom;
+	_vm->_inter->_nestLevel         = oldNestLevel;
+	_vm->_inter->_breakFromLevel    = oldBreakFrom;
 	_vm->_scenery->_pCaptureCounter = oldCaptureCounter;
 
 	_script->pop();
@@ -642,7 +633,7 @@
 }
 
 // flagbits: 0 = freeInterVariables, 1 = function -1
-void Game::totSub(int8 flags, const char *newTotFile) {
+void Game::totSub(int8 flags, const Common::String &totFile) {
 	int8 curBackupPos;
 
 	if ((flags == 16) || (flags == 17)) {
@@ -673,8 +664,7 @@
 	if (flags & 5)
 		_vm->_inter->_variables = 0;
 
-	Common::strlcpy(_curTotFile, newTotFile, 10);
-	strcat(_curTotFile, ".TOT");
+	_curTotFile = totFile + ".TOT";
 
 	if (_vm->_inter->_terminate != 0) {
 		clearUnusedEnvironment();
@@ -728,7 +718,7 @@
 	// WORKAROUND: Some versions don't make the MOVEMENT menu item unselectable
 	// in the dreamland screen, resulting in a crash when it's clicked.
 	if ((_vm->getGameType() == kGameTypeGob2) && (index == -1) && (function == 7) &&
-	    !scumm_stricmp(_environments->getTotFile(newPos), "gob06.tot"))
+	     _environments->getTotFile(newPos).equalsIgnoreCase("gob06.tot"))
 		return;
 
 	curBackupPos = _curEnvironment;

Modified: scummvm/trunk/engines/gob/game.h
===================================================================
--- scummvm/trunk/engines/gob/game.h	2011-01-29 22:44:36 UTC (rev 55628)
+++ scummvm/trunk/engines/gob/game.h	2011-01-29 22:45:15 UTC (rev 55629)
@@ -26,6 +26,8 @@
 #ifndef GOB_GAME_H
 #define GOB_GAME_H
 
+#include "common/str.h"
+
 #include "gob/util.h"
 #include "gob/video.h"
 #include "gob/sound/sounddesc.h"
@@ -47,7 +49,7 @@
 	void set(uint8 env);
 	void get(uint8 env) const;
 
-	const char *getTotFile(uint8 env) const;
+	const Common::String &getTotFile(uint8 env) const;
 
 	bool has(Variables *variables, uint8 startEnv = 0, int16 except = -1) const;
 	bool has(Script    *script   , uint8 startEnv = 0, int16 except = -1) const;
@@ -61,12 +63,12 @@
 
 private:
 	struct Environment {
-		int32      cursorHotspotX;
-		int32      cursorHotspotY;
-		char       curTotFile[14];
-		Variables *variables;
-		Script    *script;
-		Resources *resources;
+		int32          cursorHotspotX;
+		int32          cursorHotspotY;
+		Common::String totFile;
+		Variables     *variables;
+		Script        *script;
+		Resources     *resources;
 	};
 
 	struct Media {
@@ -87,8 +89,8 @@
 	Resources *_resources;
 	Hotspots  *_hotspots;
 
-	char _curTotFile[14];
-	char _totToLoad[20];
+	Common::String _curTotFile;
+	Common::String _totToLoad;
 
 	int32 _startTimeKey;
 	MouseButtons _mouseButtons;
@@ -122,7 +124,7 @@
 			MouseButtons *pButtons = 0, char handleMouse = 0);
 	void start();
 
-	void totSub(int8 flags, const char *newTotFile);
+	void totSub(int8 flags, const Common::String &totFile);
 	void switchTotSub(int16 index, int16 function);
 
 protected:

Modified: scummvm/trunk/engines/gob/init.cpp
===================================================================
--- scummvm/trunk/engines/gob/init.cpp	2011-01-29 22:44:36 UTC (rev 55628)
+++ scummvm/trunk/engines/gob/init.cpp	2011-01-29 22:45:15 UTC (rev 55629)
@@ -148,7 +148,7 @@
 	if (_vm->_dataIO->hasFile(_vm->_startTot)) {
 		_vm->_inter->allocateVars(Script::getVariablesCount(_vm->_startTot.c_str(), _vm));
 
-		strcpy(_vm->_game->_curTotFile, _vm->_startTot.c_str());
+		_vm->_game->_curTotFile = _vm->_startTot;
 
 		_vm->_sound->cdTest(1, "GOB");
 		_vm->_sound->cdLoadLIC("gob.lic");

Modified: scummvm/trunk/engines/gob/inter.cpp
===================================================================
--- scummvm/trunk/engines/gob/inter.cpp	2011-01-29 22:44:36 UTC (rev 55628)
+++ scummvm/trunk/engines/gob/inter.cpp	2011-01-29 22:45:15 UTC (rev 55629)
@@ -258,23 +258,23 @@
 			int addr = _vm->_game->_script->pos();
 
 			if ((startaddr == 0x18B4 && addr == 0x1A7F && // Zombie, EGA
-				 !scumm_stricmp(_vm->_game->_curTotFile, "avt005.tot")) ||
-			  (startaddr == 0x188D && addr == 0x1A58 && // Zombie, Mac
-				 !scumm_stricmp(_vm->_game->_curTotFile, "avt005.tot")) ||
-				(startaddr == 0x1299 && addr == 0x139A && // Dungeon
-				 !scumm_stricmp(_vm->_game->_curTotFile, "avt006.tot")) ||
-				(startaddr == 0x11C0 && addr == 0x12C9 && // Cauldron, EGA
-				 !scumm_stricmp(_vm->_game->_curTotFile, "avt012.tot")) ||
-				(startaddr == 0x11C8 && addr == 0x1341 && // Cauldron, Mac
-				 !scumm_stricmp(_vm->_game->_curTotFile, "avt012.tot")) ||
-				(startaddr == 0x09F2 && addr == 0x0AF3 && // Statue
-				 !scumm_stricmp(_vm->_game->_curTotFile, "avt016.tot")) ||
-				(startaddr == 0x0B92 && addr == 0x0C93 && // Castle
-				 !scumm_stricmp(_vm->_game->_curTotFile, "avt019.tot")) ||
-				(startaddr == 0x17D9 && addr == 0x18DA && // Finale, EGA
-				 !scumm_stricmp(_vm->_game->_curTotFile, "avt022.tot")) ||
-				(startaddr == 0x17E9 && addr == 0x19A8 && // Finale, Mac
-				 !scumm_stricmp(_vm->_game->_curTotFile, "avt022.tot"))) {
+			     _vm->_game->_curTotFile.equalsIgnoreCase("avt005.tot")) ||
+			    (startaddr == 0x188D && addr == 0x1A58 && // Zombie, Mac
+			     _vm->_game->_curTotFile.equalsIgnoreCase("avt005.tot")) ||
+			    (startaddr == 0x1299 && addr == 0x139A && // Dungeon
+			     _vm->_game->_curTotFile.equalsIgnoreCase("avt006.tot")) ||
+			    (startaddr == 0x11C0 && addr == 0x12C9 && // Cauldron, EGA
+			     _vm->_game->_curTotFile.equalsIgnoreCase("avt012.tot")) ||
+			    (startaddr == 0x11C8 && addr == 0x1341 && // Cauldron, Mac
+			     _vm->_game->_curTotFile.equalsIgnoreCase("avt012.tot")) ||
+			    (startaddr == 0x09F2 && addr == 0x0AF3 && // Statue
+			     _vm->_game->_curTotFile.equalsIgnoreCase("avt016.tot")) ||
+			    (startaddr == 0x0B92 && addr == 0x0C93 && // Castle
+			     _vm->_game->_curTotFile.equalsIgnoreCase("avt019.tot")) ||
+			    (startaddr == 0x17D9 && addr == 0x18DA && // Finale, EGA
+			     _vm->_game->_curTotFile.equalsIgnoreCase("avt022.tot")) ||
+			    (startaddr == 0x17E9 && addr == 0x19A8 && // Finale, Mac
+			     _vm->_game->_curTotFile.equalsIgnoreCase("avt022.tot"))) {
 
 				_vm->_util->longDelay(5000);
 			}
@@ -285,7 +285,7 @@
 		// of Fascination have a too short delay between the storage room and the lab.
 		// We manually add it here.
 		if ((_vm->getGameType() == kGameTypeFascination) &&
-			!scumm_stricmp(_vm->_game->_curTotFile, "PLANQUE.tot")) {
+			_vm->_game->_curTotFile.equalsIgnoreCase("PLANQUE.tot")) {
 				int addr = _vm->_game->_script->pos();
 				if ((startaddr == 0x0202 && addr == 0x0330) || // Before Lab, Amiga & Atari, English
 					(startaddr == 0x023D && addr == 0x032D) || // Before Lab, PC floppy, German
@@ -301,11 +301,11 @@
 		// A VGA version has some broken code in its scripts, this workaround skips the corrupted parts.
 		if (_vm->getGameType() == kGameTypeFascination) {
 			int addr = _vm->_game->_script->pos();
-			if ((startaddr == 0x212D) && (addr == 0x290E) && (cmd == 0x90) && !scumm_stricmp(_vm->_game->_curTotFile, "INTRO1.tot")) {
+			if ((startaddr == 0x212D) && (addr == 0x290E) && (cmd == 0x90) && _vm->_game->_curTotFile.equalsIgnoreCase("INTRO1.tot")) {
 				_vm->_game->_script->skip(2);
 				cmd = _vm->_game->_script->readByte();
 			}
-			if ((startaddr == 0x207D) && (addr == 0x22CE) && (cmd == 0x90) && !scumm_stricmp(_vm->_game->_curTotFile, "INTRO2.tot")) {
+			if ((startaddr == 0x207D) && (addr == 0x22CE) && (cmd == 0x90) && _vm->_game->_curTotFile.equalsIgnoreCase("INTRO2.tot")) {
 				_vm->_game->_script->skip(2);
 				cmd = _vm->_game->_script->readByte();
 			}

Modified: scummvm/trunk/engines/gob/inter_fascin.cpp
===================================================================
--- scummvm/trunk/engines/gob/inter_fascin.cpp	2011-01-29 22:44:36 UTC (rev 55628)
+++ scummvm/trunk/engines/gob/inter_fascin.cpp	2011-01-29 22:45:15 UTC (rev 55629)
@@ -133,12 +133,12 @@
 		flag = _vm->_game->_script->evalBoolResult();
 
 		// WORKAROUND: The script of the PC version of Fascination, when the protection check
-		// fails, writes on purpose everywhere in the memory in order to hang the computer. 
+		// fails, writes on purpose everywhere in the memory in order to hang the computer.
 		// This results in a crash in Scummvm. This workaround avoids that crash.
 		if (_vm->getPlatform() == Common::kPlatformPC) {
-			if ((!scumm_stricmp(_vm->_game->_curTotFile, "INTRO1.TOT") && (blockPos == 3533)) ||
-				(!scumm_stricmp(_vm->_game->_curTotFile, "INTRO2.TOT") && (blockPos == 3519)) ||
-				(!scumm_stricmp(_vm->_game->_curTotFile, "INTRO2.TOT") && (blockPos == 3265)))  //PC Hebrew
+			if ((_vm->_game->_curTotFile.equalsIgnoreCase("INTRO1.TOT") && (blockPos == 3533)) ||
+			    (_vm->_game->_curTotFile.equalsIgnoreCase("INTRO2.TOT") && (blockPos == 3519)) ||
+			    (_vm->_game->_curTotFile.equalsIgnoreCase("INTRO2.TOT") && (blockPos == 3265)))  //PC Hebrew
 				_terminate = 1;
 		}
 	} while (!flag && !_break && !_terminate && !_vm->shouldQuit());

Modified: scummvm/trunk/engines/gob/inter_v1.cpp
===================================================================
--- scummvm/trunk/engines/gob/inter_v1.cpp	2011-01-29 22:44:36 UTC (rev 55628)
+++ scummvm/trunk/engines/gob/inter_v1.cpp	2011-01-29 22:45:15 UTC (rev 55629)
@@ -657,7 +657,7 @@
 	uint16 offset = _vm->_game->_script->readUint16();
 
 	debugC(5, kDebugGameFlow, "tot = \"%s\", offset = %d",
-			_vm->_game->_curTotFile, offset);
+			_vm->_game->_curTotFile.c_str(), offset);
 
 	if (offset < 128) {
 		warning("Inter_v1::o1_callSub(): Offset %d points into the header. "
@@ -666,14 +666,14 @@
 	}
 
 	// Skipping the copy protection screen in Gobliiins
-	if (!_vm->_copyProtection && (_vm->getGameType() == kGameTypeGob1) && (offset == 3905)
-			&& !scumm_stricmp(_vm->_game->_curTotFile, _vm->_startTot.c_str())) {
+	if (!_vm->_copyProtection && (_vm->getGameType() == kGameTypeGob1) && (offset == 3905) &&
+	    _vm->_game->_curTotFile.equalsIgnoreCase(_vm->_startTot)) {
 		debugC(2, kDebugGameFlow, "Skipping copy protection screen");
 		return;
 	}
 	// Skipping the copy protection screen in Gobliins 2
-	if (!_vm->_copyProtection && (_vm->getGameType() == kGameTypeGob2) && (offset == 1746)
-			&& !scumm_stricmp(_vm->_game->_curTotFile, "intro0.tot")) {
+	if (!_vm->_copyProtection && (_vm->getGameType() == kGameTypeGob2) && (offset == 1746) &&
+	    _vm->_game->_curTotFile.equalsIgnoreCase("intro0.tot")) {
 		debugC(2, kDebugGameFlow, "Skipping copy protection screen");
 		return;
 	}
@@ -809,7 +809,7 @@
 
 	// WORKAROUND: Gob1 goblin stuck on reload bugs present in original - bugs #3018918 and 3065914
 	if ((_vm->getGameType() == kGameTypeGob1) && (_vm->_game->_script->pos() == 2933) &&
-			!scumm_stricmp(_vm->_game->_curTotFile, "inter.tot") && VAR(285) != 0) {
+			_vm->_game->_curTotFile.equalsIgnoreCase("inter.tot") && VAR(285) != 0) {
 		warning("Workaround for Gob1 Goblin Stuck On Reload Bug applied...");
 		// VAR(59) actually locks goblin movement, but these variables trigger this in the script.
 		WRITE_VAR(285, 0);
@@ -888,7 +888,7 @@
 
 	// WORKAROUND: The EGA version of Gobliiins 1 has an invalid expression there
 	if (_vm->isEGA() && (_vm->_game->_script->pos() == 1398) &&
-			!scumm_stricmp(_vm->_game->_curTotFile, "intro.tot")) {
+			_vm->_game->_curTotFile.equalsIgnoreCase("intro.tot")) {
 
 		_vm->_draw->_destSpriteY = 0;
 		_vm->_game->_script->skip(1);
@@ -958,27 +958,19 @@
 }
 
 void Inter_v1::o1_loadTot(OpFuncParams &params) {
-	char buf[20];
-	int8 size;
-
 	if ((_vm->_game->_script->peekByte() & 0x80) != 0) {
 		_vm->_game->_script->skip(1);
 		_vm->_game->_script->evalExpr(0);
-		Common::strlcpy(buf, _vm->_game->_script->getResultStr(), 16);
+		_vm->_game->_totToLoad = _vm->_game->_script->getResultStr();
 	} else {
-		size = _vm->_game->_script->readInt8();
-		memcpy(buf, _vm->_game->_script->readString(size), size);
-		buf[size] = '\0';
+		uint8 size = _vm->_game->_script->readInt8();
+		_vm->_game->_totToLoad = Common::String(_vm->_game->_script->readString(size), size);
 	}
 
-//	if (_vm->getGameType() == kGameTypeGeisha)
-//		strcat(buf, ".0ot");
-//	else
-	strcat(buf, ".tot");
+	_vm->_game->_totToLoad += ".tot";
 
 	if (_terminate != 2)
 		_terminate = 1;
-	strcpy(_vm->_game->_totToLoad, buf);
 }
 
 void Inter_v1::o1_palLoad(OpFuncParams &params) {
@@ -1199,7 +1191,7 @@
 	// the counting, too.
 	if ((_vm->getGameType() == kGameTypeWeen) && (VAR(59) < 4000) &&
 	    (_vm->_game->_script->pos() == 729) &&
-	    !scumm_stricmp(_vm->_game->_curTotFile, "intro5.tot"))
+	    _vm->_game->_curTotFile.equalsIgnoreCase("intro5.tot"))
 		WRITE_VAR(59, 4000);
 
 	switch (cmd) {

Modified: scummvm/trunk/engines/gob/inter_v5.cpp
===================================================================
--- scummvm/trunk/engines/gob/inter_v5.cpp	2011-01-29 22:44:36 UTC (rev 55628)
+++ scummvm/trunk/engines/gob/inter_v5.cpp	2011-01-29 22:45:15 UTC (rev 55629)
@@ -253,7 +253,7 @@
 
 void Inter_v5::o5_spaceShooter(OpGobParams &params) {
 	warning("Dynasty Stub: Space shooter: %d, %d, %s",
-			params.extraData, params.paramCount, _vm->_game->_curTotFile);
+			params.extraData, params.paramCount, _vm->_game->_curTotFile.c_str());
 
 	if (params.paramCount < 4) {
 		warning("Space shooter variable counter < 4");

Modified: scummvm/trunk/engines/gob/inter_v6.cpp
===================================================================
--- scummvm/trunk/engines/gob/inter_v6.cpp	2011-01-29 22:44:36 UTC (rev 55628)
+++ scummvm/trunk/engines/gob/inter_v6.cpp	2011-01-29 22:45:15 UTC (rev 55629)
@@ -128,7 +128,7 @@
 	//             the video that lets the sheet vanish is missing. We'll
 	//             play the one where the sheet is already gone instead.
 	if (!strcmp(fileName, "MXRAMPART") &&
-	    !scumm_stricmp(_vm->_game->_curTotFile, "EMAM2013.TOT"))
+	    _vm->_game->_curTotFile.equalsIgnoreCase("avt005.tot"))
 		strcpy(fileName, "PLCOFDR2");
 
 	if (!strcmp(fileName, "RIEN")) {

Modified: scummvm/trunk/engines/gob/sound/sound.cpp
===================================================================
--- scummvm/trunk/engines/gob/sound/sound.cpp	2011-01-29 22:44:36 UTC (rev 55628)
+++ scummvm/trunk/engines/gob/sound/sound.cpp	2011-01-29 22:45:15 UTC (rev 55629)
@@ -562,9 +562,9 @@
 	};
 
 	for (int i = 0; i < ARRAYSIZE(tracks); i++)
-		if (!scumm_stricmp(_vm->_game->_curTotFile, tracks[i][0])) {
+		if (_vm->_game->_curTotFile.equalsIgnoreCase(tracks[i][0])) {
 			debugC(1, kDebugSound, "CDROM: Playing background music \"%s\" (\"%s\")",
-					tracks[i][1], _vm->_game->_curTotFile);
+					tracks[i][1], _vm->_game->_curTotFile.c_str());
 
 			_cdrom->startTrack(tracks[i][1]);
 			break;
@@ -587,9 +587,9 @@
 	// Default to "ang?" for other languages (including EN_USA)
 	int language = _vm->_global->_language <= 4 ? _vm->_global->_language : 2;
 	for (int i = 0; i < ARRAYSIZE(tracks); i++)
-		if (!scumm_stricmp(_vm->_game->_curTotFile, tracks[i][0])) {
+		if (_vm->_game->_curTotFile.equalsIgnoreCase(tracks[i][0])) {
 			debugC(1, kDebugSound, "CDROM: Playing mult music \"%s\" (\"%s\")",
-					tracks[i][language + 1], _vm->_game->_curTotFile);
+					tracks[i][language + 1], _vm->_game->_curTotFile.c_str());
 
 			_cdrom->startTrack(tracks[i][language + 1]);
 			break;

Modified: scummvm/trunk/engines/gob/util.cpp
===================================================================
--- scummvm/trunk/engines/gob/util.cpp	2011-01-29 22:44:36 UTC (rev 55628)
+++ scummvm/trunk/engines/gob/util.cpp	2011-01-29 22:45:15 UTC (rev 55629)
@@ -153,7 +153,7 @@
 		// WORKAROUND:
 		// Force a check of the mouse in order to fix the sofa bug. This apply only for Gob3, and only
 		// in the impacted TOT file so that the second screen animation is not broken.
-		if ((_vm->getGameType() == kGameTypeGob3) && !scumm_stricmp(_vm->_game->_curTotFile, "EMAP1008.TOT"))
+		if ((_vm->getGameType() == kGameTypeGob3) && _vm->_game->_curTotFile.equalsIgnoreCase("EMAP1008.TOT"))
 			_vm->_game->evaluateScroll();
 	}
 }


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