Commit graph

287 commits

Author SHA1 Message Date
Filippos Karapetis
cd00132d23 SCI32: Also handle game checks for "torinsg.cat" in Torin
This shows the "Open..." button when continuing a game
2016-08-23 11:36:37 +03:00
Colin Snover
0a4a2567a3 SCI32: Partially implement kCD 2016-08-19 15:23:10 -05:00
Willem Jan Palenstijn
6d9ed09897 SCI32: Don't use autosave.cat in Torin 2016-08-11 19:29:34 +02:00
Willem Jan Palenstijn
401b34bf45 SCI32: Support Torin's autosave system
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-29 21:09:32 +02:00
Willem Jan Palenstijn
d832a23241 SCI32: Add SaveFileRewriteStream for read/write access to files
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-07-06 21:06:12 +02:00
Martin Kiewitz
80462b3f87 SCI: Fix auto-saving in the fan-made Cascade Quest
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-06-25 23:59:01 +02:00
Martin Kiewitz
2c247a03e9 SCI: Add hack for Pepper's Adventure in Time CDAUDIO issue
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-22 14:24:37 +01:00
Martin Kiewitz
ce595cb92d SCI: Script patch for Mixed Up Mother Goose SCI1
+ 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-09 01:28:34 +01:00
Martin Kiewitz
04de7279a1 SCI: Blocking ScummVM auto-save slot 0 for saving
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-02-05 19:43:48 +01:00
Martin Kiewitz
9d5ee9cba0 SCI: fix sciAudio support on some platforms
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.
2016-01-02 21:50:35 +01:00
Filippos Karapetis
138ec332d2 SCI: Fix wording for commit fc14641 2015-07-10 14:25:35 +03:00
Filippos Karapetis
fc1464155a SCI: Enable the save game menu option when dying in PQ2 - bug #6875
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
2015-07-10 14:13:18 +03:00
Willem Jan Palenstijn
1860c2107a SCI: Add notes 2014-10-19 23:44:45 +02:00
Filippos Karapetis
1d5536da02 SCI: Enable some menus in Jones after restoring (bugs #6537 and #6723)
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-10-19 16:52:00 +03:00
Martin Kiewitz
23bfc2f035 SCI: comment typo fix 2014-06-02 20:59:27 +02:00
Martin Kiewitz
d4de84bf8b SCI: fix saving in mother goose sci0 (bug #6486) 2014-06-02 20:51:39 +02:00
Filippos Karapetis
6a519f7f40 SCI: Initial implementation of the fanmade sciAudio library
This is used in the fanmade games "LockerGnome Quest Redux" and
"Betrayed Alliance"
2014-03-28 02:16:54 +02:00
Johannes Schickel
8fc7d60feb SCI: Make GPL headers consistent in themselves. 2014-02-18 02:39:37 +01:00
Filippos Karapetis
9addca7287 SCI: Allow saving without a VERSION file in Jones
Apparently, the original does the same. Fixes bug #6535
2014-02-17 11:52:49 +02:00
Strangerke
6795fdf639 SCI: Janitorial - Fix spacing errors 2013-11-23 11:02:24 +01:00
Filippos Karapetis
46ebf37ec9 SCI: Change wording for bug/further info references 2013-04-27 14:04:27 +03:00
Filippos Karapetis
045b10efb6 SCI: Fix loading in Jones
This has been broken for a (very) long time, a regression from commit 6ff4dd2
2013-03-21 21:27:14 +02:00
Johannes Schickel
89abab97e3 JANITORIAL: Remove trailing whitespaces.
Powered by:
git ls-files "*.cpp" "*.h" "*.m" "*.mm" | xargs sed -i -e 's/[ \t]*$//'
2012-09-26 04:17:55 +02:00
Filippos Karapetis
7eded163d8 SCI: Add support for kCD(0) with a parameter
It's now possible to start a chapter in Phantasmagoria 1
2012-07-27 01:30:37 +03:00
Filippos Karapetis
e0a3cfd21c SCI: FileIO subop 19 checks for directory validity
This is used in Torin's Passage and LSL7 when autosaving
2012-07-04 01:02:17 +03:00
Filippos Karapetis
2b50824133 SCI: Add setter/getter methods to reg_t's
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-18 05:24:06 +03:00
Filippos Karapetis
e4f08a4644 SCI: Fix the loading screen and the loading functionality in Shivers
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-13 22:56:43 +03:00
Filippos Karapetis
045613af95 SCI: Shuffle the kernel functions inside kfile.cpp
This puts them in the order that they are defined in the kernel tables
2012-06-13 12:55:07 +03:00
Filippos Karapetis
098f162ecc SCI: Use the later SCI file functions for the SCI0 ones
They are essentially the same (with the exception of the return values),
so unifying them reduces code duplication
2012-06-13 12:26:57 +03:00
Filippos Karapetis
944a774e6a SCI: Change kSave() to be a kernel function with subops 2012-06-13 12:26:55 +03:00
Filippos Karapetis
5a17ea0585 SCI: Move all file-related functions in file.*
This way, there is a clear separation of the actual SCI kernel file
functions and the file classes and wrappers of ScummVM
2012-06-13 12:26:53 +03:00
Filippos Karapetis
a209359a67 SCI: Reorder the file kernel functions a bit 2012-06-13 12:26:51 +03:00
Filippos Karapetis
aeac51d726 SCI: Implement the file operations needed for the save dialog in Phantasmagoria
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
2012-06-13 12:26:49 +03:00
Johannes Schickel
49fafb48a7 GUI: Refactor default savegame description creation.
Formerly the GMM, AGI and SCI duplicated the logic for USE_SAVEGAME_TIMESTAMP.
Now I added a method to SaveLoadChooser instead, which takes care of this. This
might not be the best placement of such a functionality, thus I added a TODO
which talks about moving it to a better place.
2012-06-10 05:04:59 +02:00
Johannes Schickel
7c5cf1b400 GUI: Add helper to SaveLoadChooser, which uses the currently active target.
This reduces the code duplication in all client code, which formerly duplicated
the querying of the plugin, game id etc. and now simply calls the newly added
method runModalWithCurrentTarget() on a SaveLoadChooser object.
2012-06-10 04:53:17 +02:00
Johannes Schickel
15046a7529 GUI: Get rid of SaveLoadChooser::setSaveMode.
We already pass the title and process button name to the constructor of
SaveLoadChooser and then do not offer any way of changing it, thus changing
the edit mode of the chooser is kind of pointless and was never actually used.
Instead we pass the mode on SaveLoadChooser construction now.
2012-06-10 04:19:45 +02:00
Filippos Karapetis
e77fc29101 SCI: Add a TODO in kFileIOReadRaw 2012-05-26 19:06:54 +03:00
Filippos Karapetis
79926b305c SCI: Bugfix for kFileIOReadRaw
Avoid overwriting the target buffer with junk when no data has been read
2012-05-26 16:23:03 +03:00
Filippos Karapetis
c3f0a426fc SCI: kMakeSaveFileName is actually using virtual savegame IDs 2012-05-14 11:16:11 +03:00
Filippos Karapetis
6b38731d39 SCI: Implement savegame deletion functionality in SCI32
This is based on two kernel functions, kMakeSaveCatName and
kMakeSaveFileName
2012-05-14 11:04:58 +03:00
Matthew Hoops
fe0c5c0e97 SCI: Fix KQ6 Mac movies with resource fork names 2012-03-08 08:04:54 -05:00
Tarek Soliman
a4798602d7 JANITORIAL: Fix missing whitespace in pointer cast
find -name '*.h' -or -name '*.cpp' | xargs sed -r -i 's@\(([A-Za-z0-9]+)\*\)@(\1 *)@g'

This seems to have caught some params as well which is not undesirable IMO.
It also caught some strings containing this which is undesirable so I
excluded them manually. (engines/sci/engine/kernel_tables.h)
2012-02-15 10:07:10 -06:00
Filippos Karapetis
acebd6d0be SCI: Removed the hack for the creation of LARRY3.DRV, used in LSL3
This is no longer necessary, as our file I/O code handles this case
correctly now. Also, updated the description of file I/O on top.
2011-10-30 21:42:32 +02:00
Filippos Karapetis
4f69967773 SCI: Added a new debug flag, "DebugMode" for SCI32 games
This is used to enable the embedded debugger in several SCI32 games
(PQ4, QFG4, GK1, GK2, KQ7, SQ6 and LSL7)
2011-10-29 18:32:52 +03:00
Filippos Karapetis
9fcd3ece53 SCI: kSave(3) is kCheckSaveGame() and kSave(6) is kFileIOUnlink() 2011-10-12 03:25:27 +03:00
Filippos Karapetis
a6884d7d69 SCI2+: Added info for the extra parameter used in kGetSaveDir in SCI32
The warning can be safely removed, as the parameter is a string that
should not be set
2011-10-09 19:16:03 +03:00
Tarek Soliman
7b68952726 SCI: change savegame default description day format to YYYY.MM.DD
... and make it optional subject to USE_SAVEGAME_TIMESTAMP
2011-09-23 22:06:19 -05:00
Max Horn
88913c0139 ALL: Remove trailing whitespaces
This tries to make our code a bit more compliant with our code formatting
conventions. For future use, this is the command I used:
  git ls-files "*.cpp" "*.h" | xargs sed -i -e 's/[ \t]*$//'
2011-06-20 00:59:48 +02:00
Max Horn
aec2ea9661 ENGINES: Remove some uses of g_engine 2011-06-03 18:21:58 +02:00
Max Horn
11bd6da595 SCI: Switch some char* to Common::String& 2011-06-03 16:16:38 +02:00