diff options
Diffstat (limited to 'engines/sherlock')
-rw-r--r-- | engines/sherlock/tattoo/tattoo_user_interface.cpp | 22 |
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; |