[Scummvm-cvs-logs] CVS: scummvm/scumm akos.cpp,1.128,1.129 gfx.cpp,2.277,2.278 scumm.cpp,1.59,1.60 scumm.h,1.413,1.414
Travis Howell
kirben at users.sourceforge.net
Sun Jun 27 03:55:02 CEST 2004
Update of /cvsroot/scummvm/scummvm/scumm
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv24833/scumm
Modified Files:
akos.cpp gfx.cpp scumm.cpp scumm.h
Log Message:
Fix actor palette in HE 7.0 games.
Use roompalette[] for all graphics decoders
Index: akos.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/akos.cpp,v
retrieving revision 1.128
retrieving revision 1.129
diff -u -d -r1.128 -r1.129
--- akos.cpp 26 Jun 2004 07:31:57 -0000 1.128
+++ akos.cpp 27 Jun 2004 10:54:25 -0000 1.129
@@ -221,7 +221,10 @@
palette[i] = new_palette[i] != 0xFF ? new_palette[i] : the_akpl[i];
}
- if (size == 256) {
+ if (_vm->_heversion == 70 && size) {
+ for (i = 0; i < size; i++)
+ palette[i] = _vm->he_actor_palette[palette[i]];
+ } else if (size == 256) {
byte color = new_palette[0];
if (color == 255) {
palette[0] = color;
Index: gfx.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/gfx.cpp,v
retrieving revision 2.277
retrieving revision 2.278
diff -u -d -r2.277 -r2.278
--- gfx.cpp 26 Jun 2004 02:45:17 -0000 2.277
+++ gfx.cpp 27 Jun 2004 10:54:31 -0000 2.278
@@ -2236,7 +2236,7 @@
for (; data > 0; data--, src++, dst++) {
if (*src != _transparentColor || !transpCheck)
- *dst = *src;
+ *dst = _roomPalette[*src];
destbytes++;
if (!(destbytes & 7))
@@ -2262,7 +2262,7 @@
for (; data > 0; data--, dst++) {
if (color != _transparentColor || !transpCheck)
- *dst = color;
+ *dst = _roomPalette[color];
destbytes++;
if (!(destbytes & 7))
dst += 312;
@@ -2288,7 +2288,7 @@
while (height) {
for (iteration = 0; iteration < 8; iteration++) {
if (color != _transparentColor || !transpCheck)
- *dst = color;
+ *dst = _roomPalette[color];
dst++;
if (shift <= 16) {
data |= *src << shift;
Index: scumm.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/scumm.cpp,v
retrieving revision 1.59
retrieving revision 1.60
diff -u -d -r1.59 -r1.60
--- scumm.cpp 26 Jun 2004 12:57:11 -0000 1.59
+++ scumm.cpp 27 Jun 2004 10:54:31 -0000 1.60
@@ -2501,6 +2501,18 @@
}
}
+ // Actor Palette in HE 7.0 games
+ if (_heversion == 70) {
+ ptr = findResourceData(MKID('REMP'), roomptr);
+ if (ptr) {
+ for (i = 0; i < 256; i++)
+ he_actor_palette[i] = *ptr++;
+ } else {
+ for (i = 0; i < 256; i++)
+ he_actor_palette[i] = i;
+ }
+ }
+
// Transparent color
if (_features & GF_OLD_BUNDLE)
gdi._transparentColor = 255; // TODO - FIXME
Index: scumm.h
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/scumm.h,v
retrieving revision 1.413
retrieving revision 1.414
diff -u -d -r1.413 -r1.414
--- scumm.h 26 Jun 2004 12:57:11 -0000 1.413
+++ scumm.h 27 Jun 2004 10:54:31 -0000 1.414
@@ -1008,9 +1008,11 @@
bool testGfxOtherUsageBits(int strip, int bit);
public:
+ byte he_actor_palette[256];
byte _proc_special_palette[256];
byte _roomPalette[256];
byte *_shadowPalette;
+ int _staticVar1, _staticVar2, _staticVar3, _staticVar4, _staticVar5;
protected:
int _shadowPaletteSize;
@@ -1030,7 +1032,6 @@
int _saveSound;
bool _native_mt32;
int _midiDriver; // Use the MD_ values from mididrv.h
- int _staticVar1, _staticVar2, _staticVar3, _staticVar4, _staticVar5;
bool _copyProtection;
bool _demoMode;
bool _confirmExit;
More information about the Scummvm-git-logs
mailing list