Commit Graph
48 Commits
Author SHA1 Message Date
Eugene Sandulenko abea37c9bb ALL: Update ScummVM project license to GPLv3+ 2021-12-26 18:48:43 +01:00
Eugene Sandulenko 5e7fe2dc57 JANITORIAL: Replace spaces in indentation with tabs 2021-04-15 21:20:36 +02:00
Bastien Bouclet 1d731aeef9 MOHAWK: Simplify retrieving game features 2020-03-28 07:38:39 +01:00
Bastien Bouclet 1f5d4d1fdd MOHAWK: RIVEN: Configuration dialog changes
* Unify the custom options dialog (previously accessed through F5), and
  the in-game options dialog accessed through the Global Main Menu.
* Change the default keybinding for F5 to show the GMM for the non-25th
  anniversary editions of the game. This allows easy access to
  the load and save functionality. With the 25th anniversary edition,
  the main menu accessed through ESC should be used instead.
2020-03-28 07:38:39 +01:00
Bastien Bouclet 3498965e66 MOHAWK: Remove the autosave overwrite check
This check is now performed by the shared autosave code.
2020-02-17 20:01:44 +01:00
Paul Gilbert c3c0d04d2a MOHAWK: Hook Myst & Riven into SaveStateDescriptor autosave flag 2020-02-16 15:44:28 -08:00
Paul Gilbert d35d91e6f6 MOHAWK: Remove autosave code 2020-02-16 15:44:28 -08:00
Bastien Bouclet e7cb40dde5 MOHAWK: RIVEN: Use an in-game thumbnail when saving from the menu
Instead of a thumbnail of the menu itself.
2018-06-29 13:31:54 +02:00
David Fioramonti 6041e4aca1 MOHAWK: Allow non-autosaves in autosave slot to be deletable
With the addition of autosaving support, deleting saves
(via the gui) to slot 0 was disabled, but for saves that
have been previousl created by the user it make sense
that they should be allowed to delete a save in slot 0.

Fixes Trac#10536.
2018-05-22 19:47:00 -07:00
David Fioramonti 37791c4bd3 MOHAWK: RIVEN: Add Autosave Support
The game will autosave to slot 0 using the save
period given in the scummvm config file.
Or when the user quits.

Autosaves are only allowed when an autosave is
in slot 0, there is no save in slot 0, or there
is a save, but it is corrupt.

This will not override any saves the player
has previously put in save slot 0. If there
is a save in slot 0 that is not an autosave
then there will be no autosaving.
2018-05-20 15:17:14 +02:00
Adrian Frühwirth 00e59a3122 ALL: Load savegame thumbnail only when necessary
This commit introduces the following changes:

