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 2021-05-13 10:30:35 -04:00 committed by GitHub
parent d17443b7b0
commit f6f5b41b76
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 4 additions and 3 deletions

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

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;

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 },