mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2024-11-10 23:32:09 +00:00
Fixes crashes when sw32_r_pixbytes is set to 2 or 4
This commit is contained in:
parent
9d71d9bb7a
commit
850382eed4
2 changed files with 2 additions and 3 deletions
|
@ -71,6 +71,7 @@ sw32_D_Init (void)
|
|||
vr_data.vid->init_caches = sw32_D_InitCaches;
|
||||
|
||||
VID_InitBuffers ();
|
||||
VID_MakeColormaps();
|
||||
}
|
||||
|
||||
void
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue