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
parent6b20264f0d07295448a96256f3cdaf1da5478879 (diff)
Tests fixes, minor changes
-rw-r--r--Benchmarks/Program.cs6
-rw-r--r--NesTiler/Palette.cs2
-rw-r--r--NesTiler/Program.cs4
-rw-r--r--TestImages/Images/blaster_master_left.pngbin6551 -> 4511 bytes
-rw-r--r--TestImages/Images/blaster_master_right.pngbin9475 -> 6531 bytes
-rw-r--r--TestImages/TestImages.csproj3
-rw-r--r--Tests/References/blaster_master_left_blaster_master_right_attr_table_1.binbin64 -> 64 bytes
-rw-r--r--Tests/References/blaster_master_left_blaster_master_right_name_table_0.binbin960 -> 960 bytes
-rw-r--r--Tests/References/blaster_master_left_blaster_master_right_name_table_1.binbin960 -> 960 bytes
-rw-r--r--Tests/References/blaster_master_left_blaster_master_right_pattern_0.binbin4000 -> 3984 bytes
-rw-r--r--Tests/References/blaster_master_left_name_table_0.binbin960 -> 960 bytes
-rw-r--r--Tests/References/blaster_master_left_pattern_0.binbin848 -> 1232 bytes
-rw-r--r--Tests/References/blaster_master_right_attr_table_0.binbin64 -> 64 bytes
-rw-r--r--Tests/References/blaster_master_right_name_table_0.binbin960 -> 960 bytes
-rw-r--r--Tests/References/blaster_master_right_pattern_0.binbin3200 -> 2800 bytes
15 files changed, 11 insertions, 4 deletions
diff --git a/Benchmarks/Program.cs b/Benchmarks/Program.cs
index 5455a69..6842a3b 100644
--- a/Benchmarks/Program.cs
+++ b/Benchmarks/Program.cs
@@ -184,7 +184,7 @@ namespace com.clusterrr.Famicom.NesTiler.Benchmarks
var r = Program.Main(args);
if (r != 0) throw new InvalidOperationException($"Return code: {r}");
- foreach (var file in Directory.GetFiles(".", "*.bin")) File.Copy(file, Path.Join(@"E:\bins", Path.GetFileName(file)), true);
+ //foreach (var file in Directory.GetFiles(".", "*.bin")) File.Copy(file, Path.Join(@"E:\bins", Path.GetFileName(file)), true);
}
public void DoBenchmarkSharedPattern(string imagePath1, string imagePath2, string bgColor = "auto")
@@ -204,12 +204,12 @@ namespace com.clusterrr.Famicom.NesTiler.Benchmarks
"--out-palette-2", PalettePath(prefix, 2),
"--out-palette-3", PalettePath(prefix, 3),
"--bg-color", bgColor,
- "--share-pattern-tables"
+ "--share-pattern-table"
};
var r = Program.Main(args);
if (r != 0) throw new InvalidOperationException($"Return code: {r}");
- foreach (var file in Directory.GetFiles(".", "*.bin")) File.Copy(file, Path.Join(@"E:\bins", Path.GetFileName(file)), true);
+ //foreach (var file in Directory.GetFiles(".", "*.bin")) File.Copy(file, Path.Join(@"E:\bins", Path.GetFileName(file)), true);
}
public void DoBenchmarkSplit2(string imagePath)
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);
}
diff --git a/TestImages/Images/blaster_master_left.png b/TestImages/Images/blaster_master_left.png
index 8dbeb8e..99ee260 100644
--- a/TestImages/Images/blaster_master_left.png
+++ b/TestImages/Images/blaster_master_left.png
Binary files differ
diff --git a/TestImages/Images/blaster_master_right.png b/TestImages/Images/blaster_master_right.png
index 237cdd5..cc83982 100644
--- a/TestImages/Images/blaster_master_right.png
+++ b/TestImages/Images/blaster_master_right.png
Binary files differ
diff --git a/TestImages/TestImages.csproj b/TestImages/TestImages.csproj
index cb75dd3..97b122f 100644
--- a/TestImages/TestImages.csproj
+++ b/TestImages/TestImages.csproj
@@ -88,6 +88,9 @@
<None Update="Images\jurassic2.png">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
+ <None Update="Images\me.png">
+ <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
+ </None>
<None Update="Images\myatej.gif">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
diff --git a/Tests/References/blaster_master_left_blaster_master_right_attr_table_1.bin b/Tests/References/blaster_master_left_blaster_master_right_attr_table_1.bin
index 3433614..38ee52d 100644
--- a/Tests/References/blaster_master_left_blaster_master_right_attr_table_1.bin
+++ b/Tests/References/blaster_master_left_blaster_master_right_attr_table_1.bin
Binary files differ
diff --git a/Tests/References/blaster_master_left_blaster_master_right_name_table_0.bin b/Tests/References/blaster_master_left_blaster_master_right_name_table_0.bin
index 0c7c8e7..9fae53f 100644
--- a/Tests/References/blaster_master_left_blaster_master_right_name_table_0.bin
+++ b/Tests/References/blaster_master_left_blaster_master_right_name_table_0.bin
Binary files differ
diff --git a/Tests/References/blaster_master_left_blaster_master_right_name_table_1.bin b/Tests/References/blaster_master_left_blaster_master_right_name_table_1.bin
index 0dfe2f5..dd3427c 100644
--- a/Tests/References/blaster_master_left_blaster_master_right_name_table_1.bin
+++ b/Tests/References/blaster_master_left_blaster_master_right_name_table_1.bin
Binary files differ
diff --git a/Tests/References/blaster_master_left_blaster_master_right_pattern_0.bin b/Tests/References/blaster_master_left_blaster_master_right_pattern_0.bin
index f276f84..b1565ca 100644
--- a/Tests/References/blaster_master_left_blaster_master_right_pattern_0.bin
+++ b/Tests/References/blaster_master_left_blaster_master_right_pattern_0.bin
Binary files differ
diff --git a/Tests/References/blaster_master_left_name_table_0.bin b/Tests/References/blaster_master_left_name_table_0.bin
index 0c7c8e7..9fae53f 100644
--- a/Tests/References/blaster_master_left_name_table_0.bin
+++ b/Tests/References/blaster_master_left_name_table_0.bin
Binary files differ
diff --git a/Tests/References/blaster_master_left_pattern_0.bin b/Tests/References/blaster_master_left_pattern_0.bin
index 34811a9..67a233c 100644
--- a/Tests/References/blaster_master_left_pattern_0.bin
+++ b/Tests/References/blaster_master_left_pattern_0.bin
Binary files differ
diff --git a/Tests/References/blaster_master_right_attr_table_0.bin b/Tests/References/blaster_master_right_attr_table_0.bin
index 3433614..38ee52d 100644
--- a/Tests/References/blaster_master_right_attr_table_0.bin
+++ b/Tests/References/blaster_master_right_attr_table_0.bin
Binary files differ
diff --git a/Tests/References/blaster_master_right_name_table_0.bin b/Tests/References/blaster_master_right_name_table_0.bin
index 95b7677..7ca0104 100644
--- a/Tests/References/blaster_master_right_name_table_0.bin
+++ b/Tests/References/blaster_master_right_name_table_0.bin
Binary files differ
diff --git a/Tests/References/blaster_master_right_pattern_0.bin b/Tests/References/blaster_master_right_pattern_0.bin
index 8280e0e..7ba2246 100644
--- a/Tests/References/blaster_master_right_pattern_0.bin
+++ b/Tests/References/blaster_master_right_pattern_0.bin
Binary files differ