aboutsummaryrefslogtreecommitdiff
path: root/engines/sherlock
diff options
context:
space:
mode:
authorPaul Gilbert2015-07-30 22:04:20 -0400
committerPaul Gilbert2015-07-30 22:04:20 -0400
commit7b6c49033e70f730d09c36d9c96cd25717c80ad1 (patch)
tree05ff4ecf49672b2e32d524d5f773b56e094c89b6 /engines/sherlock
parent96dea8fd7feb1e668ee98c7d58184c2b83025498 (diff)
downloadscummvm-rg350-7b6c49033e70f730d09c36d9c96cd25717c80ad1.tar.gz
scummvm-rg350-7b6c49033e70f730d09c36d9c96cd25717c80ad1.tar.bz2
scummvm-rg350-7b6c49033e70f730d09c36d9c96cd25717c80ad1.zip
SHERLOCK: RT: Fix initialization of _lookupTable1
Diffstat (limited to 'engines/sherlock')
-rw-r--r--engines/sherlock/tattoo/tattoo_user_interface.cpp22
1 files changed, 11 insertions, 11 deletions
diff --git a/engines/sherlock/tattoo/tattoo_user_interface.cpp b/engines/sherlock/tattoo/tattoo_user_interface.cpp
index b5ac998103..ef3a7d3741 100644
--- a/engines/sherlock/tattoo/tattoo_user_interface.cpp
+++ b/engines/sherlock/tattoo/tattoo_user_interface.cpp
@@ -605,23 +605,23 @@ void TattooUserInterface::setupBGArea(const byte cMap[PALETTE_SIZE]) {
int r, g, b;
switch (scene._currentScene) {
case 8:
- r = cMap[idx * 3] * 4 / 5;
+ r = cMap[idx * 3] / 5;
g = cMap[idx * 3 + 1] * 3 / 4;
b = cMap[idx * 3 + 2] * 3 / 4;
break;
case 18:
case 68:
- r = cMap[idx * 3] * 4 / 3;
- g = cMap[idx * 3 + 1] * 4 / 3;
- b = cMap[idx * 3 + 2] * 4 / 3;
+ r = cMap[idx * 3] / 3;
+ g = cMap[idx * 3 + 1] / 3;
+ b = cMap[idx * 3 + 2] / 3;
break;
case 7:
case 53:
- r = cMap[idx * 3] * 4 / 3;
- g = cMap[idx * 3 + 1] * 4 / 3;
- b = cMap[idx * 3 + 2] * 4 / 3;
+ r = cMap[idx * 3] / 3;
+ g = cMap[idx * 3 + 1] / 3;
+ b = cMap[idx * 3 + 2] / 3;
break;
default:
@@ -629,12 +629,12 @@ void TattooUserInterface::setupBGArea(const byte cMap[PALETTE_SIZE]) {
break;
}
- byte c = 0;
- int cd = (r - cMap[0]) * (r - cMap[0]) + (g - cMap[1]) * (g - cMap[1]) + (b - cMap[2]) * (b - cMap[2]);
+ byte c = 0xff;
+ int cd = 99999;
for (int pal = 0; pal < PALETTE_COUNT; ++pal) {
- 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]);
+ 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);
if (d < cd) {
c = pal;