Changeset - e940c165aae5
[Not reviewed]
default
0 1 0
Jason Maltzen - 6 years ago 2018-05-03 04:11:51
jason@hiddenachievement.com
Fix bar widths on reaction recorder
1 file changed with 6 insertions and 3 deletions:
0 comments (0 inline, 0 general)
ReactionRecorder.cs
Show inline comments
...
 
@@ -33,4 +33,4 @@ namespace DesertPaintLab
 
        const int DEFAULT_SWATCH_HEIGHT = 24; // including top and bottom borders
 
        const int DEFAULT_SWATCH_WIDTH = 260;
 
        const int DEFAULT_COLOR_BAR_WIDTH = 306;
 
        const int DEFAULT_SWATCH_WIDTH = 274;
 
        const int DEFAULT_COLOR_BAR_WIDTH = 320;
 
        const int DEFAULT_RED_BAR_SPACING = 32;
...
 
@@ -312,2 +312,3 @@ namespace DesertPaintLab
 
                    }
 
                    WriteLog("Color {0}, {1}, {2} is no longer red at {3},{4}", pixBytes[redPixelStart], pixBytes[redPixelStart + 1], pixBytes[redPixelStart + 2], (redPixelStart % stride)/3, redPixelStart / stride);
 

...
 
@@ -327,2 +328,3 @@ namespace DesertPaintLab
 
                    }
 
                    WriteLog("Color {0}, {1}, {2} is no longer green at pixel offset {3},{4}", pixBytes[greenPixelStart], pixBytes[greenPixelStart + 1], pixBytes[greenPixelStart + 2], (greenPixelStart % stride)/3, redPixelStart / stride);
 

...
 
@@ -342,5 +344,6 @@ namespace DesertPaintLab
 
                    }
 
                    WriteLog("Color {0}, {1}, {2} is no longer blue at pixel offset {3},{4}", pixBytes[bluePixelStart], pixBytes[bluePixelStart + 1], pixBytes[bluePixelStart + 2], (bluePixelStart % stride)/3, bluePixelStart / stride);
 

 
                    reactedColor.Blue = (byte)Math.Round((float)bluePixelCount * 255f / (float)colorBarWidth);
 
                    WriteLog("Found the color swatch at {0}, {1}. Color={2}", x, y, reactedColor);
 
                    WriteLog("Found the color swatch at {0}, {1}. Color={2} Red={3}px Green={4}px Blue={5}px", x, y, reactedColor, redPixelCount, greenPixelCount, bluePixelCount);
 
                    return true;
0 comments (0 inline, 0 general)