mirror of
https://git.code.sf.net/p/quake/quakeforge-old
synced 2024-11-25 21:31:18 +00:00
VERSION and HAVE_GL_COLOR_INDEX8_EXT fixes..
This commit is contained in:
parent
e468985ee1
commit
1c68f5aa28
6 changed files with 12 additions and 22 deletions
|
@ -549,17 +549,17 @@ void Draw_ConsoleBackground (int lines)
|
||||||
|
|
||||||
// hack the version number directly into the pic
|
// hack the version number directly into the pic
|
||||||
#ifdef _WIN32
|
#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);
|
dest = conback->data + 320*186 + 320 - 11 - 8*strlen(ver);
|
||||||
#elif defined(X11)
|
#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);
|
dest = conback->data + 320*186 + 320 - 11 - 8*strlen(ver);
|
||||||
#elif defined(__linux__)
|
#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);
|
dest = conback->data + 320*186 + 320 - 11 - 8*strlen(ver);
|
||||||
#else
|
#else
|
||||||
dest = conback->data + 320 - 43 + 320*186;
|
dest = conback->data + 320 - 43 + 320*186;
|
||||||
sprintf (ver, "QuakeForge (%4.2f)", VERSION);
|
sprintf (ver, "QuakeForge (Unknown UQuake) v" VERSION);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
for (x=0 ; x<strlen(ver) ; x++)
|
for (x=0 ; x<strlen(ver) ; x++)
|
||||||
|
|
|
@ -410,9 +410,9 @@ void Draw_Init (void)
|
||||||
|
|
||||||
// hack the version number directly into the pic
|
// hack the version number directly into the pic
|
||||||
#if defined(__linux__)
|
#if defined(__linux__)
|
||||||
sprintf (ver, "QuakeForge (Linux GL) Version %4.2f", (float)VERSION);
|
sprintf (ver, "QuakeForge (Linux GL) v", VERSION);
|
||||||
#else
|
#else
|
||||||
sprintf (ver, "QuakeForge (GL) Version %4.2f", (float)VERSION);
|
sprintf (ver, "QuakeForge (Unkown GL) v", VERSION);
|
||||||
#endif
|
#endif
|
||||||
dest = cb->data + 320*186 + 320 - 11 - 8*strlen(ver);
|
dest = cb->data + 320*186 + 320 - 11 - 8*strlen(ver);
|
||||||
y = strlen(ver);
|
y = strlen(ver);
|
||||||
|
@ -1146,11 +1146,7 @@ void GL_Upload8_EXT (byte *data, int width, int height, qboolean mipmap, qboole
|
||||||
if (!mipmap)
|
if (!mipmap)
|
||||||
{
|
{
|
||||||
// FIXME - what if this extension is available at compile but not run time?
|
// 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);
|
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;
|
goto done;
|
||||||
}
|
}
|
||||||
memcpy (scaled, data, width*height);
|
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);
|
GL_Resample8BitTexture (data, width, height, scaled, scaled_width, scaled_height);
|
||||||
|
|
||||||
// FIXME - what if this extension is available at compile but not run time?
|
// 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);
|
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)
|
if (mipmap)
|
||||||
{
|
{
|
||||||
int miplevel;
|
int miplevel;
|
||||||
|
@ -1180,9 +1172,7 @@ void GL_Upload8_EXT (byte *data, int width, int height, qboolean mipmap, qboole
|
||||||
scaled_height = 1;
|
scaled_height = 1;
|
||||||
miplevel++;
|
miplevel++;
|
||||||
// FIXME - what if this extension is available at compile but not run time?
|
// 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);
|
glTexImage2D (GL_TEXTURE_2D, miplevel, GL_COLOR_INDEX8_EXT, scaled_width, scaled_height, 0, GL_COLOR_INDEX, GL_UNSIGNED_BYTE, scaled);
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
done: ;
|
done: ;
|
||||||
|
|
|
@ -75,7 +75,7 @@ void Host_Status_f (void)
|
||||||
print = SV_ClientPrintf;
|
print = SV_ClientPrintf;
|
||||||
|
|
||||||
print ("host: %s\n", Cvar_VariableString ("hostname"));
|
print ("host: %s\n", Cvar_VariableString ("hostname"));
|
||||||
print ("version: %4.2f\n", VERSION);
|
print ("version: %s\n", VERSION);
|
||||||
if (tcpipAvailable)
|
if (tcpipAvailable)
|
||||||
print ("tcp/ip: %s\n", my_tcpip_address);
|
print ("tcp/ip: %s\n", my_tcpip_address);
|
||||||
if (ipxAvailable)
|
if (ipxAvailable)
|
||||||
|
@ -948,7 +948,7 @@ void Host_Name_f (void)
|
||||||
|
|
||||||
void Host_Version_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");
|
Con_Printf ("Exe: "__TIME__" "__DATE__"\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -192,7 +192,7 @@ void SV_SendServerinfo (client_t *client)
|
||||||
char message[2048];
|
char message[2048];
|
||||||
|
|
||||||
MSG_WriteByte (&client->message, svc_print);
|
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_WriteString (&client->message,message);
|
||||||
|
|
||||||
MSG_WriteByte (&client->message, svc_serverinfo);
|
MSG_WriteByte (&client->message, svc_serverinfo);
|
||||||
|
|
|
@ -579,7 +579,7 @@ void Sys_Quit (void)
|
||||||
memcpy (screen, d, sizeof(screen));
|
memcpy (screen, d, sizeof(screen));
|
||||||
|
|
||||||
// write the version number directly to the end 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++)
|
for (i=0 ; i<6 ; i++)
|
||||||
screen[0*80*2 + 72*2 + i*2] = ver[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 *, ...);
|
extern void (*dos_error_func)(char *, ...);
|
||||||
static char cwd[1024];
|
static char cwd[1024];
|
||||||
|
|
||||||
printf ("Quake v%4.2f\n", VERSION);
|
printf ("Quake v%s\n", VERSION);
|
||||||
|
|
||||||
// make sure there's an FPU
|
// make sure there's an FPU
|
||||||
signal(SIGNOFP, Sys_NoFPUExceptionHandler);
|
signal(SIGNOFP, Sys_NoFPUExceptionHandler);
|
||||||
|
|
|
@ -383,7 +383,7 @@ int main (int c, char **v)
|
||||||
nostdout = 1;
|
nostdout = 1;
|
||||||
else {
|
else {
|
||||||
fcntl(0, F_SETFL, fcntl (0, F_GETFL, 0) | FNDELAY);
|
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;
|
oldtime = Sys_DoubleTime () - 0.1;
|
||||||
|
|
Loading…
Reference in a new issue