Commit Graph
68 Commits
Author SHA1 Message Date
Adrian Frühwirth cee4d6b853 JANITORIAL: Fix trailing whitespace 2018-05-24 15:30:55 +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
Paul Gilbert 481e18ee1d TITANIC: Create a separate g_language global in it's own file
I was becoming concerned with more and more files having to add the
full engine definition and sub-classes thereof via titanic.h,
just so the TRANSLATE macro could call getLanguage. This way, files
just need to include the lightweight translation.h file instead
2017-09-17 16:24:26 -04:00
Paul Gilbert aa3adfb4b1 TITANIC: Allow GMM loading from the copyright and continue dialog 2017-09-05 23:01:12 -04:00
Paul Gilbert 0c2fc12756 TITANIC: Hook up in-game sound sliders to ScummVM volumes 2017-09-05 21:11:06 -04:00
Paul Gilbert d7ca6c3bc1 TITANIC: Fix crash opening GMM during startup & Continue dialog 2017-08-28 21:45:07 -04:00
David Fioramonti c96b01b82e TITANIC: Reduce header includes for titanic.h
I reduced the header includes a lot in Titanic.h and forward
declared when I could. Titanic.h was including a lot and
a lot of functions that were including it were not using its
API. This will help make it more clear which implementation
files are using which class since they will just need to include
which ones they need.

I also moved the debug related items in Titanic.h into the debugger
header.

I also reordered several of the the header includes to be local to
global.
2017-08-24 04:06:54 -07:00
Paul Gilbert 4aabc56bb3 TITANIC: Don't allow GMM loading in the middle of receiving mail 2017-08-22 21:20:03 -04:00
Bastien Bouclet 42c6f68f7a TITANIC: Pause the engine while the save/load dialogs are open 2017-08-20 10:17:00 +02:00
Paul Gilbert d9d325ac6c TITANIC: Allow GMM/F7 loading in prologue before player gets the PET 2017-08-18 22:42:21 -04:00
Paul Gilbert 8e35f77e2d TITANIC: Implement F5 & F7 Saving and Loading 2017-08-18 21:53:57 -04:00
Paul Gilbert afe27c6de8 TITANIC: Don't allow GMM save/loading during cutscenes 2017-07-05 08:22:05 -04:00
Paul Gilbert fbb4cb9b31 TITANIC: Don't allow saving during the Doorbot prologue
This works around a bug in the original where if you saved immediately
after getting the PET, the savegame would put in in an invalid state
2017-07-02 22:02:24 -04:00
Paul Gilbert c9b5c524ca TITANIC: Show GUI error dialog if titanic.dat is missing 2017-06-20 19:52:11 -04:00
Paul Gilbert fa27fd7478 TITANIC: Extra debugging info for starfield movement 2017-04-16 13:03:12 -04:00
Paul Gilbert a542104f3c TITANIC: Rename CMusicWave to CMusicRoomInstrument 2017-02-12 12:51:47 -05:00
Paul Gilbert 126bae6320 TITANIC: Implemented CMusicWave start 2017-01-29 23:51:22 -05:00
Paul Gilbert dc37fe5039 TITANIC: Renamings and cleanup for lemon dispensor 2017-01-14 16:39:38 -05:00
Paul Gilbert 301ab51735 TITANIC: Don't allow GMM Loading/Saving if the PET area is locked 2016-12-08 22:35:33 -05:00
Paul Gilbert afb4b6227a TITANIC: Fixes for freeing project and engine objects on exit 2016-11-15 21:04:30 -05:00
Paul Gilbert f57287702e TITANIC: Fix freeing of video surfaces 2016-11-14 21:55:23 -05:00
Paul Gilbert 23af9d1a3c TITANIC: Load more text strings from data file 2016-11-11 15:24:53 -05:00
Paul Gilbert f7c7f11435 TITANIC: Renames and adding debugging 2016-10-28 20:19:35 -04:00
Paul Gilbert 5291a72742 TITANIC: Fix loading of item descriptions 2016-10-26 19:26:14 -04:00
Paul Gilbert 459e3f54c9 TITANIC: Change copyPixel to not be a virtual method 2016-10-01 18:26:09 -04:00
Paul Gilbert dd1a2b65e9 TITANIC: Extra loading logic and translation code for German version 2016-09-11 14:16:11 -04:00
Paul Gilbert df3e545976 TITANIC: Implemented more game classes 2016-08-22 21:52:29 -04:00
Paul Gilbert 8b6ac03f18 TITANIC: Start of music player class 2016-08-07 19:04:28 -04:00
Paul Gilbert 13ce0156ff TITANIC: Fix crash loading Sentences/Default NPC data 2016-07-24 20:56:58 -04:00
Paul Gilbert 6e2a4edd2a TITANIC: Finish TTbarbotScript process method 2016-07-24 19:44:19 -04:00
Paul Gilbert 4f08292c8c TITANIC: Add support for arbitrary window event targets
Also moved all standard game event methods to CMainGameWindow. This
will allow for the Continue Save dialog to be added in and get
events instead of the game window
2016-07-22 21:54:48 -04:00
Paul Gilbert fb06cb4dde TITANIC: Added CMovieManager class 2016-07-15 19:27:13 -04:00
Paul Gilbert 04afc63379 TITANIC: Adding savegame header load/save methods 2016-07-15 19:25:03 -04:00
Paul Gilbert 2267c5eb4c TITANIC: Beginnings of CCreditText class 2016-07-15 19:23:41 -04:00
Paul Gilbert 3878f38d8c TITANIC: Move replacement string arrays into TTparser, added NUMBERS array 2016-07-15 19:12:22 -04:00
Paul Gilbert e1ba967233 TITANIC: Moved other static arrays from Titanic engine to dat file 2016-07-15 19:12:00 -04:00
Paul Gilbert 0820c3ffae TITANIC: Refactor CTitleEngine to use CFilesManager for PE resources 2016-07-10 16:39:01 -04:00
Paul Gilbert 71179e3763 TITANIC: More script handler setup 2016-07-10 16:38:52 -04:00
Paul Gilbert 8a6a5ad5c1 TITANIC: In progress implementation of PET Remote 2016-07-10 16:38:04 -04:00
Paul Gilbert 75fdd1504d TITANIC: Call method to initialize OSVideoSurface _map array 2016-07-10 16:12:14 -04:00
Paul Gilbert 066dd4f5cd TITANIC: Implementing PET inventory population 2016-07-10 16:11:17 -04:00
Paul Gilbert d5e346681f TITANIC: Fix deleting movies 2016-04-09 21:45:13 -04:00
Paul Gilbert 7ef899f18d TITANIC: Implementing CPetInventory setup 2016-04-01 21:58:39 -04:00
Paul Gilbert 2c16d68f45 TITANIC: Simplified item strings setup 2016-04-01 20:49:13 -04:00
Paul Gilbert 845e25d118 TITANIC: Added item strings 2016-04-01 20:37:44 -04:00
Paul Gilbert 0b37ac1869 TITANIC: Implementing more CTelevision message handlers 2016-03-24 22:40:07 -04:00
Paul Gilbert 06bd62fed4 TITANIC: First scene starting to be displayed 2016-03-22 21:54:26 -04:00
Paul Gilbert 1e6a320010 TITANIC: Implementing view draw code 2016-03-21 21:51:29 -04:00
Paul Gilbert 61947ef56b TITANIC: Create Event manager class 2016-03-18 20:04:54 -04:00
Paul Gilbert 13a8e5f822 TITANIC: Implement debugger with dump and room commands 2016-03-17 22:29:16 -04:00