r_data.c: Resolve defined-but-unused function warning intefering with compilation

Removes `R_Init8to16` and its inline helper, `makecol15`, the last bastion of an abandoned 16-bit drawer rework
This commit is contained in:
toaster 2023-01-15 13:10:09 +00:00
parent 1ba7842068
commit ad50e67ae9

View file

@ -1125,40 +1125,6 @@ const char *R_NameForColormap(extracolormap_t *extra_colormap)
}
#endif
//
// build a table for quick conversion from 8bpp to 15bpp
//
//
// added "static inline" keywords, linking with the debug version
// of allegro, it have a makecol15 function of it's own, now
// with "static inline" keywords,it sloves this problem ;)
//
FUNCMATH static inline int makecol15(int r, int g, int b)
{
return (((r >> 3) << 10) | ((g >> 3) << 5) | ((b >> 3)));
}
static void R_Init8to16(void)
{
UINT8 *palette;
int i;
palette = W_CacheLumpName("PLAYPAL",PU_CACHE);
for (i = 0; i < 256; i++)
{
// PLAYPAL uses 8 bit values
color8to16[i] = (INT16)makecol15(palette[0], palette[1], palette[2]);
palette += 3;
}
// test a big colormap
hicolormaps = Z_Malloc(16384*sizeof(*hicolormaps), PU_STATIC, NULL);
for (i = 0; i < 16384; i++)
hicolormaps[i] = (INT16)(i<<1);
}
//
// R_InitTextureData
//