diff options
author | Tim Angus <tim@ngus.net> | 2005-12-10 20:19:52 +0000 |
---|---|---|
committer | Tim Angus <tim@ngus.net> | 2005-12-10 20:19:52 +0000 |
commit | d28c9b3a4178a8d653dc479d385f60969c241bdb (patch) | |
tree | f8d124965c2c2543c43f4438a9ce3c91580dfb57 /src/qcommon | |
parent | bf23ecf17f432cf8e47302ef7464612c17be9bbe (diff) |
* s/Quake III Arena source code/Tremulous/
* De-quaked various bits and pieces
* Integrated Tremulous into the ioq3 source
* Relicensed Tremulous to be GPL
* It compiles!!!!!!!!11111111!!!!1
Diffstat (limited to 'src/qcommon')
31 files changed, 457 insertions, 291 deletions
diff --git a/src/qcommon/cm_load.c b/src/qcommon/cm_load.c index 175f138f..f5369fa3 100644 --- a/src/qcommon/cm_load.c +++ b/src/qcommon/cm_load.c @@ -1,21 +1,22 @@ /* =========================================================================== Copyright (C) 1999-2005 Id Software, Inc. +Copyright (C) 2000-2006 Tim Angus -This file is part of Quake III Arena source code. +This file is part of Tremulous. -Quake III Arena source code is free software; you can redistribute it +Tremulous is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. -Quake III Arena source code is distributed in the hope that it will be +Tremulous is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License -along with Quake III Arena source code; if not, write to the Free Software +along with Tremulous; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA =========================================================================== */ diff --git a/src/qcommon/cm_local.h b/src/qcommon/cm_local.h index 46dff4b0..0b4f72cc 100644 --- a/src/qcommon/cm_local.h +++ b/src/qcommon/cm_local.h @@ -1,21 +1,22 @@ /* =========================================================================== Copyright (C) 1999-2005 Id Software, Inc. +Copyright (C) 2000-2006 Tim Angus -This file is part of Quake III Arena source code. +This file is part of Tremulous. -Quake III Arena source code is free software; you can redistribute it +Tremulous is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. -Quake III Arena source code is distributed in the hope that it will be +Tremulous is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License -along with Quake III Arena source code; if not, write to the Free Software +along with Tremulous; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA =========================================================================== */ diff --git a/src/qcommon/cm_patch.c b/src/qcommon/cm_patch.c index 6fe9a751..806021da 100644 --- a/src/qcommon/cm_patch.c +++ b/src/qcommon/cm_patch.c @@ -1,21 +1,22 @@ /* =========================================================================== Copyright (C) 1999-2005 Id Software, Inc. +Copyright (C) 2000-2006 Tim Angus -This file is part of Quake III Arena source code. +This file is part of Tremulous. -Quake III Arena source code is free software; you can redistribute it +Tremulous is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. -Quake III Arena source code is distributed in the hope that it will be +Tremulous is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License -along with Quake III Arena source code; if not, write to the Free Software +along with Tremulous; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA =========================================================================== */ diff --git a/src/qcommon/cm_patch.h b/src/qcommon/cm_patch.h index f5ba8b8b..826fa17f 100644 --- a/src/qcommon/cm_patch.h +++ b/src/qcommon/cm_patch.h @@ -1,21 +1,22 @@ /* =========================================================================== Copyright (C) 1999-2005 Id Software, Inc. +Copyright (C) 2000-2006 Tim Angus -This file is part of Quake III Arena source code. +This file is part of Tremulous. -Quake III Arena source code is free software; you can redistribute it +Tremulous is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. -Quake III Arena source code is distributed in the hope that it will be +Tremulous is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License -along with Quake III Arena source code; if not, write to the Free Software +along with Tremulous; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA =========================================================================== */ diff --git a/src/qcommon/cm_polylib.c b/src/qcommon/cm_polylib.c index d2b98a95..acd8f613 100644 --- a/src/qcommon/cm_polylib.c +++ b/src/qcommon/cm_polylib.c @@ -1,21 +1,22 @@ /* =========================================================================== Copyright (C) 1999-2005 Id Software, Inc. +Copyright (C) 2000-2006 Tim Angus -This file is part of Quake III Arena source code. +This file is part of Tremulous. -Quake III Arena source code is free software; you can redistribute it +Tremulous is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. -Quake III Arena source code is distributed in the hope that it will be +Tremulous is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License -along with Quake III Arena source code; if not, write to the Free Software +along with Tremulous; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA =========================================================================== */ diff --git a/src/qcommon/cm_polylib.h b/src/qcommon/cm_polylib.h index 66d58d9e..f1edc5ca 100644 --- a/src/qcommon/cm_polylib.h +++ b/src/qcommon/cm_polylib.h @@ -1,21 +1,22 @@ /* =========================================================================== Copyright (C) 1999-2005 Id Software, Inc. +Copyright (C) 2000-2006 Tim Angus -This file is part of Quake III Arena source code. +This file is part of Tremulous. -Quake III Arena source code is free software; you can redistribute it +Tremulous is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. -Quake III Arena source code is distributed in the hope that it will be +Tremulous is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License -along with Quake III Arena source code; if not, write to the Free Software +along with Tremulous; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA =========================================================================== */ diff --git a/src/qcommon/cm_public.h b/src/qcommon/cm_public.h index f59fb291..ea5b203d 100644 --- a/src/qcommon/cm_public.h +++ b/src/qcommon/cm_public.h @@ -1,21 +1,22 @@ /* =========================================================================== Copyright (C) 1999-2005 Id Software, Inc. +Copyright (C) 2000-2006 Tim Angus -This file is part of Quake III Arena source code. +This file is part of Tremulous. -Quake III Arena source code is free software; you can redistribute it +Tremulous is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. -Quake III Arena source code is distributed in the hope that it will be +Tremulous is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License -along with Quake III Arena source code; if not, write to the Free Software +along with Tremulous; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA =========================================================================== */ diff --git a/src/qcommon/cm_test.c b/src/qcommon/cm_test.c index 8aeda357..9e950603 100644 --- a/src/qcommon/cm_test.c +++ b/src/qcommon/cm_test.c @@ -1,21 +1,22 @@ /* =========================================================================== Copyright (C) 1999-2005 Id Software, Inc. +Copyright (C) 2000-2006 Tim Angus -This file is part of Quake III Arena source code. +This file is part of Tremulous. -Quake III Arena source code is free software; you can redistribute it +Tremulous is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. -Quake III Arena source code is distributed in the hope that it will be +Tremulous is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License -along with Quake III Arena source code; if not, write to the Free Software +along with Tremulous; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA =========================================================================== */ diff --git a/src/qcommon/cm_trace.c b/src/qcommon/cm_trace.c index bc52c289..750bd2e3 100644 --- a/src/qcommon/cm_trace.c +++ b/src/qcommon/cm_trace.c @@ -1,21 +1,22 @@ /* =========================================================================== Copyright (C) 1999-2005 Id Software, Inc. +Copyright (C) 2000-2006 Tim Angus -This file is part of Quake III Arena source code. +This file is part of Tremulous. -Quake III Arena source code is free software; you can redistribute it +Tremulous is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. -Quake III Arena source code is distributed in the hope that it will be +Tremulous is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License -along with Quake III Arena source code; if not, write to the Free Software +along with Tremulous; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA =========================================================================== */ diff --git a/src/qcommon/cmd.c b/src/qcommon/cmd.c index b1506f59..eb52e3f6 100644 --- a/src/qcommon/cmd.c +++ b/src/qcommon/cmd.c @@ -1,21 +1,22 @@ /* =========================================================================== Copyright (C) 1999-2005 Id Software, Inc. +Copyright (C) 2000-2006 Tim Angus -This file is part of Quake III Arena source code. +This file is part of Tremulous. -Quake III Arena source code is free software; you can redistribute it +Tremulous is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. -Quake III Arena source code is distributed in the hope that it will be +Tremulous is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License -along with Quake III Arena source code; if not, write to the Free Software +along with Tremulous; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA =========================================================================== */ diff --git a/src/qcommon/common.c b/src/qcommon/common.c index b9de0679..0d82ac81 100644 --- a/src/qcommon/common.c +++ b/src/qcommon/common.c @@ -1,21 +1,22 @@ /* =========================================================================== Copyright (C) 1999-2005 Id Software, Inc. +Copyright (C) 2000-2006 Tim Angus -This file is part of Quake III Arena source code. +This file is part of Tremulous. -Quake III Arena source code is free software; you can redistribute it +Tremulous is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. -Quake III Arena source code is distributed in the hope that it will be +Tremulous is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License -along with Quake III Arena source code; if not, write to the Free Software +along with Tremulous; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA =========================================================================== */ @@ -37,14 +38,9 @@ int demo_protocols[] = #define MAX_NUM_ARGVS 50 #define MIN_DEDICATED_COMHUNKMEGS 1 -#define MIN_COMHUNKMEGS 56 -#ifdef MACOS_X -#define DEF_COMHUNKMEGS "64" +#define MIN_COMHUNKMEGS 128 +#define DEF_COMHUNKMEGS "128" #define DEF_COMZONEMEGS "24" -#else -#define DEF_COMHUNKMEGS "56" -#define DEF_COMZONEMEGS "16" -#endif int com_argc; char *com_argv[MAX_NUM_ARGVS+1]; @@ -342,9 +338,9 @@ command lines. All of these are valid: -quake3 +set test blah +map test -quake3 set test blah+map test -quake3 set test blah + map test +tremulous +set test blah +map test +tremulous set test blah+map test +tremulous set test blah + map test ============================================================================ */ @@ -389,7 +385,7 @@ void Com_ParseCommandLine( char *commandLine ) { Com_SafeMode Check for "safe" on the command line, which will -skip loading of q3config.cfg +skip loading of autogen.cfg =================== */ qboolean Com_SafeMode( void ) { @@ -2304,55 +2300,6 @@ void Com_AppendCDKey( const char *filename ) { } } -#ifndef DEDICATED // bk001204 -/* -================= -Com_WriteCDKey -================= -*/ -static void Com_WriteCDKey( const char *filename, const char *ikey ) { - fileHandle_t f; - char fbuffer[MAX_OSPATH]; - char key[17]; -#ifndef _WIN32 - mode_t savedumask; -#endif - - - sprintf(fbuffer, "%s/q3key", filename); - - - Q_strncpyz( key, ikey, 17 ); - - if(!CL_CDKeyValidate(key, NULL) ) { - return; - } - -#ifndef _WIN32 - savedumask = umask(0077); -#endif - f = FS_SV_FOpenFileWrite( fbuffer ); - if ( !f ) { - Com_Printf ("Couldn't write CD key to %s.\n", fbuffer ); - goto out; - } - - FS_Write( key, 16, f ); - - FS_Printf( f, "\n// generated by quake, do not modify\r\n" ); - FS_Printf( f, "// Do not give this file to ANYONE.\r\n" ); - FS_Printf( f, "// id Software and Activision will NOT ask you to send this file to them.\r\n"); - - FS_FCloseFile( f ); -out: -#ifndef _WIN32 - umask(savedumask); -#endif - return; -} -#endif - - static void Com_DetectAltivec(void) { // Only detect if user hasn't forcibly disabled it. @@ -2416,9 +2363,9 @@ void Com_Init( char *commandLine ) { Cbuf_AddText ("exec default.cfg\n"); - // skip the q3config.cfg if "safe" is on the command line + // skip the autogen.cfg if "safe" is on the command line if ( !Com_SafeMode() ) { - Cbuf_AddText ("exec q3config.cfg\n"); + Cbuf_AddText ("exec autogen.cfg\n"); } Cbuf_AddText ("exec autoexec.cfg\n"); @@ -2548,7 +2495,7 @@ void Com_WriteConfigToFile( const char *filename ) { return; } - FS_Printf (f, "// generated by quake, do not modify\n"); + FS_Printf (f, "// generated by tremulous, do not modify\n"); Key_WriteBindings (f); Cvar_WriteVariables (f); FS_FCloseFile( f ); @@ -2563,9 +2510,6 @@ Writes key bindings and archived cvars to config file if modified =============== */ void Com_WriteConfiguration( void ) { -#ifndef DEDICATED // bk001204 - cvar_t *fs; -#endif // if we are quiting without fully initializing, make sure // we don't write out anything if ( !com_fullyInitialized ) { @@ -2577,17 +2521,7 @@ void Com_WriteConfiguration( void ) { } cvar_modifiedFlags &= ~CVAR_ARCHIVE; - Com_WriteConfigToFile( "q3config.cfg" ); - - // bk001119 - tentative "not needed for dedicated" -#ifndef DEDICATED - fs = Cvar_Get ("fs_game", "", CVAR_INIT|CVAR_SYSTEMINFO ); - if (UI_usesUniqueCDKey() && fs && fs->string[0] != 0) { - Com_WriteCDKey( fs->string, &cl_cdkey[16] ); - } else { - Com_WriteCDKey( "baseq3", cl_cdkey ); - } -#endif + Com_WriteConfigToFile( "autogen.cfg" ); } diff --git a/src/qcommon/cvar.c b/src/qcommon/cvar.c index 2f59810d..6c0f612f 100644 --- a/src/qcommon/cvar.c +++ b/src/qcommon/cvar.c @@ -1,21 +1,22 @@ /* =========================================================================== Copyright (C) 1999-2005 Id Software, Inc. +Copyright (C) 2000-2006 Tim Angus -This file is part of Quake III Arena source code. +This file is part of Tremulous. -Quake III Arena source code is free software; you can redistribute it +Tremulous is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. -Quake III Arena source code is distributed in the hope that it will be +Tremulous is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License -along with Quake III Arena source code; if not, write to the Free Software +along with Tremulous; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA =========================================================================== */ diff --git a/src/qcommon/files.c b/src/qcommon/files.c index ebf19b16..1a336de5 100644 --- a/src/qcommon/files.c +++ b/src/qcommon/files.c @@ -1,21 +1,22 @@ /* =========================================================================== Copyright (C) 1999-2005 Id Software, Inc. +Copyright (C) 2000-2006 Tim Angus -This file is part of Quake III Arena source code. +This file is part of Tremulous. -Quake III Arena source code is free software; you can redistribute it +Tremulous is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. -Quake III Arena source code is distributed in the hope that it will be +Tremulous is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License -along with Quake III Arena source code; if not, write to the Free Software +along with Tremulous; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA =========================================================================== */ @@ -69,7 +70,7 @@ along with "home path" and "cd path" for game content. The "base game" is the directory under the paths where data comes from by default, and -can be either "baseq3" or "demoq3". +can be "base". The "current game" may be the same as the base game, or it may be the name of another directory under the paths that should be searched for files before looking in the base game. @@ -96,7 +97,7 @@ automatically restricts where game media can come from to prevent add-ons from w After the paths are initialized, quake will look for the product.txt file. If not found and verified, the game will run in restricted mode. In restricted mode, only files contained in demoq3/pak0.pk3 will be available for loading, and only if the zip header is -verified to not have been modified. A single exception is made for q3config.cfg. Files +verified to not have been modified. A single exception is made for autogen.cfg. Files can still be written out in restricted mode, so screenshots and demos are allowed. Restricted mode can be tested by setting "+set fs_restrict 1" on the command line, even if there is a valid product.txt under the basepath or cdpath. @@ -115,8 +116,8 @@ calls to FS_AddGameDirectory Additionaly, we search in several subdirectories: current game is the current mode base game is a variable to allow mods based on other mods -(such as baseq3 + missionpack content combination in a mod for instance) -BASEGAME is the hardcoded base game ("baseq3") +(such as base + missionpack content combination in a mod for instance) +BASEGAME is the hardcoded base game ("base") e.g. the qpath "sound/newstuff/test.wav" would be searched for in the following places: @@ -184,7 +185,7 @@ Read / write config to floppy option. Different version coexistance? -When building a pak file, make sure a q3config.cfg isn't present in it, +When building a pak file, make sure a autogen.cfg isn't present in it, or configs will never get loaded from disk! todo: @@ -221,9 +222,9 @@ typedef struct fileInPack_s { } fileInPack_t; typedef struct { - char pakFilename[MAX_OSPATH]; // c:\quake3\baseq3\pak0.pk3 + char pakFilename[MAX_OSPATH]; // /tremulous/base/pak0.pk3 char pakBasename[MAX_OSPATH]; // pak0 - char pakGamename[MAX_OSPATH]; // baseq3 + char pakGamename[MAX_OSPATH]; // base unzFile handle; // handle to zip file int checksum; // regular checksum int pure_checksum; // checksum for pure @@ -235,8 +236,8 @@ typedef struct { } pack_t; typedef struct { - char path[MAX_OSPATH]; // c:\quake3 - char gamedir[MAX_OSPATH]; // baseq3 + char path[MAX_OSPATH]; + char gamedir[MAX_OSPATH]; // base } directory_t; typedef struct searchpath_s { @@ -2126,7 +2127,7 @@ static char** Sys_ConcatenateFileLists( char **list0, char **list1, char **list2 FS_GetModList Returns a list of mod directory names -A mod directory is a peer to baseq3 with a pk3 in it +A mod directory is a peer to base with a pk3 in it The directories are searched in base path, cd path and home path ================ */ @@ -2173,8 +2174,8 @@ int FS_GetModList( char *listbuf, int bufsize ) { if (bDrop) { continue; } - // we drop "baseq3" "." and ".." - if (Q_stricmp(name, "baseq3") && Q_stricmpn(name, ".", 1)) { + // we drop "base" "." and ".." + if (Q_stricmp(name, "base") && Q_stricmpn(name, ".", 1)) { // now we need to find some .pk3 files to validate the mod // NOTE TTimo: (actually I'm not sure why .. what if it's a mod under developement with no .pk3?) // we didn't keep the information when we merged the directory names, as to what OS Path it was found under @@ -2602,8 +2603,8 @@ qboolean FS_ComparePaks( char *neededpaks, int len, qboolean dlstring ) { badchecksum = qfalse; havepak = qfalse; - // never autodownload any of the id paks - if ( FS_idPak(fs_serverReferencedPakNames[i], "baseq3") || FS_idPak(fs_serverReferencedPakNames[i], "missionpack") ) { + // never autodownload any of the tremulous paks + if ( FS_idPak(fs_serverReferencedPakNames[i], "base") ) { continue; } @@ -2814,7 +2815,7 @@ static void FS_Startup( const char *gameName ) { } } - Com_ReadCDKey( "baseq3" ); + Com_ReadCDKey( "base" ); fs = Cvar_Get ("fs_game", "", CVAR_INIT|CVAR_SYSTEMINFO ); if (fs && fs->string[0] != 0) { Com_AppendCDKey( fs->string ); @@ -3108,7 +3109,7 @@ const char *FS_ReferencedPakNames( void ) { info[0] = 0; // we want to return ALL pk3's from the fs_game path - // and referenced one's from baseq3 + // and referenced one's from base for ( search = fs_searchpaths ; search ; search = search->next ) { // is the element a pak file? if ( search->pack ) { @@ -3337,9 +3338,9 @@ void FS_Restart( int checksumFeed ) { // bk010116 - new check before safeMode if ( Q_stricmp(fs_gamedirvar->string, lastValidGame) ) { - // skip the q3config.cfg if "safe" is on the command line + // skip the autogen.cfg if "safe" is on the command line if ( !Com_SafeMode() ) { - Cbuf_AddText ("exec q3config.cfg\n"); + Cbuf_AddText ("exec autogen.cfg\n"); } } diff --git a/src/qcommon/huffman.c b/src/qcommon/huffman.c index b230b5be..a579944f 100644 --- a/src/qcommon/huffman.c +++ b/src/qcommon/huffman.c @@ -1,21 +1,22 @@ /* =========================================================================== Copyright (C) 1999-2005 Id Software, Inc. +Copyright (C) 2000-2006 Tim Angus -This file is part of Quake III Arena source code. +This file is part of Tremulous. -Quake III Arena source code is free software; you can redistribute it +Tremulous is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. -Quake III Arena source code is distributed in the hope that it will be +Tremulous is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License -along with Quake III Arena source code; if not, write to the Free Software +along with Tremulous; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA =========================================================================== */ diff --git a/src/qcommon/msg.c b/src/qcommon/msg.c index d16fd58d..da96dab9 100644 --- a/src/qcommon/msg.c +++ b/src/qcommon/msg.c @@ -1,21 +1,22 @@ /* =========================================================================== Copyright (C) 1999-2005 Id Software, Inc. +Copyright (C) 2000-2006 Tim Angus -This file is part of Quake III Arena source code. +This file is part of Tremulous. -Quake III Arena source code is free software; you can redistribute it +Tremulous is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. -Quake III Arena source code is distributed in the hope that it will be +Tremulous is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License -along with Quake III Arena source code; if not, write to the Free Software +along with Tremulous; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA =========================================================================== */ diff --git a/src/qcommon/net_chan.c b/src/qcommon/net_chan.c index 2ca1bfd8..3bf6a561 100644 --- a/src/qcommon/net_chan.c +++ b/src/qcommon/net_chan.c @@ -1,21 +1,22 @@ /* =========================================================================== Copyright (C) 1999-2005 Id Software, Inc. +Copyright (C) 2000-2006 Tim Angus -This file is part of Quake III Arena source code. +This file is part of Tremulous. -Quake III Arena source code is free software; you can redistribute it +Tremulous is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. -Quake III Arena source code is distributed in the hope that it will be +Tremulous is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License -along with Quake III Arena source code; if not, write to the Free Software +along with Tremulous; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA =========================================================================== */ diff --git a/src/qcommon/q_math.c b/src/qcommon/q_math.c index de90b8b4..189fb0a2 100644 --- a/src/qcommon/q_math.c +++ b/src/qcommon/q_math.c @@ -1,21 +1,22 @@ /* =========================================================================== Copyright (C) 1999-2005 Id Software, Inc. +Copyright (C) 2000-2006 Tim Angus -This file is part of Quake III Arena source code. +This file is part of Tremulous. -Quake III Arena source code is free software; you can redistribute it +Tremulous is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. -Quake III Arena source code is distributed in the hope that it will be +Tremulous is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License -along with Quake III Arena source code; if not, write to the Free Software +along with Tremulous; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA =========================================================================== */ @@ -290,58 +291,49 @@ This is not implemented very well... */ void RotatePointAroundVector( vec3_t dst, const vec3_t dir, const vec3_t point, float degrees ) { - float m[3][3]; - float im[3][3]; - float zrot[3][3]; - float tmpmat[3][3]; - float rot[3][3]; - int i; - vec3_t vr, vup, vf; - float rad; - - vf[0] = dir[0]; - vf[1] = dir[1]; - vf[2] = dir[2]; - - PerpendicularVector( vr, dir ); - CrossProduct( vr, vf, vup ); - - m[0][0] = vr[0]; - m[1][0] = vr[1]; - m[2][0] = vr[2]; - - m[0][1] = vup[0]; - m[1][1] = vup[1]; - m[2][1] = vup[2]; - - m[0][2] = vf[0]; - m[1][2] = vf[1]; - m[2][2] = vf[2]; - - memcpy( im, m, sizeof( im ) ); - - im[0][1] = m[1][0]; - im[0][2] = m[2][0]; - im[1][0] = m[0][1]; - im[1][2] = m[2][1]; - im[2][0] = m[0][2]; - im[2][1] = m[1][2]; - - memset( zrot, 0, sizeof( zrot ) ); - zrot[0][0] = zrot[1][1] = zrot[2][2] = 1.0F; - - rad = DEG2RAD( degrees ); - zrot[0][0] = cos( rad ); - zrot[0][1] = sin( rad ); - zrot[1][0] = -sin( rad ); - zrot[1][1] = cos( rad ); - - MatrixMultiply( m, zrot, tmpmat ); - MatrixMultiply( tmpmat, im, rot ); - - for ( i = 0; i < 3; i++ ) { - dst[i] = rot[i][0] * point[0] + rot[i][1] * point[1] + rot[i][2] * point[2]; - } + float sin_a; + float cos_a; + float cos_ia; + float i_i_ia; + float j_j_ia; + float k_k_ia; + float i_j_ia; + float i_k_ia; + float j_k_ia; + float a_sin; + float b_sin; + float c_sin; + float rot[3][3]; + + cos_ia = DEG2RAD(degrees); + sin_a = sin(cos_ia); + cos_a = cos(cos_ia); + cos_ia = 1.0F - cos_a; + + i_i_ia = dir[0] * dir[0] * cos_ia; + j_j_ia = dir[1] * dir[1] * cos_ia; + k_k_ia = dir[2] * dir[2] * cos_ia; + i_j_ia = dir[0] * dir[1] * cos_ia; + i_k_ia = dir[0] * dir[2] * cos_ia; + j_k_ia = dir[1] * dir[2] * cos_ia; + + a_sin = dir[0] * sin_a; + b_sin = dir[1] * sin_a; + c_sin = dir[2] * sin_a; + + rot[0][0] = i_i_ia + cos_a; + rot[0][1] = i_j_ia - c_sin; + rot[0][2] = i_k_ia + b_sin; + rot[1][0] = i_j_ia + c_sin; + rot[1][1] = j_j_ia + cos_a; + rot[1][2] = j_k_ia - a_sin; + rot[2][0] = i_k_ia - b_sin; + rot[2][1] = j_k_ia + a_sin; + rot[2][2] = k_k_ia + cos_a; + + dst[0] = point[0] * rot[0][0] + point[1] * rot[0][1] + point[2] * rot[0][2]; + dst[1] = point[0] * rot[1][0] + point[1] * rot[1][1] + point[2] * rot[1][2]; + dst[2] = point[0] * rot[2][0] + point[1] * rot[2][1] + point[2] * rot[2][2]; } /* @@ -349,21 +341,26 @@ void RotatePointAroundVector( vec3_t dst, const vec3_t dir, const vec3_t point, RotateAroundDirection =============== */ -void RotateAroundDirection( vec3_t axis[3], float yaw ) { - - // create an arbitrary axis[1] - PerpendicularVector( axis[1], axis[0] ); +void RotateAroundDirection( vec3_t axis[3], vec_t angle ) { + vec_t scale; - // rotate it around axis[0] by yaw - if ( yaw ) { - vec3_t temp; + angle = DEG2RAD( angle ); - VectorCopy( axis[1], temp ); - RotatePointAroundVector( axis[1], axis[0], temp, yaw ); - } + // create an arbitrary axis[1] + PerpendicularVector( axis[ 1 ], axis[ 0 ] ); // cross to get axis[2] - CrossProduct( axis[0], axis[1], axis[2] ); + CrossProduct( axis[ 0 ], axis[ 1 ], axis[ 2 ] ); + + // rotate + scale = cos( angle ); + VectorScale( axis[ 1 ], scale, axis[ 1 ] ); + + scale = sin( angle ); + VectorMA( axis[ 1 ], scale, axis[ 2 ], axis[ 1 ] ); + + // recalculate axis[2] + CrossProduct( axis[ 0 ], axis[ 1 ], axis[ 2 ] ); } @@ -410,6 +407,58 @@ void vectoangles( const vec3_t value1, vec3_t angles ) { /* ================= +AxisToAngles + +Takes an axis (forward + right + up) +and returns angles -- including a roll +================= +*/ +void AxisToAngles( vec3_t axis[3], vec3_t angles ) { + float length1; + float yaw, pitch, roll = 0.0f; + + if ( axis[0][1] == 0 && axis[0][0] == 0 ) { + yaw = 0; + if ( axis[0][2] > 0 ) { + pitch = 90; + } + else { + pitch = 270; + } + } + else { + if ( axis[0][0] ) { + yaw = ( atan2 ( axis[0][1], axis[0][0] ) * 180 / M_PI ); + } + else if ( axis[0][1] > 0 ) { + yaw = 90; + } + else { + yaw = 270; + } + if ( yaw < 0 ) { + yaw += 360; + } + + length1 = sqrt ( axis[0][0]*axis[0][0] + axis[0][1]*axis[0][1] ); + pitch = ( atan2(axis[0][2], length1) * 180 / M_PI ); + if ( pitch < 0 ) { + pitch += 360; + } + + roll = ( atan2( axis[1][2], axis[2][2] ) * 180 / M_PI ); + if ( roll < 0 ) { + roll += 360; + } + } + + angles[PITCH] = -pitch; + angles[YAW] = yaw; + angles[ROLL] = roll; +} + +/* +================= AnglesToAxis ================= */ @@ -445,7 +494,7 @@ void ProjectPointOnPlane( vec3_t dst, const vec3_t p, const vec3_t normal ) vec3_t n; float inv_denom; - inv_denom = DotProduct( normal, normal ); + inv_denom = 1.0f / DotProduct( normal, normal ); #ifndef Q3_VM assert( Q_fabs(inv_denom) != 0.0f ); // bk010122 - zero vectors get here #endif @@ -1181,6 +1230,18 @@ void MatrixMultiply(float in1[3][3], float in2[3][3], float out[3][3]) { in1[2][2] * in2[2][2]; } +/* +================ +VectorMatrixMultiply +================ +*/ +void VectorMatrixMultiply( const vec3_t p, vec3_t m[ 3 ], vec3_t out ) +{ + out[ 0 ] = m[ 0 ][ 0 ] * p[ 0 ] + m[ 1 ][ 0 ] * p[ 1 ] + m[ 2 ][ 0 ] * p[ 2 ]; + out[ 1 ] = m[ 0 ][ 1 ] * p[ 0 ] + m[ 1 ][ 1 ] * p[ 1 ] + m[ 2 ][ 1 ] * p[ 2 ]; + out[ 2 ] = m[ 0 ][ 2 ] * p[ 0 ] + m[ 1 ][ 2 ] * p[ 1 ] + m[ 2 ][ 2 ] * p[ 2 ]; +} + void AngleVectors( const vec3_t angles, vec3_t forward, vec3_t right, vec3_t up) { float angle; @@ -1252,4 +1313,104 @@ void PerpendicularVector( vec3_t dst, const vec3_t src ) VectorNormalize( dst ); } +/* +================= +pointToLineDistance + +Distance from a point to some line +================= +*/ +float pointToLineDistance( const vec3_t p0, const vec3_t p1, const vec3_t p2 ) +{ + vec3_t v, w, y; + float c1, c2; + + VectorSubtract( p2, p1, v ); + VectorSubtract( p1, p0, w ); + + CrossProduct( w, v, y ); + c1 = VectorLength( y ); + c2 = VectorLength( v ); + + if( c2 == 0.0f ) + return 0.0f; + else + return c1 / c2; +} + +/* +================= +GetPerpendicularViewVector +Used to find an "up" vector for drawing a sprite so that it always faces the view as best as possible +================= +*/ +void GetPerpendicularViewVector( const vec3_t point, const vec3_t p1, const vec3_t p2, vec3_t up ) +{ + vec3_t v1, v2; + + VectorSubtract( point, p1, v1 ); + VectorNormalize( v1 ); + + VectorSubtract( point, p2, v2 ); + VectorNormalize( v2 ); + + CrossProduct( v1, v2, up ); + VectorNormalize( up ); +} + +/* +================ +ProjectPointOntoVector +================ +*/ +void ProjectPointOntoVector( vec3_t point, vec3_t vStart, vec3_t vEnd, vec3_t vProj ) +{ + vec3_t pVec, vec; + + VectorSubtract( point, vStart, pVec ); + VectorSubtract( vEnd, vStart, vec ); + VectorNormalize( vec ); + // project onto the directional vector for this segment + VectorMA( vStart, DotProduct( pVec, vec ), vec, vProj ); +} + +/* +================ +VectorMaxComponent + +Return the biggest component of some vector +================ +*/ +float VectorMaxComponent( vec3_t v ) +{ + float biggest = v[ 0 ]; + + if( v[ 1 ] > biggest ) + biggest = v[ 1 ]; + + if( v[ 2 ] > biggest ) + biggest = v[ 2 ]; + + return biggest; +} + +/* +================ +VectorMinComponent + +Return the smallest component of some vector +================ +*/ +float VectorMinComponent( vec3_t v ) +{ + float smallest = v[ 0 ]; + + if( v[ 1 ] < smallest ) + smallest = v[ 1 ]; + + if( v[ 2 ] < smallest ) + smallest = v[ 2 ]; + + return smallest; +} diff --git a/src/qcommon/q_platform.h b/src/qcommon/q_platform.h index 8859b7ac..cb8e66ff 100644 --- a/src/qcommon/q_platform.h +++ b/src/qcommon/q_platform.h @@ -1,21 +1,22 @@ /* =========================================================================== Copyright (C) 1999-2005 Id Software, Inc. +Copyright (C) 2000-2006 Tim Angus -This file is part of Quake III Arena source code. +This file is part of Tremulous. -Quake III Arena source code is free software; you can redistribute it +Tremulous is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. -Quake III Arena source code is distributed in the hope that it will be +Tremulous is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License -along with Quake III Arena source code; if not, write to the Free Software +along with Tremulous; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA =========================================================================== */ diff --git a/src/qcommon/q_shared.c b/src/qcommon/q_shared.c index af72ec28..091847ca 100644 --- a/src/qcommon/q_shared.c +++ b/src/qcommon/q_shared.c @@ -1,21 +1,22 @@ /* =========================================================================== Copyright (C) 1999-2005 Id Software, Inc. +Copyright (C) 2000-2006 Tim Angus -This file is part of Quake III Arena source code. +This file is part of Tremulous. -Quake III Arena source code is free software; you can redistribute it +Tremulous is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. -Quake III Arena source code is distributed in the hope that it will be +Tremulous is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License -along with Quake III Arena source code; if not, write to the Free Software +along with Tremulous; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA =========================================================================== */ diff --git a/src/qcommon/q_shared.h b/src/qcommon/q_shared.h index d6c69dc8..1c392f2c 100644 --- a/src/qcommon/q_shared.h +++ b/src/qcommon/q_shared.h @@ -1,21 +1,22 @@ /* =========================================================================== Copyright (C) 1999-2005 Id Software, Inc. +Copyright (C) 2000-2006 Tim Angus -This file is part of Quake III Arena source code. +This file is part of Tremulous. -Quake III Arena source code is free software; you can redistribute it +Tremulous is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. -Quake III Arena source code is distributed in the hope that it will be +Tremulous is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License -along with Quake III Arena source code; if not, write to the Free Software +along with Tremulous; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA =========================================================================== */ @@ -26,8 +27,7 @@ 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 Q3_VERSION "ioQ3 1.33" -// 1.32 released 7-10-2002 +#define Q3_VERSION "tremulous 1.1.0" #define MAX_TEAMNAME 32 @@ -280,6 +280,14 @@ typedef int fixed16_t; #define M_PI 3.14159265358979323846f // matches value in gcc v2 math.h #endif +#ifndef M_SQRT2 +#define M_SQRT2 1.414213562f +#endif + +#ifndef M_ROOT3 +#define M_ROOT3 1.732050808f +#endif + #define NUMVERTEXNORMALS 162 extern vec3_t bytedirs[NUMVERTEXNORMALS]; @@ -420,10 +428,12 @@ typedef struct { #endif #endif +#define Vector2Set(v, x, y) ((v)[0]=(x), (v)[1]=(y)) #define VectorClear(a) ((a)[0]=(a)[1]=(a)[2]=0) #define VectorNegate(a,b) ((b)[0]=-(a)[0],(b)[1]=-(a)[1],(b)[2]=-(a)[2]) #define VectorSet(v, x, y, z) ((v)[0]=(x), (v)[1]=(y), (v)[2]=(z)) #define Vector4Copy(a,b) ((b)[0]=(a)[0],(b)[1]=(a)[1],(b)[2]=(a)[2],(b)[3]=(a)[3]) +#define Vector4Add(a,b,c) ((c)[0]=(a)[0]+(b)[0],(c)[1]=(a)[1]+(b)[1],(c)[2]=(a)[2]+(b)[2],(c)[3]=(a)[3]+(b)[3]) #define SnapVector(v) {v[0]=((int)(v[0]));v[1]=((int)(v[1]));v[2]=((int)(v[2]));} // just in case you do't want to use the macros @@ -534,6 +544,7 @@ float Q_crandom( int *seed ); void vectoangles( const vec3_t value1, vec3_t angles); void AnglesToAxis( const vec3_t angles, vec3_t axis[3] ); +void AxisToAngles( vec3_t axis[3], vec3_t angles ); void AxisClear( vec3_t axis[3] ); void AxisCopy( vec3_t in[3], vec3_t out[3] ); @@ -553,16 +564,34 @@ float AngleDelta ( float angle1, float angle2 ); qboolean PlaneFromPoints( vec4_t plane, const vec3_t a, const vec3_t b, const vec3_t c ); void ProjectPointOnPlane( vec3_t dst, const vec3_t p, const vec3_t normal ); void RotatePointAroundVector( vec3_t dst, const vec3_t dir, const vec3_t point, float degrees ); -void RotateAroundDirection( vec3_t axis[3], float yaw ); +void RotateAroundDirection( vec3_t axis[3], vec_t angle ); void MakeNormalVectors( const vec3_t forward, vec3_t right, vec3_t up ); // perpendicular vector could be replaced by this //int PlaneTypeForNormal (vec3_t normal); void MatrixMultiply(float in1[3][3], float in2[3][3], float out[3][3]); +void VectorMatrixMultiply( const vec3_t p, vec3_t m[ 3 ], vec3_t out ); void AngleVectors( const vec3_t angles, vec3_t forward, vec3_t right, vec3_t up); void PerpendicularVector( vec3_t dst, const vec3_t src ); +void GetPerpendicularViewVector( const vec3_t point, const vec3_t p1, + const vec3_t p2, vec3_t up ); +void ProjectPointOntoVector( vec3_t point, vec3_t vStart, + vec3_t vEnd, vec3_t vProj ); +float VectorDistance( vec3_t v1, vec3_t v2 ); + +float pointToLineDistance( const vec3_t point, const vec3_t p1, const vec3_t p2 ); +float VectorMinComponent( vec3_t v ); +float VectorMaxComponent( vec3_t v ); + +#ifndef MAX +#define MAX(x,y) (x)>(y)?(x):(y) +#endif + +#ifndef MIN +#define MIN(x,y) (x)<(y)?(x):(y) +#endif //============================================= @@ -885,8 +914,11 @@ typedef enum { #define ENTITYNUM_MAX_NORMAL (MAX_GENTITIES-2) -#define MAX_MODELS 256 // these are sent over the net as 8 bits -#define MAX_SOUNDS 256 // so they cannot be blindly increased +#define MAX_MODELS 256 // these are sent over the net as 8 bits +#define MAX_SOUNDS 256 // so they cannot be blindly increased +#define MAX_GAME_SHADERS 64 +#define MAX_GAME_PARTICLE_SYSTEMS 64 +#define MAX_PARTICLE_FILES 128 //FIXME #define MAX_CONFIGSTRINGS 1024 @@ -1013,7 +1045,7 @@ typedef struct playerState_s { // only generate a small move value for that frame // walking will use different animations and // won't generate footsteps -#define BUTTON_AFFIRMATIVE 32 +#define BUTTON_ATTACK2 32 #define BUTTON_NEGATIVE 64 #define BUTTON_GETFLAG 128 @@ -1046,7 +1078,8 @@ typedef enum { TR_LINEAR, TR_LINEAR_STOP, TR_SINE, // value = base + sin( time / duration ) * delta - TR_GRAVITY + TR_GRAVITY, + TR_BUOYANCY //TA: what the hell is this doing in here anyway? } trType_t; typedef struct { diff --git a/src/qcommon/qcommon.h b/src/qcommon/qcommon.h index 01f4564e..c0c3925e 100644 --- a/src/qcommon/qcommon.h +++ b/src/qcommon/qcommon.h @@ -1,21 +1,22 @@ /* =========================================================================== Copyright (C) 1999-2005 Id Software, Inc. +Copyright (C) 2000-2006 Tim Angus -This file is part of Quake III Arena source code. +This file is part of Tremulous. -Quake III Arena source code is free software; you can redistribute it +Tremulous is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. -Quake III Arena source code is distributed in the hope that it will be +Tremulous is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License -along with Quake III Arena source code; if not, write to the Free Software +along with Tremulous; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA =========================================================================== */ @@ -534,7 +535,7 @@ issues. #define MAX_FILE_HANDLES 64 -#define BASEGAME "baseq3" +#define BASEGAME "base" qboolean FS_Initialized( void ); diff --git a/src/qcommon/qfiles.h b/src/qcommon/qfiles.h index 7b7ffe27..7e901b79 100644 --- a/src/qcommon/qfiles.h +++ b/src/qcommon/qfiles.h @@ -1,21 +1,22 @@ /* =========================================================================== Copyright (C) 1999-2005 Id Software, Inc. +Copyright (C) 2000-2006 Tim Angus -This file is part of Quake III Arena source code. +This file is part of Tremulous. -Quake III Arena source code is free software; you can redistribute it +Tremulous is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. -Quake III Arena source code is distributed in the hope that it will be +Tremulous is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License -along with Quake III Arena source code; if not, write to the Free Software +along with Tremulous; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA =========================================================================== */ diff --git a/src/qcommon/surfaceflags.h b/src/qcommon/surfaceflags.h index b7c10a17..31ece5cb 100644 --- a/src/qcommon/surfaceflags.h +++ b/src/qcommon/surfaceflags.h @@ -1,21 +1,22 @@ /* =========================================================================== Copyright (C) 1999-2005 Id Software, Inc. +Copyright (C) 2000-2006 Tim Angus -This file is part of Quake III Arena source code. +This file is part of Tremulous. -Quake III Arena source code is free software; you can redistribute it +Tremulous is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. -Quake III Arena source code is distributed in the hope that it will be +Tremulous is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License -along with Quake III Arena source code; if not, write to the Free Software +along with Tremulous; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA =========================================================================== */ @@ -59,6 +60,11 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA #define CONTENTS_TRIGGER 0x40000000 #define CONTENTS_NODROP 0x80000000 // don't leave bodies or items (death fog, lava) +//TA: custominfoparms below +#define CONTENTS_NOALIENBUILD 0x1000 //disallow alien building +#define CONTENTS_NOHUMANBUILD 0x2000 //disallow alien building +#define CONTENTS_NOBUILD 0x4000 //disallow alien building + #define SURF_NODAMAGE 0x1 // never give falling damage #define SURF_SLICK 0x2 // effects game physics #define SURF_SKY 0x4 // lighting from environment map @@ -78,3 +84,8 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA #define SURF_ALPHASHADOW 0x10000 // do per-pixel light shadow casting in q3map #define SURF_NODLIGHT 0x20000 // don't dlight even if solid (solid lava, skies) #define SURF_DUST 0x40000 // leave a dust trail when walking on this surface + +//TA: custominfoparms below +#define SURF_NOALIENBUILD 0x80000 //disallow alien building +#define SURF_NOHUMANBUILD 0x100000 //disallow alien building +#define SURF_NOBUILD 0x200000 //disallow alien building diff --git a/src/qcommon/unzip.h b/src/qcommon/unzip.h index 93409649..18eb31ec 100644 --- a/src/qcommon/unzip.h +++ b/src/qcommon/unzip.h @@ -1,21 +1,22 @@ /* =========================================================================== Copyright (C) 1999-2005 Id Software, Inc. +Copyright (C) 2000-2006 Tim Angus -This file is part of Quake III Arena source code. +This file is part of Tremulous. -Quake III Arena source code is free software; you can redistribute it +Tremulous is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. -Quake III Arena source code is distributed in the hope that it will be +Tremulous is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License -along with Quake III Arena source code; if not, write to the Free Software +along with Tremulous; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA =========================================================================== */ diff --git a/src/qcommon/vm.c b/src/qcommon/vm.c index d241af80..63529309 100644 --- a/src/qcommon/vm.c +++ b/src/qcommon/vm.c @@ -1,21 +1,22 @@ /* =========================================================================== Copyright (C) 1999-2005 Id Software, Inc. +Copyright (C) 2000-2006 Tim Angus -This file is part of Quake III Arena source code. +This file is part of Tremulous. -Quake III Arena source code is free software; you can redistribute it +Tremulous is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. -Quake III Arena source code is distributed in the hope that it will be +Tremulous is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License -along with Quake III Arena source code; if not, write to the Free Software +along with Tremulous; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA =========================================================================== */ diff --git a/src/qcommon/vm_interpreted.c b/src/qcommon/vm_interpreted.c index 4a9ff5bf..0ed58b37 100644 --- a/src/qcommon/vm_interpreted.c +++ b/src/qcommon/vm_interpreted.c @@ -1,21 +1,22 @@ /* =========================================================================== Copyright (C) 1999-2005 Id Software, Inc. +Copyright (C) 2000-2006 Tim Angus -This file is part of Quake III Arena source code. +This file is part of Tremulous. -Quake III Arena source code is free software; you can redistribute it +Tremulous is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. -Quake III Arena source code is distributed in the hope that it will be +Tremulous is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License -along with Quake III Arena source code; if not, write to the Free Software +along with Tremulous; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA =========================================================================== */ diff --git a/src/qcommon/vm_local.h b/src/qcommon/vm_local.h index a3d5caa3..7c4b7b1b 100644 --- a/src/qcommon/vm_local.h +++ b/src/qcommon/vm_local.h @@ -1,21 +1,22 @@ /* =========================================================================== Copyright (C) 1999-2005 Id Software, Inc. +Copyright (C) 2000-2006 Tim Angus -This file is part of Quake III Arena source code. +This file is part of Tremulous. -Quake III Arena source code is free software; you can redistribute it +Tremulous is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. -Quake III Arena source code is distributed in the hope that it will be +Tremulous is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License -along with Quake III Arena source code; if not, write to the Free Software +along with Tremulous; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA =========================================================================== */ diff --git a/src/qcommon/vm_ppc.c b/src/qcommon/vm_ppc.c index 2314b0c5..9475a833 100644 --- a/src/qcommon/vm_ppc.c +++ b/src/qcommon/vm_ppc.c @@ -1,21 +1,22 @@ /* =========================================================================== Copyright (C) 1999-2005 Id Software, Inc. +Copyright (C) 2000-2006 Tim Angus -This file is part of Quake III Arena source code. +This file is part of Tremulous. -Quake III Arena source code is free software; you can redistribute it +Tremulous is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. -Quake III Arena source code is distributed in the hope that it will be +Tremulous is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License -along with Quake III Arena source code; if not, write to the Free Software +along with Tremulous; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA =========================================================================== */ diff --git a/src/qcommon/vm_ppc_new.c b/src/qcommon/vm_ppc_new.c index 17cc4050..6d71d2c4 100644 --- a/src/qcommon/vm_ppc_new.c +++ b/src/qcommon/vm_ppc_new.c @@ -1,21 +1,22 @@ /* =========================================================================== Copyright (C) 1999-2005 Id Software, Inc. +Copyright (C) 2000-2006 Tim Angus -This file is part of Quake III Arena source code. +This file is part of Tremulous. -Quake III Arena source code is free software; you can redistribute it +Tremulous is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. -Quake III Arena source code is distributed in the hope that it will be +Tremulous is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License -along with Quake III Arena source code; if not, write to the Free Software +along with Tremulous; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA =========================================================================== */ diff --git a/src/qcommon/vm_x86.c b/src/qcommon/vm_x86.c index 38593c6b..de2c0eeb 100644 --- a/src/qcommon/vm_x86.c +++ b/src/qcommon/vm_x86.c @@ -1,21 +1,22 @@ /* =========================================================================== Copyright (C) 1999-2005 Id Software, Inc. +Copyright (C) 2000-2006 Tim Angus -This file is part of Quake III Arena source code. +This file is part of Tremulous. -Quake III Arena source code is free software; you can redistribute it +Tremulous is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. -Quake III Arena source code is distributed in the hope that it will be +Tremulous is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License -along with Quake III Arena source code; if not, write to the Free Software +along with Tremulous; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA =========================================================================== */ diff --git a/src/qcommon/vm_x86_64.c b/src/qcommon/vm_x86_64.c index f90b7ff3..e8545b9f 100644 --- a/src/qcommon/vm_x86_64.c +++ b/src/qcommon/vm_x86_64.c @@ -1,22 +1,23 @@ /* =========================================================================== Copyright (C) 1999-2005 Id Software, Inc. +Copyright (C) 2000-2006 Tim Angus Copyright (C) 2005 Ludwig Nussel <ludwig.nussel@web.de> -This file is part of Quake III Arena source code. +This file is part of Tremulous. -Quake III Arena source code is free software; you can redistribute it +Tremulous is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. -Quake III Arena source code is distributed in the hope that it will be +Tremulous is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License -along with Quake III Arena source code; if not, write to the Free Software +along with Tremulous; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA =========================================================================== */ |