[Scummvm-cvs-logs] SF.net SVN: scummvm: [22087] scummvm/trunk/engines/scumm

fingolfin at users.sourceforge.net fingolfin at users.sourceforge.net
Sat Apr 22 17:09:02 CEST 2006


Revision: 22087
Author:   fingolfin
Date:     2006-04-22 17:08:18 -0700 (Sat, 22 Apr 2006)
ViewCVS:  http://svn.sourceforge.net/scummvm/?rev=22087&view=rev

Log Message:
-----------
Replaced _demoMode by GF_DEMO

Modified Paths:
--------------
    scummvm/trunk/engines/scumm/resource.cpp
    scummvm/trunk/engines/scumm/script_v2.cpp
    scummvm/trunk/engines/scumm/script_v5.cpp
    scummvm/trunk/engines/scumm/scumm.cpp
    scummvm/trunk/engines/scumm/scumm.h
Modified: scummvm/trunk/engines/scumm/resource.cpp
===================================================================
--- scummvm/trunk/engines/scumm/resource.cpp	2006-04-22 23:59:56 UTC (rev 22086)
+++ scummvm/trunk/engines/scumm/resource.cpp	2006-04-23 00:08:18 UTC (rev 22087)
@@ -172,7 +172,7 @@
 			result = openResourceFile(buf2, encByte);
 			// We have .man files so set demo mode
 			if (_game.id == GID_MANIAC)
-				_demoMode = true;
+				_game.features |= GF_DEMO;
 		}
 
 		if (result) {

Modified: scummvm/trunk/engines/scumm/script_v2.cpp
===================================================================
--- scummvm/trunk/engines/scumm/script_v2.cpp	2006-04-22 23:59:56 UTC (rev 22086)
+++ scummvm/trunk/engines/scumm/script_v2.cpp	2006-04-23 00:08:18 UTC (rev 22087)
@@ -425,7 +425,7 @@
 	if (_game.id == GID_MANIAC && _actorToPrintStrFor == 0xFF) {
 		if (_game.platform == Common::kPlatformC64) {
 			_string[textSlot].color = 14;
-		} else if (_demoMode) {
+		} else if (_game.features & GF_DEMO) {
 			_string[textSlot].color = (_game.version == 2) ? 15 : 1;
 		}
 	}
@@ -711,7 +711,7 @@
 		a->setActorCostume(arg);
 		break;
 	case 5:		// SO_TALK_COLOR
-		if (_game.id == GID_MANIAC && _game.version == 2 && _demoMode && arg == 1)
+		if (_game.id == GID_MANIAC && _game.version == 2 && (_game.features & GF_DEMO) && arg == 1)
 			a->_talkColor = 15;
 		else
 			a->_talkColor = arg;
@@ -844,11 +844,11 @@
 			vs->hicolor = 1;
 			vs->dimcolor = 1;
 		} else if (_game.version == 1) {
-			vs->color = (_game.id == GID_MANIAC && _demoMode) ? 16 : 5;
+			vs->color = (_game.id == GID_MANIAC && (_game.features & GF_DEMO)) ? 16 : 5;
 			vs->hicolor = 7;
 			vs->dimcolor = 11;
 		} else {
-			vs->color = (_game.id == GID_MANIAC && _demoMode) ? 13 : 2;
+			vs->color = (_game.id == GID_MANIAC && (_game.features & GF_DEMO)) ? 13 : 2;
 			vs->hicolor = 14;
 			vs->dimcolor = 8;
 		}
@@ -1467,7 +1467,7 @@
 	// FIXME allows quotes script (173) to start during introudction of
 	// demo mode of V1 Maniac Mansion. setUserState was halting script
 	// 173 before it started.
-	if (!(_game.id == GID_MANIAC && _demoMode))
+	if (!(_game.id == GID_MANIAC && (_game.features & GF_DEMO)))
 	// Hide inventory, freeze scripts, hide cursor
 	setUserState(15);
 

