Changeset - 2154d10fecad
[Not reviewed]
default
0 3 0
Jason Maltzen - 5 years ago 2019-11-02 13:25:48
jason@hiddenachievement.com
Fix another bug in scanning where it was scanning off the right side of the image.
3 files changed with 3 insertions and 3 deletions:
0 comments (0 inline, 0 general)
DesertPaintLab.csproj
Show inline comments
...
 
@@ -15,25 +15,25 @@
 
    <UpdateEnabled>false</UpdateEnabled>
 
    <UpdateMode>Foreground</UpdateMode>
 
    <UpdateInterval>7</UpdateInterval>
 
    <UpdateIntervalUnits>Days</UpdateIntervalUnits>
 
    <UpdatePeriodically>false</UpdatePeriodically>
 
    <UpdateRequired>false</UpdateRequired>
 
    <MapFileExtensions>true</MapFileExtensions>
 
    <AutorunEnabled>true</AutorunEnabled>
 
    <ApplicationRevision>0</ApplicationRevision>
 
    <ApplicationVersion>1.0.0.%2a</ApplicationVersion>
 
    <UseApplicationTrust>false</UseApplicationTrust>
 
    <BootstrapperEnabled>true</BootstrapperEnabled>
 
    <ReleaseVersion>9.0.3</ReleaseVersion>
 
    <ReleaseVersion>9.0.4</ReleaseVersion>
 
  </PropertyGroup>
 
  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x86' ">
 
    <DebugSymbols>true</DebugSymbols>
 
    <DebugType>full</DebugType>
 
    <Optimize>false</Optimize>
 
    <OutputPath>bin\x86\Debug</OutputPath>
 
    <DefineConstants>DEBUG</DefineConstants>
 
    <ErrorReport>prompt</ErrorReport>
 
    <WarningLevel>4</WarningLevel>
 
    <PlatformTarget>x86</PlatformTarget>
 
    <ConsolePause>false</ConsolePause>
 
    <additionalargs>/unsafe</additionalargs>
DesertPaintLab.sln
Show inline comments
...
 
@@ -32,15 +32,15 @@ Global
 
		$0.TextStylePolicy = $2
 
		$2.inheritsSet = null
 
		$2.scope = text/x-csharp
 
		$0.CSharpFormattingPolicy = $3
 
		$3.scope = text/x-csharp
 
		$0.TextStylePolicy = $4
 
		$4.FileWidth = 80
 
		$4.TabsToSpaces = True
 
		$4.scope = text/plain
 
		$0.StandardHeader = $5
 
		$0.VersionControlPolicy = $6
 
		description = Desert Paint Lab utility for A Tale in the Desert
 
		version = 9.0.3
 
		version = 9.0.4
 
	EndGlobalSection
 
EndGlobal
ReactionRecorder.cs
Show inline comments
...
 
@@ -327,25 +327,25 @@ namespace DesertPaintLab
 
            result &= IsColorMatch(swatch_r, swatch_r, swatch_r, pixBytes[solidLowerRight], pixBytes[solidLowerRight + 1], pixBytes[solidLowerRight + 2]);
 

	
 
            if (!result)
 
            {
 
                return false;
 
            }
 

	
 
            // scan down the right and left sides
 
            for (int yOff = 1; yOff < (swatchHeight - 5); ++yOff)
 
            {
 
                int testPixel = solidUpperLeft + (yOff * stride);
 
                result &= IsColorMatch(swatch_r, swatch_r, swatch_r, pixBytes[testPixel], pixBytes[testPixel + 1], pixBytes[testPixel + 2]);
 
                testPixel += ((swatchWidth - 1) * (x + 3));
 
                testPixel += ((swatchWidth - 1) * 3);
 
                result &= IsColorMatch(swatch_r, swatch_r, swatch_r, pixBytes[testPixel], pixBytes[testPixel + 1], pixBytes[testPixel + 2]);
 
            }
 

	
 
            if (!result)
 
            {
 
                WriteLog("Failed to find left edge for potential swatch of color {2}, {3}, {4} at {0}, {1}", x, y, swatch_r, swatch_g, swatch_b);
 
                return false;
 
            }
 

	
 
            // test the left edge for dark pixels
 
            int i = 0;
 
            for (i = 0; result && (i < swatchHeight-pixelMultiplier); ++i)
0 comments (0 inline, 0 general)