Revert "More accurate 8-bit <=> 5-bit RGB color conversion (#1827)"

This reverts commit 223b3d1921.
This commit is contained in:
Rangi42
2025-10-24 13:32:59 -04:00
parent 8bedd710d7
commit ca383c91ca
20 changed files with 15 additions and 31 deletions

View File

@@ -1,4 +1,4 @@
error: Failed to fit tile colors [$1527, $15cc, $1a93] in specified palettes
error: Failed to fit tile colors [$1527, $15cc, $1ab4] in specified palettes
note: The following palette was specified:
[$1a93, $15cc]
[$1ab4, $15cc]
Conversion aborted after 1 error

View File

@@ -1,4 +1,4 @@
error: Failed to fit tile colors [$688b, $7f55, $7fff] in specified palettes
error: Failed to fit tile colors [$6c8a, $7f55, $7fff] in specified palettes
note: The following palettes were specified:
[$5f77, $213d, $41a6, $40ee]
[$3f65, $36b3, $262a, $50b0]

View File

@@ -1,5 +1,5 @@
error: Failed to fit tile colors [$688b, $7f55, $7fff] in specified palettes
error: Failed to fit tile colors [$6c8a, $7f55, $7fff] in specified palettes
note: The following palettes were specified:
[$7fff, $7f55]
[$7fff, $688b]
[$7fff, $6c8a]
Conversion aborted after 1 error

Binary file not shown.

View File

@@ -1,3 +1,3 @@
warning: Fusing colors #a9bacbff and #aabbccff into Game Boy color $66f5 [first seen at x: 1, y: 1]
warning: Fusing colors #a9b9c9ff and #aabbccff into Game Boy color $66f5 [first seen at x: 1, y: 1]
FATAL: Tile (0, 0) contains the background color (#aabbccff)!
Conversion aborted after 1 error

Binary file not shown.

Before

Width:  |  Height:  |  Size: 174 B

After

Width:  |  Height:  |  Size: 177 B

View File

@@ -1 +1 @@
U<EFBFBD><EFBFBD><EFBFBD>
U<EFBFBD><EFBFBD><EFBFBD>

Binary file not shown.

Binary file not shown.

Before

Width:  |  Height:  |  Size: 556 B

After

Width:  |  Height:  |  Size: 927 B

Binary file not shown.

Binary file not shown.

Before

Width:  |  Height:  |  Size: 556 B

After

Width:  |  Height:  |  Size: 927 B

Binary file not shown.

Binary file not shown.

Before

Width:  |  Height:  |  Size: 556 B

After

Width:  |  Height:  |  Size: 927 B

Binary file not shown.

Binary file not shown.

Before

Width:  |  Height:  |  Size: 556 B

After

Width:  |  Height:  |  Size: 927 B

Binary file not shown.

View File

@@ -144,7 +144,7 @@ static void generate_palettes(uint16_t palettes[/* 60 */][4]) {
* Expand a 5-bit color component to 8 bits with minimal bias
*/
static uint8_t _5to8(uint8_t five) {
return (five * 255 + 15) / 31;
return five << 3 | five >> 2;
}
// Can't mark as `const`, as the array type is otherwise not compatible (augh)