[Scummvm-git-logs] scummvm master -> 34bc417d12a27dab03d72c158e97af789439001d

bluegr noreply at scummvm.org
Mon Mar 7 10:28:14 UTC 2022


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

Summary:
34bc417d12 SCUMM: Fix bug #13196 - Invalid phrase with GIVE crashes Monkey EGA Demo


Commit: 34bc417d12a27dab03d72c158e97af789439001d
    https://github.com/scummvm/scummvm/commit/34bc417d12a27dab03d72c158e97af789439001d
Author: Pragyansh Chaturvedi (76248539+r41k0u at users.noreply.github.com)
Date: 2022-03-07T12:28:09+02:00

Commit Message:
SCUMM: Fix bug #13196 - Invalid phrase with GIVE crashes Monkey EGA Demo

* SCUMM: Fix Invalid phrase with GIVE crashes Monkey Island EGA Demo
* SCUMM: Suggested changes on Pull #3731
* SCUMM: specify game id in Pull #3731
* SCUMM: seperated AMIGA monkey VGA and VGA Demo variants. Assigned GF_DEMO flags

Changed paths:
    devtools/scumm-md5.txt
    engines/scumm/detection_tables.h
    engines/scumm/script_v5.cpp
    engines/scumm/scumm-md5.h


diff --git a/devtools/scumm-md5.txt b/devtools/scumm-md5.txt
index e89a9fae415..6708c341294 100644
--- a/devtools/scumm-md5.txt
+++ b/devtools/scumm-md5.txt
@@ -240,7 +240,7 @@ monkey	The Secret of Monkey Island
 
 	71523b539491527d9860f4407faf0411	7607	en	DOS	Demo	EGA Demo	-	Fingolfin
 	771bc18ec6f93837b839c992b211904b	-1	de	DOS	Demo	EGA Demo	-	khalek
-	54a936ad06161ff7bfefcb96200f7bff	7617	en	Amiga	VGA	Demo	-	khalek
+	54a936ad06161ff7bfefcb96200f7bff	7617	en	Amiga   VGA Demo	VGA	Demo	-	khalek
 	c0c9de81fb965e6cbe77f6e5631ca705	9135	en	DOS	SE Talkie	Unofficial SE Talkie v1.02	lotharsm
 	4252854e7d052cb488b520ba89c3eb6d	9135	de	DOS	SE Talkie	Unofficial SE Talkie v1.01
 	2b3744585bc6815ec55dd09f655b7a5b	-1	ko	DOS	VGA	VGA	Fan translation	ScummVM-Kor
