Commit graph

29 commits

Author SHA1 Message Date
Bastien Bouclet
73b3a43b89 MOHAWK: MYST: Introduce a main menu stack
Used in the 25th Anniversary edition of Myst ME
2018-06-29 13:15:01 +02:00
Bastien Bouclet
47ddd9c214 MOHAWK: MYST: Move the current stack id to ScriptParser 2018-06-13 07:55:55 +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
0500096703 MOHAWK: MYST: Do not autosave over saves from the original
The previous logic was enabling autosaving if the metadata
file was not present, but saves from the original
don't have metadata. Now it checks if the non-metadata
file can be loaded to determine if the slot is empty.
2018-05-22 19:47:00 -07:00
Bastien Bouclet
4396b011ac MOHAWK: MYST: Fix the Wii/GameCube build 2018-05-19 18:23:45 +02:00
David Fioramonti
719c2b8374 MOHAWK: MYST: Autosave to Slot 0
The game will autosave to slot 0 using the save
period given in the scummvm config file
or when the user exits using the GMM.

Autosaves are only allowed when an autosave is
in slot 0 or there is no save in slot 0.

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-19 17:56:05 +02:00
David Fioramonti
52e247e239 MOHAWK: MYST: Make Dni/Atrus endings an enum
The global variable "ending" tracks various
states that Atrus can be in.

This variable determines what video of
Atrus will be playing and if the brother
books have been destroyed.

Despite this variable being called ending
there are other endings not captured by
this variable (like the brother endings).

Also change spelling of Dini to Dni for one
usage of ActiveAge from a previous commit.
2018-04-27 19:22:00 +02:00
David Fioramonti
ab7cdc5907 MOHAWK: MYST: Make global currentAge an enum
This global basically tracks what age/book/stack
the player is in.

It is also used to change stacks via
MohawkEngine_Myst::changeToStack() by
being an index for MystScriptParser::_stackMap
and MystScriptParser::_startCard.

E.x., instead of _global.currentAge = 2
now _global.currentAge = kMystLibrary.

Also two of the endings are considered Ages
instead of being apart of _global.ending.
2018-04-26 22:09:46 +02:00
dafioram
519e02da47 MOHAWK: MYST: Turn held page state into an enum
Previously, the held page stage was an unsigned int 16
with values 0-13. The enum will make its state more clear.
2018-04-25 18:46:50 +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
b51589e993 MOHAWK: Make sure the cursor is visible after loading in Myst
Fixes #7164.
2016-07-24 14:17:45 +02:00
Bastien Bouclet
9db3f69f5e MOHAWK: Switch to slot based save file naming for Myst
Myst previously used the user provided description as the save filename.
This was not working when the user entered chacacters forbidden by the
filesystem.

The actual save format has not changed. Old saves are still compatible,
but must be renamed to 'myst-###.mys' and 'myst-###.mym'.

Fixes 7106.
2016-04-03 08:11:56 +02:00
Bastien Bouclet
7044996cd5 MOHAWK: Add support for the ScummVM save metadata features
The metadata is saved in a separate file to keep compatibility with
the original engine saves.
2016-02-22 08:44:55 +01:00
Bastien Bouclet
0c8d8bbd40 MOHAWK: Use nullptr where applicable in the Myst code 2016-02-07 15:27:03 +01:00
Bastien Bouclet
131dcb0aad MOHAWK: Reset some Myst state variables as per the original
This fixes a bug where the player could be stuck on Channelwood's
lower level with the elevator on the upper level.

This also turns the light off on Stoneship when entering the age,
since the battery is depleted.

Thanks to dtungsten for submitting this fix in PR#478.
2014-07-08 20:13:29 +02:00
Johannes Schickel
abd9e92086 MOHAWK: Make GPL headers consistent in themselves. 2014-02-18 02:39:36 +01:00
Bastien Bouclet
b15ad58f11 MOHAWK: Disable zip mode in Myst demo 2011-08-07 16:54:19 +02:00
Bastien Bouclet
9f05f8805d MOHAWK: Fix loading a Myst savegame from the launcher. 2011-05-15 17:41:55 +02: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
Bastien Bouclet
30c33c6e6b MOHAWK: Add Achenar's crate state to Mechanical state 2011-02-13 12:15:37 +01:00
Bastien Bouclet
7baf4d2ed3 MOHAWK: Implement Stoneship chest puzzle
svn-id: r55577
2011-01-27 21:13:34 +00:00
Bastien Bouclet
81d29aa303 MOHAWK: Add a stub for Myst var getter 308
svn-id: r55187
2011-01-09 16:13:31 +00:00
Bastien Bouclet
9058a83ad9 MOHAWK: Myst zip mode improvements
- Save visited zip destinations in the game state
- Only allow zipping to visited zip destinations
- Save zip mode setting in the game state

svn-id: r55185
2011-01-09 15:31:08 +00:00
Bastien Bouclet
9265c85c49 MOHAWK: Implement minimal D'ni stack. Lacking movie control.
svn-id: r55180
2011-01-09 10:14:40 +00:00
Bastien Bouclet
b55e593cdd MOHAWK: Merge Myst intro opcode 100 with generic opcode 40 into engine method changeStack
svn-id: r55152
2011-01-07 19:26:31 +00:00
Bastien Bouclet
14cd97cc77 MOHAWK: Implement Myst opcodes 129 to 132, and 192 to 197, Stellar observatory buttons
svn-id: r55065
2010-12-30 13:53:14 +00:00
Bastien Bouclet
6c9a4d36ec MOHAWK: Implement Myst opcode 214, Stellar observatory initialization
svn-id: r55063
2010-12-29 19:33:49 +00:00
Matthew Hoops
f2495a42f6 MOHAWK: Move myst_saveload.* to myst_state.*
svn-id: r55045
2010-12-26 15:10:33 +00:00
Renamed from engines/mohawk/myst_saveload.cpp (Browse further)