#ifdef WIN32
# define strcasecmp _stricmp
# define strncasecmp _strnicmp
+#else
+#include "strings.h"
#endif
// Create our own define for Mac OS X
#endif
#ifdef SUNOS
-#include <sys/file.h> ///< Needed for FNDELAY
+#include <sys/file.h> ///< Needed for O_NDELAY
#endif
//============================================================================
}
else
{
- Con_DPrintf("Not using buffered \"%s\" (buffered: %p, %d)\n", csprogsfn, cls.caughtcsprogsdata, (int) cls.caughtcsprogsdatasize);
+ Con_DPrintf("Not using buffered \"%s\" (buffered: %p, %d)\n", csprogsfn, (void *)cls.caughtcsprogsdata, (int) cls.caughtcsprogsdatasize);
csprogsdata = FS_LoadFile(csprogsfn, tempmempool, true, &csprogsdatasize);
}
}
{
int bufferobject = vertexbuffer ? vertexbuffer->bufferobject : 0;
if (!bufferobject && gl_paranoid.integer)
- Con_DPrintf("Warning: no bufferobject in R_Mesh_VertexPointer(%i, %i, %i, %p, %p, %08x)", components, gltype, (int)stride, pointer, vertexbuffer, (unsigned int)bufferoffset);
+ Con_DPrintf("Warning: no bufferobject in R_Mesh_VertexPointer(%i, %i, %i, %p, %p, %08x)", components, gltype, (int)stride, pointer, (void *)vertexbuffer, (unsigned int)bufferoffset);
gl_state.pointer_vertex_components = components;
gl_state.pointer_vertex_gltype = gltype;
gl_state.pointer_vertex_stride = stride;
# Compilation
CFLAGS_COMMON=$(CFLAGS_MAKEDEP) $(CFLAGS_PRELOAD) $(CFLAGS_FS) $(CFLAGS_WARNINGS) $(CFLAGS_LIBZ) $(CFLAGS_LIBJPEG) $(CFLAGS_SND_XMP) $(CFLAGS_NET) $(CFLAGS_SDL) -D_FILE_OFFSET_BITS=64 -D__KERNEL_STRICT_NAMES -I../../../
+# CFLAGS_STANDARD=-D_POSIX_C_SOURCE=200112L -std=c11 -pedantic
CFLAGS_CLIENT=-DCONFIG_MENU $(CFLAGS_VIDEO_CAPTURE)
CFLAGS_SERVER=
CFLAGS_DEBUG=-ggdb
}
if (invalidintcount || invalidshortcount || invalidmismatchcount)
{
- Con_Printf("Mod_ValidateElements(%i, %i, %i, %p, %p) called at %s:%d", numelements, first, last, element3i, element3s, filename, fileline);
+ Con_Printf("Mod_ValidateElements(%i, %i, %i, %p, %p) called at %s:%d", numelements, first, last, (void *)element3i, (void *)element3s, filename, fileline);
Con_Printf(", %i elements are invalid in element3i (example: element3i[%i] == %i)", invalidintcount, invalidintexample, element3i ? element3i[invalidintexample] : 0);
Con_Printf(", %i elements are invalid in element3s (example: element3s[%i] == %i)", invalidshortcount, invalidshortexample, element3s ? element3s[invalidshortexample] : 0);
Con_Printf(", %i elements mismatch between element3i and element3s (example: element3s[%i] is %i and element3i[%i] is %i)", invalidmismatchcount, invalidmismatchexample, element3s ? element3s[invalidmismatchexample] : 0, invalidmismatchexample, element3i ? element3i[invalidmismatchexample] : 0);
//============================================================================
// Menu
-const char *vm_m_extensions =
-"BX_WAL_SUPPORT "
-"DP_CINEMATIC_DPV "
-"DP_COVERAGE "
-"DP_CRYPTO "
-"DP_CSQC_BINDMAPS "
-"DP_GFX_FONTS "
-"DP_GFX_FONTS_FREETYPE "
-"DP_UTF8 "
-"DP_FONT_VARIABLEWIDTH "
-"DP_MENU_EXTRESPONSEPACKET "
-"DP_QC_ASINACOSATANATAN2TAN "
-"DP_QC_AUTOCVARS "
-"DP_QC_CMD "
-"DP_QC_CRC16 "
-"DP_QC_CVAR_TYPE "
-"DP_QC_CVAR_DESCRIPTION "
-"DP_QC_DIGEST "
-"DP_QC_DIGEST_SHA256 "
-"DP_QC_FINDCHAIN_TOFIELD "
-"DP_QC_I18N "
-"DP_QC_LOG "
-"DP_QC_RENDER_SCENE "
-"DP_QC_SPRINTF "
-"DP_QC_STRFTIME "
-"DP_QC_STRINGBUFFERS "
-"DP_QC_STRINGBUFFERS_CVARLIST "
-"DP_QC_STRINGBUFFERS_EXT_WIP "
-"DP_QC_STRINGCOLORFUNCTIONS "
-"DP_QC_STRING_CASE_FUNCTIONS "
-"DP_QC_STRREPLACE "
-"DP_QC_TOKENIZEBYSEPARATOR "
-"DP_QC_TOKENIZE_CONSOLE "
-"DP_QC_UNLIMITEDTEMPSTRINGS "
-"DP_QC_URI_ESCAPE "
-"DP_QC_URI_GET "
-"DP_QC_URI_POST "
-"DP_QC_WHICHPACK "
-"FTE_STRINGS "
-;
+const char *vm_m_extensions[] = {
+"BX_WAL_SUPPORT",
+"DP_CINEMATIC_DPV",
+"DP_COVERAGE",
+"DP_CRYPTO",
+"DP_CSQC_BINDMAPS",
+"DP_GFX_FONTS",
+"DP_GFX_FONTS_FREETYPE",
+"DP_UTF8",
+"DP_FONT_VARIABLEWIDTH",
+"DP_MENU_EXTRESPONSEPACKET",
+"DP_QC_ASINACOSATANATAN2TAN",
+"DP_QC_AUTOCVARS",
+"DP_QC_CMD",
+"DP_QC_CRC16",
+"DP_QC_CVAR_TYPE",
+"DP_QC_CVAR_DESCRIPTION",
+"DP_QC_DIGEST",
+"DP_QC_DIGEST_SHA256",
+"DP_QC_FINDCHAIN_TOFIELD",
+"DP_QC_I18N",
+"DP_QC_LOG",
+"DP_QC_RENDER_SCENE",
+"DP_QC_SPRINTF",
+"DP_QC_STRFTIME",
+"DP_QC_STRINGBUFFERS",
+"DP_QC_STRINGBUFFERS_CVARLIST",
+"DP_QC_STRINGBUFFERS_EXT_WIP",
+"DP_QC_STRINGCOLORFUNCTIONS",
+"DP_QC_STRING_CASE_FUNCTIONS",
+"DP_QC_STRREPLACE",
+"DP_QC_TOKENIZEBYSEPARATOR",
+"DP_QC_TOKENIZE_CONSOLE",
+"DP_QC_UNLIMITEDTEMPSTRINGS",
+"DP_QC_URI_ESCAPE",
+"DP_QC_URI_GET",
+"DP_QC_URI_POST",
+"DP_QC_WHICHPACK",
+"FTE_STRINGS",
+NULL
+};
/*
=========
// flag - used to store general flags like PRVM_GE_SELF, etc.
int flag;
- const char *extensionstring; // [INIT]
+ const char **extensionstring; // [INIT]
qboolean loadintoworld; // [INIT]
extern const int vm_cl_numbuiltins;
extern const int vm_m_numbuiltins;
-extern const char * vm_sv_extensions; // client also uses this
-extern const char * vm_m_extensions;
+extern const char *vm_sv_extensions[]; // client also uses this
+extern const char *vm_m_extensions[];
void SVVM_init_cmd(prvm_prog_t *prog);
void SVVM_reset_cmd(prvm_prog_t *prog);
// kind of helper function
static qboolean checkextension(prvm_prog_t *prog, const char *name)
{
- int len;
- const char *e, *start;
- len = (int)strlen(name);
+ const char **e;
for (e = prog->extensionstring;*e;e++)
{
- while (*e == ' ')
- e++;
- if (!*e)
- break;
- start = e;
- while (*e && *e != ' ')
- e++;
- if ((e - start) == len && !strncasecmp(start, name, len))
+ if(!strcasecmp(*e, name))
{
#ifdef USEODE
// special sheck for ODE
return PRVM_KNOWNSTRINGBASE + i;
// new unknown engine string
if (developer_insane.integer)
- Con_DPrintf("new engine string %p = \"%s\"\n", s, s);
+ Con_DPrintf("new engine string %p = \"%s\"\n", (void *)s, s);
for (i = prog->firstfreeknownstring;i < prog->numknownstrings;i++)
if (!prog->knownstrings[i])
break;
Con_Printf("prvm_coverage: %s just executed a statement at %s for the first time. Coverage: %.2f%%.\n", prog->name, PRVM_WhereAmI(vabuf, sizeof(vabuf), prog, func, statement), prog->statements_covered * 100.0 / prog->numstatements);
}
-#ifdef __GNUC__
+#if defined (__GNUC__) && (_GNU_SOURCE)
#define HAVE_COMPUTED_GOTOS 1
#endif
}
shadermode_t;
-typedef enum shaderpermutation_e
-{
- SHADERPERMUTATION_DIFFUSE = 1<<0, ///< (lightsource) whether to use directional shading
- SHADERPERMUTATION_VERTEXTEXTUREBLEND = 1<<1, ///< indicates this is a two-layer material blend based on vertex alpha (q3bsp)
- SHADERPERMUTATION_VIEWTINT = 1<<2, ///< view tint (postprocessing only), use vertex colors (generic only)
- SHADERPERMUTATION_COLORMAPPING = 1<<3, ///< indicates this is a colormapped skin
- SHADERPERMUTATION_SATURATION = 1<<4, ///< saturation (postprocessing only)
- SHADERPERMUTATION_FOGINSIDE = 1<<5, ///< tint the color by fog color or black if using additive blend mode
- SHADERPERMUTATION_FOGOUTSIDE = 1<<6, ///< tint the color by fog color or black if using additive blend mode
- SHADERPERMUTATION_FOGHEIGHTTEXTURE = 1<<7, ///< fog color and density determined by texture mapped on vertical axis
- SHADERPERMUTATION_FOGALPHAHACK = 1<<8, ///< fog color and density determined by texture mapped on vertical axis
- SHADERPERMUTATION_GAMMARAMPS = 1<<9, ///< gamma (postprocessing only)
- SHADERPERMUTATION_CUBEFILTER = 1<<10, ///< (lightsource) use cubemap light filter
- SHADERPERMUTATION_GLOW = 1<<11, ///< (lightmap) blend in an additive glow texture
- SHADERPERMUTATION_BLOOM = 1<<12, ///< bloom (postprocessing only)
- SHADERPERMUTATION_SPECULAR = 1<<13, ///< (lightsource or deluxemapping) render specular effects
- SHADERPERMUTATION_POSTPROCESSING = 1<<14, ///< user defined postprocessing (postprocessing only)
- SHADERPERMUTATION_REFLECTION = 1<<15, ///< normalmap-perturbed reflection of the scene infront of the surface, preformed as an overlay on the surface
- SHADERPERMUTATION_OFFSETMAPPING = 1<<16, ///< adjust texcoords to roughly simulate a displacement mapped surface
- SHADERPERMUTATION_OFFSETMAPPING_RELIEFMAPPING = 1<<17, ///< adjust texcoords to accurately simulate a displacement mapped surface (requires OFFSETMAPPING to also be set!)
- SHADERPERMUTATION_SHADOWMAP2D = 1<<18, ///< (lightsource) use shadowmap texture as light filter
- SHADERPERMUTATION_SHADOWMAPVSDCT = 1<<19, ///< (lightsource) use virtual shadow depth cube texture for shadowmap indexing
- SHADERPERMUTATION_SHADOWMAPORTHO = 1<<20, ///< (lightsource) use orthographic shadowmap projection
- SHADERPERMUTATION_DEFERREDLIGHTMAP = 1<<21, ///< (lightmap) read Texture_ScreenDiffuse/Specular textures and add them on top of lightmapping
- SHADERPERMUTATION_ALPHAKILL = 1<<22, ///< (deferredgeometry) discard pixel if diffuse texture alpha below 0.5, (generic) apply global alpha
- SHADERPERMUTATION_REFLECTCUBE = 1<<23, ///< fake reflections using global cubemap (not HDRI light probe)
- SHADERPERMUTATION_NORMALMAPSCROLLBLEND = 1<<24, ///< (water) counter-direction normalmaps scrolling
- SHADERPERMUTATION_BOUNCEGRID = 1<<25, ///< (lightmap) use Texture_BounceGrid as an additional source of ambient light
- SHADERPERMUTATION_BOUNCEGRIDDIRECTIONAL = 1<<26, ///< (lightmap) use 16-component pixels in bouncegrid texture for directional lighting rather than standard 4-component
- SHADERPERMUTATION_TRIPPY = 1<<27, ///< use trippy vertex shader effect
- SHADERPERMUTATION_DEPTHRGB = 1<<28, ///< read/write depth values in RGB color coded format for older hardware without depth samplers
- SHADERPERMUTATION_ALPHAGEN_VERTEX = 1<<29, ///< alphaGen vertex
- SHADERPERMUTATION_SKELETAL = 1<<30, ///< (skeletal models) use skeletal matrices to deform vertices (gpu-skinning)
- SHADERPERMUTATION_OCCLUDE = 1<<31, ///< use occlusion buffer for corona
- SHADERPERMUTATION_COUNT = 32 ///< size of shaderpermutationinfo array
-}
-shaderpermutation_t;
+#define SHADERPERMUTATION_DIFFUSE (1<<0) ///< (lightsource) whether to use directional shading
+#define SHADERPERMUTATION_VERTEXTEXTUREBLEND (1<<1) ///< indicates this is a two-layer material blend based on vertex alpha (q3bsp)
+#define SHADERPERMUTATION_VIEWTINT (1<<2) ///< view tint (postprocessing only), use vertex colors (generic only)
+#define SHADERPERMUTATION_COLORMAPPING (1<<3) ///< indicates this is a colormapped skin
+#define SHADERPERMUTATION_SATURATION (1<<4) ///< saturation (postprocessing only)
+#define SHADERPERMUTATION_FOGINSIDE (1<<5) ///< tint the color by fog color or black if using additive blend mode
+#define SHADERPERMUTATION_FOGOUTSIDE (1<<6) ///< tint the color by fog color or black if using additive blend mode
+#define SHADERPERMUTATION_FOGHEIGHTTEXTURE (1<<7) ///< fog color and density determined by texture mapped on vertical axis
+#define SHADERPERMUTATION_FOGALPHAHACK (1<<8) ///< fog color and density determined by texture mapped on vertical axis
+#define SHADERPERMUTATION_GAMMARAMPS (1<<9) ///< gamma (postprocessing only)
+#define SHADERPERMUTATION_CUBEFILTER (1<<10) ///< (lightsource) use cubemap light filter
+#define SHADERPERMUTATION_GLOW (1<<11) ///< (lightmap) blend in an additive glow texture
+#define SHADERPERMUTATION_BLOOM (1<<12) ///< bloom (postprocessing only)
+#define SHADERPERMUTATION_SPECULAR (1<<13) ///< (lightsource or deluxemapping) render specular effects
+#define SHADERPERMUTATION_POSTPROCESSING (1<<14) ///< user defined postprocessing (postprocessing only)
+#define SHADERPERMUTATION_REFLECTION (1<<15) ///< normalmap-perturbed reflection of the scene infront of the surface, preformed as an overlay on the surface
+#define SHADERPERMUTATION_OFFSETMAPPING (1<<16) ///< adjust texcoords to roughly simulate a displacement mapped surface
+#define SHADERPERMUTATION_OFFSETMAPPING_RELIEFMAPPING (1<<17) ///< adjust texcoords to accurately simulate a displacement mapped surface (requires OFFSETMAPPING to also be set!)
+#define SHADERPERMUTATION_SHADOWMAP2D (1<<18) ///< (lightsource) use shadowmap texture as light filter
+#define SHADERPERMUTATION_SHADOWMAPVSDCT (1<<19) ///< (lightsource) use virtual shadow depth cube texture for shadowmap indexing
+#define SHADERPERMUTATION_SHADOWMAPORTHO (1<<20) ///< (lightsource) use orthographic shadowmap projection
+#define SHADERPERMUTATION_DEFERREDLIGHTMAP (1<<21) ///< (lightmap) read Texture_ScreenDiffuse/Specular textures and add them on top of lightmapping
+#define SHADERPERMUTATION_ALPHAKILL (1<<22) ///< (deferredgeometry) discard pixel if diffuse texture alpha below 0.5, (generic) apply global alpha
+#define SHADERPERMUTATION_REFLECTCUBE (1<<23) ///< fake reflections using global cubemap (not HDRI light probe)
+#define SHADERPERMUTATION_NORMALMAPSCROLLBLEND (1<<24) ///< (water) counter-direction normalmaps scrolling
+#define SHADERPERMUTATION_BOUNCEGRID (1<<25) ///< (lightmap) use Texture_BounceGrid as an additional source of ambient light
+#define SHADERPERMUTATION_BOUNCEGRIDDIRECTIONAL (1<<26) ///< (lightmap) use 16-component pixels in bouncegrid texture for directional lighting rather than standard 4-component
+#define SHADERPERMUTATION_TRIPPY (1<<27) ///< use trippy vertex shader effect
+#define SHADERPERMUTATION_DEPTHRGB (1<<28) ///< read/write depth values in RGB color coded format for older hardware without depth samplers
+#define SHADERPERMUTATION_ALPHAGEN_VERTEX (1<<29) ///< alphaGen vertex
+#define SHADERPERMUTATION_SKELETAL (1<<30) ///< (skeletal models) use skeletal matrices to deform vertices (gpu-skinning)
+#define SHADERPERMUTATION_OCCLUDE (1<<31) ///< use occlusion buffer for corona
+#define SHADERPERMUTATION_COUNT 32 ///< size of shaderpermutationinfo array
// 1.0f / N table
extern float ixtable[4096];
-const char *vm_sv_extensions =
-"BX_WAL_SUPPORT "
-"DP_BUTTONCHAT "
-"DP_BUTTONUSE "
-"DP_CL_LOADSKY "
-"DP_CON_ALIASPARAMETERS "
-"DP_CON_BESTWEAPON "
-"DP_CON_EXPANDCVAR "
-"DP_CON_SET "
-"DP_CON_SETA "
-"DP_CON_STARTMAP "
-"DP_COVERAGE "
-"DP_CRYPTO "
-"DP_CSQC_BINDMAPS "
-"DP_CSQC_ENTITYWORLDOBJECT "
-"DP_CSQC_ENTITYMODELLIGHT "
-"DP_CSQC_ENTITYTRANSPARENTSORTING_OFFSET "
-"DP_CSQC_MAINVIEW "
-"DP_CSQC_MINFPS_QUALITY "
-"DP_CSQC_MULTIFRAME_INTERPOLATION "
-"DP_CSQC_BOXPARTICLES "
-"DP_CSQC_SPAWNPARTICLE "
-"DP_CSQC_QUERYRENDERENTITY "
-"DP_CSQC_ROTATEMOVES "
-"DP_CSQC_SETPAUSE "
-"DP_CSQC_V_CALCREFDEF_WIP1 "
-"DP_CSQC_V_CALCREFDEF_WIP2 "
-"DP_EF_ADDITIVE "
-"DP_EF_BLUE "
-"DP_EF_DOUBLESIDED "
-"DP_EF_DYNAMICMODELLIGHT "
-"DP_EF_FLAME "
-"DP_EF_FULLBRIGHT "
-"DP_EF_NODEPTHTEST "
-"DP_EF_NODRAW "
-"DP_EF_NOGUNBOB "
-"DP_EF_NOSELFSHADOW "
-"DP_EF_NOSHADOW "
-"DP_EF_RED "
-"DP_EF_RESTARTANIM_BIT "
-"DP_EF_STARDUST "
-"DP_EF_TELEPORT_BIT "
-"DP_ENT_ALPHA "
-"DP_ENT_COLORMOD "
-"DP_ENT_CUSTOMCOLORMAP "
-"DP_ENT_EXTERIORMODELTOCLIENT "
-"DP_ENT_GLOW "
-"DP_ENT_GLOWMOD "
-"DP_ENT_LOWPRECISION "
-"DP_ENT_SCALE "
-"DP_ENT_TRAILEFFECTNUM "
-"DP_ENT_VIEWMODEL "
-"DP_GFX_EXTERNALTEXTURES "
-"DP_GFX_EXTERNALTEXTURES_PERMAP "
-"DP_GFX_FOG "
-"DP_GFX_MODEL_INTERPOLATION "
-"DP_GFX_QUAKE3MODELTAGS "
-"DP_GFX_SKINFILES "
-"DP_GFX_SKYBOX "
-"DP_GFX_FONTS "
-"DP_GFX_FONTS_FREETYPE "
-"DP_UTF8 "
-"DP_FONT_VARIABLEWIDTH "
-"DP_HALFLIFE_MAP "
-"DP_HALFLIFE_MAP_CVAR "
-"DP_HALFLIFE_SPRITE "
-"DP_INPUTBUTTONS "
-"DP_LIGHTSTYLE_STATICVALUE "
-"DP_LITSPRITES "
-"DP_LITSUPPORT "
-"DP_MONSTERWALK "
-"DP_MOVETYPEBOUNCEMISSILE "
-"DP_MOVETYPEFLYWORLDONLY "
-"DP_MOVETYPEFOLLOW "
-"DP_NULL_MODEL "
-"DP_QC_ASINACOSATANATAN2TAN "
-"DP_QC_AUTOCVARS "
-"DP_QC_CHANGEPITCH "
-"DP_QC_CMD "
-"DP_QC_COPYENTITY "
-"DP_QC_CRC16 "
-"DP_QC_CVAR_DEFSTRING "
-"DP_QC_CVAR_DESCRIPTION "
-"DP_QC_CVAR_STRING "
-"DP_QC_CVAR_TYPE "
-"DP_QC_DIGEST "
-"DP_QC_DIGEST_SHA256 "
-"DP_QC_EDICT_NUM "
-"DP_QC_ENTITYDATA "
-"DP_QC_ENTITYSTRING "
-"DP_QC_ETOS "
-"DP_QC_EXTRESPONSEPACKET "
-"DP_QC_FINDCHAIN "
-"DP_QC_FINDCHAINFLAGS "
-"DP_QC_FINDCHAINFLOAT "
-"DP_QC_FINDCHAIN_TOFIELD "
-"DP_QC_FINDFLAGS "
-"DP_QC_FINDFLOAT "
-"DP_QC_FS_SEARCH "
-"DP_QC_GETLIGHT "
-"DP_QC_GETSURFACE "
-"DP_QC_GETSURFACETRIANGLE "
-"DP_QC_GETSURFACEPOINTATTRIBUTE "
-"DP_QC_GETTAGINFO "
-"DP_QC_GETTAGINFO_BONEPROPERTIES "
-"DP_QC_GETTIME "
-"DP_QC_GETTIME_CDTRACK "
-"DP_QC_I18N "
-"DP_QC_LOG "
-"DP_QC_MINMAXBOUND "
-"DP_QC_MULTIPLETEMPSTRINGS "
-"DP_QC_NUM_FOR_EDICT "
-"DP_QC_RANDOMVEC "
-"DP_QC_SINCOSSQRTPOW "
-"DP_QC_SPRINTF "
-"DP_QC_STRFTIME "
-"DP_QC_STRINGBUFFERS "
-"DP_QC_STRINGBUFFERS_CVARLIST "
-"DP_QC_STRINGBUFFERS_EXT_WIP "
-"DP_QC_STRINGCOLORFUNCTIONS "
-"DP_QC_STRING_CASE_FUNCTIONS "
-"DP_QC_STRREPLACE "
-"DP_QC_TOKENIZEBYSEPARATOR "
-"DP_QC_TOKENIZE_CONSOLE "
-"DP_QC_TRACEBOX "
-"DP_QC_TRACETOSS "
-"DP_QC_TRACE_MOVETYPE_HITMODEL "
-"DP_QC_TRACE_MOVETYPE_WORLDONLY "
-"DP_QC_UNLIMITEDTEMPSTRINGS "
-"DP_QC_URI_ESCAPE "
-"DP_QC_URI_GET "
-"DP_QC_URI_POST "
-"DP_QC_VECTOANGLES_WITH_ROLL "
-"DP_QC_VECTORVECTORS "
-"DP_QC_WHICHPACK "
-"DP_QUAKE2_MODEL "
-"DP_QUAKE2_SPRITE "
-"DP_QUAKE3_MAP "
-"DP_QUAKE3_MODEL "
-"DP_REGISTERCVAR "
-"DP_SKELETONOBJECTS "
-"DP_SND_DIRECTIONLESSATTNNONE "
-"DP_SND_FAKETRACKS "
-"DP_SND_SOUND7_WIP1 "
-"DP_SND_SOUND7_WIP2 "
-"DP_SND_OGGVORBIS "
-"DP_SND_SETPARAMS "
-"DP_SND_STEREOWAV "
-"DP_SND_GETSOUNDTIME "
-"DP_VIDEO_DPV "
-"DP_VIDEO_SUBTITLES "
-"DP_SOLIDCORPSE "
-"DP_SPRITE32 "
-"DP_SV_BOTCLIENT "
-"DP_SV_BOUNCEFACTOR "
-"DP_SV_CLIENTCAMERA "
-"DP_SV_CLIENTCOLORS "
-"DP_SV_CLIENTNAME "
-"DP_SV_CMD "
-"DP_SV_CUSTOMIZEENTITYFORCLIENT "
-"DP_SV_DISABLECLIENTPREDICTION "
-"DP_SV_DISCARDABLEDEMO "
-"DP_SV_DRAWONLYTOCLIENT "
-"DP_SV_DROPCLIENT "
-"DP_SV_EFFECT "
-"DP_SV_ENTITYCONTENTSTRANSITION "
-"DP_SV_MODELFLAGS_AS_EFFECTS "
-"DP_SV_MOVETYPESTEP_LANDEVENT "
-"DP_SV_NETADDRESS "
-"DP_SV_NODRAWTOCLIENT "
-"DP_SV_ONENTITYNOSPAWNFUNCTION "
-"DP_SV_ONENTITYPREPOSTSPAWNFUNCTION "
-"DP_SV_PING "
-"DP_SV_PING_PACKETLOSS "
-"DP_SV_PLAYERPHYSICS "
-"DP_PHYSICS_ODE "
-"DP_SV_POINTPARTICLES "
-"DP_SV_POINTSOUND "
-"DP_SV_PRECACHEANYTIME "
-"DP_SV_PRINT "
-"DP_SV_PUNCHVECTOR "
-"DP_SV_QCSTATUS "
-"DP_SV_ROTATINGBMODEL "
-"DP_SV_SETCOLOR "
-"DP_SV_SHUTDOWN "
-"DP_SV_SLOWMO "
-"DP_SV_SPAWNFUNC_PREFIX "
-"DP_SV_WRITEPICTURE "
-"DP_SV_WRITEUNTERMINATEDSTRING "
-"DP_TE_BLOOD "
-"DP_TE_BLOODSHOWER "
-"DP_TE_CUSTOMFLASH "
-"DP_TE_EXPLOSIONRGB "
-"DP_TE_FLAMEJET "
-"DP_TE_PARTICLECUBE "
-"DP_TE_PARTICLERAIN "
-"DP_TE_PARTICLESNOW "
-"DP_TE_PLASMABURN "
-"DP_TE_QUADEFFECTS1 "
-"DP_TE_SMALLFLASH "
-"DP_TE_SPARK "
-"DP_TE_STANDARDEFFECTBUILTINS "
-"DP_TRACE_HITCONTENTSMASK_SURFACEINFO "
-"DP_USERMOVETYPES "
-"DP_VIEWZOOM "
-"EXT_BITSHIFT "
-"FRIK_FILE "
-"FTE_CSQC_SKELETONOBJECTS "
-"FTE_QC_CHECKPVS "
-"FTE_STRINGS "
-"KRIMZON_SV_PARSECLIENTCOMMAND "
-"NEH_CMD_PLAY2 "
-"NEH_RESTOREGAME "
-"NEXUIZ_PLAYERMODEL "
-"NXQ_GFX_LETTERBOX "
-"PRYDON_CLIENTCURSOR "
-"TENEBRAE_GFX_DLIGHTS "
-"TW_SV_STEPCONTROL "
-"ZQ_PAUSE "
-"DP_RM_CLIPGROUP "
-//"EXT_CSQC " // not ready yet
-;
+const char *vm_sv_extensions[] = {
+"BX_WAL_SUPPORT",
+"DP_BUTTONCHAT",
+"DP_BUTTONUSE",
+"DP_CL_LOADSKY",
+"DP_CON_ALIASPARAMETERS",
+"DP_CON_BESTWEAPON",
+"DP_CON_EXPANDCVAR",
+"DP_CON_SET",
+"DP_CON_SETA",
+"DP_CON_STARTMAP",
+"DP_COVERAGE",
+"DP_CRYPTO",
+"DP_CSQC_BINDMAPS",
+"DP_CSQC_ENTITYWORLDOBJECT",
+"DP_CSQC_ENTITYMODELLIGHT",
+"DP_CSQC_ENTITYTRANSPARENTSORTING_OFFSET",
+"DP_CSQC_MAINVIEW",
+"DP_CSQC_MINFPS_QUALITY",
+"DP_CSQC_MULTIFRAME_INTERPOLATION",
+"DP_CSQC_BOXPARTICLES",
+"DP_CSQC_SPAWNPARTICLE",
+"DP_CSQC_QUERYRENDERENTITY",
+"DP_CSQC_ROTATEMOVES",
+"DP_CSQC_SETPAUSE",
+"DP_CSQC_V_CALCREFDEF_WIP1",
+"DP_CSQC_V_CALCREFDEF_WIP2",
+"DP_EF_ADDITIVE",
+"DP_EF_BLUE",
+"DP_EF_DOUBLESIDED",
+"DP_EF_DYNAMICMODELLIGHT",
+"DP_EF_FLAME",
+"DP_EF_FULLBRIGHT",
+"DP_EF_NODEPTHTEST",
+"DP_EF_NODRAW",
+"DP_EF_NOGUNBOB",
+"DP_EF_NOSELFSHADOW",
+"DP_EF_NOSHADOW",
+"DP_EF_RED",
+"DP_EF_RESTARTANIM_BIT",
+"DP_EF_STARDUST",
+"DP_EF_TELEPORT_BIT",
+"DP_ENT_ALPHA",
+"DP_ENT_COLORMOD",
+"DP_ENT_CUSTOMCOLORMAP",
+"DP_ENT_EXTERIORMODELTOCLIENT",
+"DP_ENT_GLOW",
+"DP_ENT_GLOWMOD",
+"DP_ENT_LOWPRECISION",
+"DP_ENT_SCALE",
+"DP_ENT_TRAILEFFECTNUM",
+"DP_ENT_VIEWMODEL",
+"DP_GFX_EXTERNALTEXTURES",
+"DP_GFX_EXTERNALTEXTURES_PERMAP",
+"DP_GFX_FOG",
+"DP_GFX_MODEL_INTERPOLATION",
+"DP_GFX_QUAKE3MODELTAGS",
+"DP_GFX_SKINFILES",
+"DP_GFX_SKYBOX",
+"DP_GFX_FONTS",
+"DP_GFX_FONTS_FREETYPE",
+"DP_UTF8",
+"DP_FONT_VARIABLEWIDTH",
+"DP_HALFLIFE_MAP",
+"DP_HALFLIFE_MAP_CVAR",
+"DP_HALFLIFE_SPRITE",
+"DP_INPUTBUTTONS",
+"DP_LIGHTSTYLE_STATICVALUE",
+"DP_LITSPRITES",
+"DP_LITSUPPORT",
+"DP_MONSTERWALK",
+"DP_MOVETYPEBOUNCEMISSILE",
+"DP_MOVETYPEFLYWORLDONLY",
+"DP_MOVETYPEFOLLOW",
+"DP_NULL_MODEL",
+"DP_QC_ASINACOSATANATAN2TAN",
+"DP_QC_AUTOCVARS",
+"DP_QC_CHANGEPITCH",
+"DP_QC_CMD",
+"DP_QC_COPYENTITY",
+"DP_QC_CRC16",
+"DP_QC_CVAR_DEFSTRING",
+"DP_QC_CVAR_DESCRIPTION",
+"DP_QC_CVAR_STRING",
+"DP_QC_CVAR_TYPE",
+"DP_QC_DIGEST",
+"DP_QC_DIGEST_SHA256",
+"DP_QC_EDICT_NUM",
+"DP_QC_ENTITYDATA",
+"DP_QC_ENTITYSTRING",
+"DP_QC_ETOS",
+"DP_QC_EXTRESPONSEPACKET",
+"DP_QC_FINDCHAIN",
+"DP_QC_FINDCHAINFLAGS",
+"DP_QC_FINDCHAINFLOAT",
+"DP_QC_FINDCHAIN_TOFIELD",
+"DP_QC_FINDFLAGS",
+"DP_QC_FINDFLOAT",
+"DP_QC_FS_SEARCH",
+"DP_QC_GETLIGHT",
+"DP_QC_GETSURFACE",
+"DP_QC_GETSURFACETRIANGLE",
+"DP_QC_GETSURFACEPOINTATTRIBUTE",
+"DP_QC_GETTAGINFO",
+"DP_QC_GETTAGINFO_BONEPROPERTIES",
+"DP_QC_GETTIME",
+"DP_QC_GETTIME_CDTRACK",
+"DP_QC_I18N",
+"DP_QC_LOG",
+"DP_QC_MINMAXBOUND",
+"DP_QC_MULTIPLETEMPSTRINGS",
+"DP_QC_NUM_FOR_EDICT",
+"DP_QC_RANDOMVEC",
+"DP_QC_SINCOSSQRTPOW",
+"DP_QC_SPRINTF",
+"DP_QC_STRFTIME",
+"DP_QC_STRINGBUFFERS",
+"DP_QC_STRINGBUFFERS_CVARLIST",
+"DP_QC_STRINGBUFFERS_EXT_WIP",
+"DP_QC_STRINGCOLORFUNCTIONS",
+"DP_QC_STRING_CASE_FUNCTIONS",
+"DP_QC_STRREPLACE",
+"DP_QC_TOKENIZEBYSEPARATOR",
+"DP_QC_TOKENIZE_CONSOLE",
+"DP_QC_TRACEBOX",
+"DP_QC_TRACETOSS",
+"DP_QC_TRACE_MOVETYPE_HITMODEL",
+"DP_QC_TRACE_MOVETYPE_WORLDONLY",
+"DP_QC_UNLIMITEDTEMPSTRINGS",
+"DP_QC_URI_ESCAPE",
+"DP_QC_URI_GET",
+"DP_QC_URI_POST",
+"DP_QC_VECTOANGLES_WITH_ROLL",
+"DP_QC_VECTORVECTORS",
+"DP_QC_WHICHPACK",
+"DP_QUAKE2_MODEL",
+"DP_QUAKE2_SPRITE",
+"DP_QUAKE3_MAP",
+"DP_QUAKE3_MODEL",
+"DP_REGISTERCVAR",
+"DP_SKELETONOBJECTS",
+"DP_SND_DIRECTIONLESSATTNNONE",
+"DP_SND_FAKETRACKS",
+"DP_SND_SOUND7_WIP1",
+"DP_SND_SOUND7_WIP2",
+"DP_SND_OGGVORBIS",
+"DP_SND_SETPARAMS",
+"DP_SND_STEREOWAV",
+"DP_SND_GETSOUNDTIME",
+"DP_VIDEO_DPV",
+"DP_VIDEO_SUBTITLES",
+"DP_SOLIDCORPSE",
+"DP_SPRITE32",
+"DP_SV_BOTCLIENT",
+"DP_SV_BOUNCEFACTOR",
+"DP_SV_CLIENTCAMERA",
+"DP_SV_CLIENTCOLORS",
+"DP_SV_CLIENTNAME",
+"DP_SV_CMD",
+"DP_SV_CUSTOMIZEENTITYFORCLIENT",
+"DP_SV_DISABLECLIENTPREDICTION",
+"DP_SV_DISCARDABLEDEMO",
+"DP_SV_DRAWONLYTOCLIENT",
+"DP_SV_DROPCLIENT",
+"DP_SV_EFFECT",
+"DP_SV_ENTITYCONTENTSTRANSITION",
+"DP_SV_MODELFLAGS_AS_EFFECTS",
+"DP_SV_MOVETYPESTEP_LANDEVENT",
+"DP_SV_NETADDRESS",
+"DP_SV_NODRAWTOCLIENT",
+"DP_SV_ONENTITYNOSPAWNFUNCTION",
+"DP_SV_ONENTITYPREPOSTSPAWNFUNCTION",
+"DP_SV_PING",
+"DP_SV_PING_PACKETLOSS",
+"DP_SV_PLAYERPHYSICS",
+"DP_PHYSICS_ODE",
+"DP_SV_POINTPARTICLES",
+"DP_SV_POINTSOUND",
+"DP_SV_PRECACHEANYTIME",
+"DP_SV_PRINT",
+"DP_SV_PUNCHVECTOR",
+"DP_SV_QCSTATUS",
+"DP_SV_ROTATINGBMODEL",
+"DP_SV_SETCOLOR",
+"DP_SV_SHUTDOWN",
+"DP_SV_SLOWMO",
+"DP_SV_SPAWNFUNC_PREFIX",
+"DP_SV_WRITEPICTURE",
+"DP_SV_WRITEUNTERMINATEDSTRING",
+"DP_TE_BLOOD",
+"DP_TE_BLOODSHOWER",
+"DP_TE_CUSTOMFLASH",
+"DP_TE_EXPLOSIONRGB",
+"DP_TE_FLAMEJET",
+"DP_TE_PARTICLECUBE",
+"DP_TE_PARTICLERAIN",
+"DP_TE_PARTICLESNOW",
+"DP_TE_PLASMABURN",
+"DP_TE_QUADEFFECTS1",
+"DP_TE_SMALLFLASH",
+"DP_TE_SPARK",
+"DP_TE_STANDARDEFFECTBUILTINS",
+"DP_TRACE_HITCONTENTSMASK_SURFACEINFO"
+"DP_USERMOVETYPES",
+"DP_VIEWZOOM",
+"EXT_BITSHIFT",
+"FRIK_FILE",
+"FTE_CSQC_SKELETONOBJECTS",
+"FTE_QC_CHECKPVS",
+"FTE_STRINGS",
+"KRIMZON_SV_PARSECLIENTCOMMAND",
+"NEH_CMD_PLAY2",
+"NEH_RESTOREGAME",
+"NEXUIZ_PLAYERMODEL",
+"NXQ_GFX_LETTERBOX",
+"PRYDON_CLIENTCURSOR",
+"TENEBRAE_GFX_DLIGHTS",
+"TW_SV_STEPCONTROL",
+"ZQ_PAUSE",
+"DP_RM_CLIPGROUP",
+NULL
+//"EXT_CSQC" // not ready yet
+};
/*
=================
#include <io.h>
#include "conio.h"
#else
+#include <sys/time.h>
#include <unistd.h>
#include <fcntl.h>
-#include <time.h>
#endif
#include <signal.h>
// =======================================================================
void Sys_Shutdown (void)
{
-#ifdef FNDELAY
- fcntl (0, F_SETFL, fcntl (0, F_GETFL, 0) & ~FNDELAY);
-#endif
+ fcntl (0, F_SETFL, fcntl (0, F_GETFL, 0) & ~O_NDELAY);
fflush(stdout);
}
char string[MAX_INPUTLINE];
// change stdin to non blocking
-#ifdef FNDELAY
- fcntl (0, F_SETFL, fcntl (0, F_GETFL, 0) & ~FNDELAY);
-#endif
+ fcntl (0, F_SETFL, fcntl (0, F_GETFL, 0) & ~O_NDELAY);
va_start (argptr,error);
dpvsnprintf (string, sizeof (string), error, argptr);
{
if(sys.outfd < 0)
return;
-#ifdef FNDELAY
// BUG: for some reason, NDELAY also affects stdout (1) when used on stdin (0).
// this is because both go to /dev/tty by default!
{
int origflags = fcntl (sys.outfd, F_GETFL, 0);
- fcntl (sys.outfd, F_SETFL, origflags & ~FNDELAY);
-#endif
+ fcntl (sys.outfd, F_SETFL, origflags & ~O_NDELAY);
#ifdef WIN32
#define write _write
#endif
break; // sorry, I cannot do anything about this error - without an output
text += written;
}
-#ifdef FNDELAY
fcntl (sys.outfd, F_SETFL, origflags);
}
-#endif
//fprintf(stdout, "%s", text);
}
else
sys.outfd = 1;
-#ifdef FNDELAY
- fcntl(0, F_SETFL, fcntl (0, F_GETFL, 0) | FNDELAY);
-#endif
+ fcntl(0, F_SETFL, fcntl (0, F_GETFL, 0) | O_NDELAY);
Host_Main();
#ifdef __ANDROID__
#include <android/log.h>
-
-#ifndef FNDELAY
-#define FNDELAY O_NDELAY
-#endif
#endif
#include <signal.h>
Sys_AllowProfiling(false);
#endif
#ifndef WIN32
- fcntl (0, F_SETFL, fcntl (0, F_GETFL, 0) & ~FNDELAY);
+ fcntl (0, F_SETFL, fcntl (0, F_GETFL, 0) & ~O_NDELAY);
#endif
fflush(stdout);
SDL_Quit();
// change stdin to non blocking
#ifndef WIN32
- fcntl (0, F_SETFL, fcntl (0, F_GETFL, 0) & ~FNDELAY);
+ fcntl (0, F_SETFL, fcntl (0, F_GETFL, 0) & ~O_NDELAY);
#endif
va_start (argptr,error);
#else
if(sys.outfd < 0)
return;
-#ifdef FNDELAY
+#ifdef O_NDELAY
// BUG: for some reason, NDELAY also affects stdout (1) when used on stdin (0).
// this is because both go to /dev/tty by default!
{
int origflags = fcntl (sys.outfd, F_GETFL, 0);
- fcntl (sys.outfd, F_SETFL, origflags & ~FNDELAY);
+ fcntl (sys.outfd, F_SETFL, origflags & ~O_NDELAY);
#endif
#ifdef WIN32
#define write _write
break; // sorry, I cannot do anything about this error - without an output
text += written;
}
-#ifdef FNDELAY
+#ifdef O_NDELAY
fcntl (sys.outfd, F_SETFL, origflags);
}
#endif
sys.outfd = 1;
#ifndef WIN32
- fcntl(0, F_SETFL, fcntl (0, F_GETFL, 0) | FNDELAY);
+ fcntl(0, F_SETFL, fcntl (0, F_GETFL, 0) | O_NDELAY);
#endif
// we don't know which systems we'll want to init, yet...
Cvar_SetQuick(&gl_info_driver, gl_driver);
// LadyHavoc: report supported extensions
+ Con_DPrintf("\nQuakeC extensions for server and client:");
+ for (i = 0; vm_sv_extensions[i]; i++)
+ Con_DPrintf(" %s", vm_sv_extensions[i]);
+ Con_DPrintf("\n");
#ifdef CONFIG_MENU
- Con_DPrintf("\nQuakeC extensions for server and client: %s\nQuakeC extensions for menu: %s\n", vm_sv_extensions, vm_m_extensions);
-#else
- Con_DPrintf("\nQuakeC extensions for server and client: %s\n", vm_sv_extensions);
+ Con_DPrintf("\nQuakeC extensions for menu:");
+ for (i = 0; vm_m_extensions[i]; i++)
+ Con_DPrintf(" %s", vm_m_extensions[i]);
+ Con_DPrintf("\n");
#endif
// clear to black (loading plaque will be seen over this)
{
j = (p - l->arrays[i].data) / l->recordsize;
if (p != l->arrays[i].data + j * l->recordsize)
- Sys_Error("Mem_ExpandableArray_FreeRecord: no such record %p\n", p);
+ Sys_Error("Mem_ExpandableArray_FreeRecord: no such record %p\n", (void *)p);
if (!l->arrays[i].allocflags[j])
- Sys_Error("Mem_ExpandableArray_FreeRecord: record %p is already free!\n", p);
+ Sys_Error("Mem_ExpandableArray_FreeRecord: record %p is already free!\n", (void *)p);
l->arrays[i].allocflags[j] = false;
l->arrays[i].numflaggedrecords--;
return;