diff --git a/engines/scumm/detection_tables.h b/engines/scumm/detection_tables.h
index dc9deff7dd4..aa5aeee6192 100644
--- a/engines/scumm/detection_tables.h
+++ b/engines/scumm/detection_tables.h
@@ -186,9 +186,10 @@ static const GameSettings gameVariantsTable[] = {
 	{"pass", 0, 0, GID_PASS, 4, 0, MDT_PCSPK | MDT_PCJR | MDT_CMS | MDT_ADLIB, GF_16COLOR, Common::kPlatformDOS, GUIO2(GUIO_NOSPEECH, GUIO_NOMIDI)},
 
 	{"monkey", "VGA",      "vga", GID_MONKEY_VGA, 4, 0, MDT_PCSPK | MDT_PCJR | MDT_CMS | MDT_ADLIB | MDT_MIDI | MDT_PREFER_MT32, 0, UNK, GUIO1(GUIO_NOSPEECH)},
+	{"monkey", "VGA Demo",      "vga", GID_MONKEY_VGA, 4, 0, MDT_PCSPK | MDT_PCJR | MDT_CMS | MDT_ADLIB | MDT_MIDI | MDT_PREFER_MT32, GF_DEMO, UNK, GUIO1(GUIO_NOSPEECH)},
 	{"monkey", "EGA",      "ega", GID_MONKEY_EGA, 4, 0, MDT_PCSPK | MDT_PCJR | MDT_CMS | MDT_ADLIB | MDT_MIDI | MDT_PREFER_MT32, GF_16COLOR,     Common::kPlatformDOS, GUIO1(GUIO_NOSPEECH)},
 	{"monkey", "No AdLib", "ega", GID_MONKEY_EGA, 4, 0, MDT_PCSPK | MDT_PCJR,                        GF_16COLOR,     Common::kPlatformAtariST, GUIO2(GUIO_NOSPEECH, GUIO_NOMIDI)},
-	{"monkey", "Demo",     "ega", GID_MONKEY_EGA, 4, 0, MDT_PCSPK | MDT_PCJR | MDT_CMS | MDT_ADLIB,            GF_16COLOR,     Common::kPlatformDOS, GUIO2(GUIO_NOSPEECH, GUIO_NOMIDI)},
+	{"monkey", "Demo",     "ega", GID_MONKEY_EGA, 4, 0, MDT_PCSPK | MDT_PCJR | MDT_CMS | MDT_ADLIB,            GF_16COLOR | GF_DEMO,     Common::kPlatformDOS, GUIO2(GUIO_NOSPEECH, GUIO_NOMIDI)},
 	{"monkey", "CD",           0, GID_MONKEY,     5, 0, MDT_ADLIB,                        GF_AUDIOTRACKS, UNK, GUIO2(GUIO_NOSPEECH, GUIO_NOMIDI)},
 	{"monkey", "Mac",    0, GID_MONKEY,     5, 0, MDT_ADLIB,                        0, UNK, GUIO2(GUIO_NOSPEECH, GUIO_NOMIDI)},
 	{"monkey", "FM-TOWNS",     0, GID_MONKEY,     5, 0, MDT_TOWNS,                        GF_AUDIOTRACKS, Common::kPlatformFMTowns, GUIO4(GUIO_NOSPEECH, GUIO_NOMIDI, GUIO_MIDITOWNS, GUIO_TRIM_FMTOWNS_TO_200_PIXELS)},
diff --git a/engines/scumm/script_v5.cpp b/engines/scumm/script_v5.cpp
index 9a6bf8ce794..70c7198bfbf 100644
--- a/engines/scumm/script_v5.cpp
+++ b/engines/scumm/script_v5.cpp
@@ -882,6 +882,23 @@ void ScummEngine_v5::o5_doSentence() {
 
 	int objectA = getVarOrDirectWord(PARAM_2);
 	int objectB = getVarOrDirectWord(PARAM_3);
+
+	//	HACK: breath mint(object 458) should only be given to actors.
+	//	Giving it to non-actor objects crashes the game.
+	//	The sentence doesn't run a script if the recipient is not an actor.
+	//	Trac #13196
+	//	This bug occurred always when breath mint was given to non-actor objects
+	// 	and sometimes when other non actor objects were given to breathe mint
+	//	Giving pot or red herring to breath mint triggered the bug as these two objects' scripts
+	//	reverse the sentence (in case if the user had reversed the items), effectively making the sentence
+	//	such that the breath mint is being given to the pot/red herring.
+	// 	But giving hunk o' meat to breath mint didn't trigger the bug as such reversal is not done
+	//	by hunk o' meat's script.
+	if (((_game.id == GID_MONKEY_VGA && (_game.features & GF_DEMO)) ||
+		 (_game.id == GID_MONKEY_EGA && (_game.features & GF_DEMO)))
+		&& verb == 3 && objectA == 458 && !isValidActor(objectB))
+		return;
+
 	doSentence(verb, objectA, objectB);
 }
 
diff --git a/engines/scumm/scumm-md5.h b/engines/scumm/scumm-md5.h
index be92c577062..b53789ab194 100644
--- a/engines/scumm/scumm-md5.h
+++ b/engines/scumm/scumm-md5.h
@@ -1,5 +1,5 @@
 /*
-  This file was generated by the md5table tool on Mon Feb  7 12:42:06 2022
+  This file was generated by the md5table tool on Sat Feb 26 17:16:50 2022
   DO NOT EDIT MANUALLY!
  */
 
@@ -267,7 +267,7 @@ static const MD5Table md5table[] = {
 	{ "5262a27afcaee04e5c4900220bd463e7", "PuttsFunShop", "", "", -1, Common::EN_USA, Common::kPlatformUnknown },
 	{ "52a4bae0746a11d7b1e8554e91a6645c", "zak", "V2", "V2", -1, Common::FR_FRA, Common::kPlatformDOS },
 	{ "53e94115b55dd51d4b8ff0871aa1df1e", "spyfox", "", "Demo", 20103, Common::EN_USA, Common::kPlatformUnknown },
-	{ "54a936ad06161ff7bfefcb96200f7bff", "monkey", "VGA", "Demo", 7617, Common::EN_ANY, Common::kPlatformAmiga },
+	{ "54a936ad06161ff7bfefcb96200f7bff", "monkey", "VGA Demo", "Demo", 7617, Common::EN_ANY, Common::kPlatformAmiga },
 	{ "55518cd73cf9c6d23ea29c51ee06bdfe", "ft", "", "", -1, Common::IT_ITA, Common::kPlatformUnknown },
 	{ "55b4494051b06e95bcaa0d6d8f6fb757", "atlantis", "Steam", "Humble", 286720, Common::EN_ANY, Common::kPlatformWindows },
 	{ "55e4cc866ff9046824e1c638ba2b8c7f", "ft", "", "Akella", -1, Common::RU_RUS, Common::kPlatformUnknown },




More information about the Scummvm-git-logs mailing list