[Scummvm-cvs-logs] scummvm master -> 7b6c49033e70f730d09c36d9c96cd25717c80ad1

dreammaster dreammaster at scummvm.org
Fri Jul 31 04:05:20 CEST 2015


This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .

Summary:
7b6c49033e SHERLOCK: RT: Fix initialization of _lookupTable1


Commit: 7b6c49033e70f730d09c36d9c96cd25717c80ad1
    https://github.com/scummvm/scummvm/commit/7b6c49033e70f730d09c36d9c96cd25717c80ad1
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2015-07-30T22:04:20-04:00

Commit Message:
SHERLOCK: RT: Fix initialization of _lookupTable1

Changed paths:
    engines/sherlock/tattoo/tattoo_user_interface.cpp



diff --git a/engines/sherlock/tattoo/tattoo_user_interface.cpp b/engines/sherlock/tattoo/tattoo_user_interface.cpp
index b5ac998..ef3a7d3 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;






More information about the Scummvm-git-logs mailing list