[Scummvm-cvs-logs] CVS: scummvm/scumm palette.cpp,2.45,2.46 saveload.cpp,1.225,1.226 saveload.h,1.59,1.60
kirben
kirben at users.sourceforge.net
Sat May 21 08:49:40 CEST 2005
- Previous message: [Scummvm-cvs-logs] CVS: scummvm/scumm gfx.cpp,2.455,2.456
- Next message: [Scummvm-cvs-logs] CVS: scummvm/saga actor.cpp,1.130,1.131 actor.h,1.71,1.72 script.h,1.81,1.82 sfuncs.cpp,1.114,1.115
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Update of /cvsroot/scummvm/scummvm/scumm
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv7590/scumm
Modified Files:
palette.cpp saveload.cpp saveload.h
Log Message:
Add patch from cyx for:
1094340 - COMI: Frightening the gravedigger, he goes white.
905833 - COMI: Palette in Theater controls
Index: palette.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/palette.cpp,v
retrieving revision 2.45
retrieving revision 2.46
diff -u -d -r2.45 -r2.46
--- palette.cpp 21 May 2005 14:28:21 -0000 2.45
+++ palette.cpp 21 May 2005 15:45:09 -0000 2.46
@@ -269,7 +269,7 @@
}
}
- if (_heversion >= 90) {
+ if (_heversion >= 90 || _version == 8) {
memcpy(_darkenPalette, _currentPalette, 768);
}
@@ -674,7 +674,7 @@
const byte *palptr;
int color, idx, j;
- if (_heversion >= 90) {
+ if (_heversion >= 90 || _version == 8) {
palptr = _darkenPalette;
} else {
palptr = getPalettePtr(_curPalIndex, _roomResource);
@@ -737,7 +737,7 @@
byte *cur;
int j;
- cptr = getPalettePtr(_curPalIndex, _roomResource) + startColor * 3;
+ cptr = _darkenPalette + startColor * 3;
cur = _currentPalette + startColor * 3;
for (j = startColor; j <= endColor; j++) {
@@ -809,7 +809,9 @@
int i;
int ar, ag, ab;
uint sum, bestsum, bestitem = 0;
- byte *pal = _currentPalette;
+
+ int startColor = (_version == 8) ? 24 : 1;
+ byte *pal = _currentPalette + startColor * 3;
if (r > 255)
r = 255;
@@ -824,7 +826,7 @@
g &= ~3;
b &= ~3;
- for (i = 0; i < 256; i++, pal += 3) {
+ for (i = startColor; i < 256; i++, pal += 3) {
ar = pal[0] & ~3;
ag = pal[1] & ~3;
ab = pal[2] & ~3;
@@ -901,6 +903,11 @@
_currentPalette[idx * 3 + 0] = r;
_currentPalette[idx * 3 + 1] = g;
_currentPalette[idx * 3 + 2] = b;
+ if (_version == 8) {
+ _darkenPalette[idx * 3 + 0] = r;
+ _darkenPalette[idx * 3 + 1] = g;
+ _darkenPalette[idx * 3 + 2] = b;
+ }
setDirtyColors(idx, idx);
}
Index: saveload.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/saveload.cpp,v
retrieving revision 1.225
retrieving revision 1.226
diff -u -d -r1.225 -r1.226
--- saveload.cpp 18 May 2005 00:46:30 -0000 1.225
+++ saveload.cpp 21 May 2005 15:45:09 -0000 1.226
@@ -605,6 +605,7 @@
MK_OBSOLETE(ScummEngine, gdi._transparentColor, sleByte, VER(8), VER(50)),
MKARRAY(ScummEngine, _currentPalette[0], sleByte, 768, VER(8)),
+ MKARRAY(ScummEngine, _darkenPalette[0], sleByte, 768, VER(53)),
// Sam & Max specific palette replaced by _shadowPalette now.
MK_OBSOLETE_ARRAY(ScummEngine, _proc_special_palette[0], sleByte, 256, VER(8), VER(33)),
@@ -915,6 +916,11 @@
s->saveLoadArrayOf(_palManipPalette, 0x300, 1, sleByte);
s->saveLoadArrayOf(_palManipIntermediatePal, 0x600, 1, sleByte);
}
+
+ // darkenPalette was not saved before V53
+ if (s->isLoading() && savegameVersion < VER(53)) {
+ memcpy(_darkenPalette, _currentPalette, 768);
+ }
//
Index: saveload.h
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/saveload.h,v
retrieving revision 1.59
retrieving revision 1.60
diff -u -d -r1.59 -r1.60
--- saveload.h 10 May 2005 23:17:32 -0000 1.59
+++ saveload.h 21 May 2005 15:45:09 -0000 1.60
@@ -45,7 +45,7 @@
* only saves/loads those which are valid for the version of the savegame
* which is being loaded/saved currently.
*/
-#define CURRENT_VER 52
+#define CURRENT_VER 53
/**
* An auxillary macro, used to specify savegame versions. We use this instead
- Previous message: [Scummvm-cvs-logs] CVS: scummvm/scumm gfx.cpp,2.455,2.456
- Next message: [Scummvm-cvs-logs] CVS: scummvm/saga actor.cpp,1.130,1.131 actor.h,1.71,1.72 script.h,1.81,1.82 sfuncs.cpp,1.114,1.115
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the Scummvm-git-logs
mailing list