[Scummvm-cvs-logs] CVS: scummvm/scumm actor.cpp,1.297,1.298 akos.cpp,1.178,1.179 palette.cpp,2.18,2.19 script_v6.cpp,1.405,1.406 script_v8.cpp,2.272,2.273 scumm.h,1.492,1.493
Max Horn
fingolfin at users.sourceforge.net
Tue Sep 21 06:55:03 CEST 2004
- Previous message: [Scummvm-cvs-logs] CVS: scummvm/scumm actor.cpp,1.296,1.297 object.cpp,1.186,1.187 resource.h,1.12,1.13
- Next message: [Scummvm-cvs-logs] CVS: tools descumm-common.cpp,1.9,1.10 descumm-tool.cpp,1.6,1.7 descumm.h,1.11,1.12 descumm6.cpp,1.178,1.179
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Update of /cvsroot/scummvm/scummvm/scumm
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv27651
Modified Files:
actor.cpp akos.cpp palette.cpp script_v6.cpp script_v8.cpp
scumm.h
Log Message:
cleanup
Index: actor.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/actor.cpp,v
retrieving revision 1.297
retrieving revision 1.298
diff -u -d -r1.297 -r1.298
--- actor.cpp 21 Sep 2004 12:57:38 -0000 1.297
+++ actor.cpp 21 Sep 2004 13:54:29 -0000 1.298
@@ -1805,12 +1805,9 @@
// allow remap of generic palette entry?
if (!shadow_mode || akpl_color >= 16) {
- if (r_fact != 256)
- r = (r * r_fact) >> 8;
- if (g_fact != 256)
- g = (g * g_fact) >> 8;
- if (b_fact != 256)
- b = (b * b_fact) >> 8;
+ r = (r * r_fact) >> 8;
+ g = (g * g_fact) >> 8;
+ b = (b * b_fact) >> 8;
palette[i] = _vm->remapPaletteColor(r, g, b, threshold);
}
}
Index: akos.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/akos.cpp,v
retrieving revision 1.178
retrieving revision 1.179
diff -u -d -r1.178 -r1.179
--- akos.cpp 20 Sep 2004 18:27:12 -0000 1.178
+++ akos.cpp 21 Sep 2004 13:54:30 -0000 1.179
@@ -289,17 +289,15 @@
}
void AkosRenderer::setPalette(byte *new_palette) {
- const byte *the_akpl;
uint size, i;
- the_akpl = _vm->findResourceData(MKID('AKPL'), akos);
size = _vm->getResourceDataSize(akpl);
if (size > 256)
error("akos_setPalette: %d is too many colors", size);
for (i = 0; i < size; i++) {
- palette[i] = new_palette[i] != 0xFF ? new_palette[i] : the_akpl[i];
+ palette[i] = new_palette[i] != 0xFF ? new_palette[i] : akpl[i];
}
if (_vm->_heversion == 70 && size) {
Index: palette.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/palette.cpp,v
retrieving revision 2.18
retrieving revision 2.19
diff -u -d -r2.18 -r2.19
--- palette.cpp 21 Sep 2004 12:44:33 -0000 2.18
+++ palette.cpp 21 Sep 2004 13:54:30 -0000 2.19
@@ -436,7 +436,7 @@
*table++ = remapPaletteColor((curpal[0] * redScale) >> 8,
(curpal[1] * greenScale) >> 8,
(curpal[2] * blueScale) >> 8,
- (uint) - 1);
+ -1);
curpal += 3;
}
}
@@ -658,7 +658,7 @@
}
-int ScummEngine::remapPaletteColor(int r, int g, int b, uint threshold) {
+int ScummEngine::remapPaletteColor(int r, int g, int b, int threshold) {
int i;
int ar, ag, ab;
uint sum, bestsum, bestitem = 0;
@@ -692,7 +692,7 @@
}
}
- if (threshold != (uint) - 1 && bestsum > colorWeight(threshold, threshold, threshold)) {
+ if (threshold != -1 && bestsum > colorWeight(threshold, threshold, threshold)) {
// Best match exceeded threshold. Try to find an unused palette entry and
// use it for our purpose.
pal = _currentPalette + (256 - 2) * 3;
Index: script_v6.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/script_v6.cpp,v
retrieving revision 1.405
retrieving revision 1.406
diff -u -d -r1.405 -r1.406
--- script_v6.cpp 19 Sep 2004 00:15:09 -0000 1.405
+++ script_v6.cpp 21 Sep 2004 13:54:30 -0000 1.406
@@ -2705,7 +2705,7 @@
push(checkXYInBoxBounds(args[3], args[1], args[2]));
break;
case 206:
- push(remapPaletteColor(args[1], args[2], args[3], (uint) - 1));
+ push(remapPaletteColor(args[1], args[2], args[3], -1));
break;
case 207:
i = getObjectIndex(args[1]);
Index: script_v8.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/script_v8.cpp,v
retrieving revision 2.272
retrieving revision 2.273
diff -u -d -r2.272 -r2.273
--- script_v8.cpp 18 Sep 2004 20:50:15 -0000 2.272
+++ script_v8.cpp 21 Sep 2004 13:54:30 -0000 2.273
@@ -1362,7 +1362,7 @@
push(getKeyState(args[1]));
break;
case 0xCE: // getRGBSlot
- push(remapPaletteColor(args[1], args[2], args[3], (uint) - 1));
+ push(remapPaletteColor(args[1], args[2], args[3], -1));
break;
case 0xD7: // getBox
push(checkXYInBoxBounds(args[3], args[1], args[2]));
Index: scumm.h
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/scumm.h,v
retrieving revision 1.492
retrieving revision 1.493
diff -u -d -r1.492 -r1.493
--- scumm.h 21 Sep 2004 12:44:33 -0000 1.492
+++ scumm.h 21 Sep 2004 13:54:30 -0000 1.493
@@ -978,7 +978,7 @@
virtual void palManipulateInit(int resID, int start, int end, int time);
void palManipulate();
public:
- int remapPaletteColor(int r, int g, int b, uint threshold); // Used by Actor::remapActorPalette
+ int remapPaletteColor(int r, int g, int b, int threshold); // Used by Actor::remapActorPalette
protected:
void moveMemInPalRes(int start, int end, byte direction);
void setupShadowPalette(int slot, int redScale, int greenScale, int blueScale, int startColor, int endColor);
- Previous message: [Scummvm-cvs-logs] CVS: scummvm/scumm actor.cpp,1.296,1.297 object.cpp,1.186,1.187 resource.h,1.12,1.13
- Next message: [Scummvm-cvs-logs] CVS: tools descumm-common.cpp,1.9,1.10 descumm-tool.cpp,1.6,1.7 descumm.h,1.11,1.12 descumm6.cpp,1.178,1.179
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the Scummvm-git-logs
mailing list