Bitmap Paletting
Posted: Mon Aug 22, 2022 1:23 am
LEGO Island's bitmaps are paletted in a specific way. The bitmaps must be 256-colors (or else the game will crash loading them), and the first 10 and last 10 colors of the palette are forced to the same colors, as well as 2 colors in the middle, regardless of what they may be in the original bitmap. This must be accounted for when creating replacement bitmaps, otherwise certain palette entries will be forcibly changed and cause the following artifacts:
The forced palette can be seen most clearly when inserting this image, which is paletted so that each color corresponds to a palette entry in order. Regardless of the original palette, 22 of the colors are forced, and the first as a rule becomes transparency:
Finally, here is a palette from an original in-game bitmap. As you can see, it has those forced colors already in the palette so it can take advantage of the fact those colors need to be there:
For reference, these are the forced colors:
Code: Select all
0 - ff00ff (mapped to something else in-game)
1 - bf0000
2 - 00bf00
3 - bfbf00
4 - 0000bf
5 - bf00bf
6 - 00bfbf
7 - c0c0c0
8 - c0dcc0
9 - a6caf0
140 - ff00ff (mapped to sky color)
141 - 39a3d9 (mapped to sky color)
246 - fffbf0
247 - a0a0a4
248 - 808080
249 - ff0000
250 - 00ff00
251 - ffff00
252 - 0000ff
253 - ff00ff
254 - 00ffff
255 - ffffff