replace version numbers with strings
parent
8452118b9c
commit
3bbba8adce
|
@ -522,7 +522,7 @@ void Con_Printf (const char *fmt, ...)
|
||||||
/*
|
/*
|
||||||
================
|
================
|
||||||
Con_DWarning -- ericw
|
Con_DWarning -- ericw
|
||||||
|
|
||||||
same as Con_Warning, but only prints if "developer" cvar is set.
|
same as Con_Warning, but only prints if "developer" cvar is set.
|
||||||
use for "exceeds standard limit of" messages, which are only relevant for developers
|
use for "exceeds standard limit of" messages, which are only relevant for developers
|
||||||
targetting vanilla engines
|
targetting vanilla engines
|
||||||
|
@ -951,7 +951,7 @@ void Con_TabComplete (void)
|
||||||
// for (like "map ") and a list of all the maps.
|
// for (like "map ") and a list of all the maps.
|
||||||
arg_completion_type_t arg_completion = arg_completion_types[j];
|
arg_completion_type_t arg_completion = arg_completion_types[j];
|
||||||
const char *command_name = arg_completion.command;
|
const char *command_name = arg_completion.command;
|
||||||
|
|
||||||
if (!strncmp (key_lines[edit_line] + 1, command_name, strlen(command_name)))
|
if (!strncmp (key_lines[edit_line] + 1, command_name, strlen(command_name)))
|
||||||
{
|
{
|
||||||
int nummatches = 0;
|
int nummatches = 0;
|
||||||
|
@ -1227,7 +1227,7 @@ void Con_DrawConsole (int lines, qboolean drawinput)
|
||||||
|
|
||||||
//draw version number in bottom right
|
//draw version number in bottom right
|
||||||
y += 8;
|
y += 8;
|
||||||
q_snprintf (ver, sizeof(ver), "QuakeSpasm " QUAKESPASM_VER_STRING);
|
q_snprintf (ver, sizeof(ver), "QuakeSpasm " QUAKESPASM_VERSION);
|
||||||
for (x = 0; x < (int)strlen(ver); x++)
|
for (x = 0; x < (int)strlen(ver); x++)
|
||||||
Draw_Character ((con_linewidth - strlen(ver) + x + 2)<<3, y, ver[x] /*+ 128*/);
|
Draw_Character ((con_linewidth - strlen(ver) + x + 2)<<3, y, ver[x] /*+ 128*/);
|
||||||
}
|
}
|
||||||
|
|
|
@ -505,7 +505,7 @@ static qboolean VID_SetMode (int width, int height, int refreshrate, int bpp, qb
|
||||||
SDL_GL_SetAttribute(SDL_GL_MULTISAMPLEBUFFERS, fsaa > 0 ? 1 : 0);
|
SDL_GL_SetAttribute(SDL_GL_MULTISAMPLEBUFFERS, fsaa > 0 ? 1 : 0);
|
||||||
SDL_GL_SetAttribute(SDL_GL_MULTISAMPLESAMPLES, fsaa);
|
SDL_GL_SetAttribute(SDL_GL_MULTISAMPLESAMPLES, fsaa);
|
||||||
|
|
||||||
q_snprintf(caption, sizeof(caption), "QuakeSpasm " QUAKESPASM_VER_STRING);
|
q_snprintf(caption, sizeof(caption), "QuakeSpasm " QUAKESPASM_VERSION);
|
||||||
|
|
||||||
/* Create the window if needed, hidden */
|
/* Create the window if needed, hidden */
|
||||||
if (!draw_context)
|
if (!draw_context)
|
||||||
|
|
|
@ -230,8 +230,8 @@ void Host_FindMaxClients (void)
|
||||||
|
|
||||||
void Host_Version_f (void)
|
void Host_Version_f (void)
|
||||||
{
|
{
|
||||||
Con_Printf ("Quake Version %1.2f\n", VERSION);
|
Con_Printf ("Quake Version %s\n", VERSION);
|
||||||
Con_Printf ("QuakeSpasm Version " QUAKESPASM_VER_STRING "\n");
|
Con_Printf ("QuakeSpasm Version " QUAKESPASM_VERSION "\n");
|
||||||
Con_Printf ("Exe: " __TIME__ " " __DATE__ "\n");
|
Con_Printf ("Exe: " __TIME__ " " __DATE__ "\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -98,7 +98,7 @@ void FileList_Add (const char *name, filelist_item_t **list)
|
||||||
static void FileList_Clear (filelist_item_t **list)
|
static void FileList_Clear (filelist_item_t **list)
|
||||||
{
|
{
|
||||||
filelist_item_t *blah;
|
filelist_item_t *blah;
|
||||||
|
|
||||||
while (*list)
|
while (*list)
|
||||||
{
|
{
|
||||||
blah = (*list)->next;
|
blah = (*list)->next;
|
||||||
|
@ -316,11 +316,11 @@ void DemoList_Init (void)
|
||||||
searchpath_t *search;
|
searchpath_t *search;
|
||||||
pack_t *pak;
|
pack_t *pak;
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
// we don't want to list the demos in id1 pakfiles,
|
// we don't want to list the demos in id1 pakfiles,
|
||||||
// because these are not "add-on" demos
|
// because these are not "add-on" demos
|
||||||
q_snprintf (ignorepakdir, sizeof(ignorepakdir), "/%s/", GAMENAME);
|
q_snprintf (ignorepakdir, sizeof(ignorepakdir), "/%s/", GAMENAME);
|
||||||
|
|
||||||
for (search = com_searchpaths; search; search = search->next)
|
for (search = com_searchpaths; search; search = search->next)
|
||||||
{
|
{
|
||||||
if (*search->filename) //directory
|
if (*search->filename) //directory
|
||||||
|
@ -442,7 +442,7 @@ void Host_Status_f (void)
|
||||||
print_fn = SV_ClientPrintf;
|
print_fn = SV_ClientPrintf;
|
||||||
|
|
||||||
print_fn ("host: %s\n", Cvar_VariableString ("hostname"));
|
print_fn ("host: %s\n", Cvar_VariableString ("hostname"));
|
||||||
print_fn ("version: %4.2f\n", VERSION);
|
print_fn ("version: " VERSION "\n");
|
||||||
if (tcpipAvailable)
|
if (tcpipAvailable)
|
||||||
print_fn ("tcp/ip: %s\n", my_tcpip_address);
|
print_fn ("tcp/ip: %s\n", my_tcpip_address);
|
||||||
if (ipxAvailable)
|
if (ipxAvailable)
|
||||||
|
@ -631,10 +631,10 @@ void Host_SetPos_f(void)
|
||||||
Cmd_ForwardToServer ();
|
Cmd_ForwardToServer ();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (pr_global_struct->deathmatch)
|
if (pr_global_struct->deathmatch)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if (Cmd_Argc() != 7 && Cmd_Argc() != 4)
|
if (Cmd_Argc() != 7 && Cmd_Argc() != 4)
|
||||||
{
|
{
|
||||||
SV_ClientPrintf("usage:\n");
|
SV_ClientPrintf("usage:\n");
|
||||||
|
@ -650,23 +650,23 @@ void Host_SetPos_f(void)
|
||||||
(int)sv_player->v.v_angle[2]);
|
(int)sv_player->v.v_angle[2]);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (sv_player->v.movetype != MOVETYPE_NOCLIP)
|
if (sv_player->v.movetype != MOVETYPE_NOCLIP)
|
||||||
{
|
{
|
||||||
noclip_anglehack = true;
|
noclip_anglehack = true;
|
||||||
sv_player->v.movetype = MOVETYPE_NOCLIP;
|
sv_player->v.movetype = MOVETYPE_NOCLIP;
|
||||||
SV_ClientPrintf ("noclip ON\n");
|
SV_ClientPrintf ("noclip ON\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
//make sure they're not going to whizz away from it
|
//make sure they're not going to whizz away from it
|
||||||
sv_player->v.velocity[0] = 0;
|
sv_player->v.velocity[0] = 0;
|
||||||
sv_player->v.velocity[1] = 0;
|
sv_player->v.velocity[1] = 0;
|
||||||
sv_player->v.velocity[2] = 0;
|
sv_player->v.velocity[2] = 0;
|
||||||
|
|
||||||
sv_player->v.origin[0] = atof(Cmd_Argv(1));
|
sv_player->v.origin[0] = atof(Cmd_Argv(1));
|
||||||
sv_player->v.origin[1] = atof(Cmd_Argv(2));
|
sv_player->v.origin[1] = atof(Cmd_Argv(2));
|
||||||
sv_player->v.origin[2] = atof(Cmd_Argv(3));
|
sv_player->v.origin[2] = atof(Cmd_Argv(3));
|
||||||
|
|
||||||
if (Cmd_Argc() == 7)
|
if (Cmd_Argc() == 7)
|
||||||
{
|
{
|
||||||
sv_player->v.angles[0] = atof(Cmd_Argv(4));
|
sv_player->v.angles[0] = atof(Cmd_Argv(4));
|
||||||
|
@ -674,7 +674,7 @@ void Host_SetPos_f(void)
|
||||||
sv_player->v.angles[2] = atof(Cmd_Argv(6));
|
sv_player->v.angles[2] = atof(Cmd_Argv(6));
|
||||||
sv_player->v.fixangle = 1;
|
sv_player->v.fixangle = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
SV_LinkEdict (sv_player, false);
|
SV_LinkEdict (sv_player, false);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1120,7 +1120,7 @@ Host_Loadgame_f
|
||||||
void Host_Loadgame_f (void)
|
void Host_Loadgame_f (void)
|
||||||
{
|
{
|
||||||
static char *start;
|
static char *start;
|
||||||
|
|
||||||
char name[MAX_OSPATH];
|
char name[MAX_OSPATH];
|
||||||
char mapname[MAX_QPATH];
|
char mapname[MAX_QPATH];
|
||||||
float time, tfloat;
|
float time, tfloat;
|
||||||
|
@ -1139,7 +1139,7 @@ void Host_Loadgame_f (void)
|
||||||
Con_Printf ("load <savename> : load a game\n");
|
Con_Printf ("load <savename> : load a game\n");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (strstr(Cmd_Argv(1), ".."))
|
if (strstr(Cmd_Argv(1), ".."))
|
||||||
{
|
{
|
||||||
Con_Printf ("Relative pathnames are not allowed.\n");
|
Con_Printf ("Relative pathnames are not allowed.\n");
|
||||||
|
@ -1156,11 +1156,11 @@ void Host_Loadgame_f (void)
|
||||||
// SCR_BeginLoadingPlaque ();
|
// SCR_BeginLoadingPlaque ();
|
||||||
|
|
||||||
Con_Printf ("Loading game from %s...\n", name);
|
Con_Printf ("Loading game from %s...\n", name);
|
||||||
|
|
||||||
// avoid leaking if the previous Host_Loadgame_f failed with a Host_Error
|
// avoid leaking if the previous Host_Loadgame_f failed with a Host_Error
|
||||||
if (start != NULL)
|
if (start != NULL)
|
||||||
free (start);
|
free (start);
|
||||||
|
|
||||||
start = (char *) COM_LoadMallocFile_TextMode_OSPath(name, NULL);
|
start = (char *) COM_LoadMallocFile_TextMode_OSPath(name, NULL);
|
||||||
if (start == NULL)
|
if (start == NULL)
|
||||||
{
|
{
|
||||||
|
|
|
@ -105,10 +105,10 @@ int main(int argc, char *argv[])
|
||||||
if (!parms.membase)
|
if (!parms.membase)
|
||||||
Sys_Error ("Not enough memory free; check disk space\n");
|
Sys_Error ("Not enough memory free; check disk space\n");
|
||||||
|
|
||||||
Sys_Printf("Quake %1.2f (c) id Software\n", VERSION);
|
Sys_Printf("Quake " VERSION " (c) id Software\n");
|
||||||
Sys_Printf("FitzQuake %1.2f (c) John Fitzgibbons\n", FITZQUAKE_VERSION);
|
Sys_Printf("FitzQuake " FITZQUAKE_VERSION " (c) John Fitzgibbons\n");
|
||||||
Sys_Printf("FitzQuake SDL port (c) SleepwalkR, Baker\n");
|
Sys_Printf("FitzQuake SDL port (c) SleepwalkR, Baker\n");
|
||||||
Sys_Printf("QuakeSpasm " QUAKESPASM_VER_STRING " (c) Ozkan Sezer, Eric Wasylishen & others\n");
|
Sys_Printf("QuakeSpasm " QUAKESPASM_VERSION " (c) Ozkan Sezer, Eric Wasylishen & others\n");
|
||||||
|
|
||||||
Sys_Printf("Host_Init\n");
|
Sys_Printf("Host_Init\n");
|
||||||
Host_Init();
|
Host_Init();
|
||||||
|
|
|
@ -1089,9 +1089,9 @@ void M_AdjustSliders (int dir)
|
||||||
curr_alwaysrun = ALWAYSRUN_VANILLA;
|
curr_alwaysrun = ALWAYSRUN_VANILLA;
|
||||||
else
|
else
|
||||||
curr_alwaysrun = ALWAYSRUN_OFF;
|
curr_alwaysrun = ALWAYSRUN_OFF;
|
||||||
|
|
||||||
target_alwaysrun = (ALWAYSRUN_ITEMS + curr_alwaysrun + dir) % ALWAYSRUN_ITEMS;
|
target_alwaysrun = (ALWAYSRUN_ITEMS + curr_alwaysrun + dir) % ALWAYSRUN_ITEMS;
|
||||||
|
|
||||||
if (target_alwaysrun == ALWAYSRUN_VANILLA)
|
if (target_alwaysrun == ALWAYSRUN_VANILLA)
|
||||||
{
|
{
|
||||||
Cvar_SetValue ("cl_alwaysrun", 0);
|
Cvar_SetValue ("cl_alwaysrun", 0);
|
||||||
|
@ -1200,7 +1200,7 @@ void M_Options_Draw (void)
|
||||||
M_Print (16, 32 + 8*OPT_CONTRAST, " Contrast");
|
M_Print (16, 32 + 8*OPT_CONTRAST, " Contrast");
|
||||||
r = vid_contrast.value - 1.0;
|
r = vid_contrast.value - 1.0;
|
||||||
M_DrawSlider (220, 32 + 8*OPT_CONTRAST, r);
|
M_DrawSlider (220, 32 + 8*OPT_CONTRAST, r);
|
||||||
|
|
||||||
// OPT_MOUSESPEED:
|
// OPT_MOUSESPEED:
|
||||||
M_Print (16, 32 + 8*OPT_MOUSESPEED, " Mouse Speed");
|
M_Print (16, 32 + 8*OPT_MOUSESPEED, " Mouse Speed");
|
||||||
r = (sensitivity.value - 1)/10;
|
r = (sensitivity.value - 1)/10;
|
||||||
|
@ -1696,7 +1696,7 @@ void M_Quit_Draw (void) //johnfitz -- modified for new quit message
|
||||||
m_state = m_quit;
|
m_state = m_quit;
|
||||||
}
|
}
|
||||||
|
|
||||||
sprintf(msg1, "QuakeSpasm " QUAKESPASM_VER_STRING);
|
sprintf(msg1, "QuakeSpasm " QUAKESPASM_VERSION);
|
||||||
|
|
||||||
//okay, this is kind of fucked up. M_DrawTextBox will always act as if
|
//okay, this is kind of fucked up. M_DrawTextBox will always act as if
|
||||||
//width is even. Also, the width and lines values are for the interior of the box,
|
//width is even. Also, the width and lines values are for the interior of the box,
|
||||||
|
|
|
@ -26,20 +26,9 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||||
|
|
||||||
// quakedef.h -- primary header for client
|
// quakedef.h -- primary header for client
|
||||||
|
|
||||||
#define VERSION 1.09
|
#define VERSION "1.09"
|
||||||
|
#define FITZQUAKE_VERSION "0.85" //johnfitz
|
||||||
#define FITZQUAKE_VERSION 0.85 //johnfitz
|
#define QUAKESPASM_VERSION "0.93.1"
|
||||||
#define QUAKESPASM_VERSION 0.93
|
|
||||||
#define QUAKESPASM_VER_PATCH 1 // helper to print a string like 0.93.1
|
|
||||||
#ifndef QUAKESPASM_VER_SUFFIX
|
|
||||||
#define QUAKESPASM_VER_SUFFIX // optional version suffix string literal like "-beta1"
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#define QS_STRINGIFY_(x) #x
|
|
||||||
#define QS_STRINGIFY(x) QS_STRINGIFY_(x)
|
|
||||||
|
|
||||||
// combined version string like "0.92.1-beta1"
|
|
||||||
#define QUAKESPASM_VER_STRING QS_STRINGIFY(QUAKESPASM_VERSION) "." QS_STRINGIFY(QUAKESPASM_VER_PATCH) QUAKESPASM_VER_SUFFIX
|
|
||||||
|
|
||||||
//define PARANOID // speed sapping error checking
|
//define PARANOID // speed sapping error checking
|
||||||
|
|
||||||
|
|
|
@ -289,18 +289,18 @@ void SV_SendServerinfo (client_t *client)
|
||||||
int i; //johnfitz
|
int i; //johnfitz
|
||||||
|
|
||||||
MSG_WriteByte (&client->message, svc_print);
|
MSG_WriteByte (&client->message, svc_print);
|
||||||
sprintf (message, "%c\nFITZQUAKE %1.2f SERVER (%i CRC)\n", 2, FITZQUAKE_VERSION, pr_crc); //johnfitz -- include fitzquake version
|
sprintf (message, "%c\nFITZQUAKE " FITZQUAKE_VERSION " SERVER (%i CRC)\n", 2, pr_crc); //johnfitz -- include fitzquake version
|
||||||
MSG_WriteString (&client->message,message);
|
MSG_WriteString (&client->message,message);
|
||||||
|
|
||||||
MSG_WriteByte (&client->message, svc_serverinfo);
|
MSG_WriteByte (&client->message, svc_serverinfo);
|
||||||
MSG_WriteLong (&client->message, sv.protocol); //johnfitz -- sv.protocol instead of PROTOCOL_VERSION
|
MSG_WriteLong (&client->message, sv.protocol); //johnfitz -- sv.protocol instead of PROTOCOL_VERSION
|
||||||
|
|
||||||
if (sv.protocol == PROTOCOL_RMQ)
|
if (sv.protocol == PROTOCOL_RMQ)
|
||||||
{
|
{
|
||||||
// mh - now send protocol flags so that the client knows the protocol features to expect
|
// mh - now send protocol flags so that the client knows the protocol features to expect
|
||||||
MSG_WriteLong (&client->message, sv.protocolflags);
|
MSG_WriteLong (&client->message, sv.protocolflags);
|
||||||
}
|
}
|
||||||
|
|
||||||
MSG_WriteByte (&client->message, svs.maxclients);
|
MSG_WriteByte (&client->message, svs.maxclients);
|
||||||
|
|
||||||
if (!coop.value && deathmatch.value)
|
if (!coop.value && deathmatch.value)
|
||||||
|
@ -517,7 +517,7 @@ byte *SV_FatPVS (vec3_t org, qmodel_t *worldmodel) //johnfitz -- added worldmode
|
||||||
if (!fatpvs)
|
if (!fatpvs)
|
||||||
Sys_Error ("SV_FatPVS: realloc() failed on %d bytes", fatpvs_capacity);
|
Sys_Error ("SV_FatPVS: realloc() failed on %d bytes", fatpvs_capacity);
|
||||||
}
|
}
|
||||||
|
|
||||||
Q_memset (fatpvs, 0, fatbytes);
|
Q_memset (fatpvs, 0, fatbytes);
|
||||||
SV_AddToFatPVS (org, worldmodel->nodes, worldmodel); //johnfitz -- worldmodel as a parameter
|
SV_AddToFatPVS (org, worldmodel->nodes, worldmodel); //johnfitz -- worldmodel as a parameter
|
||||||
return fatpvs;
|
return fatpvs;
|
||||||
|
@ -586,7 +586,7 @@ void SV_WriteEntitiesToClient (edict_t *clent, sizebuf_t *msg)
|
||||||
for (i=0 ; i < ent->num_leafs ; i++)
|
for (i=0 ; i < ent->num_leafs ; i++)
|
||||||
if (pvs[ent->leafnums[i] >> 3] & (1 << (ent->leafnums[i]&7) ))
|
if (pvs[ent->leafnums[i] >> 3] & (1 << (ent->leafnums[i]&7) ))
|
||||||
break;
|
break;
|
||||||
|
|
||||||
// ericw -- added ent->num_leafs < MAX_ENT_LEAFS condition.
|
// ericw -- added ent->num_leafs < MAX_ENT_LEAFS condition.
|
||||||
//
|
//
|
||||||
// if ent->num_leafs == MAX_ENT_LEAFS, the ent is visible from too many leafs
|
// if ent->num_leafs == MAX_ENT_LEAFS, the ent is visible from too many leafs
|
||||||
|
@ -1365,7 +1365,7 @@ void SV_SpawnServer (const char *server)
|
||||||
q_strlcpy (sv.name, server, sizeof(sv.name));
|
q_strlcpy (sv.name, server, sizeof(sv.name));
|
||||||
|
|
||||||
sv.protocol = sv_protocol; // johnfitz
|
sv.protocol = sv_protocol; // johnfitz
|
||||||
|
|
||||||
if (sv.protocol == PROTOCOL_RMQ)
|
if (sv.protocol == PROTOCOL_RMQ)
|
||||||
{
|
{
|
||||||
// set up the protocol flags used by this server
|
// set up the protocol flags used by this server
|
||||||
|
|
Loading…
Reference in New Issue