Subversion Repositories eduke32

Rev

Rev 6056 | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 6056 Rev 8488
Line 15... Line 15...
15
15
16
----------
16
----------
17
17
18
decl[[
18
decl[[
19
const int32_t qsetmode;
19
const int32_t qsetmode;
20
int32_t getclosestcol_lim(int32_t r, int32_t g, int32_t b, int32_t lastokcol);
20
int32_t paletteGetClosestColorUpToIndex(int32_t r, int32_t g, int32_t b, int32_t lastokcol);
21
char *palookup[256];  // MAXPALOOKUPS
21
char *palookup[256];  // MAXPALOOKUPS
22
uint8_t palette[768];
22
uint8_t palette[768];
23
uint8_t *basepaltable[];
23
uint8_t *basepaltable[];
24
24
25
const char *getblendtab(int32_t blend);
25
const char *getblendtab(int32_t blend);
Line 238... Line 238...
238
        lastokcol = 255
238
        lastokcol = 255
239
    elseif (type(lastokcol)~="number" or not (lastokcol >= 0 and lastokcol <= 255)) then
239
    elseif (type(lastokcol)~="number" or not (lastokcol >= 0 and lastokcol <= 255)) then
240
        error("invalid argument #4 <lastokcol>: must be in the range [0 .. 255]", 2)
240
        error("invalid argument #4 <lastokcol>: must be in the range [0 .. 255]", 2)
241
    end
241
    end
242
242
243
    return C.getclosestcol_lim(r, g, b, lastokcol)
243
    return C.paletteGetClosestColorUpToIndex(r, g, b, lastokcol)
244
end
244
end
245
245
246
246
247
---------- Mapster32-only functions ----------
247
---------- Mapster32-only functions ----------
248
248