Commit Graph
46 Commits
Author SHA1 Message Date
Eugene Sandulenko abea37c9bb ALL: Update ScummVM project license to GPLv3+ 2021-12-26 18:48:43 +01:00
Orgad Shaneh fe104cc337 ENGINES: Use MetaEngine consistently for getting autosave slot
The autosave refactoring that was done in
7adad5aaf5 used g_engine for identifying the
autosave slot. This worked for in-game save/load, but doesn't fit when
called from the launcher.

Fix by passing MetaEngine to SaveStateDescriptor ctor and using it for this
query.

Amends 7adad5aaf5.
2021-10-24 16:46:06 +02:00
Paul Gilbert 9f175c4053 ENGINES: Cleanup of savegame filenames generation
This removes filename methods when it matched the Engine method.
Secondly, ensuring there was an overriden getSaveStateName method
for engines that didn't do the standard target.00x save filenames
2020-02-16 15:44:28 -08:00
David Fioramonti 771be9e3a9 TITANIC: Address readSavegameHeader compiler warning
A function had a bool return that was not being used
now it is checked and an error is issued if the call fails.
2018-06-30 14:30:35 -07:00
Adrian Frühwirth 8885b37abb TITANIC: Enforce code formatting guidelines 2018-05-07 20:06:29 +02:00
Adrian Frühwirth 10abb0c646 TITANIC: Fix discrepancy between readSavegameHeader() declaration and definition
This should have been part of commit 00e59a3122.
2018-04-22 22:45:54 +02:00
Adrian Frühwirth b1b83ac954 Revert "TITANIC: Fix memory leak due to save thumbnail changes"
This was a miss in commit 00e59a3122. The new parameter was supposed
to be called skipThumbnail and default to true instead.
For consistency's sake (the rest of the tree uses skipThumbnail, not
loadThumbnail) I'm reverting this and will separately update the
declaration to how it should have been from the beginning.

Thanks dreammaster!
2018-04-22 22:42:40 +02:00
Paul Gilbert ab3f397e2d TITANIC: Fix memory leak due to save thumbnail changes 2018-04-22 11:44:15 -04: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 47f6c2e9b9 Merge pull request #1010 from dreammaster/debugger_params
GUI: Support double quoted debugger parameters
2017-09-24 12:18:15 -04:00
Paul Gilbert f6ef3cbc9e TITANIC: Fix memory leak on thumbnails when loading savegames 2017-09-18 21:00:39 -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 f9bec828de TITANIC: Support full view specification in debugger room command 2017-09-04 10:15:53 -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 aef786fcc3 TITANIC: Hook in the original game's secret cheat room
You can either use a special Ctrl-C key combination, or use the
'cheat' command in the debugger
2017-08-07 21:10:24 -04:00
Paul Gilbert 503b9c16d2 TITANIC: Don't show invalid meta info for original game saves 2017-08-05 18:34:50 -04:00
David Fioramonti eb05082617 TITANIC: Allow last saved game to be loaded 2017-08-03 16:14:20 -07:00
David Fioramonti 293df6a68f TITANIC: Max saved games const centralized
Before the const specifying the max number of save/load games was
in titanic.h, core/project_item.cpp, main_game_window, and detection.cpp.

Since they all inherit from titanic.h they should just use the const there.

Also the saved game const in core/project_item.cpp was named differently
so I also changed that.
2017-08-03 16:13:34 -07:00
Bastien Bouclet bc952807ec TITANIC: Adjust the switch/case fall-through comments
This way, GCC 7 does not generate a warning for those cases when
-Wimplicit-fallthrough=3 is enabled, which is now the default.
2017-07-23 11:12:12 +02:00
Paul Gilbert a1b4b017f8 TITANIC: Further fix for tracking total play time 2017-06-17 16:43:44 -04:00
Paul Gilbert 9dbd9c567e TITANIC: Fix maintaining total playtime for savegames 2017-06-17 13:39:13 -04:00
Paul Gilbert 96c36d5398 TITANIC: Hide any active PET text cursor when loading a savegame 2016-12-26 21:10:17 -05:00
Paul Gilbert 25f0a97653 TITANIC: Fix crash loading games when speech is active 2016-12-19 20:00:58 -05:00
Paul Gilbert 2466edc4b8 TITANIC: Fix scanning for rooms in parseView 2016-10-28 22:31:06 -04:00
Eugene Sandulenko dead4aa014 JANITORIAL: Remove trailing spaces 2016-10-09 14:59:58 +02:00
Paul Gilbert 610aab1c63 TITANIC: Convert some dynamic_casts back to static_cast as appropriate 2016-09-05 10:06:21 -04:00
Paul Gilbert 33737ea2dc TITANIC: Convert many static_casts to dynamic_cast 2016-09-01 19:10:36 -04:00
Paul Gilbert eb98b984fb TITANIC: Add semicolon after EMPTY_MESSAGE_MAP macro usages 2016-07-24 20:11:49 -04:00
Paul Gilbert 0ed7b463e8 TITANIC: Fixes for saving & loading savegames 2016-07-20 21:51:44 -04:00
Paul Gilbert 2db54279e9 TITANIC: Fixes for saving/loading savegame headers 2016-07-20 20:12:45 -04:00
Paul Gilbert 1102203396 TITANIC: Add missing engine saving functionality 2016-07-20 18:49:41 -04:00
Paul Gilbert 5ccc0a66da TITANIC: Removed const modifier from all saveable objects
Turns out that CGameObject::save regenerates the _movieRangeInfo list.
So the const suffix can no longer be used for the entire hierarchy
2016-07-15 19:25:58 -04:00
Paul Gilbert 5c2a39e74a TITANIC: Set up empty message targets for classes without messages 2016-07-15 19:25:44 -04:00
Paul Gilbert 04afc63379 TITANIC: Adding savegame header load/save methods 2016-07-15 19:25:03 -04:00
Paul Gilbert abb5e0a5c1 TITANIC: Added CGameManager::viewChange 2016-03-19 09:29:11 -04:00
Paul Gilbert 3a42c8ca44 TITANIC: Added various preLoad methods 2016-03-19 07:48:23 -04:00
Paul Gilbert bad72e2ae4 TITANIC: Implement various post-load methods 2016-03-12 19:23:00 -05:00
Paul Gilbert 759c0e3b45 TITANIC: More game manager setup 2016-03-08 22:56:34 -05:00
Paul Gilbert 8a404e62aa TITANIC: Implemented CTreeItem::findByName 2016-03-08 21:13:24 -05:00
Paul Gilbert 34ade1f8cb TITANIC: Add const suffix to many tree item methods 2016-03-08 20:33:57 -05:00
Paul Gilbert eff4ed1ac1 TITANIC: Fleshing out CProjectItem methods 2016-03-08 19:35:30 -05:00
Paul Gilbert d1a29a1d1a TITANIC: Moved CompressedFile class into simple_file.h
One of the joys of working with ScummVM was that, using existing
Common functionality, the entirety of the original's CompressedFile
class could be reduced to a couple of lines. As such, CompressedFile
doesn't really need it's own seperate files anymore.
2016-03-08 18:57:17 -05:00
Paul Gilbert 0645a3dbde TITANIC: Fix crash when compressed newgame.st file was closed 2016-03-08 18:48:26 -05:00
Paul Gilbert 61518fb208 TITANIC: Move CPetControl and direct support classes to new folder 2016-03-04 20:21:02 -05:00
Paul Gilbert d07fbeb255 TITANIC: Beginnings of CPetControl support classes 2016-03-04 07:46:39 -05:00
Paul Gilbert 63db0980e5 TITANIC: Rename of sub-folders for better clarity 2016-02-25 08:48:21 -05:00