From 35192beb47a3c601bdaf243019d2ba65571b5aa1 Mon Sep 17 00:00:00 2001 From: Spoike Date: Mon, 14 Nov 2005 01:32:21 +0000 Subject: [PATCH] More tweekable. git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@1569 fc73d0e0-1445-4013-8a0c-d673dee63da5 --- engine/client/cl_main.c | 2 +- engine/client/sys_win.c | 2 +- engine/common/bothdefs.h | 10 ++++++---- engine/gl/gl_vidnt.c | 4 ++-- engine/http/httpclient.c | 2 +- engine/http/httpserver.c | 10 +++++----- engine/server/sv_main.c | 4 ++-- engine/server/sv_sys_win.c | 8 ++++---- engine/sw/vid_win2.c | 4 ++-- 9 files changed, 24 insertions(+), 22 deletions(-) diff --git a/engine/client/cl_main.c b/engine/client/cl_main.c index 702d9468b..7b33207c6 100644 --- a/engine/client/cl_main.c +++ b/engine/client/cl_main.c @@ -901,7 +901,7 @@ void CL_Disconnect (void) Cvar_ApplyLatches(CVAR_SERVEROVERRIDE); if (VID_SetWindowCaption) - VID_SetWindowCaption("FTE QuakeWorld: disconnected"); + VID_SetWindowCaption(FULLENGINENAME": disconnected"); // stop sounds (especially looping!) S_StopAllSounds (true); diff --git a/engine/client/sys_win.c b/engine/client/sys_win.c index e3ff9260c..6f4558442 100644 --- a/engine/client/sys_win.c +++ b/engine/client/sys_win.c @@ -869,7 +869,7 @@ qboolean Sys_InitTerminal (void) if (!AllocConsole()) return false; SetConsoleCtrlHandler (HandlerRoutine, TRUE); - SetConsoleTitle ("FTE dedicated server"); + SetConsoleTitle (FULLENGINENAME, " dedicated server"); hinput = GetStdHandle (STD_INPUT_HANDLE); houtput = GetStdHandle (STD_OUTPUT_HANDLE); diff --git a/engine/common/bothdefs.h b/engine/common/bothdefs.h index 844289bf0..cee7657eb 100644 --- a/engine/common/bothdefs.h +++ b/engine/common/bothdefs.h @@ -241,10 +241,12 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. //#define VERSION 2.56 -#define DISTRIBUTION "FTE" -#define DISTRIBUTIONLONG "Forethought Entertainment" - -#define ENGINEWEBSITE "http://fteqw.sourceforge.net/" +#ifndef DISTRIBUTION + #define DISTRIBUTION "FTE" + #define DISTRIBUTIONLONG "Forethought Entertainment" + #define FULLENGINENAME "FTE QuakeWorld" + #define ENGINEWEBSITE "http://fteqw.sourceforge.net/" +#endif #ifndef PLATFORM #if defined(_WIN32) diff --git a/engine/gl/gl_vidnt.c b/engine/gl/gl_vidnt.c index f797c3903..f0f144b5b 100644 --- a/engine/gl/gl_vidnt.c +++ b/engine/gl/gl_vidnt.c @@ -353,7 +353,7 @@ qboolean VID_SetWindowedMode (rendererstate_t *info) dibwindow = CreateWindowEx ( ExWindowStyle, WINDOW_CLASS_NAME, - "FTE QuakeWorld", + FULLENGINENAME, WindowStyle, rect.left, rect.top, wwidth, @@ -478,7 +478,7 @@ qboolean VID_SetFullDIBMode (rendererstate_t *info) dibwindow = CreateWindowEx ( ExWindowStyle, WINDOW_CLASS_NAME, - "FTE QuakeWorld", + FULLENGINENAME, WindowStyle, rect.left, rect.top, wwidth, diff --git a/engine/http/httpclient.c b/engine/http/httpclient.c index 41bd6fb04..cf83e5ffc 100644 --- a/engine/http/httpclient.c +++ b/engine/http/httpclient.c @@ -521,7 +521,7 @@ qboolean HTTP_CL_Get(char *url, char *localfile, void (*NotifyFunction)(char *lo } ExpandBuffer(con, 2048); - sprintf(con->buffer, "GET %s HTTP/1.1\r\n" "Host: %s\r\n" "Connection: close\r\n" "User-Agent: FTE\r\n" "\r\n", uri, server); + sprintf(con->buffer, "GET %s HTTP/1.1\r\n" "Host: %s\r\n" "Connection: close\r\n" "User-Agent: "FULLENGINENAME"\r\n" "\r\n", uri, server); con->bufferused = strlen(con->buffer); con->contentlength = -1; con->NotifyFunction = NotifyFunction; diff --git a/engine/http/httpserver.c b/engine/http/httpserver.c index 05ff784b3..aba1f0638 100644 --- a/engine/http/httpserver.c +++ b/engine/http/httpserver.c @@ -351,7 +351,7 @@ cont: if (HTTPmarkup == 3 && !hostspecified) //1.1 requires the host to be specified... we ca,just ignore it as we're not routing or imitating two servers. (for complience we need to encourage the client to send - does nothing for compatability or anything, just compliance to spec. not always the same thing) { - msg = "HTTP/1.1 400 Bad Request\r\n" "Content-Type: text/plain\r\n" "Content-Length: 69\r\n" "Server: FTE/0\r\n" "\r\n" "400 Bad Request\r\nYour client failed to provide the host header line"; + msg = "HTTP/1.1 400 Bad Request\r\n" "Content-Type: text/plain\r\n" "Content-Length: 69\r\n" "Server: "FULLENGINENAME"/0\r\n" "\r\n" "400 Bad Request\r\nYour client failed to provide the host header line"; ammount = strlen(msg); ExpandOutBuffer(cl, ammount, true); @@ -368,9 +368,9 @@ cont: if (!cl->file) { if (HTTPmarkup >= 3) - msg = "HTTP/1.1 404 Not Found\r\n" "Content-Type: text/plain\r\n" "Content-Length: 15\r\n" "Server: FTE/0\r\n" "\r\n" "404 Bad address"; + msg = "HTTP/1.1 404 Not Found\r\n" "Content-Type: text/plain\r\n" "Content-Length: 15\r\n" "Server: "FULLENGINENAME"/0\r\n" "\r\n" "404 Bad address"; else if (HTTPmarkup == 2) - msg = "HTTP/1.0 404 Not Found\r\n" "Content-Type: text/plain\r\n" "Content-Length: 15\r\n" "Server: FTE/0\r\n" "\r\n" "404 Bad address"; + msg = "HTTP/1.0 404 Not Found\r\n" "Content-Type: text/plain\r\n" "Content-Length: 15\r\n" "Server: "FULLENGINENAME"/0\r\n" "\r\n" "404 Bad address"; else if (HTTPmarkup) msg = "HTTP/0.9 404 Not Found\r\n" "\r\n" "404 Bad address"; else @@ -385,9 +385,9 @@ cont: else { if (HTTPmarkup>=3) - sprintf(resource, "HTTP/1.1 200 OK\r\n" "Content-Type: %s\r\n" "Content-Length: %i\r\n" "Server: FTE/0\r\n" "\r\n", strstr(resource, ".htm")?"text/html":"text/plain", cl->file->length); + sprintf(resource, "HTTP/1.1 200 OK\r\n" "Content-Type: %s\r\n" "Content-Length: %i\r\n" "Server: "FULLENGINENAME"/0\r\n" "\r\n", strstr(resource, ".htm")?"text/html":"text/plain", cl->file->length); else if (HTTPmarkup==2) - sprintf(resource, "HTTP/1.0 200 OK\r\n" "Content-Type: %s\r\n" "Content-Length: %i\r\n" "Server: FTE/0\r\n" "\r\n", strstr(resource, ".htm")?"text/html":"text/plain", cl->file->length); + sprintf(resource, "HTTP/1.0 200 OK\r\n" "Content-Type: %s\r\n" "Content-Length: %i\r\n" "Server: "FULLENGINENAME"/0\r\n" "\r\n", strstr(resource, ".htm")?"text/html":"text/plain", cl->file->length); else if (HTTPmarkup) sprintf(resource, "HTTP/0.9 200 OK\r\n\r\n"); else diff --git a/engine/server/sv_main.c b/engine/server/sv_main.c index 8db6d55ec..432c91d2e 100644 --- a/engine/server/sv_main.c +++ b/engine/server/sv_main.c @@ -1058,7 +1058,7 @@ void SVC_GetChallenge (void) if (sv_listen.value >= 2) { //dp can respond to this (and fte won't get confused because the challenge will be wrong) - buf = va("challenge FTE%i", svs.challenges[i].challenge); + buf = va("challenge DISTRIBUTION%i", svs.challenges[i].challenge); Netchan_OutOfBand(NS_SERVER, net_from, strlen(buf)+1, buf); } } @@ -1294,7 +1294,7 @@ client_t *SVC_DirectConnect(void) protocol = SCP_DARKPLACES6; s = Info_ValueForKey(userinfo[0], "challenge"); - if (!strncmp(s, "FTE", 3)) + if (!strncmp(s, DISTRIBUTION, strlen(DISTRIBUTION))) challenge = atoi(s+3); else challenge = atoi(s); diff --git a/engine/server/sv_sys_win.c b/engine/server/sv_sys_win.c index 83533ef9b..04b03ab5c 100644 --- a/engine/server/sv_sys_win.c +++ b/engine/server/sv_sys_win.c @@ -29,7 +29,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. #ifndef MINIMAL //#define USESERVICE #endif -#define SERVICENAME "FTEQWSV" +#define SERVICENAME DISTRIBUTION"SV" @@ -1100,15 +1100,15 @@ void CreateSampleService(qboolean create) else { HKEY hk; - RegOpenKey(HKEY_LOCAL_MACHINE, "SOFTWARE\\FTE", &hk); - if (!hk)RegCreateKey(HKEY_LOCAL_MACHINE, "SOFTWARE\\FTE", &hk); + RegOpenKey(HKEY_LOCAL_MACHINE, "SOFTWARE\\"DISTRIBUTION, &hk); + if (!hk)RegCreateKey(HKEY_LOCAL_MACHINE, "SOFTWARE\\"DISTRIBUTION, &hk); RegSetValueEx(hk, "servicepath", 0, REG_SZ, path, strlen(path)); RegCloseKey(hk); schService = CreateService( schSCManager, // SCManager database SERVICENAME, // name of service - "FTE QuakeWorld Server", // service name to display + FULLENGINENAME" Server", // service name to display SERVICE_ALL_ACCESS, // desired access SERVICE_WIN32_OWN_PROCESS|SERVICE_INTERACTIVE_PROCESS, // service type SERVICE_AUTO_START, // start type diff --git a/engine/sw/vid_win2.c b/engine/sw/vid_win2.c index d80ef6d07..d758ec279 100644 --- a/engine/sw/vid_win2.c +++ b/engine/sw/vid_win2.c @@ -506,8 +506,8 @@ LONG WINAPI MainWndProc ( /* ** VID_CreateWindow */ -#define WINDOW_CLASS_NAME "FTE QuakeWorld" -#define WINDOW_TITLE_NAME "FTE QuakeWorld" +#define WINDOW_CLASS_NAME FULLENGINENAME +#define WINDOW_TITLE_NAME FULLENGINENAME void VID_CreateWindow( int width, int height, qboolean fullscreen)