force color 255 to black and fix x11 handling when the display can't be had

This commit is contained in:
Bill Currie 2000-09-18 15:18:51 +00:00
parent 258cceffee
commit 1900df8da6
2 changed files with 6 additions and 3 deletions

View file

@ -164,13 +164,13 @@ x11_open_display( void )
{
if ( !x_disp ) {
x_disp = XOpenDisplay( NULL );
x_screen = DefaultScreen (x_disp);
x_root = RootWindow (x_disp, x_screen);
if ( !x_disp ) {
Sys_Error("x11_open_display: Could not open display [%s]\n", XDisplayName( NULL ));
}
x_screen = DefaultScreen (x_disp);
x_root = RootWindow (x_disp, x_screen);
// catch signals
signal(SIGHUP, TragicDeath);
signal(SIGINT, TragicDeath);

View file

@ -940,6 +940,9 @@ void Host_Init (quakeparms_t *parms)
host_basepal = (byte *)COM_LoadHunkFile ("gfx/palette.lmp");
if (!host_basepal)
Sys_Error ("Couldn't load gfx/palette.lmp");
host_basepal[765] =
host_basepal[766] =
host_basepal[767] = 0; // LordHavoc: force the transparent color to black
host_colormap = (byte *)COM_LoadHunkFile ("gfx/colormap.lmp");
if (!host_colormap)
Sys_Error ("Couldn't load gfx/colormap.lmp");