220 Commits

Author SHA1 Message Date
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
Matthew Hoops
eea482fa43 ALL: behaviour -> behavior 2011-05-25 10:50:46 -04:00
strangerke
69b1485a22 GIT: Clean up: Suppress SVN tags, now useless 2011-05-12 01:16:22 +02:00
Ori Avtalion
9414d7a6e2 JANITORIAL: Reduce header dependencies in shared code
Some backends may break as I only compiled SDL
2011-04-28 15:08:58 +03:00
Lars Skovlund
a55a211ddc SCI32: Reroute kSave(5) to kGetSaveFiles(). Any differences to pre-SCI32
kGetSaveFiles() should be worked out there.
2011-03-09 20:18:34 +01:00
md5
9cc12cfc97 SCI21: kSave(1) is kRestoreGame 2011-03-04 00:25:22 +02:00
md5
49f3f5e1e8 SCI: Fixed a memory leak. Thanks to digitall for finding this using Valgrind 2011-02-26 16:30:47 +02:00
Max Horn
c093925763 SCI: Fix (rare) leak in kSaveGame, tweak kFileIOFindNext, cleanup
svn-id: r55867
2011-02-10 13:39:01 +00:00
Max Horn
41121be4d6 GUI: Rename SaveLoadChooser::runModal to runModalWithPluginAndTarget
This avoids hiding an overloaded virtual method, which in turn can
cause weird bugs (see also the next commit).

svn-id: r55815
2011-02-07 22:58:22 +00:00
Filippos Karapetis
fc83afc5f2 SCI2.1: Added/documented some functionality used by Shivers 1
- Added kFileIO subop 17 (create save slot)
- Added information about a (probably debug) kernel function used in a puzzle, kCelInfo
- Added some information on two kSave subops
- Added 2 workarounds for uninitialized variables

svn-id: r55158
2011-01-08 10:23:27 +00:00
Filippos Karapetis
32d7e687ee SCI: debugC calls no longer require a debug level of 2 to show output
svn-id: r55086
2011-01-01 12:48:12 +00:00
Filippos Karapetis
de2ef2edc0 SCI: Removed the system strings code and replaced it with a much more simplified version, thus greatly simplifying handling of system strings
svn-id: r54805
2010-12-07 00:47:05 +00:00
Filippos Karapetis
77da22290d SCI: kSave case 0 is actually kSaveGame. Based on a patch by lskovlun
svn-id: r54215
2010-11-11 23:51:43 +00:00
Max Horn
e27b05ef35 COMMON: Rename String::printf() to String::format()
This is a first step towards getting rid of all uses of regular printf,
fprintf, vprintf, vfprintf, puts, fputs, etc. in our codebase.

The name format() reflects the purpose of the function, and parallels
String.format() in Java, boost::format, and others.

svn-id: r54004
2010-11-01 16:02:28 +00:00
Filippos Karapetis
dca3c8d8bf SCI: Play time related changes
- Added support for savegame play time
- Removed obsolete variables for calculating the play time (EngineState::gameStartTime and Console::_enterTime)
- Renamed some variables to camelCase

svn-id: r53974
2010-10-31 01:45:24 +00:00
Torbjörn Andersson
c91a07229a JANITORIAL: Removed most punctuation at end of warning() and error()
Our warning() and error() functions always add an exclamation mark
to the end of the message anyway.

svn-id: r52791
2010-09-18 10:55:16 +00:00
Thierry Crozat
c073369f0a i18n: Translate Save and Restore buttons in SCI engine
svn-id: r52694
2010-09-12 21:56:37 +00:00
Martin Kiewitz
10a460443b SCI: adding save description, if none was entered
fixes bug #3061964

svn-id: r52637
2010-09-08 16:15:42 +00:00