mirror of
https://github.com/Shpoike/Quakespasm.git
synced 2025-02-15 16:41:22 +00:00
Merge branch 'master' into qss-r7
This commit is contained in:
commit
ba2b97080b
11 changed files with 30 additions and 19 deletions
|
@ -2171,7 +2171,7 @@ static qboolean CL_ParseSpecialPrints(const char *printtext)
|
|||
if (realtime > cl.printversionresponse)
|
||||
{
|
||||
MSG_WriteByte (&cls.message, clc_stringcmd);
|
||||
MSG_WriteString(&cls.message,va("say QuakeSpasm %1.2f.%d"BUILD_SPECIAL_STR, (float)QUAKESPASM_VERSION, QUAKESPASM_VER_PATCH));
|
||||
MSG_WriteString(&cls.message,va("say QuakeSpasm " QUAKESPASM_VER_STRING));
|
||||
cl.printversionresponse = realtime+20;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1253,7 +1253,7 @@ void Con_DrawConsole (int lines, qboolean drawinput)
|
|||
|
||||
//draw version number in bottom right
|
||||
y += 8;
|
||||
sprintf (ver, "QuakeSpasm version %1.2f.%d"BUILD_SPECIAL_STR, (float)QUAKESPASM_VERSION, QUAKESPASM_VER_PATCH);
|
||||
sprintf (ver, "QuakeSpasm version " QUAKESPASM_VER_STRING);
|
||||
for (x = 0; x < (int)strlen(ver); x++)
|
||||
Draw_Character ((con_linewidth - strlen(ver) + x + 2)<<3, y, ver[x] /*+ 128*/);
|
||||
}
|
||||
|
|
|
@ -542,6 +542,7 @@ static qboolean VID_SetMode (int width, int height, int bpp, qboolean fullscreen
|
|||
char caption[50];
|
||||
int depthbits, stencilbits;
|
||||
int fsaa_obtained;
|
||||
int previous_display;
|
||||
|
||||
// so Con_Printfs don't mess us up by forcing vid and snd updates
|
||||
temp = scr_disabled_for_loading;
|
||||
|
@ -568,7 +569,7 @@ static qboolean VID_SetMode (int width, int height, int bpp, qboolean fullscreen
|
|||
SDL_GL_SetAttribute(SDL_GL_MULTISAMPLEBUFFERS, fsaa > 0 ? 1 : 0);
|
||||
SDL_GL_SetAttribute(SDL_GL_MULTISAMPLESAMPLES, fsaa);
|
||||
|
||||
q_snprintf(caption, sizeof(caption), "QuakeSpasm %1.2f.%d"BUILD_SPECIAL_STR, (float)QUAKESPASM_VERSION, QUAKESPASM_VER_PATCH);
|
||||
q_snprintf(caption, sizeof(caption), "QuakeSpasm " QUAKESPASM_VER_STRING);
|
||||
|
||||
#if defined(USE_SDL2)
|
||||
/* Create the window if needed, hidden */
|
||||
|
@ -597,6 +598,12 @@ static qboolean VID_SetMode (int width, int height, int bpp, qboolean fullscreen
|
|||
}
|
||||
if (!draw_context)
|
||||
Sys_Error ("Couldn't create window");
|
||||
|
||||
previous_display = -1;
|
||||
}
|
||||
else
|
||||
{
|
||||
previous_display = SDL_GetWindowDisplayIndex(draw_context);
|
||||
}
|
||||
|
||||
/* Ensure the window is not fullscreen */
|
||||
|
@ -608,6 +615,9 @@ static qboolean VID_SetMode (int width, int height, int bpp, qboolean fullscreen
|
|||
|
||||
/* Set window size and display mode */
|
||||
SDL_SetWindowSize (draw_context, width, height);
|
||||
if (previous_display >= 0)
|
||||
SDL_SetWindowPosition (draw_context, SDL_WINDOWPOS_CENTERED_DISPLAY(previous_display), SDL_WINDOWPOS_CENTERED_DISPLAY(previous_display));
|
||||
else
|
||||
SDL_SetWindowPosition(draw_context, SDL_WINDOWPOS_CENTERED, SDL_WINDOWPOS_CENTERED);
|
||||
SDL_SetWindowDisplayMode (draw_context, VID_SDL2_GetDisplayMode(width, height, bpp));
|
||||
SDL_SetWindowBordered (draw_context, vid_borderless.value ? SDL_FALSE : SDL_TRUE);
|
||||
|
|
|
@ -222,7 +222,7 @@ void Host_FindMaxClients (void)
|
|||
void Host_Version_f (void)
|
||||
{
|
||||
Con_Printf ("Quake Version %1.2f\n", VERSION);
|
||||
Con_Printf ("QuakeSpasm Version %1.2f.%d"BUILD_SPECIAL_STR"\n", (float)QUAKESPASM_VERSION, QUAKESPASM_VER_PATCH);
|
||||
Con_Printf ("QuakeSpasm Version " QUAKESPASM_VER_STRING "\n");
|
||||
Con_Printf ("Exe: " __TIME__ " " __DATE__ "\n");
|
||||
}
|
||||
|
||||
|
|
|
@ -465,7 +465,7 @@ void Host_Status_f (void)
|
|||
print_fn = SV_ClientPrintf;
|
||||
|
||||
print_fn ( "host: %s\n", Cvar_VariableString ("hostname"));
|
||||
print_fn ( "version: QuakeSpasm %1.2f.%d"BUILD_SPECIAL_STR"\n", (float)QUAKESPASM_VERSION, QUAKESPASM_VER_PATCH);
|
||||
print_fn ( "version: QuakeSpasm "QUAKESPASM_VER_STRING"\n");
|
||||
if (ipv4Available)
|
||||
print_fn ("tcp/ip: %s\n", my_ipv4_address); //Spike -- FIXME: we should really have ports displayed here or something
|
||||
if (ipv6Available)
|
||||
|
|
|
@ -133,8 +133,7 @@ int main(int argc, char *argv[])
|
|||
Sys_Printf("GLQuake %1.2f (c) id Software\n", GLQUAKE_VERSION);
|
||||
Sys_Printf("FitzQuake %1.2f (c) John Fitzgibbons\n", FITZQUAKE_VERSION);
|
||||
Sys_Printf("FitzQuake SDL port (c) SleepwalkR, Baker\n");
|
||||
Sys_Printf("QuakeSpasm %1.2f.%d"BUILD_SPECIAL_STR" (c) Ozkan Sezer, Eric Wasylishen & others\n",
|
||||
(float)QUAKESPASM_VERSION, QUAKESPASM_VER_PATCH);
|
||||
Sys_Printf("QuakeSpasm " QUAKESPASM_VER_STRING " (c) Ozkan Sezer, Eric Wasylishen & others\n");
|
||||
|
||||
Sys_Printf("Host_Init\n");
|
||||
Host_Init();
|
||||
|
|
|
@ -1768,7 +1768,7 @@ void M_Quit_Draw (void) //johnfitz -- modified for new quit message
|
|||
m_state = m_quit;
|
||||
}
|
||||
|
||||
sprintf(msg1, "QuakeSpasm %1.2f.%d"BUILD_SPECIAL_STR, (float)QUAKESPASM_VERSION, QUAKESPASM_VER_PATCH);
|
||||
sprintf(msg1, "QuakeSpasm " QUAKESPASM_VER_STRING);
|
||||
|
||||
//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,
|
||||
|
|
|
@ -1205,7 +1205,7 @@ static void _Datagram_ServerControlPacket (sys_socket_t acceptsock, struct qsock
|
|||
if (*com_token) //the master server needs this. This tells the master which game we should be listed as.
|
||||
{MSG_WriteString(&net_message, va("\\gamename\\%s", com_token));net_message.cursize--;}
|
||||
MSG_WriteString(&net_message, "\\protocol\\3");net_message.cursize--; //this is stupid
|
||||
MSG_WriteString(&net_message, va("\\ver\\QuakeSpasm %1.2f.%d"BUILD_SPECIAL_STR, (float)QUAKESPASM_VERSION, QUAKESPASM_VER_PATCH));net_message.cursize--;
|
||||
MSG_WriteString(&net_message, "\\ver\\QuakeSpasm "QUAKESPASM_VER_STRING);net_message.cursize--;
|
||||
MSG_WriteString(&net_message, va("\\nqprotocol\\%u", sv.protocol));net_message.cursize--;
|
||||
if (*gamedir)
|
||||
{MSG_WriteString(&net_message, va("\\modname\\%s", gamedir));net_message.cursize--;}
|
||||
|
|
|
@ -3439,7 +3439,7 @@ static void PF_infokey(void)
|
|||
{ //nq doesn't really do serverinfo. it just has some cvars.
|
||||
if (!strcmp(key, "*version"))
|
||||
{
|
||||
q_snprintf(buf, sizeof(buf), "QuakeSpasm %1.2f.%d"BUILD_SPECIAL_STR, (float)QUAKESPASM_VERSION, QUAKESPASM_VER_PATCH);
|
||||
q_snprintf(buf, sizeof(buf), "QuakeSpasm " QUAKESPASM_VER_STRING);
|
||||
r = buf;
|
||||
}
|
||||
else
|
||||
|
@ -4483,11 +4483,10 @@ void PR_DumpPlatform_f(void)
|
|||
}
|
||||
fprintf(f,
|
||||
"/*\n"
|
||||
"Extensions file for QuakeSpasm %1.2f.%d"BUILD_SPECIAL_STR"\n"
|
||||
"Extensions file for QuakeSpasm " QUAKESPASM_VER_STRING "\n"
|
||||
"This file is auto-generated by %s %s.\n"
|
||||
"You will probably need to use FTEQCC to compile this.\n"
|
||||
"*/\n"
|
||||
,QUAKESPASM_VERSION, QUAKESPASM_VER_PATCH
|
||||
,Cmd_Argv(0), Cmd_Args()?Cmd_Args():"with no args");
|
||||
|
||||
fprintf(f,
|
||||
|
|
|
@ -38,13 +38,16 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
|||
#define FITZQUAKE_VERSION 0.85 //johnfitz
|
||||
#define QUAKESPASM_VERSION 0.92
|
||||
#define QUAKESPASM_VER_PATCH 2 // helper to print a string like 0.92.1
|
||||
|
||||
#ifdef BUILD_SPECIAL
|
||||
#define BUILD_SPECIAL_STR STRINGIFY(BUILD_SPECIAL)
|
||||
#else
|
||||
#define BUILD_SPECIAL_STR ""
|
||||
#ifndef QUAKESPASM_VER_SUFFIX
|
||||
#define QUAKESPASM_VER_SUFFIX // optional version suffix like -beta1
|
||||
#endif
|
||||
|
||||
#define QS_STRINGIFY2(x) QS_STRINGIFY(x)
|
||||
#define QS_STRINGIFY(x) #x
|
||||
|
||||
// combined version string like "0.92.1-beta1"
|
||||
#define QUAKESPASM_VER_STRING QS_STRINGIFY2(QUAKESPASM_VERSION) "." QS_STRINGIFY2(QUAKESPASM_VER_PATCH) QS_STRINGIFY2(QUAKESPASM_VER_SUFFIX)
|
||||
|
||||
//define PARANOID // speed sapping error checking
|
||||
|
||||
#define GAMENAME "id1" // directory to look in by default
|
||||
|
|
|
@ -1511,7 +1511,7 @@ void SV_SendServerinfo (client_t *client)
|
|||
retry:
|
||||
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\nQuakeSpasm %1.2f.%d"BUILD_SPECIAL_STR" Server (%i CRC)\n", 2, (float)QUAKESPASM_VERSION, QUAKESPASM_VER_PATCH, pr_crc); //spike -- quakespasm has moved on, and has its own server capabilities now. Advertising = good, right?
|
||||
sprintf (message, "%c\nQuakeSpasm "QUAKESPASM_VER_STRING" Server (%i CRC)\n", 2, pr_crc); //spike -- quakespasm has moved on, and has its own server capabilities now. Advertising = good, right?
|
||||
MSG_WriteString (&client->message,message);
|
||||
|
||||
// lack of serverinfo means any csqc info might as well be sent the lame dp way
|
||||
|
|
Loading…
Reference in a new issue