[Scummvm-cvs-logs] scummvm master -> d980584cc5ffab51bd79fa1e3cb369ca69c74104

eriktorbjorn eriktorbjorn at telia.com
Tue Mar 4 07:09:29 CET 2014


This automated email contains information about 6 new commits which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .

Summary:
93e7e72285 AGOS: Add missing loyalty rating to Feeble Files 4CD version
f8c3dcd8b8 AGOS: Add setLoyaltyRating() function
d56d64c8ef AGOS: Move most off the loyalty rating workaround to off_b2Set()
b5259a65d8 AGOS: Modify setLoyaltyRating() on Kirben's suggestion
dcac9c1986 AGOS: Fix cut-and-paste error in setLoyaltyRating()
d980584cc5 Merge pull request #441 from eriktorbjorn/feeble-loyalty


Commit: 93e7e72285baf7312ca13ee68bf3568584c561b9
    https://github.com/scummvm/scummvm/commit/93e7e72285baf7312ca13ee68bf3568584c561b9
Author: Torbjörn Andersson (eriktorbjorn at users.sourceforge.net)
Date: 2014-02-26T13:45:09-08:00

Commit Message:
AGOS: Add missing loyalty rating to Feeble Files 4CD version

This attempts to restore the missing loyalty rating setting to the
4CD version of The Feeble Files. So far only for the English
version, since that's all I have, but it would not surprised me if
the other versions are similar.

Changed paths:
    engines/agos/agos.h
    engines/agos/detection_tables.h
    engines/agos/intern.h
    engines/agos/script_ff.cpp



diff --git a/engines/agos/agos.h b/engines/agos/agos.h
index 34ab328..69ad765 100644
--- a/engines/agos/agos.h
+++ b/engines/agos/agos.h
@@ -1927,6 +1927,7 @@ public:
 	void off_listSaveGames();
 	void off_checkCD();
 	void off_screenTextBox();
+	void off_b2Set();
 	void off_isAdjNoun();
 	void off_hyperLinkOn();
 	void off_hyperLinkOff();
diff --git a/engines/agos/detection_tables.h b/engines/agos/detection_tables.h
index 26c2e7e..77fc88c 100644
--- a/engines/agos/detection_tables.h
+++ b/engines/agos/detection_tables.h
@@ -2622,7 +2622,7 @@ static const AGOSGameDescription gameDescriptions[] = {
 
 		GType_FF,
 		GID_FEEBLEFILES,
-		GF_OLD_BUNDLE | GF_TALKIE | GF_PACKED
+		GF_OLD_BUNDLE | GF_TALKIE | GF_PACKED | GF_BROKEN_FF_RATING
 	},
 
 	// The Feeble Files - English Windows 4CD
@@ -2645,7 +2645,7 @@ static const AGOSGameDescription gameDescriptions[] = {
 
 		GType_FF,
 		GID_FEEBLEFILES,
-		GF_OLD_BUNDLE | GF_TALKIE
+		GF_OLD_BUNDLE | GF_TALKIE | GF_BROKEN_FF_RATING
 	},
 
 	// The Feeble Files - French Windows 4CD
diff --git a/engines/agos/intern.h b/engines/agos/intern.h
index 8b7ab32..3f5c8c5 100644
--- a/engines/agos/intern.h
+++ b/engines/agos/intern.h
@@ -246,16 +246,17 @@ enum SubObjectFlags {
 };
 
 enum GameFeatures {
-	GF_TALKIE          = 1 << 0,
-	GF_OLD_BUNDLE      = 1 << 1,
-	GF_CRUNCHED        = 1 << 2,
-	GF_CRUNCHED_GAMEPC = 1 << 3,
-	GF_ZLIBCOMP        = 1 << 4,
-	GF_32COLOR         = 1 << 5,
-	GF_EGA             = 1 << 6,
-	GF_PLANAR          = 1 << 7,
-	GF_DEMO            = 1 << 8,
-	GF_PACKED          = 1 << 9
+	GF_TALKIE           = 1 << 0,
+	GF_OLD_BUNDLE       = 1 << 1,
+	GF_CRUNCHED         = 1 << 2,
+	GF_CRUNCHED_GAMEPC  = 1 << 3,
+	GF_ZLIBCOMP         = 1 << 4,
+	GF_32COLOR          = 1 << 5,
+	GF_EGA              = 1 << 6,
+	GF_PLANAR           = 1 << 7,
+	GF_DEMO             = 1 << 8,
+	GF_PACKED           = 1 << 9,
+	GF_BROKEN_FF_RATING = 1 << 10
 };
 
 enum GameFileTypes {
diff --git a/engines/agos/script_ff.cpp b/engines/agos/script_ff.cpp
index d942a88..ae0df84 100644
--- a/engines/agos/script_ff.cpp
+++ b/engines/agos/script_ff.cpp
@@ -243,7 +243,7 @@ void AGOSEngine_Feeble::setupOpcodes() {
 		/* 164 */
 		OPCODE(oe2_getDollar2),
 		OPCODE(off_isAdjNoun),
-		OPCODE(oe2_b2Set),
+		OPCODE(off_b2Set),
 		OPCODE(oe2_b2Clear),
 		/* 168 */
 		OPCODE(oe2_b2Zero),
@@ -467,6 +467,31 @@ void AGOSEngine_Feeble::off_isAdjNoun() {
 		setScriptCondition(false);
 }
 
+void AGOSEngine_Feeble::off_b2Set() {
+	// 166: set bit2
+	uint bit = getVarOrByte();
+	_bitArrayTwo[bit / 16] |= (1 << (bit & 15));
+
+	if (getFeatures() & GF_BROKEN_FF_RATING) {
+		// WORKAROUND: The 4CD version of The Feeble File is missing the
+		// opcodes to set the loyalty rating. This approximates the script
+		// from the 2CD version. See bug #6525.
+
+		switch (bit) {
+		case 152:
+			// Kicking vending machine: Possibility of Undesirable Character Flaws
+			writeVariable(120, 1);
+			break;
+		case 153:
+			// Confessing: Confirmed Minor Character Flaws
+			writeVariable(120, 2);
+			break;
+		default:
+			break;
+		}
+	}
+}
+
 void AGOSEngine_Feeble::off_hyperLinkOn() {
 	// 171: oracle hyperlink on
 	hyperLinkOn(getVarOrWord());
@@ -565,6 +590,26 @@ void AGOSEngine_Feeble::off_loadVideo() {
 
 	assert(_moviePlayer);
 	_moviePlayer->load();
+
+	if (getFeatures() & GF_BROKEN_FF_RATING) {
+		// WORKAROUND: The 4CD version of The Feeble File is missing the
+		// opcodes to set the loyalty rating. This approximates the script
+		// from the 2CD version. See bug #6525.
+
+		if (strcmp((const char *)filename, "MainMin.smk") == 0) {
+			// Being sent to Cygnus Alpha: Suspected Subversive Activity
+			writeVariable(120, 3);
+		} else if (strcmp((const char *)filename, "fxmadsam.smk") == 0) {
+			// Escaping from Cygnus Alpha: Confirmed Subversive Activity
+			writeVariable(120, 4);
+		} else if (strcmp((const char *)filename, "Statue1.smk") == 0) {
+			// Being brought before Filbert: Confirmed Treasonous Activity
+			writeVariable(120, 5);
+		} else if (strcmp((const char *)filename, "IceTrench.smk") == 0) {
+			// Arriving at rebel base: Freedom Fighters Operative
+			writeVariable(120, 6);
+		}
+	}
 }
 
 void AGOSEngine_Feeble::off_playVideo() {


Commit: f8c3dcd8b8c26c5b86f41a2e2dd279ad432ea0dd
    https://github.com/scummvm/scummvm/commit/f8c3dcd8b8c26c5b86f41a2e2dd279ad432ea0dd
Author: Torbjörn Andersson (eriktorbjorn at users.sourceforge.net)
Date: 2014-02-26T22:31:17-08:00

Commit Message:
AGOS: Add setLoyaltyRating() function

Changed paths:
    engines/agos/agos.h
    engines/agos/script_ff.cpp



diff --git a/engines/agos/agos.h b/engines/agos/agos.h
index 69ad765..6f4829c 100644
--- a/engines/agos/agos.h
+++ b/engines/agos/agos.h
@@ -1970,6 +1970,8 @@ protected:
 	virtual uint16 readUint16Wrapper(const void *src);
 	virtual uint32 readUint32Wrapper(const void *src);
 
+	void setLoyaltyRating(int rating);
+
 	void playVideo(const char *filename, bool lastSceneUsed = false);
 	void stopInteractiveVideo();
 
diff --git a/engines/agos/script_ff.cpp b/engines/agos/script_ff.cpp
index ae0df84..a9cadb5 100644
--- a/engines/agos/script_ff.cpp
+++ b/engines/agos/script_ff.cpp
@@ -296,6 +296,10 @@ void AGOSEngine_Feeble::executeOpcode(int opcode) {
 	(this->*op) ();
 }
 
+void AGOSEngine_Feeble::setLoyaltyRating(int rating) {
+	writeVariable(120, rating);
+}
+
 // -----------------------------------------------------------------------
 // Feeble Files Opcodes
 // -----------------------------------------------------------------------
@@ -480,11 +484,11 @@ void AGOSEngine_Feeble::off_b2Set() {
 		switch (bit) {
 		case 152:
 			// Kicking vending machine: Possibility of Undesirable Character Flaws
-			writeVariable(120, 1);
+			setLoyaltyRating(1);
 			break;
 		case 153:
 			// Confessing: Confirmed Minor Character Flaws
-			writeVariable(120, 2);
+			setLoyaltyRating(2);
 			break;
 		default:
 			break;
@@ -598,16 +602,16 @@ void AGOSEngine_Feeble::off_loadVideo() {
 
 		if (strcmp((const char *)filename, "MainMin.smk") == 0) {
 			// Being sent to Cygnus Alpha: Suspected Subversive Activity
-			writeVariable(120, 3);
+			setLoyaltyRating(3);
 		} else if (strcmp((const char *)filename, "fxmadsam.smk") == 0) {
 			// Escaping from Cygnus Alpha: Confirmed Subversive Activity
-			writeVariable(120, 4);
+			setLoyaltyRating(4);
 		} else if (strcmp((const char *)filename, "Statue1.smk") == 0) {
 			// Being brought before Filbert: Confirmed Treasonous Activity
-			writeVariable(120, 5);
+			setLoyaltyRating(5);
 		} else if (strcmp((const char *)filename, "IceTrench.smk") == 0) {
 			// Arriving at rebel base: Freedom Fighters Operative
-			writeVariable(120, 6);
+			setLoyaltyRating(6);
 		}
 	}
 }


Commit: d56d64c8ef018cec8ad4bd99b64921c80ebf9727
    https://github.com/scummvm/scummvm/commit/d56d64c8ef018cec8ad4bd99b64921c80ebf9727
Author: Torbjörn Andersson (eriktorbjorn at users.sourceforge.net)
Date: 2014-02-26T22:39:13-08:00

Commit Message:
AGOS: Move most off the loyalty rating workaround to off_b2Set()

Kirben pointed out that there were more loyalty rating events tied
to this opcode than to off_loadVideo(). I didn't notice this
myself since the video loading was so much easier to spot in the
script dump. It's a pity there doesn't seem to be any one opcode
that covers all of the cases.

Changed paths:
    engines/agos/script_ff.cpp



diff --git a/engines/agos/script_ff.cpp b/engines/agos/script_ff.cpp
index a9cadb5..2ab9847 100644
--- a/engines/agos/script_ff.cpp
+++ b/engines/agos/script_ff.cpp
@@ -490,6 +490,18 @@ void AGOSEngine_Feeble::off_b2Set() {
 			// Confessing: Confirmed Minor Character Flaws
 			setLoyaltyRating(2);
 			break;
+		case 240:
+			// Being sent to Cygnus Alpha: Suspected Subversive Activity
+			setLoyaltyRating(3);
+			break;
+		case 251:
+			// Escaping from Cygnus Alpha: Confirmed Subversive Activity
+			setLoyaltyRating(4);
+			break;
+		case 253:
+			// Arriving at rebel base: Freedom Fighters Operative
+			setLoyaltyRating(6);
+			break;
 		default:
 			break;
 		}
@@ -600,18 +612,9 @@ void AGOSEngine_Feeble::off_loadVideo() {
 		// opcodes to set the loyalty rating. This approximates the script
 		// from the 2CD version. See bug #6525.
 
-		if (strcmp((const char *)filename, "MainMin.smk") == 0) {
-			// Being sent to Cygnus Alpha: Suspected Subversive Activity
-			setLoyaltyRating(3);
-		} else if (strcmp((const char *)filename, "fxmadsam.smk") == 0) {
-			// Escaping from Cygnus Alpha: Confirmed Subversive Activity
-			setLoyaltyRating(4);
-		} else if (strcmp((const char *)filename, "Statue1.smk") == 0) {
+		if (strcmp((const char *)filename, "Statue1.smk") == 0) {
 			// Being brought before Filbert: Confirmed Treasonous Activity
 			setLoyaltyRating(5);
-		} else if (strcmp((const char *)filename, "IceTrench.smk") == 0) {
-			// Arriving at rebel base: Freedom Fighters Operative
-			setLoyaltyRating(6);
 		}
 	}
 }


Commit: b5259a65d841a2045df3528856534d545f64289d
    https://github.com/scummvm/scummvm/commit/b5259a65d841a2045df3528856534d545f64289d
Author: Torbjörn Andersson (eriktorbjorn at users.sourceforge.net)
Date: 2014-03-01T00:48:22-08:00

Commit Message:
AGOS: Modify setLoyaltyRating() on Kirben's suggestion

Changed paths:
    engines/agos/agos.h
    engines/agos/script_ff.cpp



diff --git a/engines/agos/agos.h b/engines/agos/agos.h
index 6f4829c..67f243e 100644
--- a/engines/agos/agos.h
+++ b/engines/agos/agos.h
@@ -1970,7 +1970,7 @@ protected:
 	virtual uint16 readUint16Wrapper(const void *src);
 	virtual uint32 readUint32Wrapper(const void *src);
 
-	void setLoyaltyRating(int rating);
+	void setLoyaltyRating(byte rating);
 
 	void playVideo(const char *filename, bool lastSceneUsed = false);
 	void stopInteractiveVideo();
diff --git a/engines/agos/script_ff.cpp b/engines/agos/script_ff.cpp
index 2ab9847..932cbd7 100644
--- a/engines/agos/script_ff.cpp
+++ b/engines/agos/script_ff.cpp
@@ -296,8 +296,37 @@ void AGOSEngine_Feeble::executeOpcode(int opcode) {
 	(this->*op) ();
 }
 
-void AGOSEngine_Feeble::setLoyaltyRating(int rating) {
-	writeVariable(120, rating);
+void AGOSEngine_Feeble::setLoyaltyRating(byte rating) {
+	// WORKAROUND: The 4CD version of The Feeble File is missing the parts
+	// of the script that set the loyalty rating. This approximates the
+	// script from the 2CD version. See bug #6525.
+
+	switch (rating) {
+	case 1:
+		// Kicking vending machine: Possibility of Undesirable Character Flaws
+		writeVariable(120, rating);
+		break;
+	case 2:
+		// Confessing: Confirmed Minor Character Flaws
+		writeVariable(120, 2);
+		break;
+	case 3:
+		// Being sent to Cygnus Alpha: Suspected Subversive Activity
+		writeVariable(120, 3);
+		break;
+	case 4:
+		// Escaping from Cygnus Alpha: Confirmed Subversive Activity
+		writeVariable(120, 4);
+		break;
+	case 5:
+		// Being brought before Filbert: Confirmed Treasonous Activity
+		writeVariable(120, 5);
+		break;
+	case 6:
+		// Arriving at rebel base: Freedom Fighters Operative
+		writeVariable(120, 6);
+		break;
+	}
 }
 
 // -----------------------------------------------------------------------
@@ -477,29 +506,20 @@ void AGOSEngine_Feeble::off_b2Set() {
 	_bitArrayTwo[bit / 16] |= (1 << (bit & 15));
 
 	if (getFeatures() & GF_BROKEN_FF_RATING) {
-		// WORKAROUND: The 4CD version of The Feeble File is missing the
-		// opcodes to set the loyalty rating. This approximates the script
-		// from the 2CD version. See bug #6525.
-
 		switch (bit) {
 		case 152:
-			// Kicking vending machine: Possibility of Undesirable Character Flaws
 			setLoyaltyRating(1);
 			break;
 		case 153:
-			// Confessing: Confirmed Minor Character Flaws
 			setLoyaltyRating(2);
 			break;
 		case 240:
-			// Being sent to Cygnus Alpha: Suspected Subversive Activity
 			setLoyaltyRating(3);
 			break;
 		case 251:
-			// Escaping from Cygnus Alpha: Confirmed Subversive Activity
 			setLoyaltyRating(4);
 			break;
 		case 253:
-			// Arriving at rebel base: Freedom Fighters Operative
 			setLoyaltyRating(6);
 			break;
 		default:
@@ -608,12 +628,7 @@ void AGOSEngine_Feeble::off_loadVideo() {
 	_moviePlayer->load();
 
 	if (getFeatures() & GF_BROKEN_FF_RATING) {
-		// WORKAROUND: The 4CD version of The Feeble File is missing the
-		// opcodes to set the loyalty rating. This approximates the script
-		// from the 2CD version. See bug #6525.
-
 		if (strcmp((const char *)filename, "Statue1.smk") == 0) {
-			// Being brought before Filbert: Confirmed Treasonous Activity
 			setLoyaltyRating(5);
 		}
 	}


Commit: dcac9c1986abd40e0b9669577fa04baed199ea2a
    https://github.com/scummvm/scummvm/commit/dcac9c1986abd40e0b9669577fa04baed199ea2a
Author: Torbjörn Andersson (eriktorbjorn at users.sourceforge.net)
Date: 2014-03-01T01:06:52-08:00

Commit Message:
AGOS: Fix cut-and-paste error in setLoyaltyRating()

Changed paths:
    engines/agos/script_ff.cpp



diff --git a/engines/agos/script_ff.cpp b/engines/agos/script_ff.cpp
index 932cbd7..e4fadcf 100644
--- a/engines/agos/script_ff.cpp
+++ b/engines/agos/script_ff.cpp
@@ -304,7 +304,7 @@ void AGOSEngine_Feeble::setLoyaltyRating(byte rating) {
 	switch (rating) {
 	case 1:
 		// Kicking vending machine: Possibility of Undesirable Character Flaws
-		writeVariable(120, rating);
+		writeVariable(120, 1);
 		break;
 	case 2:
 		// Confessing: Confirmed Minor Character Flaws


Commit: d980584cc5ffab51bd79fa1e3cb369ca69c74104
    https://github.com/scummvm/scummvm/commit/d980584cc5ffab51bd79fa1e3cb369ca69c74104
Author: Torbjörn Andersson (eriktorbjorn at telia.com)
Date: 2014-03-03T22:08:59-08:00

Commit Message:
Merge pull request #441 from eriktorbjorn/feeble-loyalty

Possible fix for bug #6525, AGOS: FF - Loyalty Rating never changes in 4 CD version

Changed paths:
    engines/agos/agos.h
    engines/agos/detection_tables.h
    engines/agos/intern.h
    engines/agos/script_ff.cpp









More information about the Scummvm-git-logs mailing list