allocate space for the color maps

This commit is contained in:
Bill Currie 2001-08-25 04:36:27 +00:00
parent f7f04aad5f
commit 5134978100

View file

@ -197,6 +197,9 @@ void
VID_MakeColormaps (int fullbrights, byte *pal) VID_MakeColormaps (int fullbrights, byte *pal)
{ {
vid.fullbright = fullbrights; 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));
VID_MakeColormap8(vid.colormap8, pal); VID_MakeColormap8(vid.colormap8, pal);
VID_MakeColormap16(vid.colormap16, pal); VID_MakeColormap16(vid.colormap16, pal);
VID_MakeColormap32(vid.colormap32, pal); VID_MakeColormap32(vid.colormap32, pal);