aboutsummaryrefslogtreecommitdiff
path: root/engines/scumm/saveload.cpp
diff options
context:
space:
mode:
authorMax Horn2006-04-29 16:24:39 +0000
committerMax Horn2006-04-29 16:24:39 +0000
commitc4df5037dc19a053cb0a3f66a4cf0775ffc09183 (patch)
tree7e68680a343cd0a471f19209d86790b053a2fd86 /engines/scumm/saveload.cpp
parentad5a89a04b3ccc847cb022b125d2a555c10839b6 (diff)
downloadscummvm-rg350-c4df5037dc19a053cb0a3f66a4cf0775ffc09183.tar.gz
scummvm-rg350-c4df5037dc19a053cb0a3f66a4cf0775ffc09183.tar.bz2
scummvm-rg350-c4df5037dc19a053cb0a3f66a4cf0775ffc09183.zip
* Renamed several methods in favor of a somewhat more uniform naming scheme: setupFOO for stuff that inits static data (i.e. will be called only once, or after loading savegames), vs. resetFOO / updateFOO methods which are called frequently and (re)set dynamic data.
* Doing this, split scummInit into setupScumm and resetScumm methods * Moved some init code to new methods (huuuuge init methods are hard to read, and hard to customize using subclassing) * Renmaed various setup???Palette methods to set???Palette * Some minor cleanup / tweaks svn-id: r22227
Diffstat (limited to 'engines/scumm/saveload.cpp')
-rw-r--r--engines/scumm/saveload.cpp51
1 files changed, 6 insertions, 45 deletions
diff --git a/engines/scumm/saveload.cpp b/engines/scumm/saveload.cpp
index 92cd9881fd..d6594f1a55 100644
--- a/engines/scumm/saveload.cpp
+++ b/engines/scumm/saveload.cpp
@@ -257,7 +257,7 @@ bool ScummEngine::loadState(int slot, bool compat) {
res.nukeResource(i, j);
}
- initScummVars();
+ resetScummVars();
if (_game.features & GF_OLD_BUNDLE)
loadCharset(0); // FIXME - HACK ?
@@ -270,7 +270,7 @@ bool ScummEngine::loadState(int slot, bool compat) {
delete in;
// Update volume settings
- setupVolumes();
+ updateVolumes();
// Init NES costume data
if (_game.platform == Common::kPlatformNES) {
@@ -331,53 +331,14 @@ bool ScummEngine::loadState(int slot, bool compat) {
}
}
- // We could simply dirty colours 0-15 for 16-colour games -- nowadays
- // they handle their palette pretty much like the more recent games
- // anyway. There was a time, though, when re-initializing was necessary
- // for backwards compatibility, and it may still prove useful if we
- // ever add options for using different 16-colour palettes.
- if (_game.version == 1) {
- if (_game.platform == Common::kPlatformC64) {
- setupC64Palette();
- } else if (_game.platform == Common::kPlatformNES) {
- setupNESPalette();
- } else {
- setupV1Palette();
- }
- } else if (_game.features & GF_16COLOR) {
- switch (_renderMode) {
- case Common::kRenderEGA:
- setupEGAPalette();
- break;
-
- case Common::kRenderAmiga:
- setupAmigaPalette();
- break;
-
- case Common::kRenderCGA:
- setupCGAPalette();
- break;
-
- case Common::kRenderHercA:
- case Common::kRenderHercG:
- setupHercPalette();
- break;
-
- default:
- if ((_game.platform == Common::kPlatformAmiga) || (_game.platform == Common::kPlatformAtariST))
- setupAmigaPalette();
- else
- setupEGAPalette();
- }
- } else
- setDirtyColors(0, 255);
-
+ // Reset the palette.
+ resetPalette();
if (hdr.ver < VER(35) && _game.id == GID_MANIAC && _game.version == 1)
- setupV1ActorTalkColor();
+ resetV1ActorTalkColor();
// Load the static room data
- loadRoomSubBlocks();
+ setupRoomSubBlocks();
if (!(_game.features & GF_NEW_CAMERA)) {
camera._last.x = camera._cur.x;