Subversion Repositories eduke32

Rev

Rev 6831 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
5359 hendricks2 1
 
2
#include "compat.h"
3
 
4
#ifdef __cplusplus
5
extern "C" {
6
#endif
7
 
8488 hendricks2 8
extern void paletteInitClosestColorScale(int32_t rscale, int32_t gscale, int32_t bscale);
9
extern void paletteInitClosestColorMap(uint8_t const * pal) ATTRIBUTE((nonnull(1)));
10
extern void paletteInitClosestColorGrid(void);
5359 hendricks2 11
 
8488 hendricks2 12
extern int32_t paletteGetClosestColorUpToIndex(int32_t r, int32_t g, int32_t b, int32_t lastokcol);
13
extern int32_t paletteGetClosestColorUpToIndexNoCache(int32_t r, int32_t g, int32_t b, int32_t lastokcol);
14
extern void paletteFlushClosestColor(void);
5359 hendricks2 15
 
6831 terminx 16
static FORCE_INLINE int32_t paletteGetClosestColor(int32_t r, int32_t g, int32_t b)
5359 hendricks2 17
{
8488 hendricks2 18
    return paletteGetClosestColorUpToIndex(r, g, b, 255);
5359 hendricks2 19
}
8488 hendricks2 20
static FORCE_INLINE int32_t paletteGetClosestColorNoCache(int32_t r, int32_t g, int32_t b)
5376 hendricks2 21
{
8488 hendricks2 22
    return paletteGetClosestColorUpToIndexNoCache(r, g, b, 255);
5376 hendricks2 23
}
5359 hendricks2 24
 
25
#ifdef __cplusplus
26
}
27
#endif