RCS file: /cvsroot/scummvm/scummvm/scumm/palette.cpp,v
retrieving revision 2.45
diff -u -r2.45 palette.cpp
|
|
|
269 | 269 | } |
270 | 270 | } |
271 | 271 | |
272 | | if (_heversion >= 90) { |
| 272 | if (_heversion >= 90 || _version == 8) { |
273 | 273 | memcpy(_darkenPalette, _currentPalette, 768); |
274 | 274 | } |
275 | 275 | |
… |
… |
|
674 | 674 | const byte *palptr; |
675 | 675 | int color, idx, j; |
676 | 676 | |
677 | | if (_heversion >= 90) { |
| 677 | if (_heversion >= 90 || _version == 8) { |
678 | 678 | palptr = _darkenPalette; |
679 | 679 | } else { |
680 | 680 | palptr = getPalettePtr(_curPalIndex, _roomResource); |
… |
… |
|
737 | 737 | byte *cur; |
738 | 738 | int j; |
739 | 739 | |
740 | | cptr = getPalettePtr(_curPalIndex, _roomResource) + startColor * 3; |
| 740 | cptr = _darkenPalette + startColor * 3; |
741 | 741 | cur = _currentPalette + startColor * 3; |
742 | 742 | |
743 | 743 | for (j = startColor; j <= endColor; j++) { |
… |
… |
|
809 | 809 | int i; |
810 | 810 | int ar, ag, ab; |
811 | 811 | uint sum, bestsum, bestitem = 0; |
812 | | byte *pal = _currentPalette; |
| 812 | byte *pal = _currentPalette + 24 * 3; |
813 | 813 | |
814 | 814 | if (r > 255) |
815 | 815 | r = 255; |
… |
… |
|
824 | 824 | g &= ~3; |
825 | 825 | b &= ~3; |
826 | 826 | |
827 | | for (i = 0; i < 256; i++, pal += 3) { |
| 827 | for (i = 24; i < 256; i++, pal += 3) { |
828 | 828 | ar = pal[0] & ~3; |
829 | 829 | ag = pal[1] & ~3; |
830 | 830 | ab = pal[2] & ~3; |
… |
… |
|
901 | 901 | _currentPalette[idx * 3 + 0] = r; |
902 | 902 | _currentPalette[idx * 3 + 1] = g; |
903 | 903 | _currentPalette[idx * 3 + 2] = b; |
| 904 | if (_version == 8) { |
| 905 | _darkenPalette[idx * 3 + 0] = r; |
| 906 | _darkenPalette[idx * 3 + 1] = g; |
| 907 | _darkenPalette[idx * 3 + 2] = b; |
| 908 | } |
904 | 909 | setDirtyColors(idx, idx); |
905 | 910 | } |
906 | 911 | |
RCS file: /cvsroot/scummvm/scummvm/scumm/saveload.cpp,v
retrieving revision 1.225
diff -u -r1.225 saveload.cpp
|
|
|
605 | 605 | |
606 | 606 | MK_OBSOLETE(ScummEngine, gdi._transparentColor, sleByte, VER(8), VER(50)), |
607 | 607 | MKARRAY(ScummEngine, _currentPalette[0], sleByte, 768, VER(8)), |
| 608 | MKARRAY(ScummEngine, _darkenPalette[0], sleByte, 768, VER(53)), |
608 | 609 | |
609 | 610 | // Sam & Max specific palette replaced by _shadowPalette now. |
610 | 611 | MK_OBSOLETE_ARRAY(ScummEngine, _proc_special_palette[0], sleByte, 256, VER(8), VER(33)), |
… |
… |
|
915 | 916 | s->saveLoadArrayOf(_palManipPalette, 0x300, 1, sleByte); |
916 | 917 | s->saveLoadArrayOf(_palManipIntermediatePal, 0x600, 1, sleByte); |
917 | 918 | } |
| 919 | |
| 920 | // darkenPalette was not saved before V53 |
| 921 | if (s->isLoading() && savegameVersion < VER(53)) { |
| 922 | memcpy(_darkenPalette, _currentPalette, 768); |
| 923 | } |
918 | 924 | |
919 | 925 | |
920 | 926 | // |
RCS file: /cvsroot/scummvm/scummvm/scumm/saveload.h,v
retrieving revision 1.59
diff -u -r1.59 saveload.h
|
|
|
45 | 45 | * only saves/loads those which are valid for the version of the savegame |
46 | 46 | * which is being loaded/saved currently. |
47 | 47 | */ |
48 | | #define CURRENT_VER 52 |
| 48 | #define CURRENT_VER 53 |
49 | 49 | |
50 | 50 | /** |
51 | 51 | * An auxillary macro, used to specify savegame versions. We use this instead |