diff options
author | Colin Snover | 2016-09-28 15:21:59 -0500 |
---|---|---|
committer | Colin Snover | 2016-09-29 19:39:16 -0500 |
commit | b7f93623c420718e5e781c08149a57a2163318c2 (patch) | |
tree | e66028e02ef02819a81d8972c9bedb8cfd43492c /engines/sci | |
parent | e412eaffbc47e5087401dc57912863bd59dcbf48 (diff) | |
download | scummvm-rg350-b7f93623c420718e5e781c08149a57a2163318c2.tar.gz scummvm-rg350-b7f93623c420718e5e781c08149a57a2163318c2.tar.bz2 scummvm-rg350-b7f93623c420718e5e781c08149a57a2163318c2.zip |
SCI32: Fix broken palette cycling in SCI2/2.1early games
This fixes the incorrect appearance of the Sierra logo in PQ4 when
the main menu appears in hi-res mode.
The behaviour of kPalCycle(SetCycle) changed in between 2.1early
and 2.1mid to fix an off-by-one error that prevented the last
palette entry in a cycle range from being used. Some earlier games,
like PQ4CD in hi-res mode, relied on this behaviour, and would
render incorrectly if the last palette entry in a range was used.
Diffstat (limited to 'engines/sci')
-rw-r--r-- | engines/sci/graphics/palette32.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/engines/sci/graphics/palette32.cpp b/engines/sci/graphics/palette32.cpp index 6b719f8e86..ec3d912365 100644 --- a/engines/sci/graphics/palette32.cpp +++ b/engines/sci/graphics/palette32.cpp @@ -556,7 +556,10 @@ void GfxPalette32::setCycle(const uint8 fromColor, const uint8 toColor, const in clearCycleMap(cycler->fromColor, cycler->numColorsToCycle); } - const uint16 numColorsToCycle = toColor - fromColor + 1; + uint16 numColorsToCycle = toColor - fromColor; + if (getSciVersion() >= SCI_VERSION_2_1_MIDDLE || g_sci->getGameId() == GID_KQ7) { + numColorsToCycle += 1; + } cycler->fromColor = fromColor; cycler->numColorsToCycle = numColorsToCycle; cycler->currentCycle = fromColor; |