aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthew Hoops2010-07-27 15:45:21 +0000
committerMatthew Hoops2010-07-27 15:45:21 +0000
commitcf26b88e54983f8a8d73b640f817967c6fcd5d89 (patch)
treeb5066a8ba9fd31f81db42d5ed2609eb56b0be39f
parent7024991cc99bf5a964fceeae62057a1d5e501c51 (diff)
downloadscummvm-rg350-cf26b88e54983f8a8d73b640f817967c6fcd5d89.tar.gz
scummvm-rg350-cf26b88e54983f8a8d73b640f817967c6fcd5d89.tar.bz2
scummvm-rg350-cf26b88e54983f8a8d73b640f817967c6fcd5d89.zip
SCI: Fix bug #3035058 - ECOQUEST demo: Missing subtitles
The demo uses a special version of kMessage to get its messages. svn-id: r51376
-rw-r--r--engines/sci/engine/kstring.cpp15
1 files changed, 14 insertions, 1 deletions
diff --git a/engines/sci/engine/kstring.cpp b/engines/sci/engine/kstring.cpp
index 3a7bb30c80..76541f78e0 100644
--- a/engines/sci/engine/kstring.cpp
+++ b/engines/sci/engine/kstring.cpp
@@ -456,7 +456,8 @@ enum kMessageFunc {
K_MESSAGE_REFNOUN,
K_MESSAGE_PUSH,
K_MESSAGE_POP,
- K_MESSAGE_LASTMESSAGE
+ K_MESSAGE_LASTMESSAGE,
+ K_MESSAGE_ECOQUEST1_DEMO = 99
};
reg_t kGetMessage(EngineState *s, int argc, reg_t *argv) {
@@ -558,6 +559,18 @@ reg_t kMessage(EngineState *s, int argc, reg_t *argv) {
return NULL_REG;
}
+ case K_MESSAGE_ECOQUEST1_DEMO:
+ // The EcoQuest 1 demo uses a special version of kMessage. It's one of the
+ // earliest SCI 1.1 games. The noun is always 99 in this case, so we can
+ // treat it as a subop. If any other games require this syntax, we can change
+ // this to work with those games too.
+
+ if (g_sci->getGameId() != GID_ECOQUEST || !g_sci->isDemo())
+ error("kMessage called with EcoQuest 1 demo syntax in a different game");
+
+ tuple.noun = argv[0].toUint16();
+ tuple.verb = argv[2].toUint16();
+ return make_reg(0, s->_msgState->getMessage(argv[1].toUint16(), tuple, argv[3]));
default:
warning("Message: subfunction %i invoked (not implemented)", func);
}