[Scummvm-tracker] [ScummVM :: Bugs] #12060: SCI: GK1: Can not restore saved game.
ScummVM :: Bugs
trac at scummvm.org
Tue Feb 2 20:53:01 UTC 2021
#12060: SCI: GK1: Can not restore saved game.
---------------------+-------------------------------
Reporter: vanfanel | Owner: sluicebox
Type: defect | Status: closed
Priority: normal | Component: Engine: SCI
Version: | Resolution: fixed
Keywords: | Game: Gabriel Knight 1
---------------------+-------------------------------
Changes (by sluicebox):
* owner: (none) => sluicebox
* status: new => closed
* resolution: => fixed
Comment:
SCI games depend on many game-specific and version-specific files and if
they're run without them they'll fail in different ways. GK1 has dozens of
files that are indirectly relied upon. The SCI instructions are to copy
all of the files:
https://wiki.scummvm.org/index.php/Datafiles#All_SCI32_.28SCI2.2F3.29_games
The gibberish bytes are because ScummVM returns uninitialized memory when
reading a string from an invalid file handle. The GK1 game scripts don't
do any error checking when reading VERSION (which Sierra fixed in later
SCI32 games) so when there's no VERSION you're getting random bytes. Those
random bytes got saved in save-files and then and compared to new random
bytes upon Restore with unpredictable results. You can see this because
ScummVM always logs "WARNING: Attempt to use invalid/unused file handle
65535!" when you start GK1 without VERSION.
I've improved this slightly by changing ScummVM to always initialize
kFileIOReadString's output so that the results will be consistent. Now if
you save a GK1 game without a VERSION file it will still load if you don't
have the VERSION file. But that just keeps a bad situation from getting
worse.
The real problem here was missing game files. You gotta have 'em all! =)
https://github.com/scummvm/scummvm/commit/89c67944f4c0d51c1fc6f81c2bbc3c78ca862812
--
Ticket URL: <https://bugs.scummvm.org/ticket/12060#comment:5>
ScummVM :: Bugs <https://bugs.scummvm.org>
ScummVM
More information about the Scummvm-tracker
mailing list