2015-09-27 21:17:59 +00:00
|
|
|
|
|
|
|
#include "compat.h"
|
|
|
|
|
|
|
|
#ifdef __cplusplus
|
|
|
|
extern "C" {
|
|
|
|
#endif
|
|
|
|
|
|
|
|
extern void initfastcolorlookup_scale(int32_t rscale, int32_t gscale, int32_t bscale);
|
|
|
|
extern void initfastcolorlookup_palette(uint8_t const * pal) ATTRIBUTE((nonnull(1)));
|
|
|
|
extern void initfastcolorlookup_gridvectors(void);
|
|
|
|
|
|
|
|
extern int32_t getclosestcol_lim(int32_t r, int32_t g, int32_t b, int32_t lastokcol);
|
2015-10-10 06:57:32 +00:00
|
|
|
extern int32_t getclosestcol_nocache_lim(int32_t r, int32_t g, int32_t b, int32_t lastokcol);
|
2015-09-27 21:17:59 +00:00
|
|
|
extern void getclosestcol_flush(void);
|
|
|
|
|
2018-04-12 21:03:47 +00:00
|
|
|
static FORCE_INLINE int32_t paletteGetClosestColor(int32_t r, int32_t g, int32_t b)
|
2015-09-27 21:17:59 +00:00
|
|
|
{
|
|
|
|
return getclosestcol_lim(r, g, b, 255);
|
|
|
|
}
|
2017-02-25 08:15:53 +00:00
|
|
|
static FORCE_INLINE int32_t getclosestcol_nocache(int32_t r, int32_t g, int32_t b)
|
2015-10-10 06:57:32 +00:00
|
|
|
{
|
|
|
|
return getclosestcol_nocache_lim(r, g, b, 255);
|
|
|
|
}
|
2015-09-27 21:17:59 +00:00
|
|
|
|
|
|
|
#ifdef __cplusplus
|
|
|
|
}
|
|
|
|
#endif
|