VERSION and HAVE_GL_COLOR_INDEX8_EXT fixes..

This commit is contained in:
Zephaniah E. Hull 1999-12-31 03:11:54 +00:00
parent e468985ee1
commit 1c68f5aa28
6 changed files with 12 additions and 22 deletions

View file

@ -549,17 +549,17 @@ void Draw_ConsoleBackground (int lines)
// hack the version number directly into the pic
#ifdef _WIN32
sprintf (ver, "QuakeForge (%4.2f) (WinQuake)", (float)VERSION);
sprintf (ver, "QuakeForge (WinUQuake) v" VERSION);
dest = conback->data + 320*186 + 320 - 11 - 8*strlen(ver);
#elif defined(X11)
sprintf (ver, "QuakeForge (%4.2f) (X11 Quake)", (float)VERSION);
sprintf (ver, "QuakeForge (X11 UQuake) v" VERSION);
dest = conback->data + 320*186 + 320 - 11 - 8*strlen(ver);
#elif defined(__linux__)
sprintf (ver, "QuakeForge (%4.2f) (Linux Quake)", (float)VERSION);
sprintf (ver, "QuakeForge (Linux UQuake) v" VERSION);
dest = conback->data + 320*186 + 320 - 11 - 8*strlen(ver);
#else
dest = conback->data + 320 - 43 + 320*186;
sprintf (ver, "QuakeForge (%4.2f)", VERSION);
sprintf (ver, "QuakeForge (Unknown UQuake) v" VERSION);
#endif
for (x=0 ; x<strlen(ver) ; x++)

View file

@ -410,9 +410,9 @@ void Draw_Init (void)
// hack the version number directly into the pic
#if defined(__linux__)
sprintf (ver, "QuakeForge (Linux GL) Version %4.2f", (float)VERSION);
sprintf (ver, "QuakeForge (Linux GL) v", VERSION);
#else
sprintf (ver, "QuakeForge (GL) Version %4.2f", (float)VERSION);
sprintf (ver, "QuakeForge (Unkown GL) v", VERSION);
#endif
dest = cb->data + 320*186 + 320 - 11 - 8*strlen(ver);
y = strlen(ver);
@ -1146,11 +1146,7 @@ void GL_Upload8_EXT (byte *data, int width, int height, qboolean mipmap, qboole
if (!mipmap)
{
// FIXME - what if this extension is available at compile but not run time?
#ifdef HAVE_GL_COLOR_INDEX8_EXT
glTexImage2D (GL_TEXTURE_2D, 0, GL_COLOR_INDEX8_EXT, scaled_width, scaled_height, 0, GL_COLOR_INDEX , GL_UNSIGNED_BYTE, data);
#else
Sys_Printf("Warning: GL_COLOR_INDEX8_EXT not supported\n");
#endif
goto done;
}
memcpy (scaled, data, width*height);
@ -1159,11 +1155,7 @@ void GL_Upload8_EXT (byte *data, int width, int height, qboolean mipmap, qboole
GL_Resample8BitTexture (data, width, height, scaled, scaled_width, scaled_height);
// FIXME - what if this extension is available at compile but not run time?
#ifdef HAVE_GL_COLOR_INDEX8_EXT
glTexImage2D (GL_TEXTURE_2D, 0, GL_COLOR_INDEX8_EXT, scaled_width, scaled_height, 0, GL_COLOR_INDEX, GL_UNSIGNED_BYTE, scaled);
#else
Sys_Printf("Warning: GL_COLOR_INDEX8_EXT not supported\n");
#endif
if (mipmap)
{
int miplevel;
@ -1180,9 +1172,7 @@ void GL_Upload8_EXT (byte *data, int width, int height, qboolean mipmap, qboole
scaled_height = 1;
miplevel++;
// FIXME - what if this extension is available at compile but not run time?
#ifdef HAVE_GL_COLOR_INDEX8_EXT
glTexImage2D (GL_TEXTURE_2D, miplevel, GL_COLOR_INDEX8_EXT, scaled_width, scaled_height, 0, GL_COLOR_INDEX, GL_UNSIGNED_BYTE, scaled);
#endif
}
}
done: ;

View file

@ -75,7 +75,7 @@ void Host_Status_f (void)
print = SV_ClientPrintf;
print ("host: %s\n", Cvar_VariableString ("hostname"));
print ("version: %4.2f\n", VERSION);
print ("version: %s\n", VERSION);
if (tcpipAvailable)
print ("tcp/ip: %s\n", my_tcpip_address);
if (ipxAvailable)
@ -948,7 +948,7 @@ void Host_Name_f (void)
void Host_Version_f (void)
{
Con_Printf ("Version %4.2f\n", VERSION);
Con_Printf ("Version %s\n", VERSION);
Con_Printf ("Exe: "__TIME__" "__DATE__"\n");
}

View file

@ -192,7 +192,7 @@ void SV_SendServerinfo (client_t *client)
char message[2048];
MSG_WriteByte (&client->message, svc_print);
sprintf (message, "%c\nVERSION %4.2f SERVER (%i CRC)", 2, VERSION, pr_crc);
sprintf (message, "%c\nVERSION %s SERVER (%i CRC)", 2, VERSION, pr_crc);
MSG_WriteString (&client->message,message);
MSG_WriteByte (&client->message, svc_serverinfo);

View file

@ -579,7 +579,7 @@ void Sys_Quit (void)
memcpy (screen, d, sizeof(screen));
// write the version number directly to the end screen
sprintf (ver, " v%4.2f", VERSION);
sprintf (ver, " v" VERSION);
for (i=0 ; i<6 ; i++)
screen[0*80*2 + 72*2 + i*2] = ver[i];
@ -889,7 +889,7 @@ int main (int c, char **v)
extern void (*dos_error_func)(char *, ...);
static char cwd[1024];
printf ("Quake v%4.2f\n", VERSION);
printf ("Quake v%s\n", VERSION);
// make sure there's an FPU
signal(SIGNOFP, Sys_NoFPUExceptionHandler);

View file

@ -383,7 +383,7 @@ int main (int c, char **v)
nostdout = 1;
else {
fcntl(0, F_SETFL, fcntl (0, F_GETFL, 0) | FNDELAY);
printf ("QuakeForge (Linux Quake) -- Version %0.3f\n", VERSION);
printf ("QuakeForge (Linux Quake) v%s\n", VERSION);
}
oldtime = Sys_DoubleTime () - 0.1;