aboutsummaryrefslogtreecommitdiff
path: root/engines/prince
diff options
context:
space:
mode:
authorlukaslw2014-06-16 22:06:53 +0200
committerlukaslw2014-06-22 20:09:12 +0200
commit85628b293999f71fb8918096a273ba63651a9152 (patch)
treef44ea34879f235f99d3cd341adfc961a5b694d08 /engines/prince
parente452e088f43d88a11c3fb8e820345269957da13e (diff)
downloadscummvm-rg350-85628b293999f71fb8918096a273ba63651a9152.tar.gz
scummvm-rg350-85628b293999f71fb8918096a273ba63651a9152.tar.bz2
scummvm-rg350-85628b293999f71fb8918096a273ba63651a9152.zip
PRINCE: O_INITDIALOG(), O_SHOWDIALOGBOX() update
Diffstat (limited to 'engines/prince')
-rw-r--r--engines/prince/script.cpp15
1 files changed, 15 insertions, 0 deletions
diff --git a/engines/prince/script.cpp b/engines/prince/script.cpp
index 944de69c29..c559d3f54c 100644
--- a/engines/prince/script.cpp
+++ b/engines/prince/script.cpp
@@ -1220,6 +1220,14 @@ void Interpreter::O_SUBSTRING() {
void Interpreter::O_INITDIALOG() {
debugInterpreter("O_INITDIALOG");
+ for (uint i = 0; i < _vm->_dialogBoxList.size(); i++) {
+ _vm->_dialogBoxList[i].clear();
+ }
+ _vm->_dialogBoxList.clear();
+
+ // cut string to dialogs
+ // cut dialogs to nr and lines
+ // push them to dialogBoxList
}
void Interpreter::O_ENABLEDIALOGOPT() {
@@ -1236,6 +1244,13 @@ void Interpreter::O_SHOWDIALOGBOX() {
uint16 box = readScriptFlagValue();
debugInterpreter("O_SHOWDIALOGBOX box %d", box);
_vm->createDialogBox(_vm->_dialogBoxList[box]);
+ int dialogLines = _vm->_dialogBoxList[box].size();
+ _flags->setFlagValue(Flags::DIALINES, dialogLines);
+ if (dialogLines != 0) {
+ _vm->changeCursor(1);
+ _vm->runDialog();
+ _vm->changeCursor(0);
+ }
}
void Interpreter::O_STOPSAMPLE() {