aboutsummaryrefslogtreecommitdiff
path: root/engines/sci/engine/kfile.cpp
AgeCommit message (Collapse)Author
2017-04-22SCI: Move ScummVM save/restore to GuestAdditions and reimplement for SCI32Colin Snover
2017-02-27SCI: Fix up readString writing into too small bufferWillem Jan Palenstijn
This fixes QfG4 character import, which specifies a size of 52 for a buffer of size 40.
2017-02-05SCI: Use strnlen instead of strlen to avoid buffer overflowsColin Snover
2017-01-16SCI32: Fix loading save games in KQ7 1.51Colin Snover
2017-01-11SCI32: Remove backslashes from PQ:SWAT extra save game filesColin Snover
The original interpreter created subdirectories for each in-game profile, but copying this behaviour would add a lot of superfluous complexity to the save game system in ScummVM, and may not be portable to all supported platforms. Instead, when the game tries to save its files to a subdirectory, the backslash in the file name is replaced with an underscore so it can be created successfully on filesystems where backslash is an illegal file name character. This has a side-effect of causing all save games to be displayed under all profiles, instead of just the ones "belonging" to a particular profile, but this seems like a reasonable trade-off given that there is no reason to play this game with more than one profile.
2017-01-10SCI: Fix Unused Variable Compiler Warning when SCI32 is not enabled.D G Turner
The bytesWritten variable is not used if SCI32 is not enabled. Fixed by adding this and success flag to the debug console print.
2016-12-18SCI32: Fix handling of rewritable files opened with mode 1Colin Snover
In SSCI, all files opened through kFileIO are writable. Most of the time this does not matter and the engine can get away with using read-only streams, but when chase.dat is opened by Phant1 from the retry dialogue during the chase, it needs to be writable because game code puts a '98' marker in the chase data. If this write does not occur, the game gets stuck in a loop looking for the marker.
2016-12-18SCI: Fail gracefully when attempting to write to a read-only fdColin Snover
2016-12-18SCI: Remove restriction on backwards seekingColin Snover
SaveFileRewriteStream enables backwards seeking, which is necessary for the chase.dat in Phant1 to be parsed correctly by the game.
2016-10-09SCI32: Change storage type of int16 arrays to hold reg_ts insteadColin Snover
Memory references and integers in SSCI are both 16-bit numbers, so game scripts frequently (incorrectly) use an IntArray instead of an IDArray for holding references. Since references in ScummVM are 32-bit reg_ts, IntArray entries must be large enough to hold reg_ts in order to be compatible with game scripts that store references in integer arrays. The alternative solution is to find and patch all incorrect use of IntArray across all games. This is possible, but a bit risky from a save game stability perspective, since incorrect IntArray usage is sometimes not apparent until well after the array is instantiated (like GK1's global interview array). This change invalidates existing SCI32 save games.
2016-10-05SCI32: Fix deleting save games in native save/load dialogueColin Snover
2016-10-05SCI32: Fix version file read failure in LSL6hiresColin Snover
2016-09-30SCI32: Fix some buildbot compiler warningsColin Snover
2016-09-29SCI32: Fix warnings and incompatible save games when built without SCI32Colin Snover
2016-09-29SCI32: Emulate MGDX ego view metadataColin Snover
2016-09-29SCI32: Fix deleting save games in KQ7Colin Snover
2016-09-29SCI32: Fix multiple bugs in kSaveColin Snover
1. Shift save numbers up/down for game scripts that rely on save game numbers starting from 0 to work correctly 2. Add fake file operations to support KQ7 save games 3. Hide autosave games from native save/load list to match SSCI.
2016-09-29SCI32: Emulate Shivers 1 game score metadataColin Snover
2016-09-29SCI32: Fix read overflow when there are no save gamesColin Snover
SCI system scripts will always try to read once from the game IDs array even if the number of games is zero.
2016-09-29SCI32: Add handling for save cataloguesColin Snover
2016-09-29SCI32: Implement ScummVM save/loadColin Snover
2016-09-29SCI32: Correct return values for kFileIO operationsColin Snover
2016-09-29SCI32: Implement kSave for standard-save SCI32 gamesColin Snover
Games with custom save code (KQ7, MGDX, PQ:SWAT, Shivers) are not fully supported yet.
2016-09-29SCI32: Fix "new game" and auto-save functionalityColin Snover
2016-09-29SCI32: Start implementing kSave for SCI32Colin Snover
2016-09-29SCI32: Clean up and fix some SCI32-only kFileIO operationsColin Snover
2016-09-29SCI32: Fix kFileIOOpen signatureColin Snover
The mode argument is required in SCI32 too; Torin just had a script bug.
2016-09-29SCI32: Rewrite kArray & kStringColin Snover
This change invalidates earlier SCI32 save games, which separated arrays and strings in an incompatible manner. Old save games contain invalid references to a string segment which no longer exists, and contain incompatible array structures that lack critical type information.
2016-08-25SCI: Make kFileIORename use wrapped filenamesWillem Jan Palenstijn
This fixes deleting savegames in Phantasmagoria 1.
2016-08-23SCI32: Also handle game checks for "torinsg.cat" in TorinFilippos Karapetis
This shows the "Open..." button when continuing a game
2016-08-19SCI32: Partially implement kCDColin Snover
2016-08-11SCI32: Don't use autosave.cat in TorinWillem Jan Palenstijn
2016-07-29SCI32: Support Torin's autosave systemWillem Jan Palenstijn
Torin has two sets of saves: autosave.### and torinsg.###, both with their own slots and .cat file. The autosave system uses autosave.000 and autosave.001. It also checks the presence of autosave.cat to determine if it should show the chapter selection menu on startup.
2016-07-06SCI32: Add SaveFileRewriteStream for read/write access to filesWillem Jan Palenstijn
At least Phantasmagoria and PQ:SWAT require this. This adds a ReadStream/WriteStream to support this. It replaces the previous VirtualIndexFile which required reimplementation of most read/write functions.
2016-06-25SCI: Fix auto-saving in the fan-made Cascade QuestMartin Kiewitz
Script patch to change the fixed slot 999 to fixed slot 99 in the game scripts and additional code for kSaveGame, that checks for Cascade Quest + slot 99 and will then use ScummVM slot 0, which is our auto-save slot. Fixes bug #7007 Also added the game name to the other fan-made script patch.
2016-02-22SCI: Add hack for Pepper's Adventure in Time CDAUDIO issueMartin Kiewitz
Game checks for file CDAUDIO. Currently the kFileIO(Exists) code is working pretty slowly on at least Windows. Needs to get fixed properly by enhancing SaveFileManager(). This is primarily for branch 1.8.0.
2016-02-09SCI: Script patch for Mixed Up Mother Goose SCI1Martin Kiewitz
+ Mother Goose SCI1.1 Fixes graphic issues when restoring from GMM Also make the fix ups for Mixed Up Mother Goose, Jones + PQ2 get applied all the time (debugger command not included)
2016-02-05SCI: Blocking ScummVM auto-save slot 0 for savingMartin Kiewitz
Auto-saving is not used by SCI, but slot 0 is ScummVM "standard" for auto-saving, that's why it's not available for saving anymore. Jones still uses slot 0 for saving/restoring (because it's hardcoded and changing it would break it somewhat) Deleting + restoring is still possible of couse.
2016-01-02SCI: fix sciAudio support on some platformsMartin Kiewitz
The old code expected sciAudio FOpen calls to fail, because they contained a directory name. On AmigaOS those calls succeeded. Because of that at least on AmigaOS, sciAudio support didn't work at all. We now detect sciAudio FOpen calls and return a proper virtual file handle. This should fix it on all platforms. Also moved the SCI32 virtual save file handle from 200 to 32100.
2015-07-10SCI: Fix wording for commit fc14641Filippos Karapetis
2015-07-10SCI: Enable the save game menu option when dying in PQ2 - bug #6875Filippos Karapetis
This uses the same hack as the one used to reset the menus in Jones. I've tested some more SCI games, and they don't disable menu entries when loading a game. Hopefully, Jones and PQ2 are the only ones
2014-10-19SCI: Add notesWillem Jan Palenstijn
2014-10-19SCI: Enable some menus in Jones after restoring (bugs #6537 and #6723)Filippos Karapetis
The code path that is supposed to enable these never gets called when restoring from the main menu, or from the ScummVM launcher. Since the logic on when and what to enable is quite complex, the easiest thing to do is enable these entries manually after a game is loaded.
2014-06-02SCI: comment typo fixMartin Kiewitz
2014-06-02SCI: fix saving in mother goose sci0 (bug #6486)Martin Kiewitz
2014-03-28SCI: Initial implementation of the fanmade sciAudio libraryFilippos Karapetis
This is used in the fanmade games "LockerGnome Quest Redux" and "Betrayed Alliance"
2014-02-18SCI: Make GPL headers consistent in themselves.Johannes Schickel
2014-02-17SCI: Allow saving without a VERSION file in JonesFilippos Karapetis
Apparently, the original does the same. Fixes bug #6535
2013-11-23SCI: Janitorial - Fix spacing errorsStrangerke
2013-04-27SCI: Change wording for bug/further info referencesFilippos Karapetis