aboutsummaryrefslogtreecommitdiff
path: root/engines/draci/saveload.cpp
AgeCommit message (Collapse)Author
2018-05-07DRACI: Enforce code formatting guidelinesAdrian Frühwirth
2018-04-07ALL: Load savegame thumbnail only when necessaryAdrian Frühwirth
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.
2014-03-08DRACI: Saving improvements (item in hand and hero position).lukaslw
2014-02-18DRACI: Make GPL headers consistent in themselves.Johannes Schickel
2011-11-02DRACI: Fix warningEugene Sandulenko
2011-09-08DRACI: Made some static data const.Johannes Schickel
2011-08-07GRAPHICS: Simplify the interface of Graphics::loadThumbnail().Christoph Mallon
Now it returns the Surface, so the caller does not need to create one and pass it.
2011-06-02DRACI: Remove all instances of s(n)printfMax Horn
2011-05-12GIT: Clean up: Suppress SVN tags, now uselessstrangerke
2010-10-29DRACI: Switch to the new play time counting of the Engine class.Johannes Schickel
svn-id: r53925
2009-12-09DRACI: Reduce header interdependencies; some cleanupMax Horn
svn-id: r46320
2009-11-12Handled loading/saving from the map locationRobert Špalek
svn-id: r45876
2009-11-04Brought back one old line, just to be sure.Robert Špalek
svn-id: r45675
2009-11-02Refactored running loop().Robert Špalek
- shouldExitLoop() is a bool again and introduced new flag isReloaded() instead of adding special hacky value 2 - loop() accepts 2 parameters: loop substatus and shouldExit flag, because each caller previously had to set and restore these manually. loop() now also tests whether the substatuses are properly nested. reordered the loop-exitting code. - renamed loop substatuses to logical names - enterNewRoom() returns bool whether loop() should continue so that start() doesn't have to test and clear shouldEndProgram(). it doesn't need force_reload as a parameter anymore. - dialog selections use new inner substatus instead of outer substatus, for consistency svn-id: r45607
2009-10-30Fixed svn:keywordsRobert Špalek
svn-id: r45523
2009-10-16Fix memory leaks when reading thumbnailsRobert Špalek
svn-id: r45142
2009-10-08Introduce a new struct TimeDate, replacing struct tm in client code. May ↵Max Horn
lead to compilation issues in ports, which should be trivial to fix, though svn-id: r44793
2009-10-04Fixed two bugs concerning loading:Robert Špalek
1. a room need to be reloaded by force when the loaded game is in the same room as the game before the load 2. objects from the last room and their animations must be deallocated before I change the room number svn-id: r44638
2009-10-04Hack Game::_shouldExitLoop.Robert Špalek
Immediate exit needed when loading a savegame hurts waiting in an inner (strange) loop inside a GPL program, because animations don't progress at all. Reverted to the previous behavior and kept the immediate exit as a hack for loading the game. svn-id: r44590
2009-10-04Load inventory items properly after loading the game.Robert Špalek
This solution is quite hacky, but so is the rest of the code, before a future refactoring done one day. svn-id: r44588
2009-10-04Implemented rudimentary game loading/saving.Robert Špalek
Fixed many bugs in the boilerplate. Saving (only) things that really need to be saved. Loading seems to work modulo dialogs and (possibly) inventory. svn-id: r44586
2009-10-04Implement all boilerplate concerning Global Main Menu.Robert Špalek
All currently defined featues will be supported. I have implemented everything boilerplatish, except for the actual game saving/loading (which will come in the next commit), getting volumes from the configuration (because we don't play sounds yet), and changing subtitles. svn-id: r44583