Modified: scummvm/trunk/engines/scumm/script_v5.cpp
===================================================================
--- scummvm/trunk/engines/scumm/script_v5.cpp	2006-04-22 23:59:56 UTC (rev 22086)
+++ scummvm/trunk/engines/scumm/script_v5.cpp	2006-04-23 00:08:18 UTC (rev 22087)
@@ -1340,7 +1340,7 @@
 
 	// HACK: To allow demo script of Maniac Mansion V2
 	// The camera x position is only 100, instead of 180, after game title name scrolls.
-	if (_game.id == GID_MANIAC && _game.version == 2 && _demoMode && isScriptRunning(173) && b == 180)
+	if (_game.id == GID_MANIAC && _game.version == 2 && (_game.features & GF_DEMO) && isScriptRunning(173) && b == 180)
 		b = 100;
 
 	if (b == a)

Modified: scummvm/trunk/engines/scumm/scumm.cpp
===================================================================
--- scummvm/trunk/engines/scumm/scumm.cpp	2006-04-22 23:59:56 UTC (rev 22086)
+++ scummvm/trunk/engines/scumm/scumm.cpp	2006-04-23 00:08:18 UTC (rev 22087)
@@ -365,7 +365,6 @@
 	_charsetBufPos = 0;
 	memset(_charsetBuffer, 0, sizeof(_charsetBuffer));
 	_copyProtection = false;
-	_demoMode = false;
 	_confirmExit = false;
 	_voiceMode = 0;
 	_talkDelay = 0;
@@ -544,7 +543,8 @@
 	_baseName = ConfMan.hasKey("basename") ? ConfMan.get("basename") : gs.gameid;
 
 	_copyProtection = ConfMan.getBool("copy_protection");
-	_demoMode = ConfMan.getBool("demo_mode");
+	if (ConfMan.getBool("demo_mode"))
+		_game.features |= GF_DEMO;
 	if (ConfMan.hasKey("nosubtitles")) {
 		printf("Configuration key 'nosubtitles' is deprecated. Use 'subtitles' instead\n");
 		if (!ConfMan.hasKey("subtitles"))
@@ -1087,13 +1087,13 @@
 		_actors[i].initActor(1);
 
 		// this is from IDB
-		if ((_game.version == 1) || (_game.id == GID_MANIAC && _demoMode))
+		if ((_game.version == 1) || (_game.id == GID_MANIAC && (_game.features & GF_DEMO)))
 			_actors[i].setActorCostume(i);
 	}
 
 	if (_game.id == GID_MANIAC && _game.version == 1) {
 		setupV1ActorTalkColor();
-	} else if (_game.id == GID_MANIAC && _game.version == 2 && _demoMode) {
+	} else if (_game.id == GID_MANIAC && _game.version == 2 && (_game.features & GF_DEMO)) {
 		// HACK Some palette changes needed for demo script
 		// in Maniac Mansion (Enhanced)
 		_actors[3].setPalette(3, 1);
@@ -1458,7 +1458,7 @@
 			((ScummEngine_v90he *)this)->_logicHE->beforeBootScript();
 		}
 #endif
-		if (_game.id == GID_MANIAC && _demoMode)
+		if (_game.id == GID_MANIAC && (_game.features & GF_DEMO))
 			runScript(9, 0, 0, args);
 		else
 			runScript(1, 0, 0, args);
@@ -1899,7 +1899,7 @@
 	int args[16];
 	memset(args, 0, sizeof(args));
 	args[0] = _bootParam;
-	if (_game.id == GID_MANIAC && _demoMode)
+	if (_game.id == GID_MANIAC && (_game.features & GF_DEMO))
 		runScript(9, 0, 0, args);
 	else
 		runScript(1, 0, 0, args);

Modified: scummvm/trunk/engines/scumm/scumm.h
===================================================================
--- scummvm/trunk/engines/scumm/scumm.h	2006-04-22 23:59:56 UTC (rev 22086)
+++ scummvm/trunk/engines/scumm/scumm.h	2006-04-23 00:08:18 UTC (rev 22087)
@@ -1154,7 +1154,6 @@
 	bool _enable_gs;
 	MidiDriverFlags _musicType;
 	bool _copyProtection;
-	bool _demoMode;
 	bool _confirmExit;
 
 public:


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