1. Graphics::loadThumbnail()

   Now returns a boolean and takes a new argument skipThumbnail which
   defaults to false. In case of true, loadThumbnail() reads past the
   thumbnail data in the input stream instead of actually loading the
   thumbnail. This simplifies savegame handling where, up until now,
   many engines always read the whole savegame metadata (including
   the thumbnail) and then threw away the thumbnail when not needed
   (which is in almost all cases, the most common exception being
   MetaEngine::querySaveMetaInfos() which is responsible for loading
   savegame metadata for displaying it in the GUI launcher.

2. readSavegameHeader()

   Engines which already implement such a method (name varies) now take
   a new argument skipThumbnail (default: true) which is passed
   through to loadThumbnail(). This means that the default case for
   readSavegameHeader() is now _not_ loading the thumbnail from a
   savegame and just reading past it. In those cases, e.g.
   querySaveMetaInfos(), where we actually are interested in loading
   the thumbnail readSavegameHeader() needs to explicitely be called
   with skipThumbnail == false.

   Engines whose readSavegameHeader() (name varies) already takes an
   argument loadThumbnail have been adapted to have a similar
   prototype and semantics.
   I.e. readSaveHeader(in, loadThumbnail, header) now is
   readSaveHeader(in, header, skipThumbnail).

3. Error handling

   Engines which previously did not check the return value of
   readSavegameHeader() (name varies) now do so ensuring that possibly
   broken savegames (be it a broken thumbnail or something else) don't
   make it into the GUI launcher list in the first place.
2018-04-07 09:26:20 +02:00
Bastien Bouclet 56b744f5f1 MOHAWK: Riven: Plug memory leak when saving
Fixes #10216.
2017-09-20 07:12:09 +02:00
Torbjörn Andersson d99596d477 MOHAWK: Update transition mode after loading savegame 2017-08-14 17:35:32 +02:00
Bastien Bouclet c3bbae041a MOHAWK: Riven: Improve save load error handling
A GUI error message is now displayed if an error occurs when loading a
save.
2017-07-12 22:00:33 +02:00
Bastien Bouclet 9926475937 MOHAWK: Update the card and stack variables when entering new locations 2017-07-03 08:50:10 +02:00
Bastien Bouclet 05bed84a85 MOHAWK: Rename the card and stack accessors 2017-07-03 08:50:10 +02:00
Bastien Bouclet 3c8decec0a MOHAWK: Move the resource names to RivenStack 2017-07-03 08:50:10 +02:00
Bastien Bouclet f752066a8e MOHAWK: Introduce a new RivenStack class 2017-07-03 08:50:10 +02:00
Bastien Bouclet abe6889bbe MOHAWK: Remove the current card id from the Riven engine class 2017-07-03 08:50:10 +02:00
Bastien Bouclet 504ffd2aba MOHAWK: Switch Riven saves to a slot based naming scheme
Existing saves are compatible but must be renamed to riven-###.rvn
2016-07-10 22:01:03 +02:00
Bastien Bouclet f78bb08b18 MOHAWK: Save ScummVM specific metadata in the Riven saves
- Thumbnail
- Save date
- Save description
- Total play time
2016-07-10 22:01:03 +02:00
Bastien Bouclet c06e347d90 MOHAWK: Make the Riven saved games loadable by the original engine 2016-07-10 22:01:02 +02:00
Matthew Hoops 0a899876e7 MOHAWK: Use original stack ID mapping for Riven 2014-05-03 22:55:50 -04:00
Johannes Schickel abd9e92086 MOHAWK: Make GPL headers consistent in themselves. 2014-02-18 02:39:36 +01:00
Matthew Hoops 2f6528933d MOHAWK: Improve Riven save/load error messages 2012-03-16 16:03:14 -04:00
Matthew Hoops 8cd81da14e MOHAWK: Cleanup Riven save code 2011-06-28 14:32:50 -04:00
Matthew Hoops 71c4329d86 MOHAWK: Rework archive handling
A new base class has been introduced (aptly named "Archive"), which is much cleaner than inheriting from MohawkArchive. In addition, the underlying resource retrieving code has been merged to reduce dupliplication.
2011-06-28 12:10:28 -04:00
strangerke 69b1485a22 GIT: Clean up: Suppress SVN tags, now useless 2011-05-12 01:16:22 +02:00
Matthew Hoops 4235358fad MOHAWK: Use direct access on the hashmap for Riven variables now 2011-03-23 23:14:59 -04:00
Matthew Hoops b3e27bc0d6 MOHAWK: Make Riven's save/load code use the variable map directly 2011-03-23 21:45:39 -04:00
Matthew Hoops 2053936959 MOHAWK: Ignore other 'time' variables when loading saves too 2011-03-22 14:27:32 -04:00
Matthew Hoops cb948934ab MOHAWK: Add workaround for loading the bytramtime variable 2011-03-21 12:15:14 -04:00
Matthew Hoops 54ac6ade49 MOHAWK: Don't error out when the ReturnStackID cannot be converted 2011-03-21 12:15:14 -04:00
Matthew Hoops f6b7979277 MOHAWK: Implement Riven's whark number puzzle
svn-id: r55207
2011-01-11 19:44:55 +00:00
Matthew Hoops cb843daec0 MOHAWK: Have MohawkResource::open() return a bool for success/failure
svn-id: r54418
2010-11-22 18:07:33 +00:00
Matthew Hoops 0f2bcd2f9f MOHAWK: Cleanup resource handling
- Renamed getRawData() to getResource()
- Add a getResource() and hasResource() function for named resources
- Other minor formatting changes

svn-id: r54396
2010-11-20 23:53:14 +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
Matthew Hoops 34f570419a MOHAWK: Cleanup
- Split the main Riven event loop into a separate function for readability and for use in the sunner external functions eventually
- Some minor function signature changes (const!)
- Rename matchVarToString() to getVar() (I have no idea where that original name came from, considering it takes a string and returns a variable
- Use solely Common::String in getVar()

svn-id: r52538
2010-09-05 00:48:38 +00:00
Matthew Hoops 554640ee8a Fix saving while viewing the inventory in Riven and cleanup the save/load code.
svn-id: r50333
2010-06-26 17:21:50 +00:00
Max Horn cac0ac66e2 COMMON: Get rid of Common::StringList
svn-id: r48287
2010-03-18 15:54:40 +00:00
Matthew Hoops b3ab83d8c1 Add a workaround for two 'spare' variables that can exist in some save files.
svn-id: r48069
2010-02-16 01:48:19 +00:00
Matthew Hoops d4f08cbe81 Correct our interpretation of the first four bytes of the RSRC section in Mohawk archives.
svn-id: r47583
2010-01-26 23:05:52 +00:00
Johannes Schickel aed02365ec Strip trailing spaces/tabs.
svn-id: r47541
2010-01-25 01:39:44 +00:00
Matthew Hoops c04f8d00b1 Rename MohawkFile to MohawkArchive and OldMohawkFile to LivingBooksArchive_v1 (the latter originally having an ambiguous meaning) and move them to resource.* Also, renaming the Living Books game types to remove the ambiguous old/new.
svn-id: r47429
2010-01-22 03:43:57 +00:00
Matthew Hoops 380190ee12 Fix a memory leak spotted by cppcheck. Thanks salty-horse\!
svn-id: r46977
2010-01-04 17:30:47 +00:00
Max Horn a753f606ec MOHAWK: Stop using String::emptyString
svn-id: r46780
2009-12-30 23:01:16 +00:00
Torbjörn Andersson 1a66ad80a4 Re-indentet switch() blocks to follow ScummVM indentation style. (I've always
found this style a bit unusual, but I value consistency.)

svn-id: r46734
2009-12-30 07:14:09 +00:00
Eugene Sandulenko 0ea022d076 Add Mohawk engine code. Part 1/3: main code.
svn-id: r46727
2009-12-29 23:18:24 +00:00