Add: 32bpp-to-8bpp palette index lookup.
Lookups are calculated on demand and caches in a 256KB in-memory table.
This commit is contained in:
committed by
Peter Nelson
parent
daec0e2ca4
commit
0bc22dd310
@@ -19,6 +19,13 @@ extern Palette _cur_palette; ///< Current palette
|
||||
bool CopyPalette(Palette &local_palette, bool force_copy = false);
|
||||
void GfxInitPalettes();
|
||||
|
||||
uint8_t GetNearestColourIndex(uint8_t r, uint8_t g, uint8_t b);
|
||||
|
||||
static inline uint8_t GetNearestColourIndex(const Colour colour)
|
||||
{
|
||||
return GetNearestColourIndex(colour.r, colour.g, colour.b);
|
||||
}
|
||||
|
||||
/**
|
||||
* Checks if a Colours value is valid.
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user