Subversion Repositories eduke32

Rev

Rev 6831 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 6831 Rev 8488
Line 3... Line 3...
3
3
4
#ifdef __cplusplus
4
#ifdef __cplusplus
5
extern "C" {
5
extern "C" {
6
#endif
6
#endif
7
7
8
extern void initfastcolorlookup_scale(int32_t rscale, int32_t gscale, int32_t bscale);
8
extern void paletteInitClosestColorScale(int32_t rscale, int32_t gscale, int32_t bscale);
9
extern void initfastcolorlookup_palette(uint8_t const * pal) ATTRIBUTE((nonnull(1)));
9
extern void paletteInitClosestColorMap(uint8_t const * pal) ATTRIBUTE((nonnull(1)));
10
extern void initfastcolorlookup_gridvectors(void);
10
extern void paletteInitClosestColorGrid(void);
11
11
12
extern int32_t getclosestcol_lim(int32_t r, int32_t g, int32_t b, int32_t lastokcol);
12
extern int32_t paletteGetClosestColorUpToIndex(int32_t r, int32_t g, int32_t b, int32_t lastokcol);
13
extern int32_t getclosestcol_nocache_lim(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 getclosestcol_flush(void);
14
extern void paletteFlushClosestColor(void);
15
15
16
static FORCE_INLINE int32_t paletteGetClosestColor(int32_t r, int32_t g, int32_t b)
16
static FORCE_INLINE int32_t paletteGetClosestColor(int32_t r, int32_t g, int32_t b)
17
{
17
{
18
    return getclosestcol_lim(r, g, b, 255);
18
    return paletteGetClosestColorUpToIndex(r, g, b, 255);
19
}
19
}
20
static FORCE_INLINE int32_t getclosestcol_nocache(int32_t r, int32_t g, int32_t b)
20
static FORCE_INLINE int32_t paletteGetClosestColorNoCache(int32_t r, int32_t g, int32_t b)
21
{
21
{
22
    return getclosestcol_nocache_lim(r, g, b, 255);
22
    return paletteGetClosestColorUpToIndexNoCache(r, g, b, 255);
23
}
23
}
24
24
25
#ifdef __cplusplus
25
#ifdef __cplusplus
26
}
26
}
27
#endif
27
#endif