[Scummvm-cvs-logs] scummvm master -> 6926270ca7768d0a3f9876efec57960fa271e272

bluegr bluegr at gmail.com
Wed Oct 30 07:49:35 CET 2013


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

Summary:
27281d1566 SCI: Fix script bug #3615118 in Crazy Nick's Laura Bow
82b52fc644 SCI: Handle objects with a dot in their name
d58c5b89b5 SCI: Fix script bug #3615120 - "SCI: Crazy Nick Laura Bow - kReadNumber signature mismatch"
6926270ca7 SCI: Fix script bug #3615130 - "SCI: Hoyle3 - Uninitialized read error"


Commit: 27281d15666e0217b7235413c4ecdac10d3c5de0
    https://github.com/scummvm/scummvm/commit/27281d15666e0217b7235413c4ecdac10d3c5de0
Author: Filippos Karapetis (bluegr at gmail.com)
Date: 2013-10-29T23:47:45-07:00

Commit Message:
SCI: Fix script bug #3615118 in Crazy Nick's Laura Bow

Changed paths:
    engines/sci/engine/workarounds.cpp



diff --git a/engines/sci/engine/workarounds.cpp b/engines/sci/engine/workarounds.cpp
index 154ac8f..950e518 100644
--- a/engines/sci/engine/workarounds.cpp
+++ b/engines/sci/engine/workarounds.cpp
@@ -55,6 +55,7 @@ const SciWorkaroundEntry uninitializedReadWorkarounds[] = {
 	{ GID_CASTLEBRAIN,   280,   280,  0,         "programmer", "dispatchEvent",  -1,    0, { WORKAROUND_FAKE, 0xf } }, // pressing 'q' on the computer screen in the robot room, and closing the help dialog that pops up (bug #3039656). Moves the cursor to the view with the ID returned (in this case, the robot hand)
 	{ GID_CNICK_KQ,       -1,     0,  1,          "Character", "say",            -1,   -1, { WORKAROUND_FAKE,   0 } }, // checkers/backgammon, like in hoyle 3 - temps 504 and 505 - bug #3606025
 	{ GID_CNICK_KQ,       -1,   700,  0,           "gcWindow", "open",           -1,   -1, { WORKAROUND_FAKE,   0 } }, // when entering the control menu, like in hoyle 3
+	{ GID_CNICK_LAURABOW, -1,   700,  0,                 NULL, "open",           -1,   -1, { WORKAROUND_FAKE,   0 } }, // when entering control menu - bug #3615118 (same as the gcWindow workaround for Hoyle 3)
 	{ GID_CNICK_LONGBOW,   0,     0,  0,          "RH Budget", "init",           -1,    1, { WORKAROUND_FAKE,   0 } }, // when starting the game
 	{ GID_ECOQUEST,       -1,    -1,  0,                 NULL, "doVerb",         -1,    0, { WORKAROUND_FAKE,   0 } }, // almost clicking anywhere triggers this in almost all rooms
 	{ GID_FANMADE,       516,   979,  0,                   "", "export 0",       -1,   20, { WORKAROUND_FAKE,   0 } }, // Happens in Grotesteing after the logos


Commit: 82b52fc644f0af791c23e9fddace0256d82ca3b6
    https://github.com/scummvm/scummvm/commit/82b52fc644f0af791c23e9fddace0256d82ca3b6
Author: Filippos Karapetis (bluegr at gmail.com)
Date: 2013-10-29T23:47:46-07:00

Commit Message:
SCI: Handle objects with a dot in their name

An example is the object 'dominoes.opt' in Hoyle 3, script 101

Changed paths:
    engines/sci/console.cpp



diff --git a/engines/sci/console.cpp b/engines/sci/console.cpp
index 50fae61..80d8ab8 100644
--- a/engines/sci/console.cpp
+++ b/engines/sci/console.cpp
@@ -3840,10 +3840,15 @@ static int parse_reg_t(EngineState *s, const char *str, reg_t *dest, bool mayBeV
 			const char *tmp = Common::find(str_objname.begin(), str_objname.end(), '.');
 			if (tmp != str_objname.end()) {
 				index = strtol(tmp + 1, &endptr, 16);
-				if (*endptr)
-					return -1;
-				// Chop off the index
-				str_objname = Common::String(str_objname.c_str(), tmp);
+				if (*endptr) {
+					// The characters after the dot do not represent an index.
+					// This can happen if an object contains a dot in its name,
+					// like 'dominoes.opt' in Hoyle 3.
+					index = -1;
+				} else {
+					// Valid index found, chop it off
+					str_objname = Common::String(str_objname.c_str(), tmp);
+				}
 			}
 
 			// Replace all underscores in the name with spaces


Commit: d58c5b89b503df6add6e0b4db51b401465a384eb
    https://github.com/scummvm/scummvm/commit/d58c5b89b503df6add6e0b4db51b401465a384eb
Author: Filippos Karapetis (bluegr at gmail.com)
Date: 2013-10-29T23:47:46-07:00

Commit Message:
SCI: Fix script bug #3615120 - "SCI: Crazy Nick Laura Bow - kReadNumber signature mismatch"

Changed paths:
    engines/sci/engine/kernel_tables.h
    engines/sci/engine/workarounds.cpp
    engines/sci/engine/workarounds.h



diff --git a/engines/sci/engine/kernel_tables.h b/engines/sci/engine/kernel_tables.h
index d785818..39244bd 100644
--- a/engines/sci/engine/kernel_tables.h
+++ b/engines/sci/engine/kernel_tables.h
@@ -421,7 +421,7 @@ static SciKernelMapEntry s_kernelMap[] = {
 	{ MAP_CALL(PrevNode),          SIG_EVERYWHERE,           "n",                     NULL,            NULL },
 	{ MAP_CALL(PriCoord),          SIG_EVERYWHERE,           "i",                     NULL,            NULL },
 	{ MAP_CALL(Random),            SIG_EVERYWHERE,           "i(i)(i)",               NULL,            NULL },
-	{ MAP_CALL(ReadNumber),        SIG_EVERYWHERE,           "r",                     NULL,            NULL },
+	{ MAP_CALL(ReadNumber),        SIG_EVERYWHERE,           "r",                     NULL,            kReadNumber_workarounds },
 	{ MAP_CALL(RemapColors),       SIG_SCI11, SIGFOR_ALL,    "i(i)(i)(i)(i)",         NULL,            NULL },
 #ifdef ENABLE_SCI32
 	{ "RemapColors", kRemapColors32, SIG_SCI32, SIGFOR_ALL,  "i(i)(i)(i)(i)(i)",      NULL,            NULL },
diff --git a/engines/sci/engine/workarounds.cpp b/engines/sci/engine/workarounds.cpp
index 950e518..44aa75a 100644
--- a/engines/sci/engine/workarounds.cpp
+++ b/engines/sci/engine/workarounds.cpp
@@ -365,6 +365,13 @@ const SciWorkaroundEntry kNewWindow_workarounds[] = {
 };
 
 //    gameID,           room,script,lvl,          object-name, method-name,    call,index,                workaround
+const SciWorkaroundEntry kReadNumber_workarounds[] = {
+	{ GID_CNICK_LAURABOW,100,   101,  0,          "dominoes.opt", "doit",        -1,    0, { WORKAROUND_STILLCALL, 0 } }, // When dominoes.opt is present, the game scripts call kReadNumber with an extra integer parameter - bug #3615120
+	{ GID_HOYLE3,        100,   101,  0,          "dominoes.opt", "doit",        -1,    0, { WORKAROUND_STILLCALL, 0 } }, // When dominoes.opt is present, the game scripts call kReadNumber with an extra integer parameter - bug #3615120
+	SCI_WORKAROUNDENTRY_TERMINATOR
+};
+
+//    gameID,           room,script,lvl,          object-name, method-name,    call,index,                workaround
 const SciWorkaroundEntry kPaletteUnsetFlag_workarounds[] = {
 	{ GID_QFG4,          100,   100,  0,            "doMovie", "changeState",    -1,    0, { WORKAROUND_IGNORE,    0 } }, // after the Sierra logo, no flags are passed, thus the call is meaningless - bug #3034506
 	SCI_WORKAROUNDENTRY_TERMINATOR
diff --git a/engines/sci/engine/workarounds.h b/engines/sci/engine/workarounds.h
index 59054ae..d5e91b7 100644
--- a/engines/sci/engine/workarounds.h
+++ b/engines/sci/engine/workarounds.h
@@ -88,6 +88,7 @@ extern const SciWorkaroundEntry kIsObject_workarounds[];
 extern const SciWorkaroundEntry kMemory_workarounds[];
 extern const SciWorkaroundEntry kMoveCursor_workarounds[];
 extern const SciWorkaroundEntry kNewWindow_workarounds[];
+extern const SciWorkaroundEntry kReadNumber_workarounds[];
 extern const SciWorkaroundEntry kPaletteUnsetFlag_workarounds[];
 extern const SciWorkaroundEntry kSetCursor_workarounds[];
 extern const SciWorkaroundEntry kSetPort_workarounds[];


Commit: 6926270ca7768d0a3f9876efec57960fa271e272
    https://github.com/scummvm/scummvm/commit/6926270ca7768d0a3f9876efec57960fa271e272
Author: Filippos Karapetis (bluegr at gmail.com)
Date: 2013-10-29T23:47:46-07:00

Commit Message:
SCI: Fix script bug #3615130 - "SCI: Hoyle3 - Uninitialized read error"

Changed paths:
    engines/sci/engine/workarounds.cpp



diff --git a/engines/sci/engine/workarounds.cpp b/engines/sci/engine/workarounds.cpp
index 44aa75a..764a080 100644
--- a/engines/sci/engine/workarounds.cpp
+++ b/engines/sci/engine/workarounds.cpp
@@ -56,6 +56,7 @@ const SciWorkaroundEntry uninitializedReadWorkarounds[] = {
 	{ GID_CNICK_KQ,       -1,     0,  1,          "Character", "say",            -1,   -1, { WORKAROUND_FAKE,   0 } }, // checkers/backgammon, like in hoyle 3 - temps 504 and 505 - bug #3606025
 	{ GID_CNICK_KQ,       -1,   700,  0,           "gcWindow", "open",           -1,   -1, { WORKAROUND_FAKE,   0 } }, // when entering the control menu, like in hoyle 3
 	{ GID_CNICK_LAURABOW, -1,   700,  0,                 NULL, "open",           -1,   -1, { WORKAROUND_FAKE,   0 } }, // when entering control menu - bug #3615118 (same as the gcWindow workaround for Hoyle 3)
+	{ GID_CNICK_LAURABOW,100,   110,  0,                 NULL, "doit",           -1,   -1, { WORKAROUND_FAKE,   0 } }, // when changing the "Dominoes per hand" setting - bug #3615130
 	{ GID_CNICK_LONGBOW,   0,     0,  0,          "RH Budget", "init",           -1,    1, { WORKAROUND_FAKE,   0 } }, // when starting the game
 	{ GID_ECOQUEST,       -1,    -1,  0,                 NULL, "doVerb",         -1,    0, { WORKAROUND_FAKE,   0 } }, // almost clicking anywhere triggers this in almost all rooms
 	{ GID_FANMADE,       516,   979,  0,                   "", "export 0",       -1,   20, { WORKAROUND_FAKE,   0 } }, // Happens in Grotesteing after the logos
@@ -74,6 +75,7 @@ const SciWorkaroundEntry uninitializedReadWorkarounds[] = {
 	{ GID_HOYLE3,         -1,     0,  1,          "Character", "say",            -1,   -1, { WORKAROUND_FAKE,   0 } }, // when starting checkers or dominoes, first time a character says something - temps 504 and 505
 	{ GID_HOYLE3,         -1,   700,  0,           "gcWindow", "open",           -1,   -1, { WORKAROUND_FAKE,   0 } }, // when entering control menu
 	{ GID_HOYLE3,        100,   100,  0,        "dominoHand2", "cue",            -1,    1, { WORKAROUND_FAKE,   0 } }, // while playing domino - bug #3036918
+	{ GID_HOYLE3,        100,   110,  0,           "OKButton", "doit",           -1,   -1, { WORKAROUND_FAKE,   0 } }, // when changing the "Dominoes per hand" setting - bug #3615130
 	{ GID_HOYLE4,         -1,     0,  0,                 NULL, "open",           -1,   -1, { WORKAROUND_FAKE,   0 } }, // when selecting "Control" from the menu (temp vars 0-3) - bug #3039294
 	{ GID_HOYLE4,        910,    18,  0,                 NULL, "init",           -1,    0, { WORKAROUND_FAKE,   0 } }, // during tutorial - bug #3042756
 	{ GID_HOYLE4,        910,   910,  0,                 NULL, "setup",          -1,    3, { WORKAROUND_FAKE,   0 } }, // when selecting "Tutorial" from the main menu - bug #3039294






More information about the Scummvm-git-logs mailing list