diff options
author | Colin Snover | 2017-07-24 00:57:13 -0500 |
---|---|---|
committer | Colin Snover | 2017-07-24 19:36:36 -0500 |
commit | dbdbb9b5b3bbf39b9075cc39aa38a51a43cdd5ec (patch) | |
tree | 4cd2a5c59725a015e24a46736862611231e8dd54 /engines/sci | |
parent | bfa6ad51558498106d856cec4dfa1c2ec60a7a04 (diff) | |
download | scummvm-rg350-dbdbb9b5b3bbf39b9075cc39aa38a51a43cdd5ec.tar.gz scummvm-rg350-dbdbb9b5b3bbf39b9075cc39aa38a51a43cdd5ec.tar.bz2 scummvm-rg350-dbdbb9b5b3bbf39b9075cc39aa38a51a43cdd5ec.zip |
SCI32: Match 4-language MGDX extra save game data
Diffstat (limited to 'engines/sci')
-rw-r--r-- | engines/sci/engine/kfile.cpp | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/engines/sci/engine/kfile.cpp b/engines/sci/engine/kfile.cpp index 6c96607664..1a6695f882 100644 --- a/engines/sci/engine/kfile.cpp +++ b/engines/sci/engine/kfile.cpp @@ -367,7 +367,16 @@ reg_t kFileIOOpen(EngineState *s, int argc, reg_t *argv) { // Create a virtual file containing the save game description // and avatar ID, as the game scripts expect. int saveNo; - sscanf(name.c_str(), "%d.DTA", &saveNo); + + // The 4-language release uses a slightly different filename + // structure that includes the letter of the language at the start + // of the filename + const int skip = name.firstChar() < '0' || name.firstChar() > '9'; + + if (sscanf(name.c_str() + skip, "%i.DTA", &saveNo) != 1) { + warning("Could not parse game filename %s", name.c_str()); + } + saveNo += kSaveIdShift; SavegameDesc save; |