Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/ClusterM/NesTiler.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexey 'Cluster' Avdyukhin <clusterrr@clusterrr.com>2022-10-15 23:52:43 +0300
committerAlexey 'Cluster' Avdyukhin <clusterrr@clusterrr.com>2022-10-15 23:52:43 +0300
commita0b2efdee8482c7b6343425c2b09bbf4d466abb8 (patch)
treecdab174266842396417275407529e63376606c27 /NesTiler
parent6b20264f0d07295448a96256f3cdaf1da5478879 (diff)
Tests fixes, minor changes
Diffstat (limited to 'NesTiler')
-rw-r--r--NesTiler/Palette.cs2
-rw-r--r--NesTiler/Program.cs4
2 files changed, 5 insertions, 1 deletions
diff --git a/NesTiler/Palette.cs b/NesTiler/Palette.cs
index 16da496..1d9cb8b 100644
--- a/NesTiler/Palette.cs
+++ b/NesTiler/Palette.cs
@@ -134,7 +134,7 @@ namespace com.clusterrr.Famicom.NesTiler
return GetEnumerator();
}
- public override string ToString() => string.Join(", ", colors.Where(c => c.HasValue).Select(c => ColorTranslator.ToHtml(c.Value)));
+ public override string ToString() => string.Join(", ", colors.Where(c => c.HasValue).Select(c => ColorTranslator.ToHtml(c.Value)).OrderBy(c => c));
public override int GetHashCode()
{
diff --git a/NesTiler/Program.cs b/NesTiler/Program.cs
index 44188b3..6bc9320 100644
--- a/NesTiler/Program.cs
+++ b/NesTiler/Program.cs
@@ -281,6 +281,10 @@ namespace com.clusterrr.Famicom.NesTiler
for (int x = 0; x < image.Width; x++)
{
var color = image.GetPixelColor(x, y);
+ if (color.R == 0x00 && color.G == 0x50 && color.B == 0x00)
+ {
+ Console.WriteLine($"{x} {y}");
+ }
var similarColor = nesColors[FindSimilarColor(nesColors, color, nesColorsCache)];
image.SetPixelColor(x, y, similarColor);
}