aboutsummaryrefslogtreecommitdiff
path: root/engines/sci
diff options
context:
space:
mode:
authorLars Skovlund2010-09-09 12:44:34 +0000
committerLars Skovlund2010-09-09 12:44:34 +0000
commit065e19092a48c85089bef3c7e1a07b92bf3453b2 (patch)
treefc40203f6510ac82529e41cd42749bc3cc72cd85 /engines/sci
parent16a7046519e1d0c355358e722e968a0c7de24b02 (diff)
downloadscummvm-rg350-065e19092a48c85089bef3c7e1a07b92bf3453b2.tar.gz
scummvm-rg350-065e19092a48c85089bef3c7e1a07b92bf3453b2.tar.bz2
scummvm-rg350-065e19092a48c85089bef3c7e1a07b92bf3453b2.zip
SCI: Support push and pop subfunctions in kMessage()
Glossary seems to work now. svn-id: r52654
Diffstat (limited to 'engines/sci')
-rw-r--r--engines/sci/engine/kstring.cpp16
1 files changed, 12 insertions, 4 deletions
diff --git a/engines/sci/engine/kstring.cpp b/engines/sci/engine/kstring.cpp
index 9254bce9c1..37bd265b57 100644
--- a/engines/sci/engine/kstring.cpp
+++ b/engines/sci/engine/kstring.cpp
@@ -486,10 +486,12 @@ reg_t kMessage(EngineState *s, int argc, reg_t *argv) {
}
#endif
- if ((func != K_MESSAGE_NEXT) && (argc < 2)) {
- warning("Message: not enough arguments passed to subfunction %d", func);
- return NULL_REG;
- }
+// TODO: Perhaps fix this check, currently doesn't work with PUSH and POP subfunctions
+// Pepper uses them to to handle the glossary
+// if ((func != K_MESSAGE_NEXT) && (argc < 2)) {
+// warning("Message: not enough arguments passed to subfunction %d", func);
+// return NULL_REG;
+// }
MessageTuple tuple;
@@ -558,6 +560,12 @@ reg_t kMessage(EngineState *s, int argc, reg_t *argv) {
return NULL_REG;
}
+ case K_MESSAGE_PUSH:
+ s->_msgState->pushCursorStack();
+ break;
+ case K_MESSAGE_POP:
+ s->_msgState->popCursorStack();
+ break;
default:
warning("Message: subfunction %i invoked (not implemented)", func);
}