diff options
author | Max Horn | 2009-12-04 14:25:31 +0000 |
---|---|---|
committer | Max Horn | 2009-12-04 14:25:31 +0000 |
commit | abbf2bf16214eddf1394e62ae052d8505cba4d3b (patch) | |
tree | 7a2e821ed91cffc7a0400b00173e157423bde991 /engines/scumm | |
parent | dde874392354ac625ccb61409053095bf39204df (diff) | |
download | scummvm-rg350-abbf2bf16214eddf1394e62ae052d8505cba4d3b.tar.gz scummvm-rg350-abbf2bf16214eddf1394e62ae052d8505cba4d3b.tar.bz2 scummvm-rg350-abbf2bf16214eddf1394e62ae052d8505cba4d3b.zip |
Fix bug 2908376: FOA: Won't launch in Win32
svn-id: r46250
Diffstat (limited to 'engines/scumm')
-rw-r--r-- | engines/scumm/script_v5.cpp | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/engines/scumm/script_v5.cpp b/engines/scumm/script_v5.cpp index b86eb2b476..8091517c3f 100644 --- a/engines/scumm/script_v5.cpp +++ b/engines/scumm/script_v5.cpp @@ -1753,6 +1753,12 @@ void ScummEngine_v5::o5_roomOps() { case 13: // SO_SAVE_STRING { + // This subopcode is used in Indy 4 to save the IQ points data. + // No other game uses it. We use this to replace the given filename by + // one based on the targetname ("TARGET.iq"). + // This way, the iq data of each Indy 4 variant a user might have stays + // separate. Moreover, the filename now clearly reflects to which target + // it belongs (as it should). Common::String filename; char chr; @@ -1760,7 +1766,7 @@ void ScummEngine_v5::o5_roomOps() { while ((chr = fetchScriptByte())) filename += chr; - if (filename.hasPrefix("iq-") || filename.hasPrefix("IQ-") || filename.hasSuffix("-iq") || filename.hasSuffix("-IQ")) { + if (_game.id == GID_INDY4) { filename = _targetName + ".iq"; } else { error("SO_SAVE_STRING: Unsupported filename %s", filename.c_str()); @@ -1778,6 +1784,8 @@ void ScummEngine_v5::o5_roomOps() { } case 14: // SO_LOAD_STRING { + // This subopcode is used in Indy 4 to load the IQ points data. + // See SO_SAVE_STRING for details Common::String filename; char chr; @@ -1785,7 +1793,7 @@ void ScummEngine_v5::o5_roomOps() { while ((chr = fetchScriptByte())) filename += chr; - if (filename.hasPrefix("iq-") || filename.hasPrefix("IQ-") || filename.hasSuffix("-iq") || filename.hasSuffix("-IQ")) { + if (_game.id == GID_INDY4) { filename = _targetName + ".iq"; } else { error("SO_LOAD_STRING: Unsupported filename %s", filename.c_str()); |