aboutsummaryrefslogtreecommitdiff
path: root/engines/sherlock/tattoo
diff options
context:
space:
mode:
authorPaul Gilbert2015-07-30 22:36:11 -0400
committerPaul Gilbert2015-07-30 22:36:11 -0400
commit6cf0bfe6d52a9c0f02cad3076970f38818a22f06 (patch)
tree8303dd73bdd3bf1f42a8646f326c136cef3b4bd8 /engines/sherlock/tattoo
parent7b6c49033e70f730d09c36d9c96cd25717c80ad1 (diff)
downloadscummvm-rg350-6cf0bfe6d52a9c0f02cad3076970f38818a22f06.tar.gz
scummvm-rg350-6cf0bfe6d52a9c0f02cad3076970f38818a22f06.tar.bz2
scummvm-rg350-6cf0bfe6d52a9c0f02cad3076970f38818a22f06.zip
SHERLOCK: RT: Further fixes for _lookupTable1 init
Diffstat (limited to 'engines/sherlock/tattoo')
-rw-r--r--engines/sherlock/tattoo/tattoo_journal.cpp2
-rw-r--r--engines/sherlock/tattoo/tattoo_user_interface.cpp21
2 files changed, 11 insertions, 12 deletions
diff --git a/engines/sherlock/tattoo/tattoo_journal.cpp b/engines/sherlock/tattoo/tattoo_journal.cpp
index 737593fa74..861f7099df 100644
--- a/engines/sherlock/tattoo/tattoo_journal.cpp
+++ b/engines/sherlock/tattoo/tattoo_journal.cpp
@@ -59,8 +59,8 @@ void TattooJournal::show() {
// Load palette
Common::SeekableReadStream *stream = res.load("journal.pal");
stream->read(palette, PALETTE_SIZE);
- screen.translatePalette(palette);
ui.setupBGArea(palette);
+ screen.translatePalette(palette);
delete stream;
// Set screen to black, and set background
diff --git a/engines/sherlock/tattoo/tattoo_user_interface.cpp b/engines/sherlock/tattoo/tattoo_user_interface.cpp
index ef3a7d3741..77f2dc60df 100644
--- a/engines/sherlock/tattoo/tattoo_user_interface.cpp
+++ b/engines/sherlock/tattoo/tattoo_user_interface.cpp
@@ -594,8 +594,7 @@ void TattooUserInterface::setupBGArea(const byte cMap[PALETTE_SIZE]) {
// to darker as the palette numbers go up. The last palette entry in that run is specified by _bgColor
byte *p = &_lookupTable[0];
for (int idx = 0; idx < PALETTE_COUNT; ++idx)
- *p++ = BG_GREYSCALE_RANGE_END - ((cMap[idx * 3] / 4) * 30 + (cMap[idx * 3 + 1] / 4) * 59 +
- (cMap[idx * 3 + 2] / 4) * 11) / 480;
+ *p++ = BG_GREYSCALE_RANGE_END - (cMap[idx * 3] * 30 + cMap[idx * 3 + 1] * 59 + cMap[idx * 3 + 2] * 11) / 480;
// If we're going to a scene with a haze special effect, initialize the translate table to lighten the colors
if (_mask != nullptr) {
@@ -605,23 +604,23 @@ void TattooUserInterface::setupBGArea(const byte cMap[PALETTE_SIZE]) {
int r, g, b;
switch (scene._currentScene) {
case 8:
- r = cMap[idx * 3] / 5;
+ r = cMap[idx * 3] * 4 / 5;
g = cMap[idx * 3 + 1] * 3 / 4;
b = cMap[idx * 3 + 2] * 3 / 4;
break;
case 18:
case 68:
- r = cMap[idx * 3] / 3;
- g = cMap[idx * 3 + 1] / 3;
- b = cMap[idx * 3 + 2] / 3;
+ r = cMap[idx * 3] * 4 / 3;
+ g = cMap[idx * 3 + 1] * 4 / 3;
+ b = cMap[idx * 3 + 2] * 4 / 3;
break;
case 7:
case 53:
- r = cMap[idx * 3] / 3;
- g = cMap[idx * 3 + 1] / 3;
- b = cMap[idx * 3 + 2] / 3;
+ r = cMap[idx * 3] * 4 / 3;
+ g = cMap[idx * 3 + 1] * 4 / 3;
+ b = cMap[idx * 3 + 2] * 4 / 3;
break;
default:
@@ -633,8 +632,8 @@ void TattooUserInterface::setupBGArea(const byte cMap[PALETTE_SIZE]) {
int cd = 99999;
for (int pal = 0; pal < PALETTE_COUNT; ++pal) {
- int d = (r - cMap[pal * 3] / 4) * (r - cMap[pal * 3] / 4) + (g - cMap[pal * 3 + 1] / 4) * (g - cMap[pal * 3 + 1] / 4)
- + (b - cMap[pal * 3 + 2] / 4) * (b - cMap[pal * 3 + 2] / 4);
+ int d = (r - cMap[pal * 3]) * (r - cMap[pal * 3]) + (g - cMap[pal * 3 + 1]) * (g - cMap[pal * 3 + 1]) +
+ (b - cMap[pal * 3 + 2]) * (b - cMap[pal * 3 + 2]);
if (d < cd) {
c = pal;