RCS file: /cvsroot/scummvm/scummvm/scumm/palette.cpp,v
retrieving revision 2.20
diff -u -r2.20 palette.cpp
|
|
|
147 | 147 | } |
148 | 148 | } |
149 | 149 | setDirtyColors(0, numcolor - 1); |
| 150 | if (_version == 8) { |
| 151 | memcpy(_currentOpPalette, _currentPalette, numcolor * 3); |
| 152 | } |
150 | 153 | } |
151 | 154 | |
152 | 155 | void ScummEngine::setDirtyColors(int min, int max) { |
… |
… |
|
532 | 535 | const byte *cptr; |
533 | 536 | const byte *palptr; |
534 | 537 | int color, idx, j; |
535 | | |
536 | | palptr = getPalettePtr(_curPalIndex, _roomResource); |
| 538 | |
| 539 | if (_version == 8) { |
| 540 | palptr = _currentOpPalette; |
| 541 | } else { |
| 542 | palptr = getPalettePtr(_curPalIndex, _roomResource); |
| 543 | } |
| 544 | |
| 545 | // WORKAROUND bug #905833 |
| 546 | if (_gameId == GID_CMI && (_currentRoom == 20 || _currentRoom == 18) && startColor == 24) { |
| 547 | startColor = 0; |
| 548 | } |
| 549 | |
537 | 550 | for (j = startColor; j <= endColor; j++) { |
538 | 551 | idx = (_heversion == 70) ? _HEV7ActorPalette[j] : j; |
539 | 552 | cptr = palptr + idx * 3; |
… |
… |
|
585 | 598 | * walks from the beach towards the swamp. |
586 | 599 | */ |
587 | 600 | void ScummEngine::desaturatePalette(int hueScale, int satScale, int lightScale, int startColor, int endColor) { |
588 | | |
| 601 | debug(0, "desaturatePalette(%d, %d)", startColor, endColor); |
589 | 602 | if (startColor <= endColor) { |
590 | 603 | const byte *cptr; |
591 | 604 | byte *cur; |
592 | 605 | int j; |
593 | 606 | |
594 | | cptr = getPalettePtr(_curPalIndex, _roomResource) + startColor * 3; |
| 607 | if (_version == 8) { |
| 608 | cptr = _currentOpPalette; |
| 609 | } else { |
| 610 | cptr = getPalettePtr(_curPalIndex, _roomResource); |
| 611 | } |
| 612 | |
| 613 | cptr += startColor * 3; |
595 | 614 | cur = _currentPalette + startColor * 3; |
596 | 615 | |
597 | 616 | for (j = startColor; j <= endColor; j++) { |
… |
… |
|
754 | 773 | _currentPalette[idx * 3 + 0] = r; |
755 | 774 | _currentPalette[idx * 3 + 1] = g; |
756 | 775 | _currentPalette[idx * 3 + 2] = b; |
| 776 | if (_version == 8) { |
| 777 | _currentOpPalette[idx * 3 + 0] = r; |
| 778 | _currentOpPalette[idx * 3 + 1] = g; |
| 779 | _currentOpPalette[idx * 3 + 2] = b; |
| 780 | } |
757 | 781 | setDirtyColors(idx, idx); |
758 | 782 | } |
759 | 783 | |
RCS file: /cvsroot/scummvm/scummvm/scumm/script_v8.cpp,v
retrieving revision 2.278
diff -u -r2.278 script_v8.cpp
|
|
|
1240 | 1240 | setScaleSlot(args[1], args[2], args[3], args[4], args[5], args[6], args[7]); |
1241 | 1241 | break; |
1242 | 1242 | case 22: // setBannerColors |
1243 | | // warning("o8_kernelSetFunctions: setBannerColors(%d, %d, %d, %d)", args[1], args[2], args[3], args[4]); |
| 1243 | warning("o8_kernelSetFunctions: setBannerColors(%d, %d, %d, %d)", args[1], args[2], args[3], args[4]); |
1244 | 1244 | break; |
1245 | 1245 | case 23: // setActorChoreLimbFrame |
1246 | 1246 | a = derefActor(args[1], "o8_kernelSetFunctions:setActorChoreLimbFrame"); |
RCS file: /cvsroot/scummvm/scummvm/scumm/scumm.h,v
retrieving revision 1.521
diff -u -r1.521 scumm.h
|
|
|
1067 | 1067 | protected: |
1068 | 1068 | int _shadowPaletteSize; |
1069 | 1069 | byte _currentPalette[3 * 256]; |
| 1070 | byte _currentOpPalette[3 * 256]; // v8 |
1070 | 1071 | |
1071 | 1072 | int _palDirtyMin, _palDirtyMax; |
1072 | 1073 | |