Commit Graph
126 Commits
Author SHA1 Message Date
Adrian Frühwirth 03312fba61 CGE2: Add play time metadata to savegames 2018-05-05 22:19:03 +02:00
Bastien Bouclet dc96d43717 CGE2: Push down the AD includes 2018-05-01 12:48:05 +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
Eugene Sandulenko 33abb6118f ALL: Change main engine header guard defines to <directory>_<engine>_H
Recently we started to use this as new semantics, although in the past
we used simly <engine>_H. Now these guard defines are consistent with
rest of the files which are used in the engines.
2016-05-17 18:21:30 +02:00
Filippos Karapetis c76c72c799 CGE2: Remove trailing whitespace 2014-10-28 16:06:07 +02:00
Strangerke cd86ccb73e CGE2: Remove unused constants 2014-09-28 23:39:18 +02:00
unknown 5c8129a1dd CGE2: Refactor _startupMode. 2014-09-07 11:01:23 +02:00
Peter Bozsó da1b76be4d Revert "CGE2: Make the intro skippable."
This reverts commit 5e099e90bc.
There's no need for this addition, since the intro was skippable before that too, by hitting the ESC key.
See System::touch().
2014-09-07 10:45:29 +02:00
Peter Bozsó 5e099e90bc CGE2: Make the intro skippable. 2014-09-06 22:52:24 +02:00
uruk 12a894a803 CGE2: Add checkMute().
This keeps the "Mute All" option of ScummVM and the music on/off and speech on/off buttons of Sfinx's toolbar in sync.
2014-08-13 21:16:20 +02:00
uruk d7a9ea9e2a CGE2: Rework sound system. 2014-08-13 20:58:22 +02:00
uruk 28a450982a CGE2: Fix initVolumeSwitch(). 2014-08-13 20:25:38 +02:00
uruk 854849f57a CGE2: Get rid of detection.h, move things to detection.cpp. 2014-08-11 15:28:43 +02:00
uruk 11d2cf66b6 CGE2: Rework the handling of the sound buttons on the toolbar.
Also keep in sync the volume settings and the audio mode of the game and the settings in the Launcher.
2014-08-03 22:23:55 +02:00
uruk 7dfb2b01f1 CGE2: Rearrange content of saveload.cpp and cge2.h a bit. 2014-08-03 15:04:00 +02:00
uruk 60a77ae6d7 CGE2: Add autosave functionality. 2014-08-03 14:46:11 +02:00
Strangerke 1a49887855 CGE2: Some cosmetic changes 2014-08-01 19:36:24 +02:00
uruk fc8f6d9cfe CGE2: Fix initialization of volume switches. 2014-07-29 16:27:18 +02:00
uruk 800ff40219 CGE2: Move ColorBank and kColorNum to one place.
They are strongly connected.
2014-07-29 13:25:39 +02:00
uruk 95854c3a57 CGE2: Get rid of sndSetVolume() and connected code. 2014-07-29 12:13:38 +02:00
uruk 3d69c67f99 CGE2: Get rid of kExitOkText. 2014-07-29 11:09:05 +02:00
uruk 77610ad993 CGE2: Get rid of kCrackedText. 2014-07-29 11:06:37 +02:00
uruk d4e14253c4 CGE2: Implement snFlash(). 2014-07-29 10:38:05 +02:00
uruk d95a4c5f72 CGE2: Get rid of _flag. 2014-07-29 09:05:41 +02:00
uruk ab2f720f37 CGE2: Remove commas at the end of enumerator lists. 2014-07-28 16:17:12 +02:00
uruk 0bfde974cd CGE2: Implement debug console and add a debug channel for opcodes. 2014-07-26 12:59:39 +02:00
uruk 88286115c8 CGE2: More refactoring in cge2.h and cge2.cpp. 2014-07-25 23:34:58 +02:00
uruk 56da652e8f CGE2: Rearrange things a bit in cge2.h. 2014-07-25 23:24:06 +02:00
uruk 5861b963ed CGE2: Now refactor optionTouch() the right way. 2014-07-25 23:19:11 +02:00
uruk eaddafdea7 CGE2: Get rid of unnecessary variables. 2014-07-25 22:34:39 +02:00
uruk 944465431a CGE2: Implement the sfx volume button on the toolbar. 2014-07-25 22:32:18 +02:00
uruk 668b133dab CGE2: Implement the music volume button on the toolbar. 2014-07-25 22:24:36 +02:00
uruk 22f1207cff CGE2: Rename kSoundSwtichRate to kVolumeSwitchRate. 2014-07-25 20:27:05 +02:00
uruk aaf1f6a1a0 CGE2: Fix initialization of sound switches on the toolbar. 2014-07-25 20:24:10 +02:00
uruk b85e5dcfdb CGE2: Remove kCmdDim and kCmdStep and connected code. 2014-07-24 23:19:02 +02:00
uruk c843898132 CGE2: Remove handling of unused opcodes. 2014-07-24 22:57:26 +02:00
uruk 15a2256972 CGE2: Implement snTrans() and snPort(). 2014-07-24 22:19:11 +02:00
uruk ff97d52d72 CGE2: Distinguish SFX from speech when playing sounds.
Now the sound options of ScummVM are taken into account when playing these two types of sounds. Until now, everything was considered SFX sound.
2014-07-24 18:55:09 +02:00
uruk 24cc8a8762 CGE2: Implement checkSaySwitch() and add/fix connected code. 2014-07-24 18:11:10 +02:00
uruk 755fedcceb CGE2: Set speech only/text only/both modes according to Launcher options. 2014-07-24 16:50:36 +02:00
uruk 014b734c98 CGE2: Increase readability of code connected to music switch. 2014-07-23 14:24:06 +02:00
uruk 6336ddb3ce CGE2: Keep music setting in sync with the Launcher. 2014-07-23 12:31:06 +02:00
uruk 71a9ead967 CGE2: Add and implement checkSounds() and checkMusicSwitch(). 2014-07-23 09:52:05 +02:00
uruk 49f68a8913 CGE2: Reimplement checkSaySwitch(). 2014-07-22 20:25:21 +02:00
uruk 77b5c7e4ad CGE2: Rename _commandStat to _soundStat. 2014-07-22 15:41:33 +02:00
uruk 6e26422468 CGE2: Rework loading of sprites from file.
Now it satisfies the needs described in the last commit's TODO comment.
2014-07-21 19:57:33 +02:00
uruk d9e82f8f8e CGE2: Get rid of _sprite. 2014-07-17 15:41:49 +02:00
uruk 8fae34df05 CGE2: Implement snRoom(). 2014-07-15 16:22:43 +02:00
uruk 8861b0b583 CGE2: Get rid of _mode. 2014-07-15 14:41:46 +02:00
uruk 45da1e7c74 CGE2: Implement switchVox() and switchCap(). 2014-07-09 11:17:30 +02:00