aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
authorMartin Kiewitz2016-02-05 18:40:14 +0100
committerMartin Kiewitz2016-02-05 18:40:14 +0100
commitc61c89dd350b765ec1b3d39097e250c042d5358b (patch)
tree5d31ccc7a7bb9df2b6fdf979785c4908fb6706dc /engines
parentbdec938dd2cbc6bc29ce6b3cf4e3d3ae72c3ccf2 (diff)
downloadscummvm-rg350-c61c89dd350b765ec1b3d39097e250c042d5358b.tar.gz
scummvm-rg350-c61c89dd350b765ec1b3d39097e250c042d5358b.tar.bz2
scummvm-rg350-c61c89dd350b765ec1b3d39097e250c042d5358b.zip
SCI: QfG1/2/3/4 character file detection changed
No longer checking for .sav file suffix, but instead checking room number instead. The user is able to change the suffix, which would have resulted in a compressed character file.
Diffstat (limited to 'engines')
-rw-r--r--engines/sci/engine/file.cpp30
1 files changed, 23 insertions, 7 deletions
diff --git a/engines/sci/engine/file.cpp b/engines/sci/engine/file.cpp
index a602cb4503..0b1001bfda 100644
--- a/engines/sci/engine/file.cpp
+++ b/engines/sci/engine/file.cpp
@@ -66,13 +66,29 @@ reg_t file_open(EngineState *s, const Common::String &filename, int mode, bool u
bool isCompressed = true;
const SciGameId gameId = g_sci->getGameId();
- if ((gameId == GID_QFG1 || gameId == GID_QFG1VGA || gameId == GID_QFG2 || gameId == GID_QFG3)
- && englishName.hasSuffix(".sav")) {
- // QFG Characters are saved via the CharSave object.
- // We leave them uncompressed so that they can be imported in later QFG
- // games.
- // Rooms/Scripts: QFG1: 601, QFG2: 840, QFG3/4: 52
- isCompressed = false;
+
+ // QFG Characters are saved via the CharSave object.
+ // We leave them uncompressed so that they can be imported in later QFG
+ // games, even when using the original interpreter.
+ // We check for room numbers in here, because the file suffix can be changed by the user.
+ // Rooms/Scripts: QFG1(EGA/VGA): 601, QFG2: 840, QFG3/4: 52
+ switch (gameId) {
+ case GID_QFG1:
+ case GID_QFG1VGA:
+ if (s->currentRoomNumber() == 601)
+ isCompressed = false;
+ break;
+ case GID_QFG2:
+ if (s->currentRoomNumber() == 840)
+ isCompressed = false;
+ break;
+ case GID_QFG3:
+ case GID_QFG4:
+ if (s->currentRoomNumber() == 52)
+ isCompressed = false;
+ break;
+ default:
+ break;
}
if (mode == _K_FILE_MODE_OPEN_OR_FAIL) {