aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--engines/sci/engine/kfile.cpp10
-rw-r--r--engines/sci/sci.cpp5
2 files changed, 10 insertions, 5 deletions
diff --git a/engines/sci/engine/kfile.cpp b/engines/sci/engine/kfile.cpp
index 27ae7f1493..5c8179103c 100644
--- a/engines/sci/engine/kfile.cpp
+++ b/engines/sci/engine/kfile.cpp
@@ -844,13 +844,15 @@ reg_t kFileIOFindFirst(EngineState *s, int argc, reg_t *argv) {
int attr = argv[2].toUint16(); // We won't use this, Win32 might, though...
debugC(2, kDebugLevelFile, "kFileIO(findFirst): %s, 0x%x", mask.c_str(), attr);
+ // QfG3 uses "/\*.*" for the character import, QfG4 uses "/\*"
+ if (mask.hasPrefix("/\\")) {
+ mask.deleteChar(0);
+ mask.deleteChar(0);
+ }
+
// We remove ".*". mask will get prefixed, so we will return all additional files for that gameid
if (mask == "*.*")
mask = "*";
-
- // QfG3 uses this mask for the character import
- if (mask == "/\\*.*")
- mask = "*";
return s->_dirseeker.firstFile(mask, buf, s->_segMan);
}
diff --git a/engines/sci/sci.cpp b/engines/sci/sci.cpp
index 1ebc6a2ba3..4601092af8 100644
--- a/engines/sci/sci.cpp
+++ b/engines/sci/sci.cpp
@@ -497,8 +497,11 @@ Common::String SciEngine::getFilePrefix() const {
// Quest for Glory 3 wants to read files from Quest for Glory 2 to import character data
if (_gamestate->currentRoomNumber() == 54)
return "qfg2";
+ } else if (_gameId == GID_QFG4) {
+ // Quest for Glory 4 wants to read files from Quest for Glory 3 to import character data
+ if (_gamestate->currentRoomNumber() == 54)
+ return "qfg3";
}
- // TODO: Implement the same for qfg4, when sci32 is good enough
return _targetName;
}