diff --git a/libs/video/renderer/sw32/d_init.c b/libs/video/renderer/sw32/d_init.c index 0a3c3d9bc..ccb5f7392 100644 --- a/libs/video/renderer/sw32/d_init.c +++ b/libs/video/renderer/sw32/d_init.c @@ -71,6 +71,7 @@ sw32_D_Init (void) vr_data.vid->init_caches = sw32_D_InitCaches; VID_InitBuffers (); + VID_MakeColormaps(); } void diff --git a/libs/video/renderer/sw32/vid_common_sw32.c b/libs/video/renderer/sw32/vid_common_sw32.c index 592321f48..c6679ebfa 100644 --- a/libs/video/renderer/sw32/vid_common_sw32.c +++ b/libs/video/renderer/sw32/vid_common_sw32.c @@ -188,15 +188,13 @@ VID_MakeColormap8 (void *outcolormap, byte *pal) LordHavoc: makes 8bit, 16bit, and 32bit colormaps and palettes */ -static __attribute__((used)) void //FIXME +void VID_MakeColormaps (int fullbrights, byte *pal) { vid.fullbright = fullbrights; - vid.colormap8 = malloc (256*VID_GRADES * sizeof (byte)); vid.colormap16 = malloc (256*VID_GRADES * sizeof (short)); vid.colormap32 = malloc (256*VID_GRADES * sizeof (int)); SYS_CHECKMEM (vid.colormap8 && vid.colormap16 && vid.colormap32); - VID_MakeColormap8(vid.colormap8, pal); VID_MakeColormap16(vid.colormap16, pal); VID_MakeColormap32(vid.colormap32, pal); }