diff options
| -rw-r--r-- | engines/agos/agos.h | 1 | ||||
| -rw-r--r-- | engines/agos/detection_tables.h | 4 | ||||
| -rw-r--r-- | engines/agos/intern.h | 21 | ||||
| -rw-r--r-- | engines/agos/script_ff.cpp | 47 | 
4 files changed, 60 insertions, 13 deletions
| diff --git a/engines/agos/agos.h b/engines/agos/agos.h index 34ab328999..69ad765231 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 26c2e7e90d..77fc88c6bb 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 8b7ab32315..3f5c8c519b 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 d942a88e9a..ae0df84b14 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() { | 
