aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTravis Howell2005-03-07 00:53:30 +0000
committerTravis Howell2005-03-07 00:53:30 +0000
commitbf9bdd6c2ec8cf57978db3c10b30bc7d76a0907a (patch)
tree7b3fc237adeb7aa95bf66db3e6b2f4f016b1663c
parent07aa92063aebce928dac7a70ab61970af14b1305 (diff)
downloadscummvm-rg350-bf9bdd6c2ec8cf57978db3c10b30bc7d76a0907a.tar.gz
scummvm-rg350-bf9bdd6c2ec8cf57978db3c10b30bc7d76a0907a.tar.bz2
scummvm-rg350-bf9bdd6c2ec8cf57978db3c10b30bc7d76a0907a.zip
Allow EGA option in Amiga/Atari ST games.
Restore correct palette after reloading saved game. svn-id: r17020
-rw-r--r--scumm/saveload.cpp26
-rw-r--r--scumm/scumm.cpp29
2 files changed, 46 insertions, 9 deletions
diff --git a/scumm/saveload.cpp b/scumm/saveload.cpp
index 6c0d698114..3445a453d2 100644
--- a/scumm/saveload.cpp
+++ b/scumm/saveload.cpp
@@ -252,10 +252,30 @@ bool ScummEngine::loadState(int slot, bool compat) {
else
setupV1ZakPalette();
} else if (_features & GF_16COLOR) {
- if ((_features & GF_AMIGA) || (_features & GF_ATARI_ST))
- setupAmigaPalette();
- else
+ 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 ((_features & GF_AMIGA) || (_features & GF_ATARI_ST))
+ setupAmigaPalette();
+ else
+ setupEGAPalette();
+ }
} else
setDirtyColors(0, 255);
diff --git a/scumm/scumm.cpp b/scumm/scumm.cpp
index c0e7ad4d79..19c242af37 100644
--- a/scumm/scumm.cpp
+++ b/scumm/scumm.cpp
@@ -1323,14 +1323,31 @@ void ScummEngine::scummInit() {
} else if (_features & GF_16COLOR) {
for (i = 0; i < 16; i++)
_shadowPalette[i] = i;
- if ((_features & GF_AMIGA) || (_features & GF_ATARI_ST) || _renderMode == Common::kRenderAmiga)
+
+ switch (_renderMode) {
+ case Common::kRenderEGA:
+ setupEGAPalette();
+ break;
+
+ case Common::kRenderAmiga:
setupAmigaPalette();
- else if (_renderMode == Common::kRenderHercA || _renderMode == Common::kRenderHercG)
- setupHercPalette();
- else if (_renderMode == Common::kRenderCGA)
+ break;
+
+ case Common::kRenderCGA:
setupCGAPalette();
- else
- setupEGAPalette();
+ break;
+
+ case Common::kRenderHercA:
+ case Common::kRenderHercG:
+ setupHercPalette();
+ break;
+
+ default:
+ if ((_features & GF_AMIGA) || (_features & GF_ATARI_ST))
+ setupAmigaPalette();
+ else
+ setupEGAPalette();
+ }
}
if (_version > 3 && _version < 8)