aboutsummaryrefslogtreecommitdiff
path: root/engines/sci/engine/file.cpp
AgeCommit message (Collapse)Author
2017-09-24SCI32: Remove unnecessary negative assertion check on unsigned integerColin Snover
Fixes CID 1381416.
2017-09-23SCI32: Support RAMA's custom save games through kFileIOColin Snover
2017-09-23SCI: Use reference instead of pointer for required out-data in metadata save ↵Colin Snover
function
2017-09-23SCI: Clean-ups to file handling codeColin Snover
Preparations for adding support for RAMA's custom save game format.
2017-07-26SCI32: Fix truncated save game names in Phant2Colin Snover
Phant2 creates save game names that append "<PROTECTED>" at the end of the game name, with an assumption that the game name is always exactly 36 characters long. This seems to be OK with other games too (tested GK1, SQ6, and Torin).
2017-05-13SCI32: Make sure all save game validity checks are in kCheckSaveGame32Colin Snover
Save game metadata validity checks in SCI32 should all exist within kCheckSaveGame32 since this allows most games to recover successfully from an attempt to load an invalid save game. If gamestate_restore fails, the game will usually crash because the engine is left in an inconsistent state (game scripts have cleaned up objects in preparation for a game load that is no longer happening).
2017-02-05SCI: Fix more unsafe C-string usageColin Snover
2017-01-16SCI32: Disable compression on Hoyle5 options filesColin Snover
Compression overhead takes up more space than uncompressed files, plus the uncompressed files it creates are marginally quicker and easier to debug with external tools.
2017-01-09SCI32: Disable compression for Phantasmagoria save filesColin Snover
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-18SCI32: Fix overwriting of file content when opened in append modeColin Snover
Fixes Trac#9586, Trac#9587.
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 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-29SCI: Split savegame descriptor fill code from savegame list codeColin Snover
The descriptor is used to check the validity of single savegames in SCI32.
2016-09-29SCI32: Start implementing kSave for SCI32Colin Snover
2016-08-25SCI32: Also handle chase.dat in Phantasmagoria like phantsg.dirFilippos Karapetis
This file is used during the chase sequence, and needs the same read/write logic as phantsg.dir
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-02-05SCI: QfG1/2/3/4 character file detection changedMartin Kiewitz
No longer checking for .sav file suffix, but instead checking room number instead. The user is able to change the suffix, which would have resulted in a compressed character file.
2016-01-05SCI: fix compatibility issue in kFileIOMartin Kiewitz
Allow 0xFFFF as invalid file handle again for kFileIO calls Fan game "Dating Pool" opens a non-existant file at the start and tries to read it, even though it shouldn't do the latter. The sciAudio adjustments changed our behavior to error() out in such a case. This commit changes it back to our old behavior to only print out a warning.
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-04-17SCI: sort qfg import files alphabeticallyMartin Kiewitz
2014-02-18SCI: Make GPL headers consistent in themselves.Johannes Schickel
2012-09-26JANITORIAL: Remove trailing whitespaces.Johannes Schickel
Powered by: git ls-files "*.cpp" "*.h" "*.m" "*.mm" | xargs sed -i -e 's/[ \t]*$//'
2012-06-21SCI: Don't compress exported heroes in the Quest for Glory gamesFilippos Karapetis
This allows them to be used by other games in the series not supported by ScummVM (i.e. QFG4, QFG5 and the fanmade AGS version of QFG2)
2012-06-18SCI: Add setter/getter methods to reg_t'sFilippos Karapetis
No functionality change has been made with this commit. This avoids setting and getting the reg_t members directly, and is the basis of any future work on large SCI3 scripts (larger than 64KB)
2012-06-15SCI: Fix warningsFilippos Karapetis
Thanks to DrMcCoy for reporting them
2012-06-13SCI: Fix the loading screen and the loading functionality in ShiversFilippos Karapetis
Shivers uses extra special hardcoded save files together with the normal ones that are used to store slot names and spot descriptions. The scheme is a bit odd, and since the names of the extra save files are hardcoded, this scheme is problematic to use. We skip the creation of these files altogether and use virtual files instead, which means that the (broken) spot descriptions won't be visible next to each save description. This isn't a major issue for now, and it's left as a future TODO to implement this feature in a cleaner way, and not with extra save files. This scheme fixes the slot descriptions in the loading screen. Also, kCD(1) has been implemented, which fixes loading of the save states themselves
2012-06-13SCI: Move all file-related functions in file.*Filippos Karapetis
This way, there is a clear separation of the actual SCI kernel file functions and the file classes and wrappers of ScummVM
2012-06-13SCI: Implement the file operations needed for the save dialog in PhantasmagoriaFilippos Karapetis
Phantasmagoria's scripts keep polling for the existence of the savegame index file and request to read and write it using the same parameters when opening it. The index file is closed and reopened for every save slot, which is slow and can be much slower on non-desktop devices. Also, the game scripts request seeking in writable streams and request to expand the existing index file. To provide this functionality and to reduce constant slow file opening and closing, this virtual class has been introduced