diff options
author | Travis Howell | 2004-07-25 09:21:58 +0000 |
---|---|---|
committer | Travis Howell | 2004-07-25 09:21:58 +0000 |
commit | 290d73ea0b8cbde721a693dd4f7e858cdf34e920 (patch) | |
tree | 777cca4797082dddccb056db53eec48b37be467c /scumm | |
parent | ce620d17fd46a4187bc7b0287410e2b926826b43 (diff) | |
download | scummvm-rg350-290d73ea0b8cbde721a693dd4f7e858cdf34e920.tar.gz scummvm-rg350-290d73ea0b8cbde721a693dd4f7e858cdf34e920.tar.bz2 scummvm-rg350-290d73ea0b8cbde721a693dd4f7e858cdf34e920.zip |
Sam & Max doesn't need separate palette, just uses _shadowPalette.
svn-id: r14323
Diffstat (limited to 'scumm')
-rw-r--r-- | scumm/costume.cpp | 7 | ||||
-rw-r--r-- | scumm/palette.cpp | 11 | ||||
-rw-r--r-- | scumm/script_v6.cpp | 4 | ||||
-rw-r--r-- | scumm/scumm.h | 2 |
4 files changed, 9 insertions, 15 deletions
diff --git a/scumm/costume.cpp b/scumm/costume.cpp index bb806c96a2..ef265042b9 100644 --- a/scumm/costume.cpp +++ b/scumm/costume.cpp @@ -470,11 +470,10 @@ void CostumeRenderer::proc3() { masked = (y < 0 || y >= _outheight) || (v1.mask_ptr && ((mask[0] | mask[v1.imgbufoffs]) & maskbit)); if (color && !masked) { - // FIXME: Fully implement _shadow_mode. - // For now, it's enough for Sam & Max - // transparency. + // FIXME: Fully implement _shadow_mode.in Sam & Max + // For now, it's enough for transparency. if (_shadow_mode & 0x20) { - pcolor = _vm->_proc_special_palette[*dst]; + pcolor = _shadow_table[*dst]; } else { pcolor = _palette[color]; if (pcolor == 13 && _shadow_table) diff --git a/scumm/palette.cpp b/scumm/palette.cpp index 75a4a3477b..26c3ce3831 100644 --- a/scumm/palette.cpp +++ b/scumm/palette.cpp @@ -287,11 +287,6 @@ void ScummEngine::cyclePalette() { doCyclePalette(_currentPalette, cycl->start, cycl->end, 3, !(cycl->flags & 2)); - // Also cycle the other, indirect palettes - if (_proc_special_palette) { - doCycleIndirectPalette(_proc_special_palette, cycl->start, cycl->end, !(cycl->flags & 2)); - } - if (_shadowPalette) { if (_version >= 7) { for (j = 0; j < NUM_SHADOW_PALETTE; j++) @@ -531,7 +526,7 @@ void ScummEngine::setupShadowPalette(int redScale, int greenScale, int blueScale } /** This function create the specialPalette used for semi-transparency in SamnMax */ -void ScummEngine::createSpecialPalette(int16 from, int16 to, int16 redScale, int16 greenScale, int16 blueScale, +void ScummEngine::setupShadowPalette(int16 from, int16 to, int16 redScale, int16 greenScale, int16 blueScale, int16 startColor, int16 endColor) { const byte *palPtr, *curPtr; const byte *searchPtr; @@ -546,7 +541,7 @@ void ScummEngine::createSpecialPalette(int16 from, int16 to, int16 redScale, int palPtr = getPalettePtr(_curPalIndex); for (i = 0; i < 256; i++) - _proc_special_palette[i] = i; + _shadowPalette[i] = i; curPtr = palPtr + startColor * 3; @@ -574,7 +569,7 @@ void ScummEngine::createSpecialPalette(int16 from, int16 to, int16 redScale, int currentResult = colorWeight(ar - r, ag - g, ab - b); if (currentResult < bestResult) { - _proc_special_palette[i] = currentIndex; + _shadowPalette[i] = currentIndex; bestResult = currentResult; } currentIndex++; diff --git a/scumm/script_v6.cpp b/scumm/script_v6.cpp index abe6f6da95..2515778cbf 100644 --- a/scumm/script_v6.cpp +++ b/scumm/script_v6.cpp @@ -2615,7 +2615,7 @@ void ScummEngine_v6::o6_kernelSetFunctions() { // Case 108 and 109 share the same function if (num != 6) warning("o6_kernelSetFunctions sub op %d: expected 6 params but got %d", args[0], num); - createSpecialPalette(args[1], args[2], args[3], args[4], args[5], 0, 256); + setupShadowPalette(args[1], args[2], args[3], args[4], args[5], 0, 256); break; case 110: _charset->clearCharsetMask(); @@ -2625,7 +2625,7 @@ void ScummEngine_v6::o6_kernelSetFunctions() { a->shadow_mode = args[2] + args[3]; break; case 112: /* palette shift? */ - createSpecialPalette(args[1], args[2], args[3], args[4], args[5], args[6], args[7]); + setupShadowPalette(args[1], args[2], args[3], args[4], args[5], args[6], args[7]); break; case 114: // Sam & Max film noir mode diff --git a/scumm/scumm.h b/scumm/scumm.h index 84b9100de0..b724b4ec55 100644 --- a/scumm/scumm.h +++ b/scumm/scumm.h @@ -877,7 +877,7 @@ protected: void initBGBuffers(int height); void initCycl(const byte *ptr); // Color cycle - void createSpecialPalette(int16 a, int16 b, int16 c, int16 d, int16 e, int16 colorMin, int16 colorMax); + void setupShadowPalette(int16 a, int16 b, int16 c, int16 d, int16 e, int16 colorMin, int16 colorMax); void drawObject(int obj, int arg); void drawRoomObjects(int arg); |