diff options
author | Torbjörn Andersson | 2003-07-11 14:54:16 +0000 |
---|---|---|
committer | Torbjörn Andersson | 2003-07-11 14:54:16 +0000 |
commit | e74eddf6fa7e779d3f771bd0bb0a40c241c182b7 (patch) | |
tree | 16c043bebdd6034ae9c18042f41a6530f0afee8f | |
parent | fca93093059229500524af444d087b5365c2339c (diff) | |
download | scummvm-rg350-e74eddf6fa7e779d3f771bd0bb0a40c241c182b7.tar.gz scummvm-rg350-e74eddf6fa7e779d3f771bd0bb0a40c241c182b7.tar.bz2 scummvm-rg350-e74eddf6fa7e779d3f771bd0bb0a40c241c182b7.zip |
Update the 16-colour palette if the user changes the Amiga setting from
the options dialog.
svn-id: r8910
-rw-r--r-- | scumm/scummvm.cpp | 20 |
1 files changed, 13 insertions, 7 deletions
diff --git a/scumm/scummvm.cpp b/scumm/scummvm.cpp index 9179dd86ab..f50c4e4ee0 100644 --- a/scumm/scummvm.cpp +++ b/scumm/scummvm.cpp @@ -753,6 +753,8 @@ Scumm::~Scumm () { void Scumm::setFeatures (uint32 newFeatures) { bool newCostumes = (_features & GF_NEW_COSTUMES) != 0; bool newNewCostumes = (newFeatures & GF_NEW_COSTUMES) != 0; + bool amigaPalette = (_features & GF_AMIGA) != 0; + bool newAmigaPalette = (newFeatures & GF_AMIGA) != 0; _features = newFeatures; @@ -763,6 +765,13 @@ void Scumm::setFeatures (uint32 newFeatures) { else _costumeRenderer = new CostumeRenderer(this); } + + if ((_features & GF_16COLOR) && amigaPalette != newAmigaPalette) { + if (_features & GF_AMIGA) + setupAmigaPalette(); + else + setupEGAPalette(); + } } void Scumm::scummInit() { @@ -784,15 +793,12 @@ void Scumm::scummInit() { _shadowPalette[i] = i; setupC64Palette(); } else if (_features & GF_16COLOR) { - if (_features & GF_AMIGA) { - for (i = 0; i < 16; i++) - _shadowPalette[i] = i; + for (i = 0; i < 16; i++) + _shadowPalette[i] = i; + if (_features & GF_AMIGA) setupAmigaPalette(); - } else { - for (i = 0; i < 16; i++) - _shadowPalette[i] = i; + else setupEGAPalette(); - } } if (_version <= 2) { |