diff options
author | David Turner | 2011-01-10 00:35:45 +0000 |
---|---|---|
committer | David Turner | 2011-01-10 00:35:45 +0000 |
commit | a1739f72448ff66740eed344e05bf5522874c062 (patch) | |
tree | a25bb0b441a4976777d56370857f753441ad392c | |
parent | c0da18e9b8f9a20d5adfda5cdf55e781f5b6dc48 (diff) | |
download | scummvm-rg350-a1739f72448ff66740eed344e05bf5522874c062.tar.gz scummvm-rg350-a1739f72448ff66740eed344e05bf5522874c062.tar.bz2 scummvm-rg350-a1739f72448ff66740eed344e05bf5522874c062.zip |
CINE: Modified Palette::rotateRight() function to cope with all positive values of rotation.
This fixes the assert in Operation Stealth in Scene 7 when the Russians mount the Jetskis.
svn-id: r55195
-rw-r--r-- | engines/cine/pal.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/engines/cine/pal.cpp b/engines/cine/pal.cpp index 34b196d5c7..2109c15389 100644 --- a/engines/cine/pal.cpp +++ b/engines/cine/pal.cpp @@ -141,9 +141,10 @@ int power(int base, int power) { // a.k.a. palRotate Palette &Palette::rotateRight(byte firstIndex, byte lastIndex, signed rotationAmount) { - assert(rotationAmount == 0 || rotationAmount == 1); + debug(1, "Palette::rotateRight(firstIndex: %d, lastIndex: %d, rotationAmount:%d)", firstIndex, lastIndex, rotationAmount); + assert(rotationAmount >= 0); - if (rotationAmount == 1) { + for (int j = 0; j < rotationAmount; j++) { const Color lastColor = _colors[lastIndex]; for (int i = lastIndex; i > firstIndex; i--) |