aboutsummaryrefslogtreecommitdiff
path: root/engines/sci
diff options
context:
space:
mode:
authorFilippos Karapetis2012-07-08 15:58:50 +0300
committerFilippos Karapetis2012-07-08 16:15:45 +0300
commit2ef3f5e6957ce072f9bb5df0fe3f65da578b836c (patch)
treebecd780492e15ece5b12de025ab0cfdba5d0b235 /engines/sci
parent4c43d6d85dc70e1b9b82629f1af1e9a37a136013 (diff)
downloadscummvm-rg350-2ef3f5e6957ce072f9bb5df0fe3f65da578b836c.tar.gz
scummvm-rg350-2ef3f5e6957ce072f9bb5df0fe3f65da578b836c.tar.bz2
scummvm-rg350-2ef3f5e6957ce072f9bb5df0fe3f65da578b836c.zip
SCI: Update the virtual file selected in the QFG4 character import screen
This makes the character import screen in QFG4 functional, as the virtual file index was never updated
Diffstat (limited to 'engines/sci')
-rw-r--r--engines/sci/engine/kgraphics.cpp6
-rw-r--r--engines/sci/engine/klists.cpp5
2 files changed, 9 insertions, 2 deletions
diff --git a/engines/sci/engine/kgraphics.cpp b/engines/sci/engine/kgraphics.cpp
index ec8e0dbf1b..5b483eb4a2 100644
--- a/engines/sci/engine/kgraphics.cpp
+++ b/engines/sci/engine/kgraphics.cpp
@@ -950,8 +950,8 @@ reg_t kDrawControl(EngineState *s, int argc, reg_t *argv) {
}
}
if (objName == "savedHeros") {
- // Import of QfG character files dialog is shown
- // display additional popup information before letting user use it
+ // Import of QfG character files dialog is shown.
+ // display additional popup information before letting user use it.
reg_t changeDirButton = s->_segMan->findObjectByName("changeDirItem");
if (!changeDirButton.isNull()) {
// check if checkDirButton is still enabled, in that case we are called the first time during that room
@@ -964,6 +964,8 @@ reg_t kDrawControl(EngineState *s, int argc, reg_t *argv) {
"for Quest for Glory 2. Example: 'qfg2-thief.sav'.");
}
}
+
+ // For the SCI32 version of this, check kListAt().
s->_chosenQfGImportItem = readSelectorValue(s->_segMan, controlObject, SELECTOR(mark));
}
diff --git a/engines/sci/engine/klists.cpp b/engines/sci/engine/klists.cpp
index 15d18eb4bb..342fa95eda 100644
--- a/engines/sci/engine/klists.cpp
+++ b/engines/sci/engine/klists.cpp
@@ -506,6 +506,11 @@ reg_t kListAt(EngineState *s, int argc, reg_t *argv) {
curIndex++;
}
+ // Update the virtual file selected in the character import screen of QFG4.
+ // For the SCI0-SCI1.1 version of this, check kDrawControl().
+ if (g_sci->inQfGImportRoom() && !strcmp(s->_segMan->getObjectName(curObject), "SelectorDText"))
+ s->_chosenQfGImportItem = listIndex;
+
return curObject;
}