2004-08-21 01:25:48 +00:00
|
|
|
/*
|
|
|
|
Copyright (C) 1996-1997 Id Software, Inc.
|
|
|
|
|
|
|
|
This program 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.
|
|
|
|
|
|
|
|
This program is distributed in the hope that it will be useful,
|
|
|
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
2007-10-12 10:27:51 +00:00
|
|
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
2004-08-21 01:25:48 +00:00
|
|
|
|
|
|
|
See the GNU General Public License for more details.
|
|
|
|
|
|
|
|
You should have received a copy of the GNU General Public License
|
|
|
|
along with this program; if not, write to the Free Software
|
|
|
|
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
|
|
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef __BOTHDEFS_H
|
|
|
|
#define __BOTHDEFS_H
|
|
|
|
|
2011-03-30 20:10:24 +00:00
|
|
|
// release version
|
|
|
|
#define FTE_VER_MAJOR 1
|
2011-06-25 23:40:34 +00:00
|
|
|
#define FTE_VER_MINOR 1
|
2011-03-30 20:10:24 +00:00
|
|
|
|
|
|
|
//#define VERSION 2.56
|
|
|
|
#ifndef DISTRIBUTION
|
|
|
|
#define DISTRIBUTION "FTE"
|
|
|
|
#define DISTRIBUTIONLONG "Forethought Entertainment"
|
|
|
|
#define FULLENGINENAME "FTE QuakeWorld"
|
|
|
|
#define ENGINEWEBSITE "http://www.fteqw.com"
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
2005-11-29 23:20:02 +00:00
|
|
|
#if defined(__APPLE__) && defined(__MACH__)
|
2009-11-04 21:16:50 +00:00
|
|
|
#define MACOSX
|
2005-11-29 23:20:02 +00:00
|
|
|
#endif
|
2004-08-21 01:25:48 +00:00
|
|
|
|
2009-06-21 17:45:33 +00:00
|
|
|
#if defined(__MINGW32_VERSION) || defined(__MINGW__) || defined(__MINGW32__) || defined(__MINGW64__)
|
2004-08-21 01:25:48 +00:00
|
|
|
#define MINGW
|
|
|
|
#endif
|
2005-01-04 08:06:46 +00:00
|
|
|
#if !defined(MINGW) && defined(__GNUC__) && defined(_WIN32)
|
|
|
|
#define MINGW //Erm, why is this happening?
|
|
|
|
#endif
|
2004-08-21 01:25:48 +00:00
|
|
|
|
2011-09-05 01:48:23 +00:00
|
|
|
#ifdef ANDROID
|
|
|
|
#define NO_PNG
|
|
|
|
#define NO_JPEG
|
|
|
|
#define NO_OGG
|
|
|
|
#endif
|
|
|
|
|
2012-04-09 19:12:12 +00:00
|
|
|
#ifdef NACL
|
|
|
|
#define NO_PNG
|
|
|
|
#define NO_JPEG
|
|
|
|
#define NO_OGG
|
|
|
|
#define NO_ZLIB
|
|
|
|
#endif
|
|
|
|
|
2004-08-21 01:25:48 +00:00
|
|
|
#ifdef HAVE_CONFIG_H //if it was configured properly, then we have a more correct list of features we want to use.
|
|
|
|
#include "config.h"
|
|
|
|
#else
|
2009-11-04 21:16:50 +00:00
|
|
|
#ifndef MSVCLIBSPATH
|
2010-12-23 08:53:23 +00:00
|
|
|
#if _MSC_VER == 1200
|
|
|
|
#define MSVCLIBSPATH "../libs/vc6-libs/"
|
|
|
|
#else
|
2009-11-04 21:16:50 +00:00
|
|
|
#define MSVCLIBSPATH "../libs/"
|
|
|
|
#endif
|
2010-12-23 08:53:23 +00:00
|
|
|
#endif
|
2004-08-21 01:25:48 +00:00
|
|
|
|
2009-03-07 04:37:24 +00:00
|
|
|
#ifdef NO_LIBRARIES
|
|
|
|
#define NO_DIRECTX
|
|
|
|
#define NO_PNG
|
|
|
|
#define NO_JPEG
|
|
|
|
#define NO_ZLIB
|
|
|
|
#define NO_OGG
|
|
|
|
#endif
|
|
|
|
|
2004-08-21 01:25:48 +00:00
|
|
|
//#define AVAIL_OGGVORBIS
|
2005-11-29 23:20:02 +00:00
|
|
|
#if !defined(__CYGWIN__) && !defined(MINGW) && !defined(MACOSX)
|
2004-08-21 01:25:48 +00:00
|
|
|
#define AVAIL_PNGLIB
|
|
|
|
#define AVAIL_JPEGLIB
|
|
|
|
#define AVAIL_ZLIB
|
2004-08-23 06:23:11 +00:00
|
|
|
|
2005-04-16 16:21:27 +00:00
|
|
|
#define AVAIL_OGGVORBIS
|
2010-03-14 14:35:56 +00:00
|
|
|
|
|
|
|
// #define AVAIL_OPENAL /* Jogi's OpenAL support */
|
2004-08-21 01:25:48 +00:00
|
|
|
#endif
|
2004-08-23 06:23:11 +00:00
|
|
|
|
2009-07-19 10:11:32 +00:00
|
|
|
#if defined(MINGW) || defined(MACOSX)
|
2007-10-12 10:27:51 +00:00
|
|
|
#define AVAIL_PNGLIB
|
|
|
|
#define AVAIL_ZLIB
|
|
|
|
#define AVAIL_JPEGLIB
|
|
|
|
#endif
|
|
|
|
|
2009-03-07 04:37:24 +00:00
|
|
|
#if !defined(NO_DIRECTX) && !defined(NODIRECTX)
|
|
|
|
#define AVAIL_DINPUT
|
|
|
|
#define AVAIL_DDRAW
|
|
|
|
#define AVAIL_DSOUND
|
|
|
|
#define AVAIL_D3D
|
|
|
|
#endif
|
2005-04-19 21:09:29 +00:00
|
|
|
|
2010-11-11 04:03:16 +00:00
|
|
|
//#define DYNAMIC_ZLIB
|
|
|
|
//#define DYNAMIC_LIBPNG
|
|
|
|
//#define DYNAMIC_LIBJPEG
|
|
|
|
|
2011-06-29 18:39:11 +00:00
|
|
|
#if defined(_MSC_VER) //too lazy to fix up the makefile
|
|
|
|
//#define BOTLIB_STATIC
|
|
|
|
#endif
|
|
|
|
|
2011-01-29 19:53:38 +00:00
|
|
|
#define AVAIL_FREETYPE
|
2009-07-14 23:42:54 +00:00
|
|
|
#ifdef _WIN32
|
|
|
|
//needs testing on other platforms
|
2012-02-27 12:23:15 +00:00
|
|
|
//#define AVAIL_OPENAL
|
2009-07-14 23:42:54 +00:00
|
|
|
#endif
|
|
|
|
|
2009-11-05 01:22:27 +00:00
|
|
|
#define ODE_DYNAMIC
|
2009-11-04 21:16:50 +00:00
|
|
|
|
2010-12-07 12:23:56 +00:00
|
|
|
#ifdef NO_OPENAL
|
|
|
|
#undef AVAIL_OPENAL
|
|
|
|
#endif
|
|
|
|
|
2005-04-19 21:09:29 +00:00
|
|
|
#ifdef NO_PNG
|
|
|
|
#undef AVAIL_PNGLIB
|
|
|
|
#endif
|
|
|
|
#ifdef NO_JPEG
|
|
|
|
#undef AVAIL_JPEGLIB
|
|
|
|
#endif
|
|
|
|
#ifdef NO_ZLIB
|
|
|
|
#undef AVAIL_ZLIB
|
|
|
|
#endif
|
|
|
|
#ifdef NO_OGG
|
|
|
|
#undef AVAIL_OGGVORBIS
|
|
|
|
#endif
|
2009-07-14 23:42:54 +00:00
|
|
|
#if defined(NO_FREETYPE)
|
|
|
|
#undef AVAIL_FREETYPE
|
|
|
|
#endif
|
2004-08-21 01:25:48 +00:00
|
|
|
|
2009-07-05 18:45:53 +00:00
|
|
|
//#define AVAIL_FREETYPE
|
2004-08-21 01:25:48 +00:00
|
|
|
|
|
|
|
//set any additional defines or libs in win32
|
|
|
|
#define SVRANKING
|
|
|
|
|
|
|
|
#ifdef MINIMAL
|
2004-08-26 10:18:06 +00:00
|
|
|
#define CL_MASTER //this is useful
|
2004-08-21 01:25:48 +00:00
|
|
|
|
|
|
|
#undef AVAIL_JPEGLIB //no jpeg support
|
|
|
|
#undef AVAIL_PNGLIB //no png support
|
|
|
|
#undef USE_MADLIB //no internal mp3 playing
|
|
|
|
#define NOMEDIA //NO playing of avis/cins/roqs
|
|
|
|
|
|
|
|
#define MD3MODELS //we DO want to use quake3 alias models. This might be a minimal build, but we still want this.
|
2008-01-24 02:06:15 +00:00
|
|
|
#define PLUGINS
|
2004-08-21 01:25:48 +00:00
|
|
|
|
2008-11-09 22:29:28 +00:00
|
|
|
#define PSET_CLASSIC
|
|
|
|
|
2010-07-11 02:22:39 +00:00
|
|
|
//#define CSQC_DAT //support for csqc
|
2009-11-17 00:15:44 +00:00
|
|
|
|
2009-11-05 03:07:52 +00:00
|
|
|
#ifndef SERVERONLY //don't be stupid, stupid.
|
|
|
|
#ifndef CLIENTONLY
|
|
|
|
#define CLIENTONLY
|
|
|
|
#endif
|
|
|
|
#endif
|
2004-08-21 01:25:48 +00:00
|
|
|
#else
|
|
|
|
#define SIDEVIEWS 4 //enable secondary/reverse views.
|
2010-09-15 09:06:31 +00:00
|
|
|
|
2004-08-21 01:25:48 +00:00
|
|
|
#define SP2MODELS //quake2 sprite models
|
|
|
|
#define MD2MODELS //quake2 alias models
|
|
|
|
#define MD3MODELS //quake3 alias models
|
2005-09-14 04:21:02 +00:00
|
|
|
#define MD5MODELS //doom3 models
|
|
|
|
#define ZYMOTICMODELS //zymotic skeletal models.
|
2010-09-15 09:06:31 +00:00
|
|
|
#define DPMMODELS //darkplaces model format (which I've never seen anyone use)
|
|
|
|
#define PSKMODELS //PSK model format (ActorX stuff from UT, though not the format the game itself uses)
|
2004-08-21 01:25:48 +00:00
|
|
|
#define HALFLIFEMODELS //halflife model support (experimental)
|
2011-07-30 14:14:56 +00:00
|
|
|
#define INTERQUAKEMODELS
|
2010-09-15 09:06:31 +00:00
|
|
|
|
|
|
|
#define HUFFNETWORK //huffman network compression
|
2012-02-12 05:54:44 +00:00
|
|
|
// #define DOOMWADS //doom wad/sprite support
|
|
|
|
// #define MAP_DOOM //doom map support
|
2011-02-25 04:22:14 +00:00
|
|
|
#define MAP_PROC //doom3/quake4 map support
|
2004-08-21 01:25:48 +00:00
|
|
|
//#define WOLF3DSUPPORT //wolfenstein3d map support (not started yet)
|
|
|
|
#define Q2BSPS //quake 2 bsp support
|
|
|
|
#define Q3BSPS //quake 3 bsp support
|
2005-08-26 22:56:51 +00:00
|
|
|
#define TERRAIN //heightmap support
|
2004-08-21 01:25:48 +00:00
|
|
|
#define SV_MASTER //starts up a master server
|
|
|
|
#define SVCHAT //serverside npc chatting. see sv_chat.c
|
|
|
|
#define Q2SERVER //server can run a q2 game dll and switches to q2 network and everything else.
|
|
|
|
#define Q2CLIENT //client can connect to q2 servers
|
2005-11-30 01:20:53 +00:00
|
|
|
#define Q3CLIENT
|
|
|
|
#define Q3SERVER
|
2009-11-04 21:16:50 +00:00
|
|
|
// #define HLCLIENT 7 //we can run HL gamecode (not protocol compatible, set to 6 or 7)
|
|
|
|
// #define HLSERVER 140 //we can run HL gamecode (not protocol compatible, set to 138 or 140)
|
2004-08-21 01:25:48 +00:00
|
|
|
#define NQPROT //server and client are capable of using quake1/netquake protocols. (qw is still prefered. uses the command 'nqconnect')
|
|
|
|
#define ZLIB //zip/pk3 support
|
2005-12-22 02:29:11 +00:00
|
|
|
#define WEBSERVER //http/ftp servers
|
|
|
|
#define WEBCLIENT //http/ftp clients.
|
2004-08-21 01:25:48 +00:00
|
|
|
#define RUNTIMELIGHTING //calculate lit/lux files the first time the map is loaded and doesn't have a loadable lit.
|
2005-03-10 03:55:18 +00:00
|
|
|
// #define QTERM //qterm... adds a console command that allows running programs from within quake - bit like xterm.
|
2004-08-21 01:25:48 +00:00
|
|
|
#define CL_MASTER //query master servers and stuff for a dynamic server listing.
|
|
|
|
#define R_XFLIP //allow view to be flipped horizontally
|
|
|
|
#define TEXTEDITOR
|
2004-11-29 01:21:00 +00:00
|
|
|
#define PPL //per pixel lighting (stencil shadowing)
|
2005-08-26 22:56:51 +00:00
|
|
|
#define DDS //a sort of image file format.
|
2009-11-04 21:16:50 +00:00
|
|
|
#define RTLIGHTS //realtime lighting
|
2004-08-21 01:25:48 +00:00
|
|
|
|
2008-05-14 14:46:58 +00:00
|
|
|
#define VM_Q1 //q1 qvm gamecode interface
|
2007-09-02 19:55:17 +00:00
|
|
|
|
2005-11-30 01:20:53 +00:00
|
|
|
#define TCPCONNECT //a tcpconnect command, that allows the player to connect to tcp-encapsulated qw protocols.
|
2008-11-09 22:29:28 +00:00
|
|
|
#define IRCCONNECT //an ircconnect command, that allows the player to connect to irc-encapsulated qw protocols... yeah, really.
|
2005-11-30 01:20:53 +00:00
|
|
|
|
2004-10-10 06:32:29 +00:00
|
|
|
#define PLUGINS
|
|
|
|
|
2008-11-09 22:29:28 +00:00
|
|
|
#ifdef _DEBUG
|
|
|
|
// #define OFFSCREENGECKO
|
|
|
|
#endif
|
|
|
|
|
2010-03-14 14:35:56 +00:00
|
|
|
//#define SQL
|
|
|
|
|
2005-02-12 18:56:04 +00:00
|
|
|
#define CSQC_DAT //support for csqc
|
2004-11-29 01:21:00 +00:00
|
|
|
#define MENU_DAT //support for menu.dat
|
|
|
|
|
2008-11-09 22:29:28 +00:00
|
|
|
#define PSET_SCRIPT
|
|
|
|
#define PSET_CLASSIC
|
|
|
|
//#define PSET_DARKPLACES
|
|
|
|
|
2011-09-05 01:48:23 +00:00
|
|
|
#define VOICECHAT
|
2004-08-21 01:25:48 +00:00
|
|
|
|
2004-09-24 02:43:25 +00:00
|
|
|
//these things were moved to plugins.
|
2004-08-21 01:25:48 +00:00
|
|
|
#endif
|
|
|
|
|
|
|
|
#endif
|
2008-12-23 02:55:20 +00:00
|
|
|
|
2011-09-05 01:48:23 +00:00
|
|
|
#ifdef ANDROID
|
|
|
|
#undef RTLIGHTS
|
|
|
|
#undef VOICECHAT
|
|
|
|
#undef TEXTEDITOR
|
|
|
|
#endif
|
2012-04-09 19:12:12 +00:00
|
|
|
#ifdef NACL
|
|
|
|
#undef CL_MASTER //no sockets support
|
|
|
|
#undef SV_MASTER //noone uses this anyway
|
|
|
|
#undef VOICECHAT //not going to compile a speex library - I'm too lazy, but it can be done.
|
|
|
|
#undef WEBSERVER //no sockets support (certainly no servers)
|
|
|
|
#undef WEBCLIENT //no sockets support (could use a different method, but that is non-trivial)
|
|
|
|
#undef TCPCONNECT
|
|
|
|
#undef IRCCONNECT
|
|
|
|
#endif
|
2011-09-05 01:48:23 +00:00
|
|
|
|
2004-08-21 01:25:48 +00:00
|
|
|
|
|
|
|
//fix things a little...
|
2010-03-14 14:35:56 +00:00
|
|
|
#ifdef NPQTV
|
2011-09-16 05:56:54 +00:00
|
|
|
#define NPFTE
|
|
|
|
#undef NPQTV
|
|
|
|
#endif
|
|
|
|
#ifdef NPFTE
|
2010-03-14 14:35:56 +00:00
|
|
|
/*plugins require threads and stuff now, and http download support*/
|
|
|
|
#ifndef MULTITHREAD
|
|
|
|
#define MULTITHREAD
|
|
|
|
#define WEBCLIENT
|
|
|
|
#endif
|
|
|
|
#endif
|
2004-08-21 01:25:48 +00:00
|
|
|
|
|
|
|
#ifndef _WIN32
|
2007-09-02 19:55:17 +00:00
|
|
|
#undef QTERM //not supported - FIXME: move to native plugin
|
|
|
|
#endif
|
|
|
|
|
2004-08-21 01:25:48 +00:00
|
|
|
#if (defined(Q2CLIENT) || defined(Q2SERVER))
|
|
|
|
#ifndef Q2BSPS
|
|
|
|
#error "Q2 game support without Q2BSP support. doesn't make sense"
|
|
|
|
#endif
|
|
|
|
#if !defined(MD2MODELS) || !defined(SP2MODELS)
|
|
|
|
#error "Q2 game support without full Q2 model support. doesn't make sense"
|
|
|
|
#endif
|
|
|
|
#endif
|
|
|
|
|
2011-09-16 05:56:54 +00:00
|
|
|
#ifdef NPFTE
|
2009-04-01 22:03:56 +00:00
|
|
|
#undef TEXTEDITOR
|
|
|
|
#undef WEBSERVER
|
|
|
|
#endif
|
2004-08-21 01:25:48 +00:00
|
|
|
|
|
|
|
#ifdef SERVERONLY //remove options that don't make sense on only a server
|
|
|
|
#undef Q2CLIENT
|
2004-12-24 08:45:56 +00:00
|
|
|
#undef Q3CLIENT
|
2009-03-07 05:05:54 +00:00
|
|
|
#undef HLCLIENT
|
2009-04-01 22:03:56 +00:00
|
|
|
#undef HALFLIFEMODELS
|
2005-09-14 04:21:02 +00:00
|
|
|
#undef VM_UI
|
|
|
|
#undef VM_CG
|
2004-08-21 01:25:48 +00:00
|
|
|
#undef WEBCLIENT
|
|
|
|
#undef TEXTEDITOR
|
|
|
|
#undef RUNTIMELIGHTING
|
2008-11-09 22:29:28 +00:00
|
|
|
|
|
|
|
#undef PSET_SCRIPT
|
|
|
|
#undef PSET_CLASSIC
|
|
|
|
#undef PSET_DARKPLACES
|
2004-08-21 01:25:48 +00:00
|
|
|
#endif
|
2007-10-29 06:06:20 +00:00
|
|
|
#ifdef CLIENTONLY //remove optional server components that make no sence on a client only build.
|
2004-08-21 01:25:48 +00:00
|
|
|
#undef Q2SERVER
|
2005-08-26 22:56:51 +00:00
|
|
|
#undef Q3SERVER
|
2009-03-07 05:05:54 +00:00
|
|
|
#undef HLSERVER
|
2004-08-21 01:25:48 +00:00
|
|
|
#undef WEBSERVER
|
2007-09-02 19:55:17 +00:00
|
|
|
#undef VM_Q1
|
2010-12-18 21:30:16 +00:00
|
|
|
#undef SQL
|
2004-08-21 01:25:48 +00:00
|
|
|
#endif
|
|
|
|
|
|
|
|
//remove any options that depend upon GL.
|
|
|
|
#ifndef SERVERONLY
|
2010-05-01 22:47:47 +00:00
|
|
|
#if !defined(GLQUAKE) && !defined(D3DQUAKE)
|
2004-08-21 01:25:48 +00:00
|
|
|
#undef DOOMWADS
|
|
|
|
#undef HALFLIFEMODELS
|
|
|
|
#undef Q3BSPS
|
|
|
|
#undef R_XFLIP
|
|
|
|
#undef RUNTIMELIGHTING
|
2005-08-26 22:56:51 +00:00
|
|
|
#undef Q3CLIENT
|
2004-08-21 01:25:48 +00:00
|
|
|
#endif
|
2007-08-07 16:11:30 +00:00
|
|
|
|
|
|
|
// undefine things not supported yet for D3D
|
|
|
|
#if defined(D3DQUAKE) && !defined(GLQUAKE)
|
|
|
|
#undef DDS // this is dumb
|
|
|
|
#undef HALFLIFEMODELS
|
|
|
|
#endif
|
|
|
|
|
2004-08-21 01:25:48 +00:00
|
|
|
#endif
|
|
|
|
|
2010-05-01 22:47:47 +00:00
|
|
|
#if !defined(GLQUAKE) && !defined(D3DQUAKE) && !defined(SERVERONLY)
|
2004-12-15 19:47:56 +00:00
|
|
|
#undef Q3BSPS
|
|
|
|
#endif
|
|
|
|
#if !defined(Q3BSPS)
|
2004-12-24 08:45:56 +00:00
|
|
|
#undef Q3CLIENT //reconsider this (later)
|
2005-08-26 22:56:51 +00:00
|
|
|
#undef Q3SERVER //reconsider this (later)
|
2004-12-24 08:45:56 +00:00
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifndef Q3CLIENT
|
|
|
|
#undef VM_CG // :(
|
2005-09-09 23:40:55 +00:00
|
|
|
#undef VM_UI
|
2004-12-24 08:45:56 +00:00
|
|
|
#else
|
|
|
|
#define VM_CG
|
2005-09-09 23:40:55 +00:00
|
|
|
#define VM_UI
|
2004-12-24 08:45:56 +00:00
|
|
|
#endif
|
|
|
|
|
2007-09-02 19:55:17 +00:00
|
|
|
#if defined(VM_Q1) || defined(VM_UI) || defined(VM_CG) || defined(Q3SERVER) || defined(PLUGINS)
|
2004-12-24 08:45:56 +00:00
|
|
|
#define VM_ANY
|
2004-12-15 19:47:56 +00:00
|
|
|
#endif
|
|
|
|
|
2004-08-21 01:25:48 +00:00
|
|
|
#define PROTOCOLEXTENSIONS
|
|
|
|
|
2010-07-11 02:22:39 +00:00
|
|
|
#ifdef MINIMAL
|
|
|
|
#define IFMINIMAL(x,y) x
|
|
|
|
#else
|
|
|
|
#define IFMINIMAL(x,y) y
|
|
|
|
#endif
|
|
|
|
|
2005-10-04 21:08:06 +00:00
|
|
|
//#define PRE_SAYONE 2.487 //FIXME: remove.
|
2004-08-21 01:25:48 +00:00
|
|
|
|
|
|
|
// defs common to client and server
|
|
|
|
|
2005-11-03 23:43:13 +00:00
|
|
|
#ifndef PLATFORM
|
|
|
|
#if defined(_WIN32)
|
|
|
|
#if defined(__amd64__)
|
|
|
|
#define PLATFORM "Win64"
|
2005-12-23 01:23:44 +00:00
|
|
|
#else
|
|
|
|
#define PLATFORM "Win32"
|
2005-11-03 23:43:13 +00:00
|
|
|
#endif
|
|
|
|
#elif defined(__linux__)
|
|
|
|
#if defined(__amd64__)
|
|
|
|
#define PLATFORM "Linux64"
|
|
|
|
#else
|
|
|
|
#define PLATFORM "Linux"
|
|
|
|
#endif
|
|
|
|
#elif defined(__FreeBSD__)
|
|
|
|
#define PLATFORM "FreeBSD"
|
|
|
|
#elif defined(__OpenBSD__)
|
|
|
|
#define PLATFORM "OpenBSD"
|
|
|
|
#elif defined(__NetBSD__)
|
|
|
|
#define PLATFORM "NetBSD"
|
|
|
|
#elif defined(__MORPHOS__)
|
|
|
|
#define PLATFORM "MorphOS"
|
2005-11-29 23:20:02 +00:00
|
|
|
#elif defined(MACOSX)
|
|
|
|
#define PLATFORM "MacOS X"
|
2005-09-29 23:49:24 +00:00
|
|
|
#else
|
2005-11-03 23:43:13 +00:00
|
|
|
#define PLATFORM "Unknown"
|
2005-09-29 23:49:24 +00:00
|
|
|
#endif
|
2004-08-21 01:25:48 +00:00
|
|
|
#endif
|
|
|
|
|
|
|
|
|
2011-03-03 12:57:34 +00:00
|
|
|
#if (defined(_M_IX86) || defined(__i386__)) && !defined(__amd64__) && !defined(_AMD64_)
|
2004-08-21 01:25:48 +00:00
|
|
|
#define UNALIGNED_OK 1 // set to 0 if unaligned accesses are not supported
|
|
|
|
#else
|
|
|
|
#define UNALIGNED_OK 0
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifdef _MSC_VER
|
2009-11-04 21:16:50 +00:00
|
|
|
#define VARGS __cdecl
|
|
|
|
#define MSVCDISABLEWARNINGS
|
2010-03-14 14:35:56 +00:00
|
|
|
#if _MSC_VER >= 1300
|
|
|
|
#define FTE_DEPRECATED __declspec(deprecated)
|
2010-07-11 02:22:39 +00:00
|
|
|
#define _CRT_SECURE_NO_WARNINGS
|
|
|
|
#define _CRT_NONSTDC_NO_WARNINGS
|
2010-03-14 14:35:56 +00:00
|
|
|
#endif
|
2009-11-04 21:16:50 +00:00
|
|
|
#define NORETURN __declspec(noreturn)
|
|
|
|
#endif
|
|
|
|
#if (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 1))
|
|
|
|
#define FTE_DEPRECATED __attribute__((__deprecated__)) //no idea about the actual gcc version
|
|
|
|
#define LIKEPRINTF(x) __attribute__((format(printf,x,x+1)))
|
|
|
|
#endif
|
|
|
|
#if (__GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 5))
|
|
|
|
#define NORETURN __attribute__((noreturn))
|
|
|
|
#endif
|
|
|
|
|
2012-05-09 15:30:53 +00:00
|
|
|
//I'm making my own restrict, because msvc can't cope if I #define restrict to __restrict, and quite possibly other platforms too
|
|
|
|
#if __STDC_VERSION__ >= 199901L
|
|
|
|
#define fte_restrict restrict
|
|
|
|
#elif defined(_MSC_VER)
|
|
|
|
#define fte_restrict __restrict
|
|
|
|
#else
|
|
|
|
#define fte_restrict
|
|
|
|
#endif
|
|
|
|
|
2009-11-04 21:16:50 +00:00
|
|
|
|
|
|
|
#ifndef FTE_DEPRECATED
|
|
|
|
#define FTE_DEPRECATED
|
|
|
|
#endif
|
|
|
|
#ifndef LIKEPRINTF
|
|
|
|
#define LIKEPRINTF(x)
|
2004-08-21 01:25:48 +00:00
|
|
|
#endif
|
|
|
|
#ifndef VARGS
|
|
|
|
#define VARGS
|
|
|
|
#endif
|
2009-11-04 21:16:50 +00:00
|
|
|
#ifndef NORETURN
|
|
|
|
#define NORETURN
|
|
|
|
#endif
|
2004-08-21 01:25:48 +00:00
|
|
|
|
2009-04-06 00:34:32 +00:00
|
|
|
#ifdef _WIN32
|
|
|
|
#define ZEXPORT VARGS
|
|
|
|
#define ZEXPORTVA VARGS
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
2004-08-21 01:25:48 +00:00
|
|
|
// !!! if this is changed, it must be changed in d_ifacea.h too !!!
|
|
|
|
#define CACHE_SIZE 32 // used to align key data structures
|
|
|
|
|
|
|
|
#define UNUSED(x) (x = x) // for pesky compiler / lint warnings
|
|
|
|
|
|
|
|
#define MINIMUM_MEMORY 0x550000
|
|
|
|
|
|
|
|
// up / down
|
|
|
|
#define PITCH 0
|
|
|
|
|
|
|
|
// left / right
|
|
|
|
#define YAW 1
|
|
|
|
|
|
|
|
// fall over
|
|
|
|
#define ROLL 2
|
|
|
|
|
|
|
|
#define SOUND_CHANNELS 8
|
|
|
|
|
|
|
|
|
|
|
|
#define MAX_QPATH 64 // max length of a quake game pathname
|
|
|
|
#define MAX_OSPATH 256 // max length of a filesystem pathname
|
|
|
|
|
|
|
|
#define ON_EPSILON 0.1 // point on plane side epsilon
|
|
|
|
|
Fixes, workarounds, and breakages. Hexen2 should work much better (-hexen2 says no mission pack, -portals says h2mp). Started working on splitting bigcoords per client, far too much work still to go on that. Removed gl_ztrick entirely. Enabled csprogs download by default. Added client support for fitzquake's 666 protocol, needs testing, some cleanup for dp protocols too, no server support, couldn't selectively enable it anyway. Now attempting to cache shadow meshes for explosions and stuff. Played with lightmaps a little, should potentially run a little faster on certain (intel?) cards. Tweeked npfte a little to try to avoid deadlocks and crashes. Fixed sky worldspawn parsing. Added h2mp's model format. Fixed baseline issue in q2 client, made servers generate q2 baselines. MOVETYPE_PUSH will not rotate extra if rotation is forced. Made status command show allowed client types. Changed lighting on weapons - should now be shaded.
git-svn-id: https://svn.code.sf.net/p/fteqw/code/branches/wip@3572 fc73d0e0-1445-4013-8a0c-d673dee63da5
2010-08-11 03:36:31 +00:00
|
|
|
#define MAX_NQMSGLEN 65536 // max length of a reliable message
|
2004-08-21 01:25:48 +00:00
|
|
|
#define MAX_Q2MSGLEN 1400
|
|
|
|
#define MAX_QWMSGLEN 1450
|
Fixes, workarounds, and breakages. Hexen2 should work much better (-hexen2 says no mission pack, -portals says h2mp). Started working on splitting bigcoords per client, far too much work still to go on that. Removed gl_ztrick entirely. Enabled csprogs download by default. Added client support for fitzquake's 666 protocol, needs testing, some cleanup for dp protocols too, no server support, couldn't selectively enable it anyway. Now attempting to cache shadow meshes for explosions and stuff. Played with lightmaps a little, should potentially run a little faster on certain (intel?) cards. Tweeked npfte a little to try to avoid deadlocks and crashes. Fixed sky worldspawn parsing. Added h2mp's model format. Fixed baseline issue in q2 client, made servers generate q2 baselines. MOVETYPE_PUSH will not rotate extra if rotation is forced. Made status command show allowed client types. Changed lighting on weapons - should now be shaded.
git-svn-id: https://svn.code.sf.net/p/fteqw/code/branches/wip@3572 fc73d0e0-1445-4013-8a0c-d673dee63da5
2010-08-11 03:36:31 +00:00
|
|
|
#define MAX_OVERALLMSGLEN 65536 // mvdsv sends packets this big
|
2004-08-21 01:25:48 +00:00
|
|
|
#define MAX_DATAGRAM 1450 // max length of unreliable message
|
|
|
|
#define MAX_Q2DATAGRAM MAX_Q2MSGLEN
|
|
|
|
#define MAX_NQDATAGRAM 1024 // max length of unreliable message
|
|
|
|
#define MAX_OVERALLDATAGRAM MAX_DATAGRAM
|
|
|
|
|
|
|
|
#define MAX_BACKBUFLEN 1200
|
|
|
|
|
|
|
|
//
|
|
|
|
// per-level limits
|
|
|
|
//
|
2005-08-26 22:56:51 +00:00
|
|
|
#define MAX_EDICTS 32767 // FIXME: ouch! ouch! ouch!
|
2005-09-29 23:49:24 +00:00
|
|
|
#define MAX_LIGHTSTYLES 255
|
|
|
|
#define MAX_STANDARDLIGHTSTYLES 64
|
2011-07-30 14:14:56 +00:00
|
|
|
#define MAX_MODELS 1024 // these are sent over the net as bytes
|
|
|
|
#define MAX_SOUNDS 1024 // so they cannot be blindly increased
|
2009-07-06 01:20:20 +00:00
|
|
|
#define MAX_VWEP_MODELS 32
|
2004-08-21 01:25:48 +00:00
|
|
|
|
2005-02-12 18:56:04 +00:00
|
|
|
#define MAX_CSQCMODELS 256 // these live entirly clientside
|
|
|
|
|
2004-08-21 01:25:48 +00:00
|
|
|
#define SAVEGAME_COMMENT_LENGTH 39
|
|
|
|
|
|
|
|
#define MAX_STYLESTRING 64
|
|
|
|
|
|
|
|
//
|
|
|
|
// stats are integers communicated to the client by the server
|
|
|
|
//
|
|
|
|
#define MAX_QW_STATS 32
|
|
|
|
enum {
|
|
|
|
STAT_HEALTH = 0,
|
|
|
|
//STAT_FRAGS = 1,
|
|
|
|
STAT_WEAPON = 2,
|
|
|
|
STAT_AMMO = 3,
|
|
|
|
STAT_ARMOR = 4,
|
|
|
|
STAT_WEAPONFRAME = 5,
|
|
|
|
STAT_SHELLS = 6,
|
|
|
|
STAT_NAILS = 7,
|
|
|
|
STAT_ROCKETS = 8,
|
|
|
|
STAT_CELLS = 9,
|
|
|
|
STAT_ACTIVEWEAPON = 10,
|
|
|
|
STAT_TOTALSECRETS = 11,
|
|
|
|
STAT_TOTALMONSTERS = 12,
|
|
|
|
STAT_SECRETS = 13, // bumped on client side by svc_foundsecret
|
|
|
|
STAT_MONSTERS = 14, // bumped by svc_killedmonster
|
|
|
|
STAT_ITEMS = 15,
|
2004-12-05 08:17:46 +00:00
|
|
|
STAT_VIEWHEIGHT = 16, //same as zquake
|
|
|
|
STAT_TIME = 17, //zquake
|
2004-08-21 01:25:48 +00:00
|
|
|
#ifdef SIDEVIEWS
|
|
|
|
STAT_VIEW2 = 20,
|
|
|
|
#endif
|
2004-12-05 08:17:46 +00:00
|
|
|
STAT_VIEWZOOM = 21, // DP
|
2004-08-21 01:25:48 +00:00
|
|
|
|
2012-02-12 05:18:31 +00:00
|
|
|
//these stats are used only when running a hexen2 mod/hud, and will never be used for a quake mod/hud/generic code.
|
2004-08-21 01:25:48 +00:00
|
|
|
STAT_H2_LEVEL = 32, // changes stat bar
|
|
|
|
STAT_H2_INTELLIGENCE, // changes stat bar
|
|
|
|
STAT_H2_WISDOM, // changes stat bar
|
|
|
|
STAT_H2_STRENGTH, // changes stat bar
|
|
|
|
STAT_H2_DEXTERITY, // changes stat bar
|
|
|
|
STAT_H2_BLUEMANA, // changes stat bar
|
|
|
|
STAT_H2_GREENMANA, // changes stat bar
|
|
|
|
STAT_H2_EXPERIENCE, // changes stat bar
|
|
|
|
STAT_H2_CNT_TORCH, // changes stat bar
|
|
|
|
STAT_H2_CNT_H_BOOST, // changes stat bar
|
|
|
|
STAT_H2_CNT_SH_BOOST, // changes stat bar
|
|
|
|
STAT_H2_CNT_MANA_BOOST, // changes stat bar
|
|
|
|
STAT_H2_CNT_TELEPORT, // changes stat bar
|
|
|
|
STAT_H2_CNT_TOME, // changes stat bar
|
|
|
|
STAT_H2_CNT_SUMMON, // changes stat bar
|
|
|
|
STAT_H2_CNT_INVISIBILITY, // changes stat bar
|
|
|
|
STAT_H2_CNT_GLYPH, // changes stat bar
|
|
|
|
STAT_H2_CNT_HASTE, // changes stat bar
|
|
|
|
STAT_H2_CNT_BLAST, // changes stat bar
|
|
|
|
STAT_H2_CNT_POLYMORPH, // changes stat bar
|
|
|
|
STAT_H2_CNT_FLIGHT, // changes stat bar
|
|
|
|
STAT_H2_CNT_CUBEOFFORCE, // changes stat bar
|
|
|
|
STAT_H2_CNT_INVINCIBILITY, // changes stat bar
|
|
|
|
STAT_H2_ARTIFACT_ACTIVE,
|
|
|
|
STAT_H2_ARTIFACT_LOW,
|
|
|
|
STAT_H2_MOVETYPE,
|
|
|
|
STAT_H2_CAMERAMODE,
|
|
|
|
STAT_H2_HASTED,
|
|
|
|
STAT_H2_INVENTORY,
|
|
|
|
STAT_H2_RINGS_ACTIVE,
|
|
|
|
|
|
|
|
STAT_H2_RINGS_LOW,
|
2008-06-01 22:06:22 +00:00
|
|
|
STAT_H2_ARMOUR1,
|
|
|
|
STAT_H2_ARMOUR2,
|
|
|
|
STAT_H2_ARMOUR3,
|
|
|
|
STAT_H2_ARMOUR4,
|
2004-08-21 01:25:48 +00:00
|
|
|
STAT_H2_FLIGHT_T,
|
|
|
|
STAT_H2_WATER_T,
|
|
|
|
STAT_H2_TURNING_T,
|
|
|
|
STAT_H2_REGEN_T,
|
2008-06-01 22:06:22 +00:00
|
|
|
STAT_H2_PUZZLE1,
|
|
|
|
STAT_H2_PUZZLE2,
|
|
|
|
STAT_H2_PUZZLE3,
|
|
|
|
STAT_H2_PUZZLE4,
|
|
|
|
STAT_H2_PUZZLE5,
|
|
|
|
STAT_H2_PUZZLE6,
|
|
|
|
STAT_H2_PUZZLE7,
|
|
|
|
STAT_H2_PUZZLE8,
|
2004-08-21 01:25:48 +00:00
|
|
|
STAT_H2_MAXHEALTH,
|
|
|
|
STAT_H2_MAXMANA,
|
|
|
|
STAT_H2_FLAGS,
|
2008-06-01 22:06:22 +00:00
|
|
|
STAT_H2_PLAYERCLASS,
|
2004-08-21 01:25:48 +00:00
|
|
|
|
2010-08-16 02:03:02 +00:00
|
|
|
STAT_H2_OBJECTIVE1,
|
|
|
|
STAT_H2_OBJECTIVE2,
|
|
|
|
|
2007-09-02 19:55:17 +00:00
|
|
|
|
2012-02-12 05:18:31 +00:00
|
|
|
STAT_MOVEVARS_AIRACCEL_QW_STRETCHFACTOR = 220, // DP
|
|
|
|
STAT_MOVEVARS_AIRCONTROL_PENALTY = 221, // DP
|
|
|
|
STAT_MOVEVARS_AIRSPEEDLIMIT_NONQW = 222, // DP
|
|
|
|
STAT_MOVEVARS_AIRSTRAFEACCEL_QW = 223, // DP
|
|
|
|
STAT_MOVEVARS_AIRCONTROL_POWER = 224, // DP
|
|
|
|
STAT_MOVEFLAGS = 225, // DP
|
|
|
|
STAT_MOVEVARS_WARSOWBUNNY_AIRFORWARDACCEL = 226, // DP
|
|
|
|
STAT_MOVEVARS_WARSOWBUNNY_ACCEL = 227, // DP
|
|
|
|
STAT_MOVEVARS_WARSOWBUNNY_TOPSPEED = 228, // DP
|
|
|
|
STAT_MOVEVARS_WARSOWBUNNY_TURNACCEL = 229, // DP
|
|
|
|
STAT_MOVEVARS_WARSOWBUNNY_BACKTOSIDERATIO = 230, // DP
|
|
|
|
STAT_MOVEVARS_AIRSTOPACCELERATE = 231, // DP
|
|
|
|
STAT_MOVEVARS_AIRSTRAFEACCELERATE = 232, // DP
|
|
|
|
STAT_MOVEVARS_MAXAIRSTRAFESPEED = 233, // DP
|
|
|
|
STAT_MOVEVARS_AIRCONTROL = 234, // DP
|
|
|
|
STAT_FRAGLIMIT = 235, // DP
|
|
|
|
STAT_TIMELIMIT = 236, // DP
|
|
|
|
STAT_MOVEVARS_WALLFRICTION = 237, // DP
|
|
|
|
STAT_MOVEVARS_FRICTION = 238, // DP
|
|
|
|
STAT_MOVEVARS_WATERFRICTION = 239, // DP
|
|
|
|
STAT_MOVEVARS_TICRATE = 240, // DP
|
|
|
|
STAT_MOVEVARS_TIMESCALE = 241, // DP
|
|
|
|
STAT_MOVEVARS_GRAVITY = 242, // DP
|
|
|
|
STAT_MOVEVARS_STOPSPEED = 243, // DP
|
|
|
|
STAT_MOVEVARS_MAXSPEED = 244, // DP
|
|
|
|
STAT_MOVEVARS_SPECTATORMAXSPEED = 245, // DP
|
|
|
|
STAT_MOVEVARS_ACCELERATE = 246, // DP
|
|
|
|
STAT_MOVEVARS_AIRACCELERATE = 247, // DP
|
|
|
|
STAT_MOVEVARS_WATERACCELERATE = 248, // DP
|
|
|
|
STAT_MOVEVARS_ENTGRAVITY = 249, // DP
|
|
|
|
STAT_MOVEVARS_JUMPVELOCITY = 250, // DP
|
|
|
|
STAT_MOVEVARS_EDGEFRICTION = 251, // DP
|
|
|
|
STAT_MOVEVARS_MAXAIRSPEED = 252, // DP
|
|
|
|
STAT_MOVEVARS_STEPHEIGHT = 253, // DP
|
|
|
|
STAT_MOVEVARS_AIRACCEL_QW = 254, // DP
|
2007-09-02 19:55:17 +00:00
|
|
|
STAT_MOVEVARS_AIRACCEL_SIDEWAYS_FRICTION = 255, // DP
|
|
|
|
|
|
|
|
MAX_CL_STATS = 256
|
2004-08-21 01:25:48 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
//
|
|
|
|
// item flags
|
|
|
|
//
|
|
|
|
#define IT_SHOTGUN 1
|
|
|
|
#define IT_SUPER_SHOTGUN 2
|
|
|
|
#define IT_NAILGUN 4
|
|
|
|
#define IT_SUPER_NAILGUN 8
|
|
|
|
|
|
|
|
#define IT_GRENADE_LAUNCHER 16
|
|
|
|
#define IT_ROCKET_LAUNCHER 32
|
|
|
|
#define IT_LIGHTNING 64
|
|
|
|
#define IT_SUPER_LIGHTNING 128
|
|
|
|
|
|
|
|
#define IT_SHELLS 256
|
|
|
|
#define IT_NAILS 512
|
|
|
|
#define IT_ROCKETS 1024
|
|
|
|
#define IT_CELLS 2048
|
|
|
|
|
|
|
|
#define IT_AXE 4096
|
|
|
|
|
|
|
|
#define IT_ARMOR1 8192
|
|
|
|
#define IT_ARMOR2 16384
|
|
|
|
#define IT_ARMOR3 32768
|
|
|
|
|
|
|
|
#define IT_SUPERHEALTH 65536
|
|
|
|
|
|
|
|
#define IT_KEY1 131072
|
|
|
|
#define IT_KEY2 262144
|
|
|
|
|
|
|
|
#define IT_INVISIBILITY 524288
|
|
|
|
|
|
|
|
#define IT_INVULNERABILITY 1048576
|
|
|
|
#define IT_SUIT 2097152
|
|
|
|
#define IT_QUAD 4194304
|
|
|
|
|
|
|
|
#define IT_SIGIL1 (1<<28)
|
|
|
|
|
|
|
|
#define IT_SIGIL2 (1<<29)
|
|
|
|
#define IT_SIGIL3 (1<<30)
|
|
|
|
#define IT_SIGIL4 (1<<31)
|
|
|
|
|
|
|
|
//
|
|
|
|
// print flags
|
|
|
|
//
|
|
|
|
#define PRINT_LOW 0 // pickup messages
|
|
|
|
#define PRINT_MEDIUM 1 // death messages
|
|
|
|
#define PRINT_HIGH 2 // critical messages
|
|
|
|
#define PRINT_CHAT 3 // chat messages
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//split screen stuff
|
|
|
|
#define MAX_SPLITS 4
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//savegame vars
|
|
|
|
#define SAVEGAME_COMMENT_LENGTH 39
|
|
|
|
#define SAVEGAME_VERSION 667
|
|
|
|
|
|
|
|
|
2007-06-20 00:02:54 +00:00
|
|
|
#define PM_DEFAULTSTEPHEIGHT 18
|
2004-08-21 01:25:48 +00:00
|
|
|
|
|
|
|
|
|
|
|
#define dem_cmd 0
|
|
|
|
#define dem_read 1
|
|
|
|
#define dem_set 2
|
|
|
|
#define dem_multiple 3
|
|
|
|
#define dem_single 4
|
|
|
|
#define dem_stats 5
|
|
|
|
#define dem_all 6
|
|
|
|
|
|
|
|
|
|
|
|
#endif //ifndef __BOTHDEFS_H
|