more special palette fixes by erik
svn-id: r7689
This commit is contained in:
parent
18a6b5dcc1
commit
ec4cc7d774
1 changed files with 9 additions and 2 deletions
|
@ -3104,11 +3104,18 @@ void Scumm::createSpecialPalette(int16 from, int16 to, int16 redScale, int16 gre
|
||||||
int g = (int) (*curPtr++ * greenScale) >> 8;
|
int g = (int) (*curPtr++ * greenScale) >> 8;
|
||||||
int b = (int) (*curPtr++ * blueScale) >> 8;
|
int b = (int) (*curPtr++ * blueScale) >> 8;
|
||||||
|
|
||||||
|
if (r > 255)
|
||||||
|
r = 255;
|
||||||
|
if (g > 255)
|
||||||
|
g = 255;
|
||||||
|
if (b > 255)
|
||||||
|
b = 255;
|
||||||
|
|
||||||
searchPtr = palPtr + from * 3;
|
searchPtr = palPtr + from * 3;
|
||||||
bestResult = 32000;
|
bestResult = (uint)-1;
|
||||||
currentIndex = (byte) from;
|
currentIndex = (byte) from;
|
||||||
|
|
||||||
for (j = from; j < to; j++) {
|
for (j = from; j <= to; j++) {
|
||||||
int ar = (*searchPtr++);
|
int ar = (*searchPtr++);
|
||||||
int ag = (*searchPtr++);
|
int ag = (*searchPtr++);
|
||||||
int ab = (*searchPtr++);
|
int ab = (*searchPtr++);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue