* 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
This commit is contained in:
parent
ad5a89a04b
commit
c4df5037dc
17 changed files with 239 additions and 259 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue