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

fingolfin at users.sourceforge.net fingolfin at users.sourceforge.net
Sun Apr 19 02:59:50 CEST 2009


Revision: 40008
          http://scummvm.svn.sourceforge.net/scummvm/?rev=40008&view=rev
Author:   fingolfin
Date:     2009-04-19 00:59:50 +0000 (Sun, 19 Apr 2009)

Log Message:
-----------
SCUMM: Turned PARAM_1,2,3 into an enum; minor tweaks

Modified Paths:
--------------
    scummvm/trunk/engines/scumm/script_v0.cpp
    scummvm/trunk/engines/scumm/script_v2.cpp
    scummvm/trunk/engines/scumm/script_v5.cpp
    scummvm/trunk/engines/scumm/scumm_v5.h

Modified: scummvm/trunk/engines/scumm/script_v0.cpp
===================================================================
--- scummvm/trunk/engines/scumm/script_v0.cpp	2009-04-19 00:59:28 UTC (rev 40007)
+++ scummvm/trunk/engines/scumm/script_v0.cpp	2009-04-19 00:59:50 UTC (rev 40008)
@@ -359,10 +359,6 @@
 
 #define SENTENCE_SCRIPT 2
 
-#define PARAM_1 0x80
-#define PARAM_2 0x40
-#define PARAM_3 0x20
-
 int ScummEngine_v0::getVarOrDirectWord(byte mask) {
 	return getVarOrDirectByte(mask);
 }
@@ -1037,8 +1033,4 @@
 	_activeVerb = 13;
 }
 
-#undef PARAM_1
-#undef PARAM_2
-#undef PARAM_3
-
 } // End of namespace Scumm

Modified: scummvm/trunk/engines/scumm/script_v2.cpp
===================================================================
--- scummvm/trunk/engines/scumm/script_v2.cpp	2009-04-19 00:59:28 UTC (rev 40007)
+++ scummvm/trunk/engines/scumm/script_v2.cpp	2009-04-19 00:59:50 UTC (rev 40008)
@@ -361,10 +361,6 @@
 
 #define SENTENCE_SCRIPT 2
 
-#define PARAM_1 0x80
-#define PARAM_2 0x40
-#define PARAM_3 0x20
-
 int ScummEngine_v2::getVar() {
 	return readVar(fetchScriptByte());
 }
@@ -1626,8 +1622,4 @@
 	redrawV2Inventory();
 }
 
-#undef PARAM_1
-#undef PARAM_2
-#undef PARAM_3
-
 } // End of namespace Scumm

Modified: scummvm/trunk/engines/scumm/script_v5.cpp
===================================================================
--- scummvm/trunk/engines/scumm/script_v5.cpp	2009-04-19 00:59:28 UTC (rev 40007)
+++ scummvm/trunk/engines/scumm/script_v5.cpp	2009-04-19 00:59:50 UTC (rev 40008)
@@ -362,10 +362,6 @@
 	OPCODE(0xff, o5_drawBox);
 }
 
-#define PARAM_1 0x80
-#define PARAM_2 0x40
-#define PARAM_3 0x20
-
 int ScummEngine_v5::getVar() {
 	return readVar(fetchScriptWord());
 }
@@ -2294,7 +2290,7 @@
 		_resultVarNumber++;
 	} while (--a);
 
-	// Macintosh verison of indy3ega used different interface, so adjust values.
+	// Macintosh version of indy3ega used different interface, so adjust values.
 	if (_game.id == GID_INDY3 && _game.platform == Common::kPlatformMacintosh) {
 		VAR(68) = 0;
 		VAR(69) = 0;
@@ -2745,9 +2741,7 @@
 		if (_sentenceNum) {
 			if (_sentence[_sentenceNum - 1].freezeCount && !isScriptInUse(VAR(VAR_SENTENCE_SCRIPT)))
 				return;
-			break;
-		}
-		if (!isScriptInUse(VAR(VAR_SENTENCE_SCRIPT)))
+		} else if (!isScriptInUse(VAR(VAR_SENTENCE_SCRIPT)))
 			return;
 		break;
 	default:
@@ -3082,8 +3076,4 @@
 	runInventoryScript(1);
 }
 
-#undef PARAM_1
-#undef PARAM_2
-#undef PARAM_3
-
 } // End of namespace Scumm

Modified: scummvm/trunk/engines/scumm/scumm_v5.h
===================================================================
--- scummvm/trunk/engines/scumm/scumm_v5.h	2009-04-19 00:59:28 UTC (rev 40007)
+++ scummvm/trunk/engines/scumm/scumm_v5.h	2009-04-19 00:59:50 UTC (rev 40008)
@@ -44,6 +44,12 @@
 
 	char _saveLoadVarsFilename[256];
 
+	enum {
+		PARAM_1 = 0x80,
+		PARAM_2 = 0x40,
+		PARAM_3 = 0x20
+	};
+
 public:
 	ScummEngine_v5(OSystem *syst, const DetectorResult &dr);
 


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