fteqw/engine/common/bothdefs.h

1070 lines
29 KiB
C
Raw Normal View History

/*
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
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 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
// release version
#define FTE_VER_MAJOR 1
#define FTE_VER_MINOR 6
#if defined(__APPLE__) && defined(__MACH__)
#define MACOSX
#endif
#if defined(__MINGW32_VERSION) || defined(__MINGW__) || defined(__MINGW32__) || defined(__MINGW64__)
#define MINGW
#endif
#if !defined(MINGW) && defined(__GNUC__) && defined(_WIN32)
#define MINGW //Erm, why is this happening?
#endif
#ifdef ANDROID
#define NO_PNG
#define NO_JPEG
#define NO_OGG
#endif
#ifdef _XBOX
#define NO_PNG
#define NO_JPEG
#define NO_OGG
#define NO_ZLIB
#define NOMEDIA
#define NO_FREETYPE
#define HAVE_PACKET
#endif
#ifdef NACL
#define NO_PNG
#define NO_JPEG
#define NO_OGG
#define NO_ZLIB
#endif
#ifndef MULTITHREAD
#if !defined(_WIN32) || defined(FTE_SDL) //win32 is annoying
#define NO_MULTITHREAD
#endif
#endif
#ifdef FTE_TARGET_WEB
//no Sys_LoadLibrary support, so we might as well kill this stuff off.
#define NO_PNG
#define NO_JPEG
#define NO_OGG
#define NO_ZLIB
#define NO_FREETYPE
#endif
#ifdef D3DQUAKE
#define D3D9QUAKE
//#define D3D11QUAKE
#undef D3DQUAKE
#endif
#define STRINGIFY2(s) #s
#define STRINGIFY(s) STRINGIFY2(s)
#ifndef CONFIG_FILE_NAME
#ifdef HAVE_CONFIG_H
#define CONFIG_FILE_NAME config.h
#elif defined(NOLEGACY)
#undef NOLEGACY
#define CONFIG_FILE_NAME config_nocompat.h
#elif defined(MINIMAL)
#define CONFIG_FILE_NAME config_minimal.h
#else
#define CONFIG_FILE_NAME config_fteqw.h
#endif
#endif
#undef MULTITHREAD
#define HEADLESSQUAKE //usable renderers are normally specified via the makefile, but HEADLESS is considered a feature rather than an actual renderer, so usually gets forgotten about...
//yup, C89 allows this (doesn't like C's token concat though).
#include STRINGIFY(CONFIG_FILE_NAME)
#ifndef MSVCLIBSPATH
#ifdef MSVCLIBPATH
#define MSVCLIBSPATH STRINGIFY(MSVCLIBPATH)
#elif _MSC_VER == 1200
#define MSVCLIBSPATH "../libs/vc6-libs/"
#else
#define MSVCLIBSPATH "../libs/"
#endif
#endif
#ifdef MASTERONLY
#define SV_MASTER
#undef SUBSERVERS
#undef PLUGINS
#undef HUFFNETWORK
#undef SUPPORT_ICE
#undef WEBCLIENT
#undef LOADERTHREAD
#undef PACKAGEMANAGER
#undef PACKAGE_PK3
#undef PACKAGE_Q1PAK
#undef PACKAGE_DOOMWAD
#undef PACKAGE_VPK
#undef PACKAGE_DZIP
#undef AVAIL_GZDEC
#else
#if defined(SERVERONLY) && defined(CLIENTONLY)
#undef CLIENTONLY //impossible build. assume the config had CLIENTONLY and they tried building a dedicated server
#endif
#ifndef WEBSVONLY
#ifndef CLIENTONLY
#define HAVE_SERVER
#endif
#ifndef SERVERONLY
#define HAVE_CLIENT
#endif
#endif
#endif
#ifndef NOLEGACY
#define HAVE_LEGACY
#endif
#ifndef HAVE_SERVER
#undef MVD_RECORDING
#endif
//software rendering is just too glitchy, don't use it - unless its the only choice.
#if defined(SWQUAKE) && !defined(_DEBUG) && !defined(__DJGPP__)
#undef SWQUAKE
#endif
#if defined(USE_EGL) && !defined(GLQUAKE)
#undef USE_EGL
#endif
#if defined(WAYLANDQUAKE) && !(defined(__linux__) && (defined(VKQUAKE) || (defined(GLQUAKE) && defined(USE_EGL))))
#undef WAYLANDQUAKE
#endif
//include a file to update the various configurations for game-specific configs (hopefully just names)
#ifdef BRANDING_INC
#include STRINGIFY(BRANDING_INC)
#endif
#ifndef DISTRIBUTION
#define DISTRIBUTION "FTE" //short name used to identify this engine. must be a single word
#endif
#ifndef DISTRIBUTIONLONG
#define DISTRIBUTIONLONG "Forethought Entertainment" //effectively the 'company' name
#endif
#ifndef FULLENGINENAME
#define FULLENGINENAME "FTE Quake" //the posh name for the engine
#endif
#ifndef ENGINEWEBSITE
#define ENGINEWEBSITE "^8http://^4fte.triptohell.info" //url for program
#endif
#if !defined(_WIN32) || defined(WINRT)
#undef HAVE_SPEECHTOTEXT
#undef AVAIL_MP3_ACM
#undef AVAIL_DSOUND
#undef AVAIL_XAUDIO2
#undef AVAIL_WASAPI
#endif
#if !(defined(__linux__) || defined(__CYGWIN__)) || defined(ANDROID)
#undef HAVE_GNUTLS
#endif
#if !defined(_WIN32) || (defined(_MSC_VER) && (_MSC_VER < 1300)) || defined(FTE_SDL)
#undef HAVE_WINSSPI
#endif
//subservers only has code for win32 threads and linux
#if !((defined(_WIN32) && !defined(FTE_SDL) && !defined(WINRT)) || (defined(__linux__) && !defined(ANDROID) && !defined(FTE_SDL)))
#undef SUBSERVERS
#endif
#ifndef HAVE_MIXER
//disable various sound drivers if we can't use them anyway.
#undef AVAIL_DSOUND
#undef AVAIL_XAUDIO2
#undef AVAIL_WASAPI
#endif
#ifdef NOMEDIA
#undef HAVE_CDPLAYER //includes cd playback. actual cds. faketracks are supported regardless.
#undef HAVE_JUKEBOX //includes built-in jukebox crap
#undef HAVE_MEDIA_DECODER //can play cin/roq, more with plugins
#undef HAVE_MEDIA_ENCODER //capture/capturedemo work.
#undef AVAIL_MP3_ACM //microsoft's Audio Compression Manager api
#undef HAVE_SPEECHTOTEXT //windows speech-to-text thing
#endif
#if defined(_XBOX)
#define D3D8QUAKE
#undef HAVE_TCP //FIXME
#undef HAVE_PACKET //FIXME
#undef SUPPORT_ICE //screw that
#undef PLUGINS //would need LoadLibrary working properly.
#undef AVAIL_DINPUT //xbox apparently only really does controllers.
#undef AVAIL_DSOUND //FIXME
#undef TEXTEDITOR //its hard to edit text when you have just a controller (and no onscreen keyboard)
#undef RAGDOLL //needs a proper physics engine
#undef AVAIL_MP3_ACM //api not supported
#undef AVAIL_OPENAL
#undef HAVE_SPEECHTOTEXT //api not supported
#undef MULTITHREAD //no CreateThread stuff.
#undef SUBSERVERS //single-process.
#undef VOICECHAT
#undef TERRAIN
#undef Q2CLIENT
#undef Q2SERVER
#undef Q3CLIENT
#undef Q3SERVER
#undef HLCLIENT
#undef HLSERVER
#undef VM_Q1
#undef VM_LUA
#undef HALFLIFEMODELS
#undef RUNTIMELIGHTING
#undef HEXEN2
#undef PACKAGE_DOOMWAD
#undef MAP_PROC
#undef Q1BSPS
#undef Q2BSPS
#undef Q3BSPS
#undef RFBSPS
#undef WEBSERVER //http server
#undef FTPSERVER //ftp server
#undef WEBCLIENT //http client.
#undef FTPCLIENT //ftp client.
#endif
#ifdef __DJGPP__
//no bsd sockets library.
#undef HAVE_TCP
#undef HAVE_PACKET
#undef SUPPORT_ICE
//too lazy to deal with no dlopen
#undef PLUGINS
#undef Q2SERVER
#undef Q3SERVER
#undef Q2CLIENT //fixme...
#undef Q3CLIENT //might as well.
//too lazy to write the code to boot up more cores. dosbox would probably hate it so why bother.
#undef MULTITHREAD
//too lazy to deal with various libraries
#undef VOICECHAT
#undef AVAIL_JPEGLIB
#undef AVAIL_PNGLIB
#undef AVAIL_OGGVORBIS
#endif
#ifdef FTE_TARGET_WEB
//sandboxing means some stuff CANNOT work...
#undef HAVE_TCP //websockets are not real tcp.
#undef HAVE_PACKET //no udp support
//try to trim the fat
#undef VOICECHAT //too lazy to compile speex
#undef HLCLIENT //dlls...
#undef HLSERVER //dlls...
#undef CL_MASTER //bah. use the site to specify the servers.
#undef SV_MASTER //yeah, because that makes sense in a browser
#undef RAGDOLL //no ode
#undef TCPCONNECT //err...
#undef IRCCONNECT //not happening
#undef PLUGINS //pointless
#undef VM_Q1 //no dlls
#undef MAP_PROC //meh
#undef HALFLIFEMODELS //blurgh
#undef SUPPORT_ICE //requires udp, so not usable. webrtc could be used instead, but that logic is out of our hands.
#undef HAVE_MIXER //depend upon openal instead.
//extra features stripped to try to reduce memory footprints
#undef RUNTIMELIGHTING //too slow anyway
#undef Q2CLIENT
#undef Q2SERVER //requires a dll anyway.
#undef Q3CLIENT
#undef Q3SERVER //trying to trim memory use
// #undef Q2BSPS //emscripten can't cope with bss, leading to increased download time. too lazy to fix.
// #undef Q3BSPS //emscripten can't cope with bss, leading to increased download time. too lazy to fix.
#undef TERRAIN
// #undef PSET_SCRIPT //bss+size
#define GLSLONLY //pointless having the junk
#define GLESONLY //should reduce the conditions a little
#ifndef R_MAX_RECURSE
#define R_MAX_RECURSE 2 //less bss
#endif
// #undef RTLIGHTS
#undef HEADLESSQUAKE
#define NO_FREETYPE
#endif
rewrote ban code, merging bans+nonbans+cuffs+mute+cripple+deaf+lagged+vip. added timeouts. new penalties have no dedicated command. use the addip command for it. maplist command now generates links. implemented skin objects for q3. added a csqc builtin for it. also supports compositing skins. playing demos inside zips/pk3s/paks should now work. bumped default rate cvar. added cl_transfer to attempt to connect to a new server without disconnecting first. rewrote fog command. alpha and mindist arguments are now supported. fog change also happens over a short time period. added new args to the showpic console command. can now create clickable items for touchscreen/absmouse users. fixed menus to properly support right-aligned text. this finally fixes variable-width fonts. rewrote console tab completion suggestions display. now clickable links. strings obtained from qc are now marked as const. this has required quite a few added consts all over the place. probably crappy attempt at adding joypad support to the sdl port. no idea if it works. changed key bind event code. buttons now track which event they should trigger when released, instead of being the same one the whole time. this allows +forward etc clickable buttons on screen. Also simplified modifier keys - they no longer trigger random events when pressing the modifier key itself. Right modifiers can now be bound separately from left modifiers. Right will use left's binding if not otherwise bound. Bind assumes left if there's no prefix. multiplayer->setup->network menu no longer crashes. added rgb colours to the translation view (but not to the colour-changing keys). added modelviewer command to view models. added menu_mods menu to switch mods in a more friendly way. will be shown by default if multiple manifests exist in the binarydir. clamped classic tracer density. scrag particles no longer look quite so buggy. added ifdefs to facilitate a potential winrt port. the engine should now have no extra dependencies, but still needs system code+audio drivers to be written. if it can't set a renderer, it'll now try to use *every* renderer until it finds one that works. added experimental mapcluster server mode (that console command). New maps will be started up as required. rewrote skeletal blending code a bit. added cylinder geomtypes. fix cfg_save writing to the wrong path bug. VFS_CLOSE now returns a boolean. false means there was some sort of fatal error (either crc when reading was bad, or the write got corrupted or something). Typically ignorable, depends how robust you want to be. win32 tls code now supports running as a server. added connect tls://address support, as well as equivalent sv_addport support. exposed basic model loading api to plugins. d3d11 backend now optionally supports tessellation hlsl. no suitable hlsl provided by default. !!tess to enable. attempted to add gamma ramp support for d3d11. added support for shader blobs to speed up load times. r_shaderblobs 1 to enable. almost vital for d3d11. added vid_srgb cvar. shadowless lights are no longer disabled if shadows are not supported. attempt to add support for touchscreens in win7/8. Wrote gimmicky lua support, using lua instead of ssqc. define VM_LUA to enable. updated saved game code. can again load saved games from vanilla-like engines. changed scale clamping. 0.0001 should no longer appear as 1. changed default mintic from 0.03 to 0.013 to match vanilla qw. I don't know why it was at 0.03. probably a typo. git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@4623 fc73d0e0-1445-4013-8a0c-d673dee63da5
2014-03-30 08:55:06 +00:00
#ifdef WINRT
//microsoft do not support winsock any more.
#undef HAVE_TCP
#undef HAVE_PACKET
rewrote ban code, merging bans+nonbans+cuffs+mute+cripple+deaf+lagged+vip. added timeouts. new penalties have no dedicated command. use the addip command for it. maplist command now generates links. implemented skin objects for q3. added a csqc builtin for it. also supports compositing skins. playing demos inside zips/pk3s/paks should now work. bumped default rate cvar. added cl_transfer to attempt to connect to a new server without disconnecting first. rewrote fog command. alpha and mindist arguments are now supported. fog change also happens over a short time period. added new args to the showpic console command. can now create clickable items for touchscreen/absmouse users. fixed menus to properly support right-aligned text. this finally fixes variable-width fonts. rewrote console tab completion suggestions display. now clickable links. strings obtained from qc are now marked as const. this has required quite a few added consts all over the place. probably crappy attempt at adding joypad support to the sdl port. no idea if it works. changed key bind event code. buttons now track which event they should trigger when released, instead of being the same one the whole time. this allows +forward etc clickable buttons on screen. Also simplified modifier keys - they no longer trigger random events when pressing the modifier key itself. Right modifiers can now be bound separately from left modifiers. Right will use left's binding if not otherwise bound. Bind assumes left if there's no prefix. multiplayer->setup->network menu no longer crashes. added rgb colours to the translation view (but not to the colour-changing keys). added modelviewer command to view models. added menu_mods menu to switch mods in a more friendly way. will be shown by default if multiple manifests exist in the binarydir. clamped classic tracer density. scrag particles no longer look quite so buggy. added ifdefs to facilitate a potential winrt port. the engine should now have no extra dependencies, but still needs system code+audio drivers to be written. if it can't set a renderer, it'll now try to use *every* renderer until it finds one that works. added experimental mapcluster server mode (that console command). New maps will be started up as required. rewrote skeletal blending code a bit. added cylinder geomtypes. fix cfg_save writing to the wrong path bug. VFS_CLOSE now returns a boolean. false means there was some sort of fatal error (either crc when reading was bad, or the write got corrupted or something). Typically ignorable, depends how robust you want to be. win32 tls code now supports running as a server. added connect tls://address support, as well as equivalent sv_addport support. exposed basic model loading api to plugins. d3d11 backend now optionally supports tessellation hlsl. no suitable hlsl provided by default. !!tess to enable. attempted to add gamma ramp support for d3d11. added support for shader blobs to speed up load times. r_shaderblobs 1 to enable. almost vital for d3d11. added vid_srgb cvar. shadowless lights are no longer disabled if shadows are not supported. attempt to add support for touchscreens in win7/8. Wrote gimmicky lua support, using lua instead of ssqc. define VM_LUA to enable. updated saved game code. can again load saved games from vanilla-like engines. changed scale clamping. 0.0001 should no longer appear as 1. changed default mintic from 0.03 to 0.013 to match vanilla qw. I don't know why it was at 0.03. probably a typo. git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@4623 fc73d0e0-1445-4013-8a0c-d673dee63da5
2014-03-30 08:55:06 +00:00
#undef TCPCONNECT //err...
#undef IRCCONNECT //not happening
#undef AVAIL_DSOUND //yeah, good luck there
#undef AVAIL_DINPUT //nope, not supported.
#undef SV_MASTER //no socket interface
#undef CL_MASTER //no socket interface
#undef MULTITHREAD
#undef HEADLESSQUAKE
rewrote ban code, merging bans+nonbans+cuffs+mute+cripple+deaf+lagged+vip. added timeouts. new penalties have no dedicated command. use the addip command for it. maplist command now generates links. implemented skin objects for q3. added a csqc builtin for it. also supports compositing skins. playing demos inside zips/pk3s/paks should now work. bumped default rate cvar. added cl_transfer to attempt to connect to a new server without disconnecting first. rewrote fog command. alpha and mindist arguments are now supported. fog change also happens over a short time period. added new args to the showpic console command. can now create clickable items for touchscreen/absmouse users. fixed menus to properly support right-aligned text. this finally fixes variable-width fonts. rewrote console tab completion suggestions display. now clickable links. strings obtained from qc are now marked as const. this has required quite a few added consts all over the place. probably crappy attempt at adding joypad support to the sdl port. no idea if it works. changed key bind event code. buttons now track which event they should trigger when released, instead of being the same one the whole time. this allows +forward etc clickable buttons on screen. Also simplified modifier keys - they no longer trigger random events when pressing the modifier key itself. Right modifiers can now be bound separately from left modifiers. Right will use left's binding if not otherwise bound. Bind assumes left if there's no prefix. multiplayer->setup->network menu no longer crashes. added rgb colours to the translation view (but not to the colour-changing keys). added modelviewer command to view models. added menu_mods menu to switch mods in a more friendly way. will be shown by default if multiple manifests exist in the binarydir. clamped classic tracer density. scrag particles no longer look quite so buggy. added ifdefs to facilitate a potential winrt port. the engine should now have no extra dependencies, but still needs system code+audio drivers to be written. if it can't set a renderer, it'll now try to use *every* renderer until it finds one that works. added experimental mapcluster server mode (that console command). New maps will be started up as required. rewrote skeletal blending code a bit. added cylinder geomtypes. fix cfg_save writing to the wrong path bug. VFS_CLOSE now returns a boolean. false means there was some sort of fatal error (either crc when reading was bad, or the write got corrupted or something). Typically ignorable, depends how robust you want to be. win32 tls code now supports running as a server. added connect tls://address support, as well as equivalent sv_addport support. exposed basic model loading api to plugins. d3d11 backend now optionally supports tessellation hlsl. no suitable hlsl provided by default. !!tess to enable. attempted to add gamma ramp support for d3d11. added support for shader blobs to speed up load times. r_shaderblobs 1 to enable. almost vital for d3d11. added vid_srgb cvar. shadowless lights are no longer disabled if shadows are not supported. attempt to add support for touchscreens in win7/8. Wrote gimmicky lua support, using lua instead of ssqc. define VM_LUA to enable. updated saved game code. can again load saved games from vanilla-like engines. changed scale clamping. 0.0001 should no longer appear as 1. changed default mintic from 0.03 to 0.013 to match vanilla qw. I don't know why it was at 0.03. probably a typo. git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@4623 fc73d0e0-1445-4013-8a0c-d673dee63da5
2014-03-30 08:55:06 +00:00
#endif
#ifdef ANDROID
#define GLESONLY //should reduce the conditions a little
// #undef HEADLESSQUAKE
#define NO_FREETYPE
#define NO_OPENAL
#endif
#if defined(NACL)
//stuff is sandboxed.
#undef HAVE_TCP //websockets are not true tcp
#undef HAVE_PACKET //no udp support.
#undef SUPPORT_ICE
#undef CL_MASTER //no sockets support
#undef SV_MASTER //noone uses this anyway
#undef WEBSERVER //http server
#undef FTPSERVER //ftp server
#undef FTPCLIENT //ftp client.
#undef TCPCONNECT
#undef IRCCONNECT
#define GLSLONLY //pointless having the junk
#define GLESONLY //should reduce the conditions a little
#undef HEADLESSQUAKE
#define NO_FREETYPE
#endif
#if (defined(_MSC_VER) && (_MSC_VER < 1500)) || defined(FTE_SDL)
#undef AVAIL_WASAPI //wasapi is available in the vista sdk, while that's compatible with earlier versions, its not really expected until 2008
#endif
#ifdef NO_MULTITHREAD
#undef MULTITHREAD
#endif
#ifndef MULTITHREAD
//database code requires threads to do stuff async.
#undef USE_SQLITE
#undef USE_MYSQL
#endif
#ifdef NO_LIBRARIES //catch-all...
#define NO_DIRECTX
#define NO_PNG
#define NO_JPEG
#define NO_ZLIB
#define NO_OGG
#define NO_FREETYPE
#endif
#ifdef NO_OPENAL
#undef AVAIL_OPENAL
#endif
#ifdef NO_PNG
#undef AVAIL_PNGLIB
#endif
#ifdef NO_JPEG
#undef AVAIL_JPEGLIB
#endif
#ifdef NO_OGG
#undef AVAIL_OGGVORBIS
#endif
#ifdef NO_FREETYPE
#undef AVAIL_FREETYPE
#endif
#ifdef NO_ZLIB
#undef AVAIL_ZLIB
#undef AVAIL_PNGLIB
#undef AVAIL_XZDEC
#undef AVAIL_GZDEC
#endif
#ifdef NO_GNUTLS
#undef HAVE_GNUTLS
#endif
#ifdef NO_OPENGL
#undef GLQUAKE
#undef USE_EGL
#endif
#if defined(HAVE_GNUTLS) || defined(HAVE_OPENSSL) || defined(HAVE_WINSSPI)
#define HAVE_SSL
#endif
#if defined(HAVE_GNUTLS) || defined(HAVE_OPENSSL) || defined(HAVE_WINSSPI)
//FIXME: HAVE_WINSSPI does not work as a server.
//FIXME: advertising dtls without a valid certificate will probably bug out if a client tries to auto-upgrade.
//FIXME: we don't cache server certs
#define HAVE_DTLS
#endif
#if defined(USE_SQLITE) || defined(USE_MYSQL)
#define SQL
#endif
dpp7: Treat 'dropped' c2s packets as choked when using dpp7 protocols. This is because the protocol provides no way to disambiguate, and I don't like false reports of packetloss (only reliables loss can be detected, and that's not frequent enough to be meaningful). Pings can still be determined with dpp7, for those few packets which are acked. package manager: reworked to enable/disable plugins when downloaded, which can also be present-but-disabled. package manager: display a confirmation prompt before applying changes. do not allow other changes to be made while applying. prompt may be skipped with 'pkg apply' in dedicated servers. sv: downloads are no longer forced to lower case. sv: added sv_demoAutoCompress cvar. set to 1 to directly record to *.mvd.gz cl: properly support directly playing .mvd.gz files menus: reworked to separate mouse and keyboard focus. mouse focus becomes keyboard focus only on mouse clicks. tooltips follow mouse cursors. menus: cleaned up menu heirachy a little. now simpler. server browser: changed 'hide *' filters to 'show *' instead. I felt it was more logical. deluxmapping: changed to disabled, load, generate, like r_loadlit is. render targets api now supports negative formats to mean nearest filtering, where filtering is part of texture state. drawrotpic fixed, now batches and interacts with drawpic correctly. drawline fixed, no interacts with draw* correctly, but still does not batch. fixed saving games. provide proper userinfo to nq clients, where supported. qcc: catch string table overflows safely, giving errors instead of crashes. switch to 32bit statements if some over-sized function requires it. qtv: some bigcoords support tweaks git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@5073 fc73d0e0-1445-4013-8a0c-d673dee63da5
2017-03-21 05:27:07 +00:00
#if defined(AVAIL_GZDEC) && (!defined(AVAIL_ZLIB) || defined(NPFTE))
//gzip needs zlib to work (pk3s can still contain non-compressed files)
#undef AVAIL_GZDEC
#endif
#if defined(RFBSPS) && !defined(Q3BSPS)
#define Q3BSPS //rbsp might as well depend upon q3bsp - its the same thing but with more lightstyles (support for which can bog down the renderer a little).
#endif
#if defined(QWOVERQ3) && !defined(Q3SERVER)
#undef QWOVERQ3
#endif
#if !defined(NQPROT) || defined(SERVERONLY) || !defined(AVAIL_ZLIB) || defined(DYNAMIC_ZLIB)
#undef PACKAGE_DZIP
#endif
//fix things a little...
#ifdef NPQTV
#define NPFTE
#undef NPQTV
#endif
#ifdef NPFTE
/*plugins require threads and stuff now, and http download support*/
#ifndef MULTITHREAD
#define MULTITHREAD
#define WEBCLIENT
#endif
#undef SUBSERVERS
#endif
#if (defined(NOLOADERTHREAD) || !defined(MULTITHREAD)) && defined(LOADERTHREAD)
#undef LOADERTHREAD
#endif
#ifndef _WIN32
#undef QTERM //not supported - FIXME: move to native plugin
#endif
#if defined(Q3BSPS) && !defined(Q2BSPS)
// #define Q2BSPS //FIXME: silently enable that as a dependancy, for now
#endif
#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
#ifdef NPFTE
#undef TEXTEDITOR
#undef WEBSERVER //http server
#undef FTPSERVER //ftp server
#undef FTPCLIENT //ftp client.
#endif
#ifndef AVAIL_ZLIB
rewrote ban code, merging bans+nonbans+cuffs+mute+cripple+deaf+lagged+vip. added timeouts. new penalties have no dedicated command. use the addip command for it. maplist command now generates links. implemented skin objects for q3. added a csqc builtin for it. also supports compositing skins. playing demos inside zips/pk3s/paks should now work. bumped default rate cvar. added cl_transfer to attempt to connect to a new server without disconnecting first. rewrote fog command. alpha and mindist arguments are now supported. fog change also happens over a short time period. added new args to the showpic console command. can now create clickable items for touchscreen/absmouse users. fixed menus to properly support right-aligned text. this finally fixes variable-width fonts. rewrote console tab completion suggestions display. now clickable links. strings obtained from qc are now marked as const. this has required quite a few added consts all over the place. probably crappy attempt at adding joypad support to the sdl port. no idea if it works. changed key bind event code. buttons now track which event they should trigger when released, instead of being the same one the whole time. this allows +forward etc clickable buttons on screen. Also simplified modifier keys - they no longer trigger random events when pressing the modifier key itself. Right modifiers can now be bound separately from left modifiers. Right will use left's binding if not otherwise bound. Bind assumes left if there's no prefix. multiplayer->setup->network menu no longer crashes. added rgb colours to the translation view (but not to the colour-changing keys). added modelviewer command to view models. added menu_mods menu to switch mods in a more friendly way. will be shown by default if multiple manifests exist in the binarydir. clamped classic tracer density. scrag particles no longer look quite so buggy. added ifdefs to facilitate a potential winrt port. the engine should now have no extra dependencies, but still needs system code+audio drivers to be written. if it can't set a renderer, it'll now try to use *every* renderer until it finds one that works. added experimental mapcluster server mode (that console command). New maps will be started up as required. rewrote skeletal blending code a bit. added cylinder geomtypes. fix cfg_save writing to the wrong path bug. VFS_CLOSE now returns a boolean. false means there was some sort of fatal error (either crc when reading was bad, or the write got corrupted or something). Typically ignorable, depends how robust you want to be. win32 tls code now supports running as a server. added connect tls://address support, as well as equivalent sv_addport support. exposed basic model loading api to plugins. d3d11 backend now optionally supports tessellation hlsl. no suitable hlsl provided by default. !!tess to enable. attempted to add gamma ramp support for d3d11. added support for shader blobs to speed up load times. r_shaderblobs 1 to enable. almost vital for d3d11. added vid_srgb cvar. shadowless lights are no longer disabled if shadows are not supported. attempt to add support for touchscreens in win7/8. Wrote gimmicky lua support, using lua instead of ssqc. define VM_LUA to enable. updated saved game code. can again load saved games from vanilla-like engines. changed scale clamping. 0.0001 should no longer appear as 1. changed default mintic from 0.03 to 0.013 to match vanilla qw. I don't know why it was at 0.03. probably a typo. git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@4623 fc73d0e0-1445-4013-8a0c-d673dee63da5
2014-03-30 08:55:06 +00:00
#undef SUPPORT_ICE //depends upon zlib's crc32 for fingerprinting. I cba writing my own.
#endif
#ifndef HAVE_TCP
#undef TCPCONNECT
#undef IRCCONNECT
#undef WEBSERVER //http server
#undef FTPSERVER //ftp server
#undef FTPCLIENT //ftp client.
#if !defined(FTE_TARGET_WEB) && !defined(NACL)
#undef WEBCLIENT
#endif
#endif
#ifndef HAVE_PACKET
#undef SV_MASTER
#undef CL_MASTER
#undef SUPPORT_ICE
#endif
#ifdef SERVERONLY //remove options that don't make sense on only a server
#undef Q2CLIENT
#undef Q3CLIENT
#undef HLCLIENT
#undef VM_UI
#undef VM_CG
#undef TEXTEDITOR
#undef RUNTIMELIGHTING
#undef PSET_SCRIPT
#undef PSET_CLASSIC
#undef PSET_DARKPLACES
#endif
#ifdef CLIENTONLY //remove optional server components that make no sence on a client only build.
#undef Q2SERVER
#undef Q3SERVER
#undef HLSERVER
#undef WEBSERVER
#undef FTPSERVER
#undef SUBSERVERS
#undef VM_Q1
#undef SQL
#endif
#ifndef PLUGINS
#undef USE_INTERNAL_BULLET
#undef USE_INTERNAL_ODE
#endif
------------------------------------------------------------------------ r4169 | acceptthis | 2013-01-17 08:55:12 +0000 (Thu, 17 Jan 2013) | 31 lines removed MAX_VISEDICTS limit. PEXT2_REPLACEMENTDELTAS tweaked, now has 4 million entity limit. still not enabled by default. TE_BEAM now maps to a separate TEQW_BEAM to avoid conflicts with QW. added android multitouch emulation for windows/rawinput (in_simulatemultitouch). split topcolor/bottomcolor from scoreboard, for dp's colormap|1024 feature. now using utf-8 for windows consoles. qcc warnings/errors now give clickable console links for quick+easy editing. disabled menutint when the currently active item changes contrast or gamma (for OneManClan). Added support for drawfont/drawfontscale. tweaked the qcvm a little to reduce the number of pointers. .doll file loading. still experimental and will likely crash. requires csqc active, even if its a dummy progs. this will be fixed in time. Still other things that need cleaning up. windows: gl_font "?" shows the standard windows font-selection dialog, and can be used to select windows fonts. not all work. and you probably don't want to use windings. fixed splitscreen support when playing mvds. added mini-scoreboards to splitscreen. editor/debugger now shows asm if there's no linenumber info. also, pressing f1 for help shows the shortcuts. Added support for .framegroups files for psk(psa) and iqm formats. True support for ezquake's colour codes. Mutually exclusive with background colours. path command output slightly more readable. added support for digest_hex (MD4, SHA1, CRC16). skingroups now colourmap correctly. Fix terrain colour hints, and litdata from the wrong bsp. fix ftp dual-homed issue. support epsv command, and enable ipv6 (eprt still not supported). remove d3d11 compilation from the makefile. the required headers are not provided by mingw, and are not available to the build bot, so don't bother. fix v *= v.x and similar opcodes. fteqcc: fixed support for áéíóú type chars in names. utf-8 files now properly supported (even with the utf-8 bom/identifier). utf-16 also supported. fteqcc: fixed '#if 1 == 3 && 4' parsing. fteqcc: -Werror acts on the warning, rather than as a separate error. Line numbers are thus more readable. fteqcc: copyright message now includes compile date instead. fteqccgui: the treeview control is now coloured depending on whether there were warnings/errors in the last compile. fteqccgui: the output window is now focused and scrolls down as compilation progresses. pr_dumpplatform command dumps out some pragmas to convert more serious warnings to errors. This is to avoid the infamous 'fteqcc sucks cos my code sucks' issue. rewrote prespawn/modelist/soundlist code. server tracks progress now. ------------------------------------------------------------------------ git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@4167 fc73d0e0-1445-4013-8a0c-d673dee63da5
2013-03-12 22:29:40 +00:00
#if (defined(CSQC_DAT) || !defined(CLIENTONLY)) && (defined(PLUGINS)||defined(USE_INTERNAL_BULLET)||defined(USE_INTERNAL_ODE)) //use ode only if we have a constant world state, and the library is enbled in some form.
#define USERBE
------------------------------------------------------------------------ r4169 | acceptthis | 2013-01-17 08:55:12 +0000 (Thu, 17 Jan 2013) | 31 lines removed MAX_VISEDICTS limit. PEXT2_REPLACEMENTDELTAS tweaked, now has 4 million entity limit. still not enabled by default. TE_BEAM now maps to a separate TEQW_BEAM to avoid conflicts with QW. added android multitouch emulation for windows/rawinput (in_simulatemultitouch). split topcolor/bottomcolor from scoreboard, for dp's colormap|1024 feature. now using utf-8 for windows consoles. qcc warnings/errors now give clickable console links for quick+easy editing. disabled menutint when the currently active item changes contrast or gamma (for OneManClan). Added support for drawfont/drawfontscale. tweaked the qcvm a little to reduce the number of pointers. .doll file loading. still experimental and will likely crash. requires csqc active, even if its a dummy progs. this will be fixed in time. Still other things that need cleaning up. windows: gl_font "?" shows the standard windows font-selection dialog, and can be used to select windows fonts. not all work. and you probably don't want to use windings. fixed splitscreen support when playing mvds. added mini-scoreboards to splitscreen. editor/debugger now shows asm if there's no linenumber info. also, pressing f1 for help shows the shortcuts. Added support for .framegroups files for psk(psa) and iqm formats. True support for ezquake's colour codes. Mutually exclusive with background colours. path command output slightly more readable. added support for digest_hex (MD4, SHA1, CRC16). skingroups now colourmap correctly. Fix terrain colour hints, and litdata from the wrong bsp. fix ftp dual-homed issue. support epsv command, and enable ipv6 (eprt still not supported). remove d3d11 compilation from the makefile. the required headers are not provided by mingw, and are not available to the build bot, so don't bother. fix v *= v.x and similar opcodes. fteqcc: fixed support for áéíóú type chars in names. utf-8 files now properly supported (even with the utf-8 bom/identifier). utf-16 also supported. fteqcc: fixed '#if 1 == 3 && 4' parsing. fteqcc: -Werror acts on the warning, rather than as a separate error. Line numbers are thus more readable. fteqcc: copyright message now includes compile date instead. fteqccgui: the treeview control is now coloured depending on whether there were warnings/errors in the last compile. fteqccgui: the output window is now focused and scrolls down as compilation progresses. pr_dumpplatform command dumps out some pragmas to convert more serious warnings to errors. This is to avoid the infamous 'fteqcc sucks cos my code sucks' issue. rewrote prespawn/modelist/soundlist code. server tracks progress now. ------------------------------------------------------------------------ git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@4167 fc73d0e0-1445-4013-8a0c-d673dee63da5
2013-03-12 22:29:40 +00:00
#endif
#if defined(MD1MODELS) || defined(MD2MODELS) || defined(MD3MODELS)
#define NONSKELETALMODELS
#endif
------------------------------------------------------------------------ r4169 | acceptthis | 2013-01-17 08:55:12 +0000 (Thu, 17 Jan 2013) | 31 lines removed MAX_VISEDICTS limit. PEXT2_REPLACEMENTDELTAS tweaked, now has 4 million entity limit. still not enabled by default. TE_BEAM now maps to a separate TEQW_BEAM to avoid conflicts with QW. added android multitouch emulation for windows/rawinput (in_simulatemultitouch). split topcolor/bottomcolor from scoreboard, for dp's colormap|1024 feature. now using utf-8 for windows consoles. qcc warnings/errors now give clickable console links for quick+easy editing. disabled menutint when the currently active item changes contrast or gamma (for OneManClan). Added support for drawfont/drawfontscale. tweaked the qcvm a little to reduce the number of pointers. .doll file loading. still experimental and will likely crash. requires csqc active, even if its a dummy progs. this will be fixed in time. Still other things that need cleaning up. windows: gl_font "?" shows the standard windows font-selection dialog, and can be used to select windows fonts. not all work. and you probably don't want to use windings. fixed splitscreen support when playing mvds. added mini-scoreboards to splitscreen. editor/debugger now shows asm if there's no linenumber info. also, pressing f1 for help shows the shortcuts. Added support for .framegroups files for psk(psa) and iqm formats. True support for ezquake's colour codes. Mutually exclusive with background colours. path command output slightly more readable. added support for digest_hex (MD4, SHA1, CRC16). skingroups now colourmap correctly. Fix terrain colour hints, and litdata from the wrong bsp. fix ftp dual-homed issue. support epsv command, and enable ipv6 (eprt still not supported). remove d3d11 compilation from the makefile. the required headers are not provided by mingw, and are not available to the build bot, so don't bother. fix v *= v.x and similar opcodes. fteqcc: fixed support for áéíóú type chars in names. utf-8 files now properly supported (even with the utf-8 bom/identifier). utf-16 also supported. fteqcc: fixed '#if 1 == 3 && 4' parsing. fteqcc: -Werror acts on the warning, rather than as a separate error. Line numbers are thus more readable. fteqcc: copyright message now includes compile date instead. fteqccgui: the treeview control is now coloured depending on whether there were warnings/errors in the last compile. fteqccgui: the output window is now focused and scrolls down as compilation progresses. pr_dumpplatform command dumps out some pragmas to convert more serious warnings to errors. This is to avoid the infamous 'fteqcc sucks cos my code sucks' issue. rewrote prespawn/modelist/soundlist code. server tracks progress now. ------------------------------------------------------------------------ git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@4167 fc73d0e0-1445-4013-8a0c-d673dee63da5
2013-03-12 22:29:40 +00:00
#if defined(ZYMOTICMODELS) || defined(MD5MODELS) || defined(DPMMODELS) || defined(PSKMODELS) || defined(INTERQUAKEMODELS)
#define SKELETALMODELS //defined if we have a skeletal model.
#endif
#if (defined(CSQC_DAT) || !defined(CLIENTONLY)) && defined(SKELETALMODELS)
#define SKELETALOBJECTS //the skeletal objects API is only used if we actually have skeletal models, and gamecode that uses the builtins.
#endif
#if !defined(USERBE) || !defined(SKELETALMODELS)
------------------------------------------------------------------------ r4169 | acceptthis | 2013-01-17 08:55:12 +0000 (Thu, 17 Jan 2013) | 31 lines removed MAX_VISEDICTS limit. PEXT2_REPLACEMENTDELTAS tweaked, now has 4 million entity limit. still not enabled by default. TE_BEAM now maps to a separate TEQW_BEAM to avoid conflicts with QW. added android multitouch emulation for windows/rawinput (in_simulatemultitouch). split topcolor/bottomcolor from scoreboard, for dp's colormap|1024 feature. now using utf-8 for windows consoles. qcc warnings/errors now give clickable console links for quick+easy editing. disabled menutint when the currently active item changes contrast or gamma (for OneManClan). Added support for drawfont/drawfontscale. tweaked the qcvm a little to reduce the number of pointers. .doll file loading. still experimental and will likely crash. requires csqc active, even if its a dummy progs. this will be fixed in time. Still other things that need cleaning up. windows: gl_font "?" shows the standard windows font-selection dialog, and can be used to select windows fonts. not all work. and you probably don't want to use windings. fixed splitscreen support when playing mvds. added mini-scoreboards to splitscreen. editor/debugger now shows asm if there's no linenumber info. also, pressing f1 for help shows the shortcuts. Added support for .framegroups files for psk(psa) and iqm formats. True support for ezquake's colour codes. Mutually exclusive with background colours. path command output slightly more readable. added support for digest_hex (MD4, SHA1, CRC16). skingroups now colourmap correctly. Fix terrain colour hints, and litdata from the wrong bsp. fix ftp dual-homed issue. support epsv command, and enable ipv6 (eprt still not supported). remove d3d11 compilation from the makefile. the required headers are not provided by mingw, and are not available to the build bot, so don't bother. fix v *= v.x and similar opcodes. fteqcc: fixed support for áéíóú type chars in names. utf-8 files now properly supported (even with the utf-8 bom/identifier). utf-16 also supported. fteqcc: fixed '#if 1 == 3 && 4' parsing. fteqcc: -Werror acts on the warning, rather than as a separate error. Line numbers are thus more readable. fteqcc: copyright message now includes compile date instead. fteqccgui: the treeview control is now coloured depending on whether there were warnings/errors in the last compile. fteqccgui: the output window is now focused and scrolls down as compilation progresses. pr_dumpplatform command dumps out some pragmas to convert more serious warnings to errors. This is to avoid the infamous 'fteqcc sucks cos my code sucks' issue. rewrote prespawn/modelist/soundlist code. server tracks progress now. ------------------------------------------------------------------------ git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@4167 fc73d0e0-1445-4013-8a0c-d673dee63da5
2013-03-12 22:29:40 +00:00
#undef RAGDOLL //not possible to ragdoll if we don't have certain other features.
#endif
#if !defined(RTLIGHTS)
#undef MAP_PROC //doom3 maps kinda NEED rtlights to look decent
#endif
#if !defined(Q3BSPS)
#undef Q3CLIENT //reconsider this (later)
#undef Q3SERVER //reconsider this (later)
#endif
#if defined(DEBUG) || defined(_DEBUG)
#undef NOQCDESCRIPTIONS //don't disable writing fteextensions.qc in debug builds, otherwise how would you ever build one? :o
#endif
#ifndef Q3CLIENT
#undef VM_CG // :(
#undef VM_UI
#else
#define VM_CG
#define VM_UI
#endif
#if defined(VM_Q1) || defined(VM_UI) || defined(VM_CG) || defined(Q3SERVER) || defined(PLUGINS)
#define VM_ANY
#endif
#if (defined(D3D8QUAKE) || defined(D3D9QUAKE) || defined(D3D11QUAKE)) && !defined(D3DQUAKE)
#define D3DQUAKE //shouldn't still matter
#endif
#define PROTOCOLEXTENSIONS
#ifdef MINIMAL
#define IFMINIMAL(x,y) x
#else
#define IFMINIMAL(x,y) y
#endif
// defs common to client and server
#ifndef PLATFORM
#if defined(FTE_TARGET_WEB)
#define PLATFORM "Web"
#elif defined(NACL)
#define PLATFORM "Nacl"
#elif defined(_WIN32_WCE)
#define PLATFORM "WinCE"
#define ARCH_DL_POSTFIX ".dll"
#elif defined(_WIN32)
#if defined(WINRT)
#define PLATFORM "WinRT" /*those poor poor souls. maybe just maybe I'll actually get the tools for a port, its just a shame that I won't be able to release said port*/
#elif defined(_XBOX)
#define PLATFORM "Xbox"
#else
#define PLATFORM "Win"
#endif
#define ARCH_DL_POSTFIX ".dll"
#elif defined(_WIN16)
#define PLATFORM "Win16"
#define ARCH_DL_POSTFIX ".dll"
#elif defined(__CYGWIN__)
#define PLATFORM "Cygwin" /*technically also windows*/
#define ARCH_DL_POSTFIX ".dll"
#elif defined(ANDROID) || defined(__ANDROID__)
#define PLATFORM "Android" /*technically also linux*/
#elif defined(__linux__)
#define PLATFORM "Linux"
#elif defined(__APPLE__)
#include "TargetConditionals.h"
#if TARGET_IPHONE_SIMULATOR
#define PLATFORM "iOSSim"
#elif TARGET_OS_IPHONE
#define PLATFORM "iOS"
#elif TARGET_OS_MAC
#define PLATFORM "Mac"
#else
#define PLATFORM "Apple"
#endif
#elif defined(__FreeBSD__)
#define PLATFORM "FreeBSD"
#elif defined(__OpenBSD__)
#define PLATFORM "OpenBSD"
#elif defined(__NetBSD__)
#define PLATFORM "NetBSD"
#elif defined(BSD)
#define PLATFORM "BSD"
#elif defined(__MORPHOS__)
#define PLATFORM "MorphOS"
#elif defined(__amigaos__)
#define PLATFORM "AmigaOS"
#elif defined(MACOSX)
#define PLATFORM "MacOS X"
#elif defined(__DOS__)
#define PLATFORM "Dos"
#else
#define PLATFORM "Unknown"
#endif
#endif
#ifndef ARCH_DL_POSTFIX
#define ARCH_DL_POSTFIX ".so"
#endif
#ifndef ARCH_CPU_POSTFIX
#if defined(_M_AMD64) || defined(__amd64__) || defined(__x86_64__)
#ifdef __ILP32__
#define ARCH_CPU_POSTFIX "x32" //32bit pointers, with 16 registers.
#else
#ifdef _WIN32
#define ARCH_CPU_POSTFIX "x64"
#else
#define ARCH_CPU_POSTFIX "amd64"
#define ARCH_ALTCPU_POSTFIX "x86_64"
#endif
#endif
#elif defined(_M_IX86) || defined(__i386__)
#define ARCH_CPU_POSTFIX "x86"
#elif defined(__powerpc__) || defined(__ppc__)
#define ARCH_CPU_POSTFIX "ppc"
#elif defined(__aarch64__)
#define ARCH_CPU_POSTFIX "arm64"
#elif defined(__arm__)
#ifdef __SOFTFP__
#define ARCH_CPU_POSTFIX "arm"
#else
#define ARCH_CPU_POSTFIX "armhf"
#endif
#else
#define ARCH_CPU_POSTFIX "unk"
#endif
#endif
#ifdef _MSC_VER
#define VARGS __cdecl
#define MSVCDISABLEWARNINGS
#if _MSC_VER >= 1300
#define FTE_DEPRECATED __declspec(deprecated)
#ifndef _CRT_SECURE_NO_WARNINGS
#define _CRT_SECURE_NO_WARNINGS
#endif
#ifndef _CRT_NONSTDC_NO_WARNINGS
#define _CRT_NONSTDC_NO_WARNINGS
#endif
#endif
#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
#ifdef _WIN32
#define LIKEPRINTF(x) __attribute__((format(ms_printf,x,x+1)))
#else
#define LIKEPRINTF(x) __attribute__((format(printf,x,x+1)))
#endif
#endif
#if (__GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 5))
#define NORETURN __attribute__((noreturn))
#endif
//unreachable marks the path leading to it as unreachable too.
#if (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 5))
#define FTE_UNREACHABLE __builtin_unreachable()
#endif
rewrote ban code, merging bans+nonbans+cuffs+mute+cripple+deaf+lagged+vip. added timeouts. new penalties have no dedicated command. use the addip command for it. maplist command now generates links. implemented skin objects for q3. added a csqc builtin for it. also supports compositing skins. playing demos inside zips/pk3s/paks should now work. bumped default rate cvar. added cl_transfer to attempt to connect to a new server without disconnecting first. rewrote fog command. alpha and mindist arguments are now supported. fog change also happens over a short time period. added new args to the showpic console command. can now create clickable items for touchscreen/absmouse users. fixed menus to properly support right-aligned text. this finally fixes variable-width fonts. rewrote console tab completion suggestions display. now clickable links. strings obtained from qc are now marked as const. this has required quite a few added consts all over the place. probably crappy attempt at adding joypad support to the sdl port. no idea if it works. changed key bind event code. buttons now track which event they should trigger when released, instead of being the same one the whole time. this allows +forward etc clickable buttons on screen. Also simplified modifier keys - they no longer trigger random events when pressing the modifier key itself. Right modifiers can now be bound separately from left modifiers. Right will use left's binding if not otherwise bound. Bind assumes left if there's no prefix. multiplayer->setup->network menu no longer crashes. added rgb colours to the translation view (but not to the colour-changing keys). added modelviewer command to view models. added menu_mods menu to switch mods in a more friendly way. will be shown by default if multiple manifests exist in the binarydir. clamped classic tracer density. scrag particles no longer look quite so buggy. added ifdefs to facilitate a potential winrt port. the engine should now have no extra dependencies, but still needs system code+audio drivers to be written. if it can't set a renderer, it'll now try to use *every* renderer until it finds one that works. added experimental mapcluster server mode (that console command). New maps will be started up as required. rewrote skeletal blending code a bit. added cylinder geomtypes. fix cfg_save writing to the wrong path bug. VFS_CLOSE now returns a boolean. false means there was some sort of fatal error (either crc when reading was bad, or the write got corrupted or something). Typically ignorable, depends how robust you want to be. win32 tls code now supports running as a server. added connect tls://address support, as well as equivalent sv_addport support. exposed basic model loading api to plugins. d3d11 backend now optionally supports tessellation hlsl. no suitable hlsl provided by default. !!tess to enable. attempted to add gamma ramp support for d3d11. added support for shader blobs to speed up load times. r_shaderblobs 1 to enable. almost vital for d3d11. added vid_srgb cvar. shadowless lights are no longer disabled if shadows are not supported. attempt to add support for touchscreens in win7/8. Wrote gimmicky lua support, using lua instead of ssqc. define VM_LUA to enable. updated saved game code. can again load saved games from vanilla-like engines. changed scale clamping. 0.0001 should no longer appear as 1. changed default mintic from 0.03 to 0.013 to match vanilla qw. I don't know why it was at 0.03. probably a typo. git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@4623 fc73d0e0-1445-4013-8a0c-d673dee63da5
2014-03-30 08:55:06 +00:00
//I'm making my own restrict, because msvc's headers 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) && _MSC_VER >= 1400
#define fte_restrict __restrict
#else
#define fte_restrict
#endif
#if _MSC_VER >= 1300
#define FTE_ALIGN(a) __declspec(align(a))
#elif defined(__clang__)
#define FTE_ALIGN(a) __attribute__((aligned(a)))
#elif __GNUC__ >= 3
#define FTE_ALIGN(a) __attribute__((aligned(a)))
#else
#define FTE_ALIGN(a)
#endif
#if __STDC_VERSION__ >= 201112L
#include <stdalign.h>
#define fte_alignof(type) alignof(qintptr_t)
#elif _MSC_VER
#define fte_alignof(type) __alignof(qintptr_t)
#else
#define fte_alignof(type) sizeof(qintptr_t)
#endif
//fte_inline must only be used in headers, and requires one and ONLY one fte_inlinebody elsewhere.
//fte_inlinebody must be used on a prototype OUTSIDE of a header.
//fte_inlinestatic must not be used inside any headers at all.
#if __STDC_VERSION__ >= 199901L
//C99 specifies that an inline function is used as a hint. there should be an actual body/copy somewhere (extern inline foo).
#define fte_inline inline //must have non-line 'int foo();' somewhere
#define fte_inlinebody extern inline
#define fte_inlinestatic static inline
#elif defined(_MSC_VER)
//msvc will inline like C++. and that's fine.
#define fte_inline __inline //c++ style
#define fte_inlinebody
#define fte_inlinestatic static __inline
#elif (__GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 5))
//gcc will generally inline where it can - so long as its static. but that doesn't stop it warning
#define fte_inline __attribute__((unused)) static
#define fte_inlinebody static
#define fte_inlinestatic static
#else
//make it static so we at least don't get errors (might still get warnings. see above)
#define fte_inline static
#define fte_inlinebody static
#define fte_inlinestatic static
#endif
#ifndef FTE_DEPRECATED
#define FTE_DEPRECATED
#endif
#ifndef FTE_UNREACHABLE
#define FTE_UNREACHABLE
#endif
#ifndef LIKEPRINTF
#define LIKEPRINTF(x)
#endif
#ifndef VARGS
#define VARGS
#endif
#ifndef NORETURN
#define NORETURN
#endif
#ifdef _WIN32
#define ZEXPORT VARGS
#define ZEXPORTVA VARGS
#endif
#ifdef _DEBUG
#undef FTE_UNREACHABLE
#define FTE_UNREACHABLE Sys_Error("Unreachable reached: %s %i\n", __FILE__, __LINE__)
#endif
// !!! 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
// up / down
#define PITCH 0
// left / right
#define YAW 1
// fall over
#define ROLL 2
#define MAX_QPATH 128 // max length of a quake game pathname
#define MAX_OSPATH 1024 // max length of a filesystem pathname (260 on windows, but needs to be longer for utf8)
#define OLD_MAX_QPATH 64 // it was baked into various file formats, which is unfortunate.
#define ON_EPSILON 0.1 // point on plane side epsilon
#define MAX_NQMSGLEN 65536 // max length of a reliable message. FIXME: should be 8000 to play safe with proquake
#define MAX_Q2MSGLEN 1400
#define MAX_QWMSGLEN 1450
#define MAX_OVERALLMSGLEN 65536 // mvdsv sends packets this big
#define MAX_DATAGRAM 1450 // max length of unreliable message
#define MAX_Q2DATAGRAM MAX_Q2MSGLEN
#define MAX_NQDATAGRAM 1024 // max length of unreliable message with vanilla nq protocol
#define MAX_OVERALLDATAGRAM MAX_DATAGRAM
#define MAX_BACKBUFLEN 1200
//
// per-level limits
//
#ifdef FTE_TARGET_WEB
#define MAX_EDICTS ((1<<15)-1)
#else
------------------------------------------------------------------------ r4169 | acceptthis | 2013-01-17 08:55:12 +0000 (Thu, 17 Jan 2013) | 31 lines removed MAX_VISEDICTS limit. PEXT2_REPLACEMENTDELTAS tweaked, now has 4 million entity limit. still not enabled by default. TE_BEAM now maps to a separate TEQW_BEAM to avoid conflicts with QW. added android multitouch emulation for windows/rawinput (in_simulatemultitouch). split topcolor/bottomcolor from scoreboard, for dp's colormap|1024 feature. now using utf-8 for windows consoles. qcc warnings/errors now give clickable console links for quick+easy editing. disabled menutint when the currently active item changes contrast or gamma (for OneManClan). Added support for drawfont/drawfontscale. tweaked the qcvm a little to reduce the number of pointers. .doll file loading. still experimental and will likely crash. requires csqc active, even if its a dummy progs. this will be fixed in time. Still other things that need cleaning up. windows: gl_font "?" shows the standard windows font-selection dialog, and can be used to select windows fonts. not all work. and you probably don't want to use windings. fixed splitscreen support when playing mvds. added mini-scoreboards to splitscreen. editor/debugger now shows asm if there's no linenumber info. also, pressing f1 for help shows the shortcuts. Added support for .framegroups files for psk(psa) and iqm formats. True support for ezquake's colour codes. Mutually exclusive with background colours. path command output slightly more readable. added support for digest_hex (MD4, SHA1, CRC16). skingroups now colourmap correctly. Fix terrain colour hints, and litdata from the wrong bsp. fix ftp dual-homed issue. support epsv command, and enable ipv6 (eprt still not supported). remove d3d11 compilation from the makefile. the required headers are not provided by mingw, and are not available to the build bot, so don't bother. fix v *= v.x and similar opcodes. fteqcc: fixed support for áéíóú type chars in names. utf-8 files now properly supported (even with the utf-8 bom/identifier). utf-16 also supported. fteqcc: fixed '#if 1 == 3 && 4' parsing. fteqcc: -Werror acts on the warning, rather than as a separate error. Line numbers are thus more readable. fteqcc: copyright message now includes compile date instead. fteqccgui: the treeview control is now coloured depending on whether there were warnings/errors in the last compile. fteqccgui: the output window is now focused and scrolls down as compilation progresses. pr_dumpplatform command dumps out some pragmas to convert more serious warnings to errors. This is to avoid the infamous 'fteqcc sucks cos my code sucks' issue. rewrote prespawn/modelist/soundlist code. server tracks progress now. ------------------------------------------------------------------------ git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@4167 fc73d0e0-1445-4013-8a0c-d673dee63da5
2013-03-12 22:29:40 +00:00
//#define MAX_EDICTS ((1<<22)-1) // expandable up to 22 bits
#define MAX_EDICTS ((1<<18)-1) // expandable up to 22 bits
#endif
mvd: cl_autotrack_team cvar locks autotrack to a specific team. getting the team name to match can still be problematic when it contains non-ascii chars however. qw: fix recording mid-map. q2: add support for recording demos on q2 servers. q: fix setattachment not using the correct orientations. q2: now supports splitscreen, as well as increased model and sound limits. cl: fix crosshair not appearing in splitscreen. cl: splitscreen clients now get their own colour tints (like the bf command) snd: tweak audio to be a bit more usable in splitscreen by default. cl: added con_logcenterprint cvar, for shoving a copy of centerprints onto the console. by default only appears in single player. qc: add checkbuiltin builtin. for all those #0 builtins without their own extension name. gl: fix r_dynamic -1 bug that was painfully visible in AD. mdl: validate per-frame bounds of mdl files (stuff that would crash software renderers). sv: fix -port or +sv_port commandline args to override the port correctly. win: attempt to cope with windows symlinks enumerating with the wrong filesizes. gl: fix skyboxes not appearing properly. gl: fix sprite alpha/edge issue resulting in some invisible sprites in AD. gl: fix screenshot_mega, in combination with r_projection. yay for HUGE panoramic screenshots. q2: fix replacement textures issue. qw: fix download demonum/X issue, both in client and server. qw: fix multicast dimensions not always being honoured properly. nq: fix starting angles sometimes being wrong. menusys: I'm finally uploading my menusys library, plus example mod, which I'll now be providing like csaddon is. git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@4997 fc73d0e0-1445-4013-8a0c-d673dee63da5
2016-01-18 05:22:07 +00:00
#define MAX_LIGHTSTYLES 255 // 8bit. 255 = 'invalid', and thus only 0-254 are the valid indexes.
#define MAX_STANDARDLIGHTSTYLES 64
#define MAX_PRECACHE_MODELS 4096 // 14bit.
#define MAX_PRECACHE_SOUNDS 2048 // 14bit.
mvd: cl_autotrack_team cvar locks autotrack to a specific team. getting the team name to match can still be problematic when it contains non-ascii chars however. qw: fix recording mid-map. q2: add support for recording demos on q2 servers. q: fix setattachment not using the correct orientations. q2: now supports splitscreen, as well as increased model and sound limits. cl: fix crosshair not appearing in splitscreen. cl: splitscreen clients now get their own colour tints (like the bf command) snd: tweak audio to be a bit more usable in splitscreen by default. cl: added con_logcenterprint cvar, for shoving a copy of centerprints onto the console. by default only appears in single player. qc: add checkbuiltin builtin. for all those #0 builtins without their own extension name. gl: fix r_dynamic -1 bug that was painfully visible in AD. mdl: validate per-frame bounds of mdl files (stuff that would crash software renderers). sv: fix -port or +sv_port commandline args to override the port correctly. win: attempt to cope with windows symlinks enumerating with the wrong filesizes. gl: fix skyboxes not appearing properly. gl: fix sprite alpha/edge issue resulting in some invisible sprites in AD. gl: fix screenshot_mega, in combination with r_projection. yay for HUGE panoramic screenshots. q2: fix replacement textures issue. qw: fix download demonum/X issue, both in client and server. qw: fix multicast dimensions not always being honoured properly. nq: fix starting angles sometimes being wrong. menusys: I'm finally uploading my menusys library, plus example mod, which I'll now be providing like csaddon is. git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@4997 fc73d0e0-1445-4013-8a0c-d673dee63da5
2016-01-18 05:22:07 +00:00
#define MAX_SSPARTICLESPRE 1024 // 14bit. precached particle effect names, for server-side pointparticles/trailparticles.
#define MAX_VWEP_MODELS 32
#define MAX_CSMODELS 1024 // these live entirly clientside
#define MAX_CSPARTICLESPRE 1024
#define SAVEGAME_COMMENT_LENGTH 39
#define MAX_STYLESTRING 64
------------------------------------------------------------------------ r4169 | acceptthis | 2013-01-17 08:55:12 +0000 (Thu, 17 Jan 2013) | 31 lines removed MAX_VISEDICTS limit. PEXT2_REPLACEMENTDELTAS tweaked, now has 4 million entity limit. still not enabled by default. TE_BEAM now maps to a separate TEQW_BEAM to avoid conflicts with QW. added android multitouch emulation for windows/rawinput (in_simulatemultitouch). split topcolor/bottomcolor from scoreboard, for dp's colormap|1024 feature. now using utf-8 for windows consoles. qcc warnings/errors now give clickable console links for quick+easy editing. disabled menutint when the currently active item changes contrast or gamma (for OneManClan). Added support for drawfont/drawfontscale. tweaked the qcvm a little to reduce the number of pointers. .doll file loading. still experimental and will likely crash. requires csqc active, even if its a dummy progs. this will be fixed in time. Still other things that need cleaning up. windows: gl_font "?" shows the standard windows font-selection dialog, and can be used to select windows fonts. not all work. and you probably don't want to use windings. fixed splitscreen support when playing mvds. added mini-scoreboards to splitscreen. editor/debugger now shows asm if there's no linenumber info. also, pressing f1 for help shows the shortcuts. Added support for .framegroups files for psk(psa) and iqm formats. True support for ezquake's colour codes. Mutually exclusive with background colours. path command output slightly more readable. added support for digest_hex (MD4, SHA1, CRC16). skingroups now colourmap correctly. Fix terrain colour hints, and litdata from the wrong bsp. fix ftp dual-homed issue. support epsv command, and enable ipv6 (eprt still not supported). remove d3d11 compilation from the makefile. the required headers are not provided by mingw, and are not available to the build bot, so don't bother. fix v *= v.x and similar opcodes. fteqcc: fixed support for áéíóú type chars in names. utf-8 files now properly supported (even with the utf-8 bom/identifier). utf-16 also supported. fteqcc: fixed '#if 1 == 3 && 4' parsing. fteqcc: -Werror acts on the warning, rather than as a separate error. Line numbers are thus more readable. fteqcc: copyright message now includes compile date instead. fteqccgui: the treeview control is now coloured depending on whether there were warnings/errors in the last compile. fteqccgui: the output window is now focused and scrolls down as compilation progresses. pr_dumpplatform command dumps out some pragmas to convert more serious warnings to errors. This is to avoid the infamous 'fteqcc sucks cos my code sucks' issue. rewrote prespawn/modelist/soundlist code. server tracks progress now. ------------------------------------------------------------------------ git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@4167 fc73d0e0-1445-4013-8a0c-d673dee63da5
2013-03-12 22:29:40 +00:00
#define MAX_Q2EDICTS 1024
//
// stats are integers communicated to the client by the server
//
#define MAX_QW_STATS 32
enum {
#ifdef QUAKESTATS
STAT_HEALTH = 0,
//STAT_FRAGS = 1,
STAT_WEAPONMODELI = 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,
STAT_VIEWHEIGHT = 16, //same as zquake
STAT_TIME = 17, //zquake
STAT_MATCHSTARTTIME = 18,
//STAT_UNUSED = 19,
#ifdef SIDEVIEWS
STAT_VIEW2 = 20,
#endif
STAT_VIEWZOOM = 21, // DP
#define STAT_VIEWZOOM_SCALE 255
//STAT_UNUSED = 22,
//STAT_UNUSED = 23,
//STAT_UNUSED = 24,
STAT_IDEALPITCH = 25, //nq-emu
STAT_PUNCHANGLE_X = 26, //nq-emu
STAT_PUNCHANGLE_Y = 27, //nq-emu
STAT_PUNCHANGLE_Z = 28, //nq-emu
STAT_PUNCHVECTOR_X = 29,
STAT_PUNCHVECTOR_Y = 30,
STAT_PUNCHVECTOR_Z = 31,
#ifdef HEXEN2
//these stats are used only when running a hexen2 mod/hud, and will never be used for a quake mod/hud/generic code.
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,
added qccgui icon (courtesy of shpuld) isolated transfers a little. added preliminary support for r1q2 and q2pro protocols (no zlib). fixed some missing q2 hud configstrings. fixed models attached to particles not appearing the first time around. fixed halos appearing on {foo fullbright textures. fix particle crash bug from missing particlecubes. implement r_converteffectinfo (instead of r_importeffectinfo with r_exportalleffects) for convenience. also now more complete and more accurate. loadfont no longer auto-allocates slot 0. fix issues with r_dynamic -1 don't restart audio on vid_reload (only reload it). this fixes audio issues with capturedemo with gamedir changes. fix possible crash from loading sounds during an audio reload/restart. now listens on both ports 27500 and 26000 when running quake, by default. sv_port or -port args will override. work around surfedge corruption in some instance of the slide4 map that dimman found. attempt to nudge players to travel at at least 200qu when travelling vertically through portals. this should help alieviate gravity-induced stuttering issues. fix nested function types used in conjunction with op_state. now assumes static within the parent. optimise array indexes slightly. fix issue with ptr[float].foo fix some qcc bugs to do with implicit type conversions fix a portal / angle protocol extension issue, so legacy clients can use portals, they just can't see the other side (nor predict them). fix q2 victory.pcx issue at the end of the game. use abort/sigabort instead of sigsegv on linux sys_errors. this should help get people to report stuff better. reformat the nq server advertising to be more helpful. git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@4996 fc73d0e0-1445-4013-8a0c-d673dee63da5
2015-12-28 17:41:39 +00:00
STAT_H2_CAMERAMODE, //entity
STAT_H2_HASTED,
STAT_H2_INVENTORY,
STAT_H2_RINGS_ACTIVE,
STAT_H2_RINGS_LOW,
STAT_H2_ARMOUR1,
STAT_H2_ARMOUR2,
STAT_H2_ARMOUR3,
STAT_H2_ARMOUR4,
STAT_H2_FLIGHT_T,
STAT_H2_WATER_T,
STAT_H2_TURNING_T,
STAT_H2_REGEN_T,
added qccgui icon (courtesy of shpuld) isolated transfers a little. added preliminary support for r1q2 and q2pro protocols (no zlib). fixed some missing q2 hud configstrings. fixed models attached to particles not appearing the first time around. fixed halos appearing on {foo fullbright textures. fix particle crash bug from missing particlecubes. implement r_converteffectinfo (instead of r_importeffectinfo with r_exportalleffects) for convenience. also now more complete and more accurate. loadfont no longer auto-allocates slot 0. fix issues with r_dynamic -1 don't restart audio on vid_reload (only reload it). this fixes audio issues with capturedemo with gamedir changes. fix possible crash from loading sounds during an audio reload/restart. now listens on both ports 27500 and 26000 when running quake, by default. sv_port or -port args will override. work around surfedge corruption in some instance of the slide4 map that dimman found. attempt to nudge players to travel at at least 200qu when travelling vertically through portals. this should help alieviate gravity-induced stuttering issues. fix nested function types used in conjunction with op_state. now assumes static within the parent. optimise array indexes slightly. fix issue with ptr[float].foo fix some qcc bugs to do with implicit type conversions fix a portal / angle protocol extension issue, so legacy clients can use portals, they just can't see the other side (nor predict them). fix q2 victory.pcx issue at the end of the game. use abort/sigabort instead of sigsegv on linux sys_errors. this should help get people to report stuff better. reformat the nq server advertising to be more helpful. git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@4996 fc73d0e0-1445-4013-8a0c-d673dee63da5
2015-12-28 17:41:39 +00:00
STAT_H2_PUZZLE1, //string
STAT_H2_PUZZLE2, //string
STAT_H2_PUZZLE3, //string
STAT_H2_PUZZLE4, //string
STAT_H2_PUZZLE5, //string
STAT_H2_PUZZLE6, //string
STAT_H2_PUZZLE7, //string
STAT_H2_PUZZLE8, //string
STAT_H2_MAXHEALTH,
STAT_H2_MAXMANA,
STAT_H2_FLAGS,
STAT_H2_PLAYERCLASS,
added qccgui icon (courtesy of shpuld) isolated transfers a little. added preliminary support for r1q2 and q2pro protocols (no zlib). fixed some missing q2 hud configstrings. fixed models attached to particles not appearing the first time around. fixed halos appearing on {foo fullbright textures. fix particle crash bug from missing particlecubes. implement r_converteffectinfo (instead of r_importeffectinfo with r_exportalleffects) for convenience. also now more complete and more accurate. loadfont no longer auto-allocates slot 0. fix issues with r_dynamic -1 don't restart audio on vid_reload (only reload it). this fixes audio issues with capturedemo with gamedir changes. fix possible crash from loading sounds during an audio reload/restart. now listens on both ports 27500 and 26000 when running quake, by default. sv_port or -port args will override. work around surfedge corruption in some instance of the slide4 map that dimman found. attempt to nudge players to travel at at least 200qu when travelling vertically through portals. this should help alieviate gravity-induced stuttering issues. fix nested function types used in conjunction with op_state. now assumes static within the parent. optimise array indexes slightly. fix issue with ptr[float].foo fix some qcc bugs to do with implicit type conversions fix a portal / angle protocol extension issue, so legacy clients can use portals, they just can't see the other side (nor predict them). fix q2 victory.pcx issue at the end of the game. use abort/sigabort instead of sigsegv on linux sys_errors. this should help get people to report stuff better. reformat the nq server advertising to be more helpful. git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@4996 fc73d0e0-1445-4013-8a0c-d673dee63da5
2015-12-28 17:41:39 +00:00
STAT_H2_OBJECTIVE1, //integer
STAT_H2_OBJECTIVE2, //integer
#endif
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
STAT_MOVEVARS_AIRACCEL_SIDEWAYS_FRICTION = 255, // DP
#endif
MAX_CL_STATS = 256
};
#ifdef QUAKEHUD
//
// item flags
//
#define IT_SHOTGUN (1u<<0)
#define IT_SUPER_SHOTGUN (1u<<1)
#define IT_NAILGUN (1u<<2)
#define IT_SUPER_NAILGUN (1u<<3)
#define IT_GRENADE_LAUNCHER (1u<<4)
#define IT_ROCKET_LAUNCHER (1u<<5)
#define IT_LIGHTNING (1u<<6)
#define IT_SUPER_LIGHTNING (1u<<7)
#define IT_SHELLS (1u<<8)
#define IT_NAILS (1u<<9)
#define IT_ROCKETS (1u<<10)
#define IT_CELLS (1u<<11)
#define IT_AXE (1u<<12)
#define IT_ARMOR1 (1u<<13)
#define IT_ARMOR2 (1u<<14)
#define IT_ARMOR3 (1u<<15)
#define IT_SUPERHEALTH (1u<<16)
#define IT_KEY1 (1u<<17)
#define IT_KEY2 (1u<<18)
#define IT_INVISIBILITY (1u<<19)
#define IT_INVULNERABILITY (1u<<20)
#define IT_SUIT (1u<<21)
#define IT_QUAD (1u<<22)
#define IT_SIGIL1 (1u<<28)
#define IT_SIGIL2 (1u<<29)
#define IT_SIGIL3 (1u<<30)
#define IT_SIGIL4 (1u<<31)
#endif
//
// 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
#ifndef MAX_SPLITS
#define MAX_SPLITS 1u //disabled, but must be defined for sanities sake.
#endif
//savegame vars
#define SAVEGAME_COMMENT_LENGTH 39
#define SAVEGAME_VERSION_NQ 5
#define SAVEGAME_VERSION_QW 6 //actually zQuake, but the functional difference is that its qw instead of nq.
#define SAVEGAME_VERSION_FTE_LEG 667 //found in .sav files. this is for legacy-like saved games with multiple players.
#define SAVEGAME_VERSION_FTE_HUB 25000 //found in .fsv files. includes svs.gametype, so bumps should be large.
#define CACHEGAME_VERSION_OLD 513
#define CACHEGAME_VERSION_VERBOSE 514
#define CACHEGAME_VERSION_BINARY 515
#define PM_DEFAULTSTEPHEIGHT 18
#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