aboutsummaryrefslogtreecommitdiff
path: root/engines/scumm/saveload.cpp
AgeCommit message (Collapse)Author
2019-11-19GRAPHICS: Add interface for horizontal shakesluicebox
2019-05-05SCUMM: Original V0-V2 flashlight shape and size for MM/Zak (#10947, #10951)Robert Crossfield
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.
2018-01-31SCUMM: Fix compilation failure when DISABLE_TOWNS_DUAL_LAYER_MODE is definedColin Snover
2018-01-31SCUMM: Rename iMUSE save/load function to avoid confusing function hidingColin Snover
2018-01-31SCUMM: Remove variable shadowingColin Snover
2018-01-31COMMON: Move VER macro for serializer into common codeColin Snover
2018-01-31SCUMM: Replace UB-triggering serialization code with Common::SerializerColin Snover
Fixes Trac#10342.
2017-09-22ALL: Specify the DisposeAfterUse constructor argument for dynamic memory ↵Bastien Bouclet
write streams
2016-07-01SCUMM: reset ShakePos on loading, fixes one part of bug #7141Ben Castricum
2016-04-14JANITORIAL: Reduce audio header dependenciesOri Avtalion
2016-02-14SCUMM: Fix warningEugene Sandulenko
2014-12-30SCUMM: Enable Day of the Tentacle easter eggTorbjörn Andersson
Instead of returning to the launcher, a game may now specify a list of "chained" games and optional save slots. The first game is popped from the list and started. Quitting still quits the entire ScummVM. It seemed like the sensible thing to do.
2014-10-29SCUMM: Disallow saving while a room 'prequel' is shown in v0-v3 gamesFilippos Karapetis
These are cases where the screen is completely blank, showing text. In such cases, no room is set, thus no room resources are available. An example is the screen shown after the credits in the Zak FM-TOWNS intro ("The next day..."). Thanks to segrax for finding this case. This commit is based off pull request 522, but completely disallows saving in such scenes, instead of adding explicit checks for them
2014-07-04SCUMM: Add support for CD audio tracks in the Steam versions of LoomFilippos Karapetis
Many Thanks to Ben Castricum for the original patch
2014-03-30SCUMM: Avoid potential issues casting invalid values to enumMax Horn
A compiler could in principle decide that a ResType enum can never equal 0xFF or 0xFFFF, and thus incorrectly optimize the ScummEngine::saveOrLoad code. So check the value *before* casting it.
2014-03-30ALL: Resolve multiple clang warningsMax Horn
2014-03-18SCUMM: Fix bug #6009 "DC: FT/Dig - Sound disappears when VMU save fails"D G Turner
This was introduced by fd3970aa52a0c7f411afdddfebad208f783281c8: Apply patch #2984508 - "GSoC: SCUMM stopped audio from playing while saving" This was not quite correct as if the save fails, the function exits without unpausing the engine, which resulted in sound and music remaining muted. This corrects the logic to unpause in all cases.
2014-02-18SCUMM: Make GPL headers consistent in themselves.Johannes Schickel
2014-01-17Merge pull request #366 from clone2727/he-saves-target-nameclone2727
RFC: Make HE games use the target name in all save files
2013-11-27SCUMM: Small formatting fix.Johannes Schickel
2013-11-27SCUMM: Cleanup querySaveMetaInfos implementation.Johannes Schickel
This results in less code and also less I/O operations (including seeking).
2013-11-27SCUMM: Slight cleanup in savegame code.Johannes Schickel
2013-11-01SCUMM: More renaming for playersFilippos Karapetis
Rename "player" directory to "players", and reintroduce the "player_" file prefix. This has been done after sev's request. "players/player_foo.*" is more descriptive, and avoids potential name clashes in libraries
2013-11-01SCUMM: Move all players to a separate "player" directoryFilippos Karapetis
There are 34 player .cpp/.h player files, so they have been placed in their own directory, to logically separate them from the rest of the engine
2013-10-05SCUMM: Make all HE saves prepend the target nameMatthew Hoops
This makes HE follow the ScummVM convention of using the target name everywhere. It also fixes having more than one team in both soccer and football. Loading old saves will still work and they will be tried if the newer save names are not found.
2012-11-15SCUMM: Save/load Mac music engine state for Loom and MI1Torbjörn Andersson
Note that while this removes _townsPlayer->saveLoadWithSerializer(s) it really shouldn't break anything because _musicEngine also points to the FM Towns player. Famous last words...
2012-09-26JANITORIAL: Remove trailing whitespaces.Johannes Schickel
Powered by: git ls-files "*.cpp" "*.h" "*.m" "*.mm" | xargs sed -i -e 's/[ \t]*$//'
2012-02-15JANITORIAL: Fix missing whitespace in pointer castTarek Soliman
find -name '*.h' -or -name '*.cpp' | xargs sed -r -i 's@\(([A-Za-z0-9]+)\*\)@(\1 *)@g' This seems to have caught some params as well which is not undesirable IMO. It also caught some strings containing this which is undesirable so I excluded them manually. (engines/sci/engine/kernel_tables.h)
2012-02-11Revert "SCUMM: revert savegame version to 89"Willem Jan Palenstijn
This reverts commit 65fc7225bb31e72120dcdf16e91ae377c657548d. Increasing the savegame version on a branch and then decreasing it again leads to problems with loading current savegames in old commits during a bisect.
2012-02-11SCUMM: revert savegame version to 89Tobias Gunkel
Previous versions 89-92 are merged into version 89.
2012-02-11SCUMM: save complete v0 state and initialize actors correctlyTobias Gunkel
2012-02-11SCUMM: do not convert a savegame twiceTobias Gunkel
2012-02-11SCUMM: merge object v0 id and type into one object varTobias Gunkel
2012-02-11SCUMM: changed handling of _activeInventory/_activeActor to ↵Tobias Gunkel
_activeObject(2)/_activeObject(2)Type Note: the transition is not completed yet. The code compiles but is probably not runnable as not every occurrence of _activeInventory has been properly replaced. The usage of _v0ObjectIndex and _v0ObjectInInventory should be revised too and both variables should be replaced by another mechanism (maybe by using a single variable "obj = (type << 8) | id"). - moved v0 only vars _activeInventory, _activeObject, _activeVerb from ScummEngine_v2 to ScummEngine_v0 - removed _activeActor, _activeInvExecute, _activeObject2Inv and _activeInventory. They are handled by _activeObject/_activeObjectType and _activeObject2/_activeObject2Type now. - removed _activeObject(2)Index as they only bloat the code without any benefit (?) - merge prep-name tables from ScummEngine_v2::drawPreposition() and ScummEngine_v0::drawSentenceWord() by introducing ScummEngine_v2::drawPreposition() - rename ObjectData.flags -> obj_type (quick-fix only, needs review! Maybe obj_nr and obj_type can be merged into one var: obj_nr = (obj_type << 8) | obj_nr) - o_unknown2 is negation of o_ifActiveObject (o_ifNotEqualActiveObject2) - renamed o_ifActiveObject -> o_ifEqualActiveObject2 as it acts only on _activeObject2 - renamed ScummEngine_v0::drawSentenceWord() -> ScummEngine_v0::getObjectName()
2011-11-24SCUMM: paranoia "fix" for ae5192c5d396b6ab3caf57adabeb03a832966dd3athrxx
(change sizeof check to use int16 instead of Common::Rect)
2011-11-24SCUMM: make FM-Towns save files compatible between DS and other platformsathrxx
(only applies to new save files)
2011-11-02SCUMM: Minor clean upWillem Jan Palenstijn
2011-11-01SCUMM: add comment to last commitathrxx
2011-11-01SCUMM: fix save file incompatibility between DS and other ports for non ↵athrxx
FM-TOWNS games
2011-08-27SCUMM: Properly prefix player_towns.h include with scumm/.Johannes Schickel
2011-08-27SCUMM: Also save first used color beyond 80 in Indy4 Amiga palette.Johannes Schickel
2011-08-26SCUMM: Save Indy4 Amiga specific palettes like the original did.Johannes Schickel
For older saves I added a warning and a fallback which tries to setup everything correctly. This might cause some issues, but should hopefully be just fine.
2011-08-26SCUMM: Implement proper Indy4 Amiga palette handling.Johannes Schickel
This should fix incorrect text colors in some scenes.
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-20ALL: Remove trailing whitespacesMax Horn
This tries to make our code a bit more compliant with our code formatting conventions. For future use, this is the command I used: git ls-files "*.cpp" "*.h" | xargs sed -i -e 's/[ \t]*$//'
2011-06-18SCUMM: regenerate 16bit palette after loading a savegame in LOOM PCEathrxx
(this avoids isssues when using savegames from different ports with different 16bit color modes)
2011-06-15SCUMM: hopefully fix 16bit mode support for SCUMM FM-TOWNS games and LOOM ↵athrxx
PCE on Android This mostly reverts 5b7754e3f095eb8a469dd4b7de5a6379f8e13c27. Instead, we try to use other 16bit modes after 555 fails.
2011-06-02ENGINES: Change 2nd param of Engine::saveGameState to Common::StringMax Horn
2011-05-13SCUMM: Turned ResTypeData into a Common::Array<Resource>, subsuming its ↵Max Horn
_resource member