[Scummvm-cvs-logs] SF.net SVN: scummvm:[43416] scummvm/branches/gsoc2009-16bit/engines/scumm
Kirben at users.sourceforge.net
Kirben at users.sourceforge.net
Sun Aug 16 02:20:23 CEST 2009
Revision: 43416
http://scummvm.svn.sourceforge.net/scummvm/?rev=43416&view=rev
Author: Kirben
Date: 2009-08-16 00:20:23 +0000 (Sun, 16 Aug 2009)
Log Message:
-----------
Revert revision 43410, and add alternative fix.
Revision Links:
--------------
http://scummvm.svn.sourceforge.net/scummvm/?rev=43410&view=rev
Modified Paths:
--------------
scummvm/branches/gsoc2009-16bit/engines/scumm/akos.cpp
scummvm/branches/gsoc2009-16bit/engines/scumm/cursor.cpp
scummvm/branches/gsoc2009-16bit/engines/scumm/he/palette_he.cpp
scummvm/branches/gsoc2009-16bit/engines/scumm/palette.cpp
Modified: scummvm/branches/gsoc2009-16bit/engines/scumm/akos.cpp
===================================================================
--- scummvm/branches/gsoc2009-16bit/engines/scumm/akos.cpp 2009-08-15 19:09:57 UTC (rev 43415)
+++ scummvm/branches/gsoc2009-16bit/engines/scumm/akos.cpp 2009-08-16 00:20:23 UTC (rev 43416)
@@ -299,7 +299,6 @@
if (size > 256)
error("akos_setPalette: %d is too many colors", size);
-#ifdef ENABLE_HE
if (_vm->_game.features & GF_16BIT_COLOR) {
if (_paletteNum) {
for (i = 0; i < size; i++)
@@ -318,13 +317,10 @@
for (i = 0; i < size; i++)
_palette[i] = (byte)_vm->_hePalettes[_paletteNum * _vm->_hePaletteSlot + 768 + akpl[i]];
} else {
-#endif
for (i = 0; i < size; i++) {
_palette[i] = new_palette[i] != 0xFF ? new_palette[i] : akpl[i];
}
-#ifdef ENABLE_HE
}
-#endif
if (_vm->_game.heversion == 70) {
for (i = 0; i < size; i++)
Modified: scummvm/branches/gsoc2009-16bit/engines/scumm/cursor.cpp
===================================================================
--- scummvm/branches/gsoc2009-16bit/engines/scumm/cursor.cpp 2009-08-15 19:09:57 UTC (rev 43415)
+++ scummvm/branches/gsoc2009-16bit/engines/scumm/cursor.cpp 2009-08-16 00:20:23 UTC (rev 43416)
@@ -194,19 +194,15 @@
for (j = 0; j < 32; j++) {
switch ((p & (0x3 << 14)) >> 14) {
case 1:
-#ifdef ENABLE_HE
if (_bitDepth == 2)
WRITE_UINT16(_grabbedCursor + 64 * i + j * 2, get16BitColor(palette[4], palette[5], palette[6]));
else
-#endif
_grabbedCursor[32 * i + j] = 0xfe;
break;
case 2:
-#ifdef ENABLE_HE
if (_bitDepth == 2)
WRITE_UINT16(_grabbedCursor + 64 * i + j * 2, get16BitColor(palette[0], palette[1], palette[2]));
else
-#endif
_grabbedCursor[32 * i + j] = 0xfd;
break;
default:
Modified: scummvm/branches/gsoc2009-16bit/engines/scumm/he/palette_he.cpp
===================================================================
--- scummvm/branches/gsoc2009-16bit/engines/scumm/he/palette_he.cpp 2009-08-15 19:09:57 UTC (rev 43415)
+++ scummvm/branches/gsoc2009-16bit/engines/scumm/he/palette_he.cpp 2009-08-16 00:20:23 UTC (rev 43416)
@@ -33,27 +33,6 @@
namespace Scumm {
-uint8 *ScummEngine::getHEPaletteSlot(uint16 palSlot) {
- assertRange(0, palSlot, _numPalettes, "palette");
-
- if (_game.heversion >= 99) {
- if (palSlot)
- return _hePalettes + palSlot * _hePaletteSlot + 768;
- else
- return _hePalettes + _hePaletteSlot + 768;
- }
-
- return NULL;
-}
-
-uint16 ScummEngine::get16BitColor(uint8 r, uint8 g, uint8 b) {
- uint16 ar = (r >> 3) << 10;
- uint16 ag = (g >> 3) << 5;
- uint16 ab = (b >> 3) << 0;
- uint16 col = ar | ag | ab;
- return col;
-}
-
void ScummEngine_v71he::remapHEPalette(const uint8 *src, uint8 *dst) {
int r, g, b, sum, bestitem, bestsum;
int ar, ag, ab;
Modified: scummvm/branches/gsoc2009-16bit/engines/scumm/palette.cpp
===================================================================
--- scummvm/branches/gsoc2009-16bit/engines/scumm/palette.cpp 2009-08-15 19:09:57 UTC (rev 43415)
+++ scummvm/branches/gsoc2009-16bit/engines/scumm/palette.cpp 2009-08-16 00:20:23 UTC (rev 43416)
@@ -33,6 +33,27 @@
namespace Scumm {
+uint8 *ScummEngine::getHEPaletteSlot(uint16 palSlot) {
+ assertRange(0, palSlot, _numPalettes, "palette");
+
+ if (_game.heversion >= 99) {
+ if (palSlot)
+ return _hePalettes + palSlot * _hePaletteSlot + 768;
+ else
+ return _hePalettes + _hePaletteSlot + 768;
+ }
+
+ return NULL;
+}
+
+uint16 ScummEngine::get16BitColor(uint8 r, uint8 g, uint8 b) {
+ uint16 ar = (r >> 3) << 10;
+ uint16 ag = (g >> 3) << 5;
+ uint16 ab = (b >> 3) << 0;
+ uint16 col = ar | ag | ab;
+ return col;
+}
+
void ScummEngine::resetPalette() {
if (_game.version <= 1) {
if (_game.platform == Common::kPlatformApple2GS) {
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
More information about the Scummvm-git-logs
mailing list