Changeset - 334157513064
[Not reviewed]
default
0 1 0
Jason Maltzen - 5 years ago 2019-11-08 21:35:30
jason@hiddenachievement.com
Change IsRed / IsGreen / IsBlue tests to be a little more tolerant of brighter pixels - was not detecting green clipped high correctly with the new brighter background texture.
1 file changed with 3 insertions and 3 deletions:
0 comments (0 inline, 0 general)
ReactionRecorder.cs
Show inline comments
...
 
@@ -195,25 +195,25 @@ namespace DesertPaintLab
 
                // 178 and 232
 
                //return ((r > 0xD0) && (g >= 0xC0) && (b >= 0x91)) &&
 
                //       ((r < 0xF4) && (g <= 0xED) && (b <= 0xCD));
 
                return ((color.r >= 0xF0) && (color.r <= 0xFF) && (color.g >= 0xDF) && (color.g <= 0xFA) && (color.b >= 0xB2) && (color.b <= 0xE8));
 
            }
 

	
 
            public static bool IsRed(PixelColor color)
 
            {
 
                return (color.r > 0x9F) && (color.g < 0x62) && (color.b < 0x62);
 
                return (color.r > 0x9F) && (color.g < 0x70) && (color.b < 0x70);
 
            }
 
            public static bool IsGreen(PixelColor color)
 
            {
 
                return (color.r < 0x62) && (color.g > 0x9F) && (color.b < 0x62);
 
                return (color.r < 0x70) && (color.g > 0x9F) && (color.b < 0x70);
 
            }
 
            public static bool IsBlue(PixelColor color)
 
            {
 
                return (color.r < 0x62) && (color.g < 0x62) && (color.b > 0x9F);
 
                return (color.r < 0x70) && (color.g < 0x70) && (color.b > 0x9F);
 
            }
 
        }
 

	
 
        unsafe private class Pixels
 
        {
 
            public byte* pixBytes;
 
            public int width;
 
            public int height;
0 comments (0 inline, 0 general)