[Scummvm-cvs-logs] scummvm master -> 0968acccfd36e4871fbd781815ce89c65f49aead
bluegr
bluegr at gmail.com
Wed Jan 23 02:18:17 CET 2013
This automated email contains information about 2 new commits which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .
Summary:
b1ff5ba247 SCI: Slight cleanup in kMessage()
0968acccfd SCI: Fix script bug #3601090 - "SCI: Pepper's Adventures in Time: Game becomes unsolvable"
Commit: b1ff5ba24735271ab97b9430d3dd848987a74d7d
https://github.com/scummvm/scummvm/commit/b1ff5ba24735271ab97b9430d3dd848987a74d7d
Author: Filippos Karapetis (bluegr at gmail.com)
Date: 2013-01-22T17:17:10-08:00
Commit Message:
SCI: Slight cleanup in kMessage()
Changed paths:
engines/sci/engine/kstring.cpp
diff --git a/engines/sci/engine/kstring.cpp b/engines/sci/engine/kstring.cpp
index c4db0b8..cdc50ca 100644
--- a/engines/sci/engine/kstring.cpp
+++ b/engines/sci/engine/kstring.cpp
@@ -489,6 +489,7 @@ reg_t kGetMessage(EngineState *s, int argc, reg_t *argv) {
reg_t kMessage(EngineState *s, int argc, reg_t *argv) {
uint func = argv[0].toUint16();
+ uint16 module = (argc >= 2) ? argv[1].toUint16() : 0;
#ifdef ENABLE_SCI32
if (getSciVersion() >= SCI_VERSION_2) {
@@ -520,17 +521,17 @@ reg_t kMessage(EngineState *s, int argc, reg_t *argv) {
switch (func) {
case K_MESSAGE_GET:
- return make_reg(0, s->_msgState->getMessage(argv[1].toUint16(), tuple, (argc == 7 ? argv[6] : NULL_REG)));
+ return make_reg(0, s->_msgState->getMessage(module, tuple, (argc == 7 ? argv[6] : NULL_REG)));
case K_MESSAGE_NEXT:
return make_reg(0, s->_msgState->nextMessage((argc == 2 ? argv[1] : NULL_REG)));
case K_MESSAGE_SIZE:
- return make_reg(0, s->_msgState->messageSize(argv[1].toUint16(), tuple));
+ return make_reg(0, s->_msgState->messageSize(module, tuple));
case K_MESSAGE_REFCOND:
case K_MESSAGE_REFVERB:
case K_MESSAGE_REFNOUN: {
MessageTuple t;
- if (s->_msgState->messageRef(argv[1].toUint16(), tuple, t)) {
+ if (s->_msgState->messageRef(module, tuple, t)) {
switch (func) {
case K_MESSAGE_REFCOND:
return make_reg(0, t.cond);
Commit: 0968acccfd36e4871fbd781815ce89c65f49aead
https://github.com/scummvm/scummvm/commit/0968acccfd36e4871fbd781815ce89c65f49aead
Author: Filippos Karapetis (bluegr at gmail.com)
Date: 2013-01-22T17:17:10-08:00
Commit Message:
SCI: Fix script bug #3601090 - "SCI: Pepper's Adventures in Time: Game becomes unsolvable"
Many thanks to lskovlun for debugging this problem and finding the
offending script code that caused it.
Changed paths:
engines/sci/engine/kstring.cpp
diff --git a/engines/sci/engine/kstring.cpp b/engines/sci/engine/kstring.cpp
index cdc50ca..3838c68 100644
--- a/engines/sci/engine/kstring.cpp
+++ b/engines/sci/engine/kstring.cpp
@@ -519,6 +519,30 @@ reg_t kMessage(EngineState *s, int argc, reg_t *argv) {
if (argc >= 6)
tuple = MessageTuple(argv[2].toUint16(), argv[3].toUint16(), argv[4].toUint16(), argv[5].toUint16());
+ // WORKAROUND for a script bug in Pepper. When using objects together,
+ // there is code inside script 894 that shows appropriate messages.
+ // In the case of the jar of cabbage (noun 26), the relevant message
+ // shown when using any object with it is missing. This leads to the
+ // script code being triggered, which modifies the jar's noun and
+ // message selectors, and renders it useless. Thus, when using any
+ // object with the jar of cabbage, it's effectively corrupted, and
+ // can't be used on the goat to empty it, therefore the game reaches
+ // an unsolvable state. It's almost impossible to patch the offending
+ // script, as it is used in many cases. But we can prevent the
+ // corruption of the jar here: if the message is found, the offending
+ // code is never reached and the jar is never corrupted. To do this,
+ // we substitute all verbs on the cabbage jar with the default verb,
+ // which shows the "Cannot use this object with the jar" message, and
+ // never triggers the offending script code that corrupts the object.
+ // This only affects the jar of cabbage - any other object, including
+ // the empty jar has a different noun, thus it's unaffected.
+ // Fixes bug #3601090.
+ // NOTE: To fix a corrupted jar object, type "send Glass_Jar message 52"
+ // in the debugger.
+ if (g_sci->getGameId() == GID_PEPPER && func == 0 && argc >= 6 && module == 894 &&
+ tuple.noun == 26 && tuple.cond == 0 && tuple.seq == 1)
+ tuple.verb = 0;
+
switch (func) {
case K_MESSAGE_GET:
return make_reg(0, s->_msgState->getMessage(module, tuple, (argc == 7 ? argv[6] : NULL_REG)));
More information about the Scummvm-git-logs
mailing list