diff options
author | sluicebox | 2019-12-09 22:55:33 -0800 |
---|---|---|
committer | sluicebox | 2019-12-09 22:57:46 -0800 |
commit | d43163b37cf4bc753f99fb8817a7ab3dac15236c (patch) | |
tree | d708313fa526453740193c990ef88f618cf8cf13 /engines/sci | |
parent | baea8d5c9c35aed1ebfde4891c9130dc550a58ad (diff) | |
download | scummvm-rg350-d43163b37cf4bc753f99fb8817a7ab3dac15236c.tar.gz scummvm-rg350-d43163b37cf4bc753f99fb8817a7ab3dac15236c.tar.bz2 scummvm-rg350-d43163b37cf4bc753f99fb8817a7ab3dac15236c.zip |
SCI32: Fix PHANT1 save file interoperability
Phantasmagoria 1 save files are uncompressed because they are small
and interoperable with the original interpreter, but the game scripts
frequently rename them. Renaming save files unconditionally compresses
the result and so only some files have been interoperable.
Phantasmagoria 1 files now remain uncompressed when renamed.
Diffstat (limited to 'engines/sci')
-rw-r--r-- | engines/sci/engine/kfile.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/engines/sci/engine/kfile.cpp b/engines/sci/engine/kfile.cpp index 007f8056a7..1e3f8bfd4c 100644 --- a/engines/sci/engine/kfile.cpp +++ b/engines/sci/engine/kfile.cpp @@ -900,9 +900,13 @@ reg_t kFileIORename(EngineState *s, int argc, reg_t *argv) { oldName = g_sci->wrapFilename(oldName); newName = g_sci->wrapFilename(newName); + // Phantasmagoria 1 files are small and interoperable with the + // original interpreter so they aren't compressed, see file_open(). + bool isCompressed = (g_sci->getGameId() != GID_PHANTASMAGORIA); + // SCI1.1 returns 0 on success and a DOS error code on fail. SCI32 // returns -1 on fail. We just return -1 for all versions. - if (g_sci->getSaveFileManager()->renameSavefile(oldName, newName)) + if (g_sci->getSaveFileManager()->renameSavefile(oldName, newName, isCompressed)) return NULL_REG; else return SIGNAL_REG; |