Correct palette indexes of remap colors in image importer

The codes that finds the closest entry that isn't used for remapping has the indices of remappable colors slightly off, and would make some colors in the imported image remappable even though they shouldn't have been.

Comment in header file describing the standard palette corrected as well.
This commit is contained in:
zrowny authored and GitHub committed 2021-05-13 16:30:35 +02:00
1 parent d17443b7b0
commit f6f5b41b76
3 files changed
+4 -3

No files matched your search

+1
View File
@@ -166,6 +166,7 @@ The following people are not part of the development team, but have been contrib
* Adam Bloom (adam-bloom)
* Geoff B. (geoff-B)
* Ryan D. (rctdude2)
* (zrowny)
## Toolchain
* (Balletie) - macOS
+2 -2
View File
@@ -312,11 +312,11 @@ bool ImageImporter::IsChangablePixel(int32_t paletteIndex)
return true;
if (paletteIndex == 0)
return false;
if (paletteIndex >= 203 && paletteIndex < 214)
if (paletteIndex >= 202 && paletteIndex <= 213)
return false;
if (paletteIndex == 226)
return false;
if (paletteIndex >= 227 && paletteIndex < 229)
if (paletteIndex >= 227 && paletteIndex <= 229)
return false;
if (paletteIndex >= 243)
return false;
+1 -1
View File
@@ -273,7 +273,7 @@ constexpr const GamePalette StandardPalette = { {
{ 231, 231, 171, 255 },
{ 255, 255, 207, 255 },
// 203 - 214 (Secondary remap)
// 202 - 213 (Secondary remap)
{ 27, 0, 63, 255 },
{ 51, 0, 103, 255 },
{ 63, 11, 123, 255 },