diff options
author | Filippos Karapetis | 2013-01-23 03:14:51 +0200 |
---|---|---|
committer | Filippos Karapetis | 2013-01-23 03:17:10 +0200 |
commit | b1ff5ba24735271ab97b9430d3dd848987a74d7d (patch) | |
tree | 70595b06416e104e8919159ccfde603397f9325b /engines/sci/engine | |
parent | 6476ba33d23135ace4550d6dc79f40e5f607386f (diff) | |
download | scummvm-rg350-b1ff5ba24735271ab97b9430d3dd848987a74d7d.tar.gz scummvm-rg350-b1ff5ba24735271ab97b9430d3dd848987a74d7d.tar.bz2 scummvm-rg350-b1ff5ba24735271ab97b9430d3dd848987a74d7d.zip |
SCI: Slight cleanup in kMessage()
Diffstat (limited to 'engines/sci/engine')
-rw-r--r-- | engines/sci/engine/kstring.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/engines/sci/engine/kstring.cpp b/engines/sci/engine/kstring.cpp index c4db0b891c..cdc50ca440 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); |