Correct the fullbright start color extraction.

I don't know what despair and I were thinking, but we obviously didn't
understand the colormap code at the time.
This commit is contained in:
Bill Currie 2012-01-02 10:53:57 +09:00
parent 7be08534be
commit df3d9fe4df
8 changed files with 9 additions and 9 deletions

View File

@ -291,7 +291,7 @@ VID_Init (unsigned char *palette)
vid.maxwarpwidth = WARP_WIDTH;
vid.maxwarpheight = WARP_HEIGHT;
vid.colormap8 = vid_colormap;
vid.fullbright = 256 - LittleLong (*((int *) vid.colormap8 + 2048));
vid.fullbright = 256 - vid.colormap8[256 * VID_GRADES];
// interpret command-line params

View File

@ -308,7 +308,7 @@ VID_SetMode (const char *name, unsigned char *palette)
vid.height = vmode->yres;
vid.rowbytes = vmode->xres * (vmode->depth >> 3);
vid.colormap8 = (byte *) vid_colormap;
vid.fullbright = 256 - LittleLong (*((int *) vid.colormap8 + 2048));
vid.fullbright = 256 - vid.colormap8[256 * VID_GRADES];
vid.conrowbytes = vid.rowbytes;
vid.numpages = 1;
@ -416,7 +416,7 @@ VID_Init (unsigned char *palette)
vid.rowbytes = 320;
vid.aspect = ((float) vid.height / (float) vid.width) * (4.0 / 3.0);
vid.colormap8 = (byte *) vid_colormap;
vid.fullbright = 256 - LittleLong (*((int *) vid.colormap8 + 2048));
vid.fullbright = 256 - vid.colormap8[256 * VID_GRADES];
vid.conrowbytes = vid.rowbytes;
vid.conwidth = vid.width;
vid.conheight = vid.height;

View File

@ -206,7 +206,7 @@ VID_Init (unsigned char *palette)
vid.maxwarpwidth = WARP_WIDTH;
vid.maxwarpheight = WARP_HEIGHT;
vid.colormap8 = vid_colormap;
vid.fullbright = 256 - LittleLong (*((int *) vid.colormap8 + 2048));
vid.fullbright = 256 - vid.colormap8[256 * VID_GRADES];
X11_OpenDisplay ();

View File

@ -112,7 +112,7 @@ VID_Init (unsigned char *palette)
VGA_height = vid.height;
vid.numpages = 1;
vid.colormap8 = vid_colormap;
vid.fullbright = 256 - LittleLong (*((int *) vid.colormap8 + 2048));
vid.fullbright = 256 - vid.colormap8[256 * VID_GRADES];
vid.do_screen_buffer = do_screen_buffer;
VGA_pagebase = vid.buffer = screen->pixels;
VGA_rowbytes = vid.rowbytes = screen->pitch;

View File

@ -115,7 +115,7 @@ VID_Init (unsigned char *palette)
vid.maxwarpwidth = WARP_WIDTH;
vid.maxwarpheight = WARP_HEIGHT;
vid.colormap8 = vid_colormap;
vid.fullbright = 256 - LittleLong (*((int *) vid.colormap8 + 2048));
vid.fullbright = 256 - vid.colormap8[256 * VID_GRADES];
// Check if we want fullscreen
if (vid_fullscreen->int_val) {

View File

@ -305,7 +305,7 @@ VID_SetMode (int modenum, unsigned char *palette)
}
vid.colormap8 = (byte *) vid_colormap;
vid.fullbright = 256 - LittleLong (*((int *) vid.colormap8 + 2048));
vid.fullbright = 256 - vid.colormap8[256 * VID_GRADES];
vid.conrowbytes = vid.rowbytes;
vid.numpages = 1;

View File

@ -537,7 +537,7 @@ VID_Init (unsigned char *palette)
vid.maxwarpwidth = WARP_WIDTH;
vid.maxwarpheight = WARP_HEIGHT;
vid.colormap8 = vid_colormap;
vid.fullbright = 256 - LittleLong (*((int *) vid.colormap8 + 2048));
vid.fullbright = 256 - vid.colormap8[256 * VID_GRADES];
#ifdef SPLASH_SCREEN
if(hwnd_dialog)

View File

@ -403,7 +403,7 @@ VID_Init (unsigned char *palette)
vid.numpages = 2;
vid.colormap8 = vid_colormap;
vid.fullbright = 256 - LittleLong (*((int *) vid.colormap8 + 2048));
vid.fullbright = 256 - vid.colormap8[256 * VID_GRADES];
srandom (getpid ());