It's not a bug, but a wrong implementation. After reading the code I found that display_get_index_from_rgb
gets the nearest colour in part of the 8bit palette (only from special_pal
with 224 colours).
is just a big define
file and all functions uses the colours as PIXVAL, which is in RGB555, so I guess we could store the RGB555 value in simcolor.h and use it directly.
To keep compatibility can't we use color_idx_to_rgb(idx)
in every value which uses the old value in simcolor.h
? Not sure, but the only other uses of this palette is on objects with mapcolor
parameter, so we could convert them too on their load.
Back to the colour parameters, I made a patch
. I found some parameters that should be removed and some others to be added.