From ab59cd3f0e9f0261007f844f0853fbd9d29f856a Mon Sep 17 00:00:00 2001 From: thilo Date: Wed, 9 Apr 2008 23:43:30 +0000 Subject: Include #ifdef to make it easier to create a stand-alone binary. git-svn-id: svn://svn.icculus.org/quake3/trunk@1307 edf5b092-35ff-0310-97b2-ce42778d08ea --- code/qcommon/files.c | 6 ++++++ code/qcommon/q_shared.h | 21 +++++++++++++-------- code/qcommon/qcommon.h | 13 ++++++++----- 3 files changed, 27 insertions(+), 13 deletions(-) (limited to 'code/qcommon') diff --git a/code/qcommon/files.c b/code/qcommon/files.c index a1d3312..32a24da 100644 --- a/code/qcommon/files.c +++ b/code/qcommon/files.c @@ -2795,6 +2795,7 @@ static void FS_Startup( const char *gameName ) Com_Printf( "%d files in pk3 files\n", fs_packFiles ); } +#ifndef STANDALONE /* =================== FS_CheckPak0 @@ -2891,6 +2892,7 @@ static void FS_CheckPak0( void ) Com_Error(ERR_FATAL, "You need to install Quake III Arena in order to play"); } } +#endif /* ===================== @@ -3262,7 +3264,9 @@ void FS_InitFilesystem( void ) { // try to start up normally FS_Startup( BASEGAME ); +#ifndef STANDALONE FS_CheckPak0( ); +#endif // if we can't find default.cfg, assume that the paths are // busted and error out now, rather than getting an unreadable @@ -3295,7 +3299,9 @@ void FS_Restart( int checksumFeed ) { // try to start up normally FS_Startup( BASEGAME ); +#ifndef STANDALONE FS_CheckPak0( ); +#endif // if we can't find default.cfg, assume that the paths are // busted and error out now, rather than getting an unreadable diff --git a/code/qcommon/q_shared.h b/code/qcommon/q_shared.h index 81083d1..d1f8d2a 100644 --- a/code/qcommon/q_shared.h +++ b/code/qcommon/q_shared.h @@ -26,8 +26,19 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA // q_shared.h -- included first by ALL program modules. // A user mod should never modify this file -#define PRODUCT_NAME "ioq3" -#define PRODUCT_VERSION "1.35" +#ifdef STANDALONE + #define PRODUCT_NAME "iofoo3" + #define PRODUCT_VERSION "-1" + #define BASEGAME "foobar" + #define CLIENT_WINDOW_TITLE "changeme" + #define CLIENT_WINDOW_MIN_TITLE "changeme2" +#else + #define PRODUCT_NAME "ioq3" + #define PRODUCT_VERSION "1.35" + #define BASEGAME "baseq3" + #define CLIENT_WINDOW_TITLE "ioquake3" + #define CLIENT_WINDOW_MIN_TITLE "ioq3" +#endif #ifdef SVN_VERSION # define Q3_VERSION PRODUCT_NAME " " SVN_VERSION @@ -35,12 +46,6 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA # define Q3_VERSION PRODUCT_NAME " " PRODUCT_VERSION #endif -#define CLIENT_WINDOW_TITLE "ioquake3" -#define CLIENT_WINDOW_MIN_TITLE "ioq3" -// 1.32 released 7-10-2002 - -#define BASEGAME "baseq3" - #define MAX_TEAMNAME 32 #ifdef _MSC_VER diff --git a/code/qcommon/qcommon.h b/code/qcommon/qcommon.h index d47bb21..1bd1c3d 100644 --- a/code/qcommon/qcommon.h +++ b/code/qcommon/qcommon.h @@ -243,15 +243,18 @@ extern int demo_protocols[]; #ifndef MASTER_SERVER_NAME #define MASTER_SERVER_NAME "master.quake3arena.com" #endif -#ifndef AUTHORIZE_SERVER_NAME -#define AUTHORIZE_SERVER_NAME "authorize.quake3arena.com" + +#ifndef STANDALONE + #ifndef AUTHORIZE_SERVER_NAME + #define AUTHORIZE_SERVER_NAME "authorize.quake3arena.com" + #endif + #ifndef PORT_AUTHORIZE + #define PORT_AUTHORIZE 27952 + #endif #endif #define PORT_MASTER 27950 #define PORT_UPDATE 27951 -#ifndef PORT_AUTHORIZE -#define PORT_AUTHORIZE 27952 -#endif #define PORT_SERVER 27960 #define NUM_SERVER_PORTS 4 // broadcast scan this many ports after // PORT_SERVER so a single machine can -- cgit v1.2.3