mirror of
https://github.com/libretro/scummvm.git
synced 2025-01-26 04:35:16 +00:00
SCI: Add note on SSCI 11 FindColor bug
This commit is contained in:
parent
7661b8adfc
commit
da9ffe9dbc
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user