From ad50e67ae9b9e0e113b987a7ccf5ab803b867679 Mon Sep 17 00:00:00 2001 From: toaster Date: Sun, 15 Jan 2023 13:10:09 +0000 Subject: [PATCH] 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 --- src/r_data.c | 34 ---------------------------------- 1 file changed, 34 deletions(-) diff --git a/src/r_data.c b/src/r_data.c index 0174ee9ef..6f01510a2 100644 --- a/src/r_data.c +++ b/src/r_data.c @@ -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 //