[Scummvm-cvs-logs] scummvm master -> da9ffe9dbc0912463c6161186085525bb775c0c1
wjp
wjp at usecode.org
Mon Oct 27 23:05:40 CET 2014
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:
da9ffe9dbc SCI: Add note on SSCI 11 FindColor bug
Commit: da9ffe9dbc0912463c6161186085525bb775c0c1
https://github.com/scummvm/scummvm/commit/da9ffe9dbc0912463c6161186085525bb775c0c1
Author: Willem Jan Palenstijn (wjp at usecode.org)
Date: 2014-10-27T23:04:25+01:00
Commit Message:
SCI: Add note on SSCI 11 FindColor bug
Changed paths:
engines/sci/graphics/palette.cpp
diff --git a/engines/sci/graphics/palette.cpp b/engines/sci/graphics/palette.cpp
index a3624c7..c98d1d8 100644
--- a/engines/sci/graphics/palette.cpp
+++ b/engines/sci/graphics/palette.cpp
@@ -524,6 +524,10 @@ uint16 GfxPalette::matchColor(byte r, byte g, byte b) {
cdiff = (dr*dr) + (dg*dg) + (db*db);
// minimum sum match (Sierra's)
// cdiff = ABS(dr) + ABS(dg) + ABS(db);
+// Note: (most? all?) SCI 1.1 interpreters have a bug in this code,
+// and in fact have dr, dg, db as signed int8. This makes the comparison
+// wrap around so that 0 and 255 have an effective distance of 1.
+// See bug 6455 for a symptom of this in SQ5.
if (cdiff < diff) {
if (cdiff == 0)
return i | 0x8000; // setting this flag to indicate exact match
More information about the Scummvm-git-logs
mailing list