I wonder how many things this will break...

Anyway, made the renderer more modular (multiple gl renderers in the same binary, supported properly - menu still needs work).
Rewrote parm1-16 handling, and added support for 17-32.
Lightstyle smoothing cvar: r_lightstylesmooth


git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@1113 fc73d0e0-1445-4013-8a0c-d673dee63da5
This commit is contained in:
Spoike 2005-06-22 17:10:13 +00:00
parent f64645ff6d
commit 39990c213d
22 changed files with 990 additions and 1251 deletions

View file

@ -28,12 +28,8 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#include <dinput.h>
#ifdef _MSC_VER
#ifdef AVAIL_DX7
#pragma comment (lib, "../libs/dxsdk7/lib/dxguid.lib")
#else
#pragma comment (lib, "dxguid.lib")
#endif
#endif
#define DINPUT_BUFFERSIZE 16
#define iDirectInputCreate(a,b,c,d) pDirectInputCreate(a,b,c,d)

View file

@ -115,3 +115,93 @@ void Draw_FunString(int x, int y, unsigned char *str);
#define Mod_Q1LeafPVS Mod_LeafPVS
qbyte *Mod_LeafPVS (struct mleaf_s *leaf, struct model_s *model, qbyte *buffer);
#endif
typedef struct {
char *description;
char *name[4];
r_qrenderer_t rtype;
mpic_t *(*Draw_PicFromWad) (char *name);
mpic_t *(*Draw_SafePicFromWad) (char *name);
mpic_t *(*Draw_CachePic) (char *path);
mpic_t *(*Draw_SafeCachePic) (char *path);
void (*Draw_Init) (void);
void (*Draw_ReInit) (void);
void (*Draw_Character) (int x, int y, unsigned int num);
void (*Draw_ColouredCharacter) (int x, int y, unsigned int num);
void (*Draw_String) (int x, int y, const qbyte *str);
void (*Draw_Alt_String) (int x, int y, const qbyte *str);
void (*Draw_Crosshair) (void);
void (*Draw_DebugChar) (qbyte num);
void (*Draw_Pic) (int x, int y, mpic_t *pic);
void (*Draw_ScalePic) (int x, int y, int width, int height, mpic_t *pic);
void (*Draw_SubPic) (int x, int y, mpic_t *pic, int srcx, int srcy, int width, int height);
void (*Draw_TransPic) (int x, int y, mpic_t *pic);
void (*Draw_TransPicTranslate) (int x, int y, int w, int h, qbyte *pic, qbyte *translation);
void (*Draw_ConsoleBackground) (int lines);
void (*Draw_EditorBackground) (int lines);
void (*Draw_TileClear) (int x, int y, int w, int h);
void (*Draw_Fill) (int x, int y, int w, int h, int c);
void (*Draw_FadeScreen) (void);
void (*Draw_BeginDisc) (void);
void (*Draw_EndDisc) (void);
void (*Draw_Image) (float x, float y, float w, float h, float s1, float t1, float s2, float t2, mpic_t *pic); //gl-style scaled/coloured/subpic
void (*Draw_ImageColours) (float r, float g, float b, float a);
void (*R_Init) (void);
void (*R_DeInit) (void);
void (*R_ReInit) (void);
void (*R_RenderView) (void); // must set r_refdef first
void (*R_InitSky) (struct texture_s *mt); // called at level load
qboolean (*R_CheckSky) (void);
void (*R_SetSky) (char *name, float rotate, vec3_t axis);
void (*R_NewMap) (void);
void (*R_PreNewMap) (void);
int (*R_LightPoint) (vec3_t point);
void (*R_PushDlights) (void);
void (*R_AddStain) (vec3_t org, float red, float green, float blue, float radius);
void (*R_LessenStains) (void);
void (*Media_ShowFrameBGR_24_Flip) (qbyte *framedata, int inwidth, int inheight); //input is bottom up...
void (*Media_ShowFrameRGBA_32) (qbyte *framedata, int inwidth, int inheight); //top down
void (*Media_ShowFrame8bit) (qbyte *framedata, int inwidth, int inheight, qbyte *palette); //paletted topdown (framedata is 8bit indexes into palette)
void (*Mod_Init) (void);
void (*Mod_ClearAll) (void);
struct model_s *(*Mod_ForName) (char *name, qboolean crash);
struct model_s *(*Mod_FindName) (char *name);
void *(*Mod_Extradata) (struct model_s *mod); // handles caching
void (*Mod_TouchModel) (char *name);
struct mleaf_s *(*Mod_PointInLeaf) (float *p, struct model_s *model);
qbyte *(*Mod_Q1LeafPVS) (struct mleaf_s *leaf, struct model_s *model, qbyte *buffer);
void (*Mod_NowLoadExternal) (void);
void (*Mod_Think) (void);
qboolean(*Mod_GetTag) (struct model_s *model, int tagnum, int frame1, int frame2, float f2ness, float f1time, float f2time, float *result);
int (*Mod_TagNumForName) (struct model_s *model, char *name);
qboolean (*VID_Init) (rendererstate_t *info, unsigned char *palette);
void (*VID_DeInit) (void);
void (*VID_HandlePause) (qboolean pause);
void (*VID_LockBuffer) (void);
void (*VID_UnlockBuffer) (void);
void (*D_BeginDirectRect) (int x, int y, qbyte *pbitmap, int width, int height);
void (*D_EndDirectRect) (int x, int y, int width, int height);
void (*VID_ForceLockState) (int lk);
int (*VID_ForceUnlockedAndReturnState) (void);
void (*VID_SetPalette) (unsigned char *palette);
void (*VID_ShiftPalette) (unsigned char *palette);
char *(*VID_GetRGBInfo) (int prepad, int *truevidwidth, int *truevidheight);
void (*VID_SetWindowCaption) (char *msg);
void (*SCR_UpdateScreen) (void);
char *alignment;
} rendererinfo_t;

View file

@ -171,7 +171,7 @@ typedef struct part_type_s {
float timelimit;
enum {PT_NORMAL, PT_BEAM, PT_DECAL} type;
enum {PT_NORMAL, PT_SPARK, PT_SPARKFAN, PT_TEXTUREDSPARK, PT_BEAM, PT_DECAL} type;
enum {BM_MERGE, BM_ADD, BM_SUBTRACT} blendmode;
float rotationstartmin, rotationstartrand;
@ -654,6 +654,12 @@ void P_ParticleEffect_f(void)
{
if (!strcmp(value, "beam"))
ptype->type = PT_BEAM;
else if (!strcmp(value, "spark"))
ptype->type = PT_SPARK;
else if (!strcmp(value, "sparkfan") || !strcmp(value, "trianglefan"))
ptype->type = PT_SPARKFAN;
else if (!strcmp(value, "texturedspark"))
ptype->type = PT_TEXTUREDSPARK;
else if (!strcmp(value, "decal"))
ptype->type = PT_DECAL;
else
@ -844,6 +850,16 @@ void P_ParticleEffect_f(void)
if (ptype->friction)
ptype->flags |= PT_FRICTION;
if (ptype->type == PT_NORMAL && !ptype->texname)
ptype->type = PT_SPARK;
if (ptype->type == PT_SPARK)
{
if (*ptype->texname)
ptype->type = PT_TEXTUREDSPARK;
if (ptype->scale)
ptype->type = PT_SPARKFAN;
}
if (ptype->rampmode && !ptype->ramp)
{
ptype->rampmode = RAMP_NONE;
@ -2824,12 +2840,6 @@ void GL_DrawTexturedParticle(particle_t *p, part_type_t *type)
if (lasttype != type)
{
if (type-part_type>=numparticletypes||type-part_type<0) //FIXME:! Work out why this is needed...
{
Con_Printf("Serious bug alert\n");
return;
}
lasttype = type;
qglEnd();
qglEnable(GL_TEXTURE_2D);
@ -2985,7 +2995,7 @@ void GL_DrawTrifanParticle(particle_t *p, part_type_t *type)
qglBegin (GL_TRIANGLES);
}
void GL_DrawSparkedParticle(particle_t *p, part_type_t *type)
void GL_DrawLineSparkParticle(particle_t *p, part_type_t *type)
{
if (lasttype != type)
{
@ -3014,7 +3024,56 @@ void GL_DrawSparkedParticle(particle_t *p, part_type_t *type)
p->rgb[2],
0);
qglVertex3f (p->org[0]-p->vel[0]/10, p->org[1]-p->vel[1]/10, p->org[2]-p->vel[2]/10);
}
void GL_DrawTexturedSparkParticle(particle_t *p, part_type_t *type)
{
vec3_t v, cr, o2, point;
if (lasttype != type)
{
lasttype = type;
qglEnd();
qglEnable(GL_TEXTURE_2D);
GL_Bind(type->texturenum);
if (type->blendmode == BM_ADD) //addative
qglBlendFunc(GL_SRC_ALPHA, GL_ONE);
// else if (type->blendmode == BM_SUBTRACT) //subtractive
// qglBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
else
qglBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
qglShadeModel(GL_SMOOTH);
qglBegin(GL_QUADS);
}
qglColor4f (p->rgb[0],
p->rgb[1],
p->rgb[2],
p->alpha);
VectorSubtract(r_refdef.vieworg, p->org, v);
CrossProduct(v, p->vel, cr);
VectorNormalize(cr);
VectorMA(p->org, -p->scale/2, cr, point);
qglTexCoord2f(0, 0);
qglVertex3fv(point);
VectorMA(p->org, p->scale/2, cr, point);
qglTexCoord2f(0, 1);
qglVertex3fv(point);
VectorMA(p->org, 0.1, p->vel, o2);
VectorSubtract(r_refdef.vieworg, o2, v);
CrossProduct(v, p->vel, cr);
VectorNormalize(cr);
VectorMA(o2, p->scale/2, cr, point);
qglTexCoord2f(1, 1);
qglVertex3fv(point);
VectorMA(o2, -p->scale/2, cr, point);
qglTexCoord2f(1, 0);
qglVertex3fv(point);
}
void GL_DrawSketchSparkParticle(particle_t *p, part_type_t *type)
@ -3364,7 +3423,7 @@ void SWD_DrawParticleBeam(beamseg_t *beam, part_type_t *type)
}
#endif
void DrawParticleTypes (void texturedparticles(particle_t *,part_type_t*), void sparklineparticles(particle_t*,part_type_t*), void sparkfanparticles(particle_t*,part_type_t*), void beamparticlest(beamseg_t*,part_type_t*), void beamparticlesut(beamseg_t*,part_type_t*), void drawdecalparticles(clippeddecal_t*,part_type_t*))
void DrawParticleTypes (void texturedparticles(particle_t *,part_type_t*), void sparklineparticles(particle_t*,part_type_t*), void sparkfanparticles(particle_t*,part_type_t*), void sparktexturedparticles(particle_t*,part_type_t*), void beamparticlest(beamseg_t*,part_type_t*), void beamparticlesut(beamseg_t*,part_type_t*), void drawdecalparticles(clippeddecal_t*,part_type_t*))
{
RSpeedMark();
@ -3489,12 +3548,21 @@ void DrawParticleTypes (void texturedparticles(particle_t *,part_type_t*), void
}
else
{
if (*type->texname)
switch(type->type)
{
default:
pdraw = texturedparticles;
else if (type->scale || type->scaledelta)
pdraw = sparkfanparticles;
else
break;
case PT_SPARK:
pdraw = sparklineparticles;
break;
case PT_SPARKFAN:
pdraw = sparkfanparticles;
break;
case PT_TEXTUREDSPARK:
pdraw = sparktexturedparticles;
break;
}
}
if (!type->die)
@ -3756,7 +3824,7 @@ void DrawParticleTypes (void texturedparticles(particle_t *,part_type_t*), void
}
}
if (type->type == PT_NORMAL)
if (type->type < PT_BEAM)
RQ_AddDistReorder((void*)pdraw, p, type, p->org);
}
@ -3877,9 +3945,9 @@ void P_DrawParticles (void)
qglEnable(GL_POLYGON_OFFSET_FILL);
qglBegin(GL_QUADS);
if (r_drawflat.value == 2)
DrawParticleTypes(GL_DrawSketchParticle, GL_DrawSketchSparkParticle, GL_DrawSketchSparkParticle, GL_DrawParticleBeam_Textured, GL_DrawParticleBeam_Untextured, GL_DrawClippedDecal);
DrawParticleTypes(GL_DrawSketchParticle, GL_DrawSketchSparkParticle, GL_DrawSketchSparkParticle, GL_DrawSketchSparkParticle, GL_DrawParticleBeam_Textured, GL_DrawParticleBeam_Untextured, GL_DrawClippedDecal);
else
DrawParticleTypes(GL_DrawTexturedParticle, GL_DrawSparkedParticle, GL_DrawTrifanParticle, GL_DrawParticleBeam_Textured, GL_DrawParticleBeam_Untextured, GL_DrawClippedDecal);
DrawParticleTypes(GL_DrawTexturedParticle, GL_DrawLineSparkParticle, GL_DrawTrifanParticle, GL_DrawTexturedSparkParticle, GL_DrawParticleBeam_Textured, GL_DrawParticleBeam_Untextured, GL_DrawClippedDecal);
qglEnd();
qglDisable(GL_POLYGON_OFFSET_FILL);
@ -3901,7 +3969,7 @@ void P_DrawParticles (void)
#ifdef SWQUAKE
if (qrenderer == QR_SOFTWARE)
{
DrawParticleTypes(SWD_DrawParticleBlob, SWD_DrawParticleSpark, SWD_DrawParticleSpark, SWD_DrawParticleBeam, SWD_DrawParticleBeam, NULL);
DrawParticleTypes(SWD_DrawParticleBlob, SWD_DrawParticleSpark, SWD_DrawParticleSpark, SWD_DrawParticleSpark, SWD_DrawParticleBeam, SWD_DrawParticleBeam, NULL);
RSpeedRemark();
D_StartParticles();

View file

@ -162,6 +162,7 @@ qboolean GLR_CheckSky(void);
void GLR_AddEfrags (entity_t *ent);
void GLR_RemoveEfrags (entity_t *ent);
void GLR_PreNewMap(void);
void GLR_NewMap (void);
void GLR_PushDlights (void);
@ -173,8 +174,23 @@ void GLR_LessenStains(void);
void MediaGL_ShowFrame8bit(qbyte *framedata, int inwidth, int inheight, qbyte *palette);
void MediaGL_ShowFrameRGBA_32(qbyte *framedata, int inwidth, int inheight); //top down
void MediaGL_ShowFrameBGR_24_Flip(qbyte *framedata, int inwidth, int inheight); //input is bottom up...
void GLR_SetSky (char *name, float rotate, vec3_t axis);
qboolean GLR_CheckSky(void);
void GLR_AddStain(vec3_t org, float red, float green, float blue, float radius);
void GLR_LessenStains(void);
void GLVID_DeInit (void);
void GLR_DeInit (void);
void GLSCR_DeInit (void);
int GLR_LightPoint (vec3_t p);
#endif
#if defined(SWQUAKE)
void SWR_Init (void);
void SWR_InitTextures (void);
@ -199,6 +215,17 @@ void SWR_LessenStains(void);
void MediaSW_ShowFrame8bit(qbyte *framedata, int inwidth, int inheight, qbyte *palette);
void MediaSW_ShowFrameRGBA_32(qbyte *framedata, int inwidth, int inheight); //top down
void MediaSW_ShowFrameBGR_24_Flip(qbyte *framedata, int inwidth, int inheight); //input is bottom up...
void SWR_SetSky (char *name, float rotate, vec3_t axis);
qboolean SWR_CheckSky(void);
void SWR_AddStain(vec3_t org, float red, float green, float blue, float radius);
void SWR_LessenStains(void);
void SWVID_Shutdown (void);
void SWR_DeInit (void);
void SWSCR_DeInit (void);
int SWR_LightPoint (vec3_t p);
#endif
void R_AddEfrags (entity_t *ent);
@ -327,6 +354,8 @@ extern cvar_t gl_polyblend;
extern cvar_t gl_keeptjunctions;
extern cvar_t gl_reporttjunctions;
extern cvar_t r_flashblend;
extern cvar_t r_lightstylesmooth;
extern cvar_t r_lightstylespeed;
extern cvar_t gl_nocolors;
extern cvar_t gl_load24bit;
extern cvar_t gl_finish;

File diff suppressed because it is too large Load diff

View file

@ -61,9 +61,6 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#ifdef NO_OGG
#undef AVAIL_OGGVORBIS
#endif
#if defined(NO_D3D) || !defined(_WIN32)
#undef AVAIL_DX7
#endif
#if defined(NO_MASM) || !defined(_WIN32)
#undef AVAIL_MASM
#endif
@ -88,7 +85,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#undef AVAIL_JPEGLIB //no jpeg support
#undef AVAIL_PNGLIB //no png support
#undef USE_MADLIB //no internal mp3 playing
#undef AVAIL_DX7 //no d3d support
#undef USE_D3D //no d3d support
#define NOMEDIA //NO playing of avis/cins/roqs
#define MD3MODELS //we DO want to use quake3 alias models. This might be a minimal build, but we still want this.
@ -172,8 +169,8 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#endif
#endif
#ifdef NODIRECTX
#undef AVAIL_DX7
#if defined(NODIRECTX) || (!defined(GLQUAKE) && !defined(RGLQUAKE))
#undef USE_D3D
#endif

View file

@ -63,7 +63,7 @@ BSC32=bscmake.exe
# ADD BSC32 /nologo
LINK32=link.exe
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /machine:I386
# ADD LINK32 comctl32.lib wsock32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib winmm.lib /nologo /subsystem:windows /pdb:none /machine:I386 /out:"../../fteswqw.exe"
# ADD LINK32 comctl32.lib wsock32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib winmm.lib /nologo /subsystem:windows /pdb:none /machine:I386 /out:"../../fteswqw.exe" /libpath:"../libs/dxsdk7/lib"
!ELSEIF "$(CFG)" == "ftequake - Win32 Debug"
@ -89,7 +89,7 @@ BSC32=bscmake.exe
# ADD BSC32 /nologo
LINK32=link.exe
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /debug /machine:I386 /pdbtype:sept
# ADD LINK32 comctl32.lib wsock32.lib winmm.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /debug /machine:I386 /out:"../../fteswqw_dbg.exe"
# ADD LINK32 comctl32.lib wsock32.lib winmm.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /debug /machine:I386 /out:"../../fteswqw_dbg.exe" /libpath:"../libs/dxsdk7/lib"
# SUBTRACT LINK32 /pdb:none
!ELSEIF "$(CFG)" == "ftequake - Win32 GLDebug"
@ -117,7 +117,7 @@ BSC32=bscmake.exe
# ADD BSC32 /nologo
LINK32=link.exe
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /debug /machine:I386 /pdbtype:sept
# ADD LINK32 comctl32.lib wsock32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib winmm.lib /nologo /subsystem:windows /debug /machine:I386 /out:"../../fteglqw_dbg.exe"
# ADD LINK32 comctl32.lib wsock32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib winmm.lib /nologo /subsystem:windows /debug /machine:I386 /out:"../../fteglqw_dbg.exe" /libpath:"../libs/dxsdk7/lib"
# SUBTRACT LINK32 /pdb:none
!ELSEIF "$(CFG)" == "ftequake - Win32 GLRelease"
@ -145,7 +145,7 @@ BSC32=bscmake.exe
# ADD BSC32 /nologo
LINK32=link.exe
# ADD BASE LINK32 comctl32.lib ..\dxsdk\sdk\lib\dxguid.lib wsock32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib winmm.lib /nologo /subsystem:windows /machine:I386 /out:"../../../fteqw.exe"
# ADD LINK32 comctl32.lib wsock32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib winmm.lib /nologo /subsystem:windows /pdb:none /map /machine:I386 /out:"../../fteglqw.exe"
# ADD LINK32 comctl32.lib wsock32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib winmm.lib /nologo /subsystem:windows /pdb:none /map /machine:I386 /out:"../../fteglqw.exe" /libpath:"../libs/dxsdk7/lib"
# SUBTRACT LINK32 /debug
!ELSEIF "$(CFG)" == "ftequake - Win32 MDebug"
@ -163,7 +163,7 @@ LINK32=link.exe
# PROP Ignore_Export_Lib 0
# PROP Target_Dir ""
# ADD BASE CPP /nologo /G5 /ML /W3 /GX /ZI /Od /I "..\client\gltod3d\sdk7\include" /I "..\client\gltod3d\D3DFrame" /I "..\dxsdk\sdk\inc" /I "..\scitech\include" /I "..\client" /D "NQPROT" /D "_DEBUG" /D "GLQUAKE" /D "SERVERDLL" /D "WIN32" /D "_WINDOWS" /FR".\GLDebug/" /Fp".\GLDebug/qwcl.pch" /YX /Fo".\GLDebug/" /Fd".\GLDebug/" /FD /c
# ADD CPP /nologo /G5 /W3 /Gi /GX /ZI /Od /I "..\client" /I "../libs/dxsdk7/include" /I "../common" /I "../server" /I "../gl" /I "../sw" /I "../qclib" /I "../libs" /D "_DEBUG" /D "WIN32" /D "_WINDOWS" /D "GLQUAKE" /D "SWQUAKE" /D "AVAIL_DX7" /Fr /Fp".\MDebug/qwcl.pch" /Yu"quakedef.h" /FD /c
# ADD CPP /nologo /G5 /W3 /Gi /GX /ZI /Od /I "..\client" /I "../libs/dxsdk7/include" /I "../common" /I "../server" /I "../gl" /I "../sw" /I "../qclib" /I "../libs" /D "_DEBUG" /D "WIN32" /D "_WINDOWS" /D "GLQUAKE" /D "SWQUAKE" /D "USE_D3D" /Fr /Fp".\MDebug/qwcl.pch" /Yu"quakedef.h" /FD /c
# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32
# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32
# ADD BASE RSC /l 0x809 /d "_DEBUG"
@ -174,7 +174,7 @@ BSC32=bscmake.exe
LINK32=link.exe
# ADD BASE LINK32 comctl32.lib wsock32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib winmm.lib /nologo /subsystem:windows /pdb:".\GLDebug/dglqwcl.pdb" /debug /machine:I386 /out:"../../../fteglqw.exe"
# SUBTRACT BASE LINK32 /pdb:none
# ADD LINK32 comctl32.lib wsock32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib winmm.lib /nologo /subsystem:windows /map /debug /machine:I386 /out:"../../fteqw_dbg.exe"
# ADD LINK32 comctl32.lib wsock32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib winmm.lib /nologo /subsystem:windows /map /debug /machine:I386 /out:"../../fteqw_dbg.exe" /libpath:"../libs/dxsdk7/lib"
# SUBTRACT LINK32 /profile /pdb:none
!ELSEIF "$(CFG)" == "ftequake - Win32 MRelease"
@ -192,7 +192,7 @@ LINK32=link.exe
# PROP Ignore_Export_Lib 0
# PROP Target_Dir ""
# ADD BASE CPP /nologo /W3 /GX /O2 /I "..\client\gltod3d\sdk7\include" /I "..\client\gltod3d\D3DFrame" /I "..\dxsdk\sdk\inc" /I "..\scitech\include" /I "..\client" /D "NOSOUNDASM" /D "NDEBUG" /D "_MBCS" /D "GLQUAKE" /D "SERVERDLL" /D "NQPROT" /D "WIN32" /D "_WINDOWS" /FR /YX /FD /c
# ADD CPP /nologo /G6 /GX /O2 /I "..\client" /I "../libs/dxsdk7/include" /I "../common" /I "../server" /I "../gl" /I "../sw" /I "../qclib" /I "../libs" /D "NDEBUG" /D "_MBCS" /D "WIN32" /D "_WINDOWS" /D "GLQUAKE" /D "SWQUAKE" /D "AVAIL_DX7" /Fr /Yu"quakedef.h" /FD /c
# ADD CPP /nologo /G6 /GX /O2 /I "..\client" /I "../libs/dxsdk7/include" /I "../common" /I "../server" /I "../gl" /I "../sw" /I "../qclib" /I "../libs" /D "NDEBUG" /D "_MBCS" /D "WIN32" /D "_WINDOWS" /D "GLQUAKE" /D "SWQUAKE" /D "USE_D3D" /Fr /Yu"quakedef.h" /FD /c
# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32
# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32
# ADD BASE RSC /l 0x809 /d "NDEBUG"
@ -202,7 +202,7 @@ BSC32=bscmake.exe
# ADD BSC32 /nologo
LINK32=link.exe
# ADD BASE LINK32 comctl32.lib wsock32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib winmm.lib /nologo /subsystem:windows /machine:I386 /out:"../../../fteglqw.exe"
# ADD LINK32 comctl32.lib wsock32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib winmm.lib /nologo /subsystem:windows /pdb:none /map /machine:I386 /out:"../../fteqw.exe"
# ADD LINK32 comctl32.lib wsock32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib winmm.lib /nologo /subsystem:windows /pdb:none /map /machine:I386 /out:"../../fteqw.exe" /libpath:"../libs/dxsdk7/lib"
!ELSEIF "$(CFG)" == "ftequake - Win32 MinGLDebug"
@ -230,7 +230,7 @@ BSC32=bscmake.exe
LINK32=link.exe
# ADD BASE LINK32 comctl32.lib wsock32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib winmm.lib /nologo /subsystem:windows /pdb:".\GLDebug/dglqwcl.pdb" /debug /machine:I386 /out:"../../../fteglqw.exe"
# SUBTRACT BASE LINK32 /pdb:none
# ADD LINK32 comctl32.lib wsock32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib winmm.lib /nologo /subsystem:windows /pdb:none /debug /machine:I386 /out:"../../fteminglqw_dbg.exe"
# ADD LINK32 comctl32.lib wsock32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib winmm.lib /nologo /subsystem:windows /pdb:none /debug /machine:I386 /out:"../../fteminglqw_dbg.exe" /libpath:"../libs/dxsdk7/lib"
!ELSEIF "$(CFG)" == "ftequake - Win32 MinGLRelease"
@ -257,7 +257,7 @@ BSC32=bscmake.exe
# ADD BSC32 /nologo
LINK32=link.exe
# ADD BASE LINK32 comctl32.lib wsock32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib winmm.lib /nologo /subsystem:windows /machine:I386 /out:"../../../fteglqw.exe"
# ADD LINK32 wsock32.lib winmm.lib kernel32.lib user32.lib gdi32.lib /nologo /subsystem:windows /pdb:none /machine:I386 /out:"../../fteminglqw.exe"
# ADD LINK32 wsock32.lib winmm.lib kernel32.lib user32.lib gdi32.lib /nologo /subsystem:windows /pdb:none /machine:I386 /out:"../../fteminglqw.exe" /libpath:"../libs/dxsdk7/lib"
!ELSEIF "$(CFG)" == "ftequake - Win32 Debug Dedicated Server"
@ -286,7 +286,7 @@ BSC32=bscmake.exe
LINK32=link.exe
# ADD BASE LINK32 comctl32.lib wsock32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib winmm.lib /nologo /subsystem:windows /pdb:".\GLDebug/dglqwcl.pdb" /debug /machine:I386 /out:"../../../fteminglqw.exe"
# SUBTRACT BASE LINK32 /pdb:none
# ADD LINK32 comctl32.lib wsock32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib winmm.lib /nologo /subsystem:console /pdb:none /debug /machine:I386 /out:"../../fteqwsv.exe"
# ADD LINK32 comctl32.lib wsock32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib winmm.lib /nologo /subsystem:console /pdb:none /debug /machine:I386 /out:"../../fteqwsv.exe" /libpath:"../libs/dxsdk7/lib"
!ELSEIF "$(CFG)" == "ftequake - Win32 Release Dedicated Server"
@ -314,7 +314,7 @@ BSC32=bscmake.exe
LINK32=link.exe
# ADD BASE LINK32 comctl32.lib wsock32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib winmm.lib /nologo /subsystem:console /pdb:".\GLDebug/dglqwcl.pdb" /debug /machine:I386 /out:"../../../fteminglqw.exe"
# SUBTRACT BASE LINK32 /pdb:none
# ADD LINK32 winmm.lib wsock32.lib user32.lib shell32.lib Advapi32.lib /nologo /subsystem:console /pdb:none /map /machine:I386 /out:"../../fteqwsv.exe"
# ADD LINK32 winmm.lib wsock32.lib user32.lib shell32.lib Advapi32.lib /nologo /subsystem:console /pdb:none /map /machine:I386 /out:"../../fteqwsv.exe" /libpath:"../libs/dxsdk7/lib"
# SUBTRACT LINK32 /debug
!ELSEIF "$(CFG)" == "ftequake - Win32 MinSW"
@ -342,7 +342,7 @@ BSC32=bscmake.exe
# ADD BSC32 /nologo
LINK32=link.exe
# ADD BASE LINK32 comctl32.lib wsock32.lib winmm.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /debug /machine:I386 /out:"../../fteswqw_dbg.exe" /pdbtype:sept
# ADD LINK32 comctl32.lib wsock32.lib winmm.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /pdb:none /debug /machine:I386 /out:"../../fteswqw_dbg.exe"
# ADD LINK32 comctl32.lib wsock32.lib winmm.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /pdb:none /debug /machine:I386 /out:"../../fteswqw_dbg.exe" /libpath:"../libs/dxsdk7/lib"
!ELSEIF "$(CFG)" == "ftequake - Win32 GLDebugQ3"
@ -371,7 +371,7 @@ BSC32=bscmake.exe
LINK32=link.exe
# ADD BASE LINK32 comctl32.lib wsock32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib winmm.lib /nologo /subsystem:windows /pdb:".\GLDebug/dglqwcl.pdb" /debug /machine:I386 /out:"../../fteglqw_dbg.exe"
# SUBTRACT BASE LINK32 /pdb:none
# ADD LINK32 comctl32.lib wsock32.lib winmm.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /debug /machine:I386 /out:"../../fteglqw_dbg.exe"
# ADD LINK32 comctl32.lib wsock32.lib winmm.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /debug /machine:I386 /out:"../../fteglqw_dbg.exe" /libpath:"../libs/dxsdk7/lib"
# SUBTRACT LINK32 /pdb:none
!ENDIF
@ -2099,6 +2099,37 @@ SOURCE=..\client\skin.c
# Begin Source File
SOURCE=..\client\snd_directx.c
!IF "$(CFG)" == "ftequake - Win32 Release"
!ELSEIF "$(CFG)" == "ftequake - Win32 Debug"
!ELSEIF "$(CFG)" == "ftequake - Win32 GLDebug"
!ELSEIF "$(CFG)" == "ftequake - Win32 GLRelease"
!ELSEIF "$(CFG)" == "ftequake - Win32 MDebug"
!ELSEIF "$(CFG)" == "ftequake - Win32 MRelease"
!ELSEIF "$(CFG)" == "ftequake - Win32 MinGLDebug"
!ELSEIF "$(CFG)" == "ftequake - Win32 MinGLRelease"
!ELSEIF "$(CFG)" == "ftequake - Win32 Debug Dedicated Server"
# PROP Exclude_From_Build 1
!ELSEIF "$(CFG)" == "ftequake - Win32 Release Dedicated Server"
# PROP Exclude_From_Build 1
!ELSEIF "$(CFG)" == "ftequake - Win32 MinSW"
!ELSEIF "$(CFG)" == "ftequake - Win32 GLDebugQ3"
!ENDIF
# End Source File
# Begin Source File
@ -5006,449 +5037,45 @@ SOURCE=..\common\zone.c
# Begin Source File
SOURCE=..\QCLIB\Comprout.c
!IF "$(CFG)" == "ftequake - Win32 Release"
# SUBTRACT CPP /YX /Yc /Yu
!ELSEIF "$(CFG)" == "ftequake - Win32 Debug"
# SUBTRACT CPP /YX /Yc /Yu
!ELSEIF "$(CFG)" == "ftequake - Win32 GLDebug"
# SUBTRACT CPP /YX /Yc /Yu
!ELSEIF "$(CFG)" == "ftequake - Win32 GLRelease"
# SUBTRACT CPP /YX /Yc /Yu
!ELSEIF "$(CFG)" == "ftequake - Win32 MDebug"
# SUBTRACT CPP /YX /Yc /Yu
!ELSEIF "$(CFG)" == "ftequake - Win32 MRelease"
# SUBTRACT CPP /YX /Yc /Yu
!ELSEIF "$(CFG)" == "ftequake - Win32 MinGLDebug"
# SUBTRACT CPP /YX /Yc /Yu
!ELSEIF "$(CFG)" == "ftequake - Win32 MinGLRelease"
# SUBTRACT CPP /YX /Yc /Yu
!ELSEIF "$(CFG)" == "ftequake - Win32 Debug Dedicated Server"
# SUBTRACT CPP /YX /Yc /Yu
!ELSEIF "$(CFG)" == "ftequake - Win32 Release Dedicated Server"
# SUBTRACT CPP /YX /Yc /Yu
!ELSEIF "$(CFG)" == "ftequake - Win32 MinSW"
# SUBTRACT CPP /YX /Yc /Yu
!ELSEIF "$(CFG)" == "ftequake - Win32 GLDebugQ3"
# SUBTRACT CPP /YX /Yc /Yu
!ENDIF
# End Source File
# Begin Source File
SOURCE=..\qclib\execloop.h
!IF "$(CFG)" == "ftequake - Win32 Release"
!ELSEIF "$(CFG)" == "ftequake - Win32 Debug"
!ELSEIF "$(CFG)" == "ftequake - Win32 GLDebug"
!ELSEIF "$(CFG)" == "ftequake - Win32 GLRelease"
!ELSEIF "$(CFG)" == "ftequake - Win32 MDebug"
!ELSEIF "$(CFG)" == "ftequake - Win32 MRelease"
!ELSEIF "$(CFG)" == "ftequake - Win32 MinGLDebug"
!ELSEIF "$(CFG)" == "ftequake - Win32 MinGLRelease"
!ELSEIF "$(CFG)" == "ftequake - Win32 Debug Dedicated Server"
!ELSEIF "$(CFG)" == "ftequake - Win32 Release Dedicated Server"
!ELSEIF "$(CFG)" == "ftequake - Win32 MinSW"
!ELSEIF "$(CFG)" == "ftequake - Win32 GLDebugQ3"
!ENDIF
# End Source File
# Begin Source File
SOURCE=..\QCLIB\hash.c
!IF "$(CFG)" == "ftequake - Win32 Release"
# SUBTRACT CPP /YX /Yc /Yu
!ELSEIF "$(CFG)" == "ftequake - Win32 Debug"
# SUBTRACT CPP /YX /Yc /Yu
!ELSEIF "$(CFG)" == "ftequake - Win32 GLDebug"
# SUBTRACT CPP /YX /Yc /Yu
!ELSEIF "$(CFG)" == "ftequake - Win32 GLRelease"
# SUBTRACT CPP /YX /Yc /Yu
!ELSEIF "$(CFG)" == "ftequake - Win32 MDebug"
# SUBTRACT CPP /YX /Yc /Yu
!ELSEIF "$(CFG)" == "ftequake - Win32 MRelease"
# SUBTRACT CPP /YX /Yc /Yu
!ELSEIF "$(CFG)" == "ftequake - Win32 MinGLDebug"
# SUBTRACT CPP /YX /Yc /Yu
!ELSEIF "$(CFG)" == "ftequake - Win32 MinGLRelease"
# SUBTRACT CPP /YX /Yc /Yu
!ELSEIF "$(CFG)" == "ftequake - Win32 Debug Dedicated Server"
# SUBTRACT CPP /YX /Yc /Yu
!ELSEIF "$(CFG)" == "ftequake - Win32 Release Dedicated Server"
# SUBTRACT CPP /YX /Yc /Yu
!ELSEIF "$(CFG)" == "ftequake - Win32 MinSW"
# SUBTRACT CPP /YX /Yc /Yu
!ELSEIF "$(CFG)" == "ftequake - Win32 GLDebugQ3"
# SUBTRACT CPP /YX /Yc /Yu
!ENDIF
# End Source File
# Begin Source File
SOURCE=..\QCLIB\initlib.c
!IF "$(CFG)" == "ftequake - Win32 Release"
# SUBTRACT CPP /YX /Yc /Yu
!ELSEIF "$(CFG)" == "ftequake - Win32 Debug"
# SUBTRACT CPP /YX /Yc /Yu
!ELSEIF "$(CFG)" == "ftequake - Win32 GLDebug"
# SUBTRACT CPP /YX /Yc /Yu
!ELSEIF "$(CFG)" == "ftequake - Win32 GLRelease"
# SUBTRACT CPP /YX /Yc /Yu
!ELSEIF "$(CFG)" == "ftequake - Win32 MDebug"
# SUBTRACT CPP /YX /Yc /Yu
!ELSEIF "$(CFG)" == "ftequake - Win32 MRelease"
# SUBTRACT CPP /YX /Yc /Yu
!ELSEIF "$(CFG)" == "ftequake - Win32 MinGLDebug"
# SUBTRACT CPP /YX /Yc /Yu
!ELSEIF "$(CFG)" == "ftequake - Win32 MinGLRelease"
# SUBTRACT CPP /YX /Yc /Yu
!ELSEIF "$(CFG)" == "ftequake - Win32 Debug Dedicated Server"
# SUBTRACT CPP /YX /Yc /Yu
!ELSEIF "$(CFG)" == "ftequake - Win32 Release Dedicated Server"
# SUBTRACT CPP /YX /Yc /Yu
!ELSEIF "$(CFG)" == "ftequake - Win32 MinSW"
# SUBTRACT CPP /YX /Yc /Yu
!ELSEIF "$(CFG)" == "ftequake - Win32 GLDebugQ3"
# SUBTRACT CPP /YX /Yc /Yu
!ENDIF
# End Source File
# Begin Source File
SOURCE=..\QCLIB\pr_edict.c
!IF "$(CFG)" == "ftequake - Win32 Release"
# SUBTRACT CPP /YX /Yc /Yu
!ELSEIF "$(CFG)" == "ftequake - Win32 Debug"
# SUBTRACT CPP /YX /Yc /Yu
!ELSEIF "$(CFG)" == "ftequake - Win32 GLDebug"
# SUBTRACT CPP /YX /Yc /Yu
!ELSEIF "$(CFG)" == "ftequake - Win32 GLRelease"
# SUBTRACT CPP /YX /Yc /Yu
!ELSEIF "$(CFG)" == "ftequake - Win32 MDebug"
# SUBTRACT CPP /YX /Yc /Yu
!ELSEIF "$(CFG)" == "ftequake - Win32 MRelease"
# SUBTRACT CPP /YX /Yc /Yu
!ELSEIF "$(CFG)" == "ftequake - Win32 MinGLDebug"
# SUBTRACT CPP /YX /Yc /Yu
!ELSEIF "$(CFG)" == "ftequake - Win32 MinGLRelease"
# SUBTRACT CPP /YX /Yc /Yu
!ELSEIF "$(CFG)" == "ftequake - Win32 Debug Dedicated Server"
# SUBTRACT CPP /YX /Yc /Yu
!ELSEIF "$(CFG)" == "ftequake - Win32 Release Dedicated Server"
# SUBTRACT CPP /YX /Yc /Yu
!ELSEIF "$(CFG)" == "ftequake - Win32 MinSW"
# SUBTRACT CPP /YX /Yc /Yu
!ELSEIF "$(CFG)" == "ftequake - Win32 GLDebugQ3"
# SUBTRACT CPP /YX /Yc /Yu
!ENDIF
# End Source File
# Begin Source File
SOURCE=..\QCLIB\Pr_exec.c
!IF "$(CFG)" == "ftequake - Win32 Release"
# SUBTRACT CPP /WX /YX /Yc /Yu
!ELSEIF "$(CFG)" == "ftequake - Win32 Debug"
# SUBTRACT CPP /WX /YX /Yc /Yu
!ELSEIF "$(CFG)" == "ftequake - Win32 GLDebug"
# SUBTRACT CPP /WX /YX /Yc /Yu
!ELSEIF "$(CFG)" == "ftequake - Win32 GLRelease"
# SUBTRACT CPP /WX /YX /Yc /Yu
!ELSEIF "$(CFG)" == "ftequake - Win32 MDebug"
# SUBTRACT CPP /WX /YX /Yc /Yu
!ELSEIF "$(CFG)" == "ftequake - Win32 MRelease"
# SUBTRACT CPP /WX /YX /Yc /Yu
!ELSEIF "$(CFG)" == "ftequake - Win32 MinGLDebug"
# SUBTRACT CPP /WX /YX /Yc /Yu
!ELSEIF "$(CFG)" == "ftequake - Win32 MinGLRelease"
# SUBTRACT CPP /WX /YX /Yc /Yu
!ELSEIF "$(CFG)" == "ftequake - Win32 Debug Dedicated Server"
# SUBTRACT CPP /WX /YX /Yc /Yu
!ELSEIF "$(CFG)" == "ftequake - Win32 Release Dedicated Server"
# SUBTRACT CPP /WX /YX /Yc /Yu
!ELSEIF "$(CFG)" == "ftequake - Win32 MinSW"
# SUBTRACT CPP /WX /YX /Yc /Yu
!ELSEIF "$(CFG)" == "ftequake - Win32 GLDebugQ3"
# SUBTRACT CPP /WX /YX /Yc /Yu
!ENDIF
# End Source File
# Begin Source File
SOURCE=..\QCLIB\pr_multi.c
!IF "$(CFG)" == "ftequake - Win32 Release"
# SUBTRACT CPP /YX /Yc /Yu
!ELSEIF "$(CFG)" == "ftequake - Win32 Debug"
# SUBTRACT CPP /YX /Yc /Yu
!ELSEIF "$(CFG)" == "ftequake - Win32 GLDebug"
# SUBTRACT CPP /YX /Yc /Yu
!ELSEIF "$(CFG)" == "ftequake - Win32 GLRelease"
# SUBTRACT CPP /YX /Yc /Yu
!ELSEIF "$(CFG)" == "ftequake - Win32 MDebug"
# SUBTRACT CPP /YX /Yc /Yu
!ELSEIF "$(CFG)" == "ftequake - Win32 MRelease"
# SUBTRACT CPP /YX /Yc /Yu
!ELSEIF "$(CFG)" == "ftequake - Win32 MinGLDebug"
# SUBTRACT CPP /YX /Yc /Yu
!ELSEIF "$(CFG)" == "ftequake - Win32 MinGLRelease"
# SUBTRACT CPP /YX /Yc /Yu
!ELSEIF "$(CFG)" == "ftequake - Win32 Debug Dedicated Server"
# SUBTRACT CPP /YX /Yc /Yu
!ELSEIF "$(CFG)" == "ftequake - Win32 Release Dedicated Server"
# SUBTRACT CPP /YX /Yc /Yu
!ELSEIF "$(CFG)" == "ftequake - Win32 MinSW"
# SUBTRACT CPP /YX /Yc /Yu
!ELSEIF "$(CFG)" == "ftequake - Win32 GLDebugQ3"
# SUBTRACT CPP /YX /Yc /Yu
!ENDIF
# End Source File
# Begin Source File
SOURCE=..\QCLIB\progtype.h
!IF "$(CFG)" == "ftequake - Win32 Release"
!ELSEIF "$(CFG)" == "ftequake - Win32 Debug"
!ELSEIF "$(CFG)" == "ftequake - Win32 GLDebug"
!ELSEIF "$(CFG)" == "ftequake - Win32 GLRelease"
!ELSEIF "$(CFG)" == "ftequake - Win32 MDebug"
!ELSEIF "$(CFG)" == "ftequake - Win32 MRelease"
!ELSEIF "$(CFG)" == "ftequake - Win32 MinGLDebug"
!ELSEIF "$(CFG)" == "ftequake - Win32 MinGLRelease"
!ELSEIF "$(CFG)" == "ftequake - Win32 Debug Dedicated Server"
!ELSEIF "$(CFG)" == "ftequake - Win32 Release Dedicated Server"
!ELSEIF "$(CFG)" == "ftequake - Win32 MinSW"
!ELSEIF "$(CFG)" == "ftequake - Win32 GLDebugQ3"
!ENDIF
# End Source File
# Begin Source File
SOURCE=..\QCLIB\qcc_cmdlib.c
!IF "$(CFG)" == "ftequake - Win32 Release"
# SUBTRACT CPP /YX /Yc /Yu
!ELSEIF "$(CFG)" == "ftequake - Win32 Debug"
# SUBTRACT CPP /YX /Yc /Yu
!ELSEIF "$(CFG)" == "ftequake - Win32 GLDebug"
# SUBTRACT CPP /YX /Yc /Yu
!ELSEIF "$(CFG)" == "ftequake - Win32 GLRelease"
# SUBTRACT CPP /YX /Yc /Yu
!ELSEIF "$(CFG)" == "ftequake - Win32 MDebug"
# SUBTRACT CPP /YX /Yc /Yu
!ELSEIF "$(CFG)" == "ftequake - Win32 MRelease"
# SUBTRACT CPP /YX /Yc /Yu
!ELSEIF "$(CFG)" == "ftequake - Win32 MinGLDebug"
# SUBTRACT CPP /YX /Yc /Yu
!ELSEIF "$(CFG)" == "ftequake - Win32 MinGLRelease"
# SUBTRACT CPP /YX /Yc /Yu
!ELSEIF "$(CFG)" == "ftequake - Win32 Debug Dedicated Server"
# SUBTRACT CPP /YX /Yc /Yu
!ELSEIF "$(CFG)" == "ftequake - Win32 Release Dedicated Server"
# SUBTRACT CPP /YX /Yc /Yu
!ELSEIF "$(CFG)" == "ftequake - Win32 MinSW"
# SUBTRACT CPP /YX /Yc /Yu
!ELSEIF "$(CFG)" == "ftequake - Win32 GLDebugQ3"
# SUBTRACT CPP /YX /Yc /Yu
!ENDIF
# End Source File
# Begin Source File
@ -5621,57 +5248,7 @@ SOURCE=..\QCLIB\QccMain.c
# Begin Source File
SOURCE=..\QCLIB\qcd_main.c
!IF "$(CFG)" == "ftequake - Win32 Release"
# SUBTRACT CPP /YX /Yc /Yu
!ELSEIF "$(CFG)" == "ftequake - Win32 Debug"
# SUBTRACT CPP /YX /Yc /Yu
!ELSEIF "$(CFG)" == "ftequake - Win32 GLDebug"
# SUBTRACT CPP /YX /Yc /Yu
!ELSEIF "$(CFG)" == "ftequake - Win32 GLRelease"
# SUBTRACT CPP /YX /Yc /Yu
!ELSEIF "$(CFG)" == "ftequake - Win32 MDebug"
# SUBTRACT CPP /YX /Yc /Yu
!ELSEIF "$(CFG)" == "ftequake - Win32 MRelease"
# SUBTRACT CPP /YX /Yc /Yu
!ELSEIF "$(CFG)" == "ftequake - Win32 MinGLDebug"
# SUBTRACT CPP /YX /Yc /Yu
!ELSEIF "$(CFG)" == "ftequake - Win32 MinGLRelease"
# SUBTRACT CPP /YX /Yc /Yu
!ELSEIF "$(CFG)" == "ftequake - Win32 Debug Dedicated Server"
# SUBTRACT CPP /YX /Yc /Yu
!ELSEIF "$(CFG)" == "ftequake - Win32 Release Dedicated Server"
# SUBTRACT CPP /YX /Yc /Yu
!ELSEIF "$(CFG)" == "ftequake - Win32 MinSW"
# SUBTRACT CPP /YX /Yc /Yu
!ELSEIF "$(CFG)" == "ftequake - Win32 GLDebugQ3"
# SUBTRACT CPP /YX /Yc /Yu
!ENDIF
# End Source File
# Begin Source File

View file

@ -33,12 +33,22 @@ R_AnimateLight
*/
void GLR_AnimateLight (void)
{
int i,j,k;
int i,j;
int v1, v2;
float f;
//
// light animations
// 'm' is normal light, 'a' is no light, 'z' is double bright
i = (int)(cl.time*10);
f = (cl.time*r_lightstylespeed.value);
if (f < 0)
f = 0;
i = (int)f;
if (r_lightstylesmooth.value)
f -= i; //this can require updates at 1000 times a second.. Depends on your framerate of course
else
f = 0; //only update them 10 times a second
for (j=0 ; j<MAX_LIGHTSTYLES ; j++)
{
if (!cl_lightstyle[j].length)
@ -47,10 +57,13 @@ void GLR_AnimateLight (void)
cl_lightstyle[j].colour = 7;
continue;
}
k = i % cl_lightstyle[j].length;
k = cl_lightstyle[j].map[k] - 'a';
k = k*22;
d_lightstylevalue[j] = k;
v1 = i % cl_lightstyle[j].length;
v1 = cl_lightstyle[j].map[v1] - 'a';
v2 = (i+1) % cl_lightstyle[j].length;
v2 = cl_lightstyle[j].map[v2] - 'a';
d_lightstylevalue[j] = (v1*(1-f) + v2*(f))*22;
}
}

View file

@ -63,7 +63,7 @@ extern cvar_t vid_conwidth;
typedef enum {MS_WINDOWED, MS_FULLSCREEN, MS_FULLDIB, MS_UNINIT} modestate_t;
#ifdef AVAIL_DX7
#ifdef USE_D3D
void D3DInitialize(void);
void d3dSetMode(int fullscreen, int width, int height, int bpp, int zbpp);
#endif
@ -713,7 +713,7 @@ qboolean VID_AttachGL (rendererstate_t *info)
{ //make sure we can get a valid renderer.
do
{
#ifdef AVAIL_DX7
#ifdef USE_D3D
if (!Q_strcasecmp(info->glrenderer, "D3D"))
{
extern cvar_t gl_ztrick;

View file

@ -26,7 +26,7 @@ the fact that it uses wrapper functions to call methods in a class could be a re
#include "bothdefs.h" //our always-present config file
#ifdef AVAIL_DX7
#ifdef USE_D3D
#define WIN32_LEAN_AND_MEAN
@ -56,9 +56,9 @@ the fact that it uses wrapper functions to call methods in a class could be a re
#define D3D_OVERLOADS
#define RELEASENULL(object) if (object) {object->Release();}
#include "dxsdk7/include/ddraw.h"
#include "dxsdk7/include/d3d.h"
#include "dxsdk7/include/d3dx.h"
#include "ddraw.h"
#include "d3d.h"
#include "d3dx.h"
typedef HRESULT (WINAPI *qD3DXInitialize_t)();
qD3DXInitialize_t qD3DXInitialize;
@ -83,11 +83,11 @@ qD3DXMakeDDPixelFormat_t qD3DXMakeDDPixelFormat;
typedef D3DXMATRIX* (WINAPI *qD3DXMatrixTranslation_t) ( D3DXMATRIX *pOut, float x, float y, float z );
qD3DXMatrixTranslation_t qD3DXMatrixTranslation;
#include "quakedef.h"
extern "C" {
#include "quakedef.h"
#include "glquake.h"
}
#ifdef AVAIL_DX7
#ifdef USE_D3D
// Choose one of the following. D3DXContext is new in DX7, and
// provides a standard way of managing DX. D3DFrame is from
@ -109,9 +109,9 @@ extern "C" {
// #define USE_D3DFRAME
#ifdef USE_D3DFRAME
#include "sdk7/include/d3denum.h"
#include "sdk7/include/d3dframe.h"
#include "sdk7/include/d3dutil.h"
#include "d3denum.h"
#include "d3dframe.h"
#include "d3dutil.h"
#endif
#if 0
@ -3554,6 +3554,12 @@ void APIENTRY D3DViewport (GLint x, GLint y, GLsizei width, GLsizei height){
gFakeGL->cglViewport(x, y, width, height);
}
int APIENTRY D3DGetError (void)
{
return 0;
}
HDC gHDC;
HGLRC gHGLRC;
@ -4039,6 +4045,8 @@ d3dglfunc_t glfuncs[] = {
{"glColorPointer", (PROC)D3DColorPointer},
{"glEnableClientState", (PROC)D3DEnableClientState},
{"glDisableClientState", (PROC)D3DDisableClientState},
{"glGetError", (PROC)D3DGetError},
/*
qwglCreateContext = D3DwglCreateContext;
qwglDeleteContext = D3DwglDeleteContext;
@ -4051,6 +4059,115 @@ d3dglfunc_t glfuncs[] = {
};
qboolean D3DVID_Init(rendererstate_t *info, unsigned char *palette)
{
strcpy(info->glrenderer, "D3D");
return GLVID_Init(info, palette);
}
extern "C" {
#include "gl_draw.h"
}
rendererinfo_t d3drendererinfo = {
"Direct3D",
{
"d3d",
"crap"
},
QR_OPENGL,
GLDraw_PicFromWad,
GLDraw_SafePicFromWad,
GLDraw_CachePic,
GLDraw_SafeCachePic,
GLDraw_Init,
GLDraw_ReInit,
GLDraw_Character,
GLDraw_ColouredCharacter,
GLDraw_String,
GLDraw_Alt_String,
GLDraw_Crosshair,
GLDraw_DebugChar,
GLDraw_Pic,
GLDraw_ScalePic,
GLDraw_SubPic,
GLDraw_TransPic,
GLDraw_TransPicTranslate,
GLDraw_ConsoleBackground,
GLDraw_EditorBackground,
GLDraw_TileClear,
GLDraw_Fill,
GLDraw_FadeScreen,
GLDraw_BeginDisc,
GLDraw_EndDisc,
GLDraw_Image,
GLDraw_ImageColours,
GLR_Init,
GLR_DeInit,
GLR_ReInit,
GLR_RenderView,
GLR_InitSky,
GLR_CheckSky,
GLR_SetSky,
GLR_NewMap,
GLR_PreNewMap,
GLR_LightPoint,
GLR_PushDlights,
GLR_AddStain,
GLR_LessenStains,
MediaGL_ShowFrameBGR_24_Flip,
MediaGL_ShowFrameRGBA_32,
MediaGL_ShowFrame8bit,
GLMod_Init,
GLMod_ClearAll,
GLMod_ForName,
GLMod_FindName,
GLMod_Extradata,
GLMod_TouchModel,
GLMod_PointInLeaf,
GLMod_LeafPVS,
GLMod_NowLoadExternal,
GLMod_Think,
GLMod_GetTag,
GLMod_TagNumForName,
D3DVID_Init,
GLVID_DeInit,
GLVID_HandlePause,
GLVID_LockBuffer,
GLVID_UnlockBuffer,
GLD_BeginDirectRect,
GLD_EndDirectRect,
GLVID_ForceLockState,
GLVID_ForceUnlockedAndReturnState,
GLVID_SetPalette,
GLVID_ShiftPalette,
GLVID_GetRGBInfo,
NULL, //setcaption
GLSCR_UpdateScreen,
""
};
extern "C" {
rendererinfo_t *pd3drendererinfo = &d3drendererinfo;
}
#endif

View file

@ -428,22 +428,6 @@ void PR_LoadGlabalStruct(void)
globalfloat (true, total_monsters);
globalfloat (true, found_secrets);
globalfloat (true, killed_monsters);
globalfloat (true, parm1);
globalfloat (true, parm2);
globalfloat (true, parm3);
globalfloat (true, parm4);
globalfloat (true, parm5);
globalfloat (true, parm6);
globalfloat (true, parm7);
globalfloat (true, parm8);
globalfloat (true, parm9);
globalfloat (true, parm10);
globalfloat (true, parm11);
globalfloat (true, parm12);
globalfloat (true, parm13);
globalfloat (true, parm14);
globalfloat (true, parm15);
globalfloat (true, parm16);
globalvec (true, v_forward);
globalvec (true, v_up);
globalvec (true, v_right);
@ -474,6 +458,9 @@ void PR_LoadGlabalStruct(void)
memset(&evalc_idealpitch, 0, sizeof(evalc_idealpitch));
memset(&evalc_pitch_speed, 0, sizeof(evalc_pitch_speed));
for (i = 0; i < NUM_SPAWN_PARMS; i++)
spawnparamglobals[i] = (float *)PR_FindGlobal(svprogfuncs, va("parm%i", i+1), 0);
if (!((nqglobalvars_t*)pr_globals)->dimension_send)
{ //make sure dimension send is always a valid pointer.
((nqglobalvars_t*)pr_globals)->dimension_send = &dimension_send_default;
@ -4918,7 +4905,7 @@ void PF_setspawnparms (progfuncs_t *prinst, struct globalvars_s *pr_globals)
client = svs.clients + (i-1);
for (i=0 ; i< NUM_SPAWN_PARMS ; i++)
(&pr_global_struct->parm1)[i] = client->spawn_parms[i];
*spawnparamglobals[i] = client->spawn_parms[i];
}
/*

View file

@ -36,7 +36,7 @@ typedef struct globalvars_s
} globalvars_t;
typedef struct nqglobalvars_s
{ int *pad[28];
{
int *self;
int *other;
int *world;
@ -53,22 +53,6 @@ typedef struct nqglobalvars_s
float *total_monsters;
float *found_secrets;
float *killed_monsters;
float *parm1;
float *parm2;
float *parm3;
float *parm4;
float *parm5;
float *parm6;
float *parm7;
float *parm8;
float *parm9;
float *parm10;
float *parm11;
float *parm12;
float *parm13;
float *parm14;
float *parm15;
float *parm16;
vec3_t *V_v_forward;
vec3_t *V_v_up;
vec3_t *V_v_right;

View file

@ -23,6 +23,8 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#define MAX_PROGS 64
#define MAXADDONS 16
#define NUM_SPAWN_PARMS 32 //moved from server.h because of include ordering :(.
#define NewGetEdictFieldValue GetEdictFieldValue
void Q_SetProgsParms(qboolean forcompiler);
void PR_Deinit(void);
@ -97,6 +99,8 @@ typedef struct edict_s
//#define pr_nqglobal_struct *((nqglobalvars_t*)pr_globals)
#define pr_global_struct *pr_nqglobal_struct
float *spawnparamglobals[NUM_SPAWN_PARMS];
extern nqglobalvars_t *pr_nqglobal_struct;
extern progfuncs_t *svprogfuncs; //instance

View file

@ -637,7 +637,7 @@ qboolean SV_LoadLevelCache(char *level, char *startspot, qboolean ignoreplayers)
if (e2)
e2->_float = 1;
for (j=0 ; j< NUM_SPAWN_PARMS ; j++)
(&pr_global_struct->parm1)[j] = host_client->spawn_parms[j];
*spawnparamglobals[j] = host_client->spawn_parms[j];
pr_global_struct->time = sv.time;
pr_global_struct->self = EDICT_TO_PROG(svprogfuncs, ent);
ent->area.next = ent->area.prev = NULL;

View file

@ -271,9 +271,6 @@ typedef struct
int csqcentversion[MAX_EDICTS];//prevents ent versions from going backwards
} server_t;
#define NUM_SPAWN_PARMS 16
typedef enum
{
cs_free, // can be reused for a new connection
@ -465,6 +462,7 @@ typedef struct client_s
int delta_sequence; // -1 = no compression
int last_sequence;
netchan_t netchan;
qboolean isindependant;
int lastsequence_acknoledged;

View file

@ -968,7 +968,7 @@ void SVDP_EmitEntitiesUpdate (client_t *client, packet_entities_t *to, sizebuf_t
MSG_WriteByte(msg, svcdp_entities);
MSG_WriteLong(msg, 0);
if (client->protocol == SCP_DARKPLACES7)
MSG_WriteLong(msg, 0);
MSG_WriteLong(msg, client->last_sequence);
for (newindex = 0; newindex < to->num_entities; newindex++)
to->entities[newindex].bitmask = 0;
@ -2344,8 +2344,8 @@ void SV_WriteEntitiesToClient (client_t *client, sizebuf_t *msg, qboolean ignore
continue;
if (e >= 1024 && !(client->fteprotocolextensions & PEXT_ENTITYDBL2))
continue;
if (/*dement->modelindex >= 256 &&*/ !(client->fteprotocolextensions & PEXT_MODELDBL))
continue;
// if (dement->modelindex >= 256 && !(client->fteprotocolextensions & PEXT_MODELDBL))
// continue;
state = &pack->entities[pack->num_entities];
pack->num_entities++;

View file

@ -304,7 +304,12 @@ void SV_SaveSpawnparms (qboolean dontsave)
pr_global_struct->self = EDICT_TO_PROG(svprogfuncs, host_client->edict);
PR_ExecuteProgram (svprogfuncs, pr_global_struct->SetChangeParms);
for (j=0 ; j<NUM_SPAWN_PARMS ; j++)
host_client->spawn_parms[j] = (&pr_global_struct->parm1)[j];
{
if (spawnparamglobals[j])
host_client->spawn_parms[j] = *spawnparamglobals[j];
else
host_client->spawn_parms[j] = 0;
}
}
#ifdef SVRANKING
@ -320,7 +325,12 @@ void SV_SaveSpawnparms (qboolean dontsave)
host_client->kills=0;
host_client->deaths=0;
for (j=0 ; j<NUM_SPAWN_PARMS ; j++)
rs.parm[j] = (&pr_global_struct->parm1)[j];
{
if (spawnparamglobals[j])
rs.parm[j] = *spawnparamglobals[j];
else
rs.parm[j] = 0;
}
Rank_SetPlayerStats(host_client->rankid, &rs);
}
}

View file

@ -376,7 +376,7 @@ void SV_DropClient (client_t *drop)
if (pr_nqglobal_struct->SetChangeParms)
PR_ExecuteProgram (svprogfuncs, pr_global_struct->SetChangeParms);
for (j=0 ; j<NUM_SPAWN_PARMS ; j++)
rs.parm[j] = (&pr_global_struct->parm1)[j];
rs.parm[j] = *spawnparamglobals[j];
Rank_SetPlayerStats(drop->rankid, &rs);
}
}
@ -1029,7 +1029,12 @@ void SV_GetNewSpawnParms(client_t *cl)
if (pr_nqglobal_struct->SetNewParms)
PR_ExecuteProgram (svprogfuncs, pr_global_struct->SetNewParms);
for (i=0 ; i<NUM_SPAWN_PARMS ; i++)
cl->spawn_parms[i] = (&pr_global_struct->parm1)[i];
{
if (spawnparamglobals[i])
cl->spawn_parms[i] = *spawnparamglobals[i];
else
cl->spawn_parms[i] = 0;
}
}
}
@ -3297,7 +3302,7 @@ qboolean ReloadRanking(client_t *cl, char *newname)
if (pr_nqglobal_struct->SetChangeParms)
PR_ExecuteProgram (svprogfuncs, pr_global_struct->SetChangeParms);
for (j=0 ; j<NUM_SPAWN_PARMS ; j++)
rs.parm[j] = (&pr_global_struct->parm1)[j];
rs.parm[j] = *spawnparamglobals[j];
Rank_SetPlayerStats(cl->rankid, &rs);
}
if (!Rank_GetPlayerStats(newid, &rs))

View file

@ -868,20 +868,6 @@ if (l > 1.0/64)
}
/*
=============
SV_Physics_None
Non moving objects can only think
=============
*/
void SV_Physics_None (edict_t *ent)
{
// regular thinking
SV_RunThink (ent);
}
/*
=============
SV_Physics_Follow
@ -1660,106 +1646,7 @@ void SV_WalkMove (edict_t *ent)
#endif
/*
================
SV_Physics_Client
Player character actions
From normal Quake in an attempt to fix physics in QuakeRally
================
*/
#define FL_JUMPRELEASED 4096
void SV_Physics_Client (edict_t *ent, int num)
{
qboolean readyforjump;
float oldvel;
if ( svs.clients[num-1].state < cs_spawned )
return; // unconnected slot
readyforjump = false;
if (progstype == PROG_QW)
if (ent->v->button2)
if ((int)ent->v->flags & FL_JUMPRELEASED)
readyforjump = true;
//
// call standard client pre-think
//
pr_global_struct->time = sv.time;
pr_global_struct->self = EDICT_TO_PROG(svprogfuncs, ent);
PR_ExecuteProgram (svprogfuncs, pr_global_struct->PlayerPreThink);
if (readyforjump) //qw progs can't jump for themselves...
{
if (!ent->v->button2 && !((int)ent->v->flags & FL_JUMPRELEASED))
ent->v->velocity[2] += 270;
}
//
// do a move
//
SV_CheckVelocity (ent);
//
// decide which move function to call
//
switch ((int)ent->v->movetype)
{
case MOVETYPE_NONE:
if (!SV_RunThink (ent))
return;
break;
case MOVETYPE_WALK:
oldvel = ent->v->velocity[0];
if (!SV_RunThink (ent))
return;
if (!SV_CheckWater (ent) && ! ((int)ent->v->flags & FL_WATERJUMP) )
SV_AddGravity (ent, ent->v->gravity);
SV_CheckStuck (ent);
SV_WalkMove (ent);
break;
case MOVETYPE_FOLLOW:
SV_Physics_Follow (ent);
break;
case MOVETYPE_TOSS:
case MOVETYPE_BOUNCE:
SV_Physics_Toss (ent);
break;
case MOVETYPE_FLY:
case MOVETYPE_SWIM:
if (!SV_RunThink (ent))
return;
SV_FlyMove (ent, host_frametime, NULL);
break;
case MOVETYPE_NOCLIP:
if (!SV_RunThink (ent))
return;
VectorMA (ent->v->origin, host_frametime, ent->v->velocity, ent->v->origin);
VectorMA (ent->v->angles, host_frametime, ent->v->avelocity, ent->v->angles);
break;
default:
Sys_Error ("SV_Physics_client: bad movetype %i", (int)ent->v->movetype);
}
//
// call standard player post-think
//
SV_LinkEdict (ent, true);
pr_global_struct->time = sv.time;
pr_global_struct->self = EDICT_TO_PROG(svprogfuncs, ent);
PR_ExecuteProgram (svprogfuncs, pr_global_struct->PlayerPostThink);
}
/*
================
SV_RunEntity
@ -1768,19 +1655,53 @@ SV_RunEntity
*/
void SV_RunEntity (edict_t *ent)
{
int c,originMoved;
edict_t *ent2;
vec3_t oldOrigin,oldAngle;
edict_t *movechain;
vec3_t initial_origin,initial_angle;
if (ent->v->lastruntime == (float)realtime)
return;
ent->v->lastruntime = (float)realtime;
if (ent->entnum > 0 && ent->entnum <= sv.allocated_client_slots)
{ //a client woo.
qboolean readyforjump = false;
ent2 = PROG_TO_EDICT(svprogfuncs, ent->v->movechain);
if (ent2 != sv.edicts)
if ( svs.clients[ent->entnum-1].state < cs_spawned )
return; // unconnected slot
host_client = &svs.clients[ent->entnum-1];
SV_ClientThink();
if (progstype == PROG_QW) //detect if the mod should do a jump
if (ent->v->button2)
if ((int)ent->v->flags & FL_JUMPRELEASED)
readyforjump = true;
//
// call standard client pre-think
//
pr_global_struct->time = sv.time;
pr_global_struct->self = EDICT_TO_PROG(svprogfuncs, ent);
PR_ExecuteProgram (svprogfuncs, pr_global_struct->PlayerPreThink);
if (readyforjump) //qw progs can't jump for themselves...
{
if (!ent->v->button2 && !((int)ent->v->flags & FL_JUMPRELEASED) && ent->v->velocity[2] <= 0)
ent->v->velocity[2] += 270;
}
}
else
{
VectorCopy(ent->v->origin,oldOrigin);
VectorCopy(ent->v->angles,oldAngle);
if (ent->v->lastruntime == (float)realtime)
return;
ent->v->lastruntime = (float)realtime;
}
movechain = PROG_TO_EDICT(svprogfuncs, ent->v->movechain);
if (movechain != sv.edicts)
{
VectorCopy(ent->v->origin,initial_origin);
VectorCopy(ent->v->angles,initial_angle);
}
switch ( (int)ent->v->movetype)
@ -1789,7 +1710,8 @@ void SV_RunEntity (edict_t *ent)
SV_Physics_Pusher (ent);
break;
case MOVETYPE_NONE:
SV_Physics_None (ent);
if (!SV_RunThink (ent))
return;
break;
case MOVETYPE_NOCLIP:
SV_Physics_Noclip (ent);
@ -1826,37 +1748,40 @@ void SV_RunEntity (edict_t *ent)
SV_Error ("SV_Physics: bad movetype %i on %s", (int)ent->v->movetype, svprogfuncs->stringtable + ent->v->classname);
}
if (ent2 != sv.edicts)
if (movechain != sv.edicts)
{
originMoved = !VectorCompare(ent->v->origin,oldOrigin);
if (originMoved || !VectorCompare(ent->v->angles,oldAngle))
qboolean callfunc;
if ((callfunc=DotProduct(ent->v->origin, initial_origin)) || DotProduct(ent->v->angles, initial_angle))
{
VectorSubtract(ent->v->origin,oldOrigin,oldOrigin);
VectorSubtract(ent->v->angles,oldAngle,oldAngle);
vec3_t moveang, moveorg;
int i;
VectorSubtract(ent->v->angles, initial_angle, moveang)
VectorSubtract(ent->v->origin, initial_origin, moveorg)
for(c=0;c<10;c++)
{ // chain a max of 10 objects
if (ent2->isfree) break;
for(i=16;i && movechain != sv.edicts && !movechain->isfree;i--, movechain = PROG_TO_EDICT(svprogfuncs, movechain->v->movechain))
{
if ((int)movechain->v->flags & FL_MOVECHAIN_ANGLE)
VectorAdd(movechain->v->angles, moveang, movechain->v->angles);
VectorAdd(movechain->v->origin, moveorg, movechain->v->origin);
VectorAdd(oldOrigin,ent2->v->origin,ent2->v->origin);
if ((int)ent2->v->flags & FL_MOVECHAIN_ANGLE)
if (movechain->v->chainmoved && callfunc)
{
VectorAdd(oldAngle,ent2->v->angles,ent2->v->angles);
}
if (originMoved && ent2->v->chainmoved)
{ // callback function
pr_global_struct->self = EDICT_TO_PROG(svprogfuncs, ent2);
pr_global_struct->self = EDICT_TO_PROG(svprogfuncs, movechain);
pr_global_struct->other = EDICT_TO_PROG(svprogfuncs, ent);
PR_ExecuteProgram(svprogfuncs, ent2->v->chainmoved);
PR_ExecuteProgram(svprogfuncs, movechain->v->chainmoved);
}
ent2 = PROG_TO_EDICT(svprogfuncs, ent2->v->movechain);
if (ent2 == sv.edicts) break;
}
}
}
if (ent->entnum > 0 && ent->entnum <= sv.allocated_client_slots)
{
SV_LinkEdict (ent, true);
pr_global_struct->time = sv.time;
pr_global_struct->self = EDICT_TO_PROG(svprogfuncs, ent);
PR_ExecuteProgram (svprogfuncs, pr_global_struct->PlayerPostThink);
}
}
/*
@ -1990,14 +1915,6 @@ qboolean SV_Physics (void)
pr_global_struct->frametime = host_frametime;
for (i = 0; i < sv.allocated_client_slots; i++)
{
host_client = &svs.clients[i];
if (host_client->state == cs_spawned)
if (sv_nomsec.value || SV_PlayerPhysicsQC || !ISQWCLIENT(host_client))
SV_ClientThink();
}
SV_ProgStartFrame ();
PR_RunThreads();
@ -2025,9 +1942,9 @@ qboolean SV_Physics (void)
if (i > 0 && i <= sv.allocated_client_slots)
{
if (sv_nomsec.value || SV_PlayerPhysicsQC || !ISQWCLIENT(&svs.clients[i-1]))
if (!svs.clients[i-1].isindependant)
{
SV_Physics_Client(ent, i);
SV_RunEntity(ent);
SV_RunNewmis ();
}
else

View file

@ -9,6 +9,8 @@
#ifdef SVRANKING
typedef struct {
int ident;
int version;
int usedslots;
int leader;
int freeslot;
@ -26,6 +28,9 @@ cvar_t rank_needlogin = {"rank_needlogin", "0"};
cvar_t rank_filename = {"rank_filename", ""};
char rank_cvargroup[] = "server rankings";
#define RANKFILE_VERSION 0x00000000
#define RANKFILE_IDENT *(int*)"RANK"
void inline READ_PLAYERSTATS(int x, rankstats_t *os)
{
int i;
@ -102,6 +107,8 @@ void inline WRITEHEADER(void)
{
rankfileheader_t nh;
nh.ident = RANKFILE_IDENT;
nh.version = swaplong(RANKFILE_VERSION);
nh.usedslots = swaplong(rankfileheader.usedslots);
nh.leader = swaplong(rankfileheader.leader);
nh.freeslot = swaplong(rankfileheader.freeslot);
@ -115,6 +122,7 @@ void inline WRITEHEADER(void)
qboolean Rank_OpenRankings(void)
{
qboolean created;
if (!rankfile)
{
if (!*rank_filename.string)
@ -127,7 +135,12 @@ qboolean Rank_OpenRankings(void)
rankfile = fopen(va("%s/%s", com_gamedir, rank_filename.string), "r+b");
if (!rankfile) //hmm... try creating
{
rankfile = fopen(va("%s/%s", com_gamedir, rank_filename.string), "w+b");
created = true;
}
else
created = false;
if (!rankfile)
return false; //couldn't open file.
@ -136,10 +149,20 @@ qboolean Rank_OpenRankings(void)
fseek(rankfile, 0, SEEK_SET);
fread(&rankfileheader, sizeof(rankfileheader_t), 1, rankfile);
rankfileheader.version = swaplong(rankfileheader.version);
rankfileheader.usedslots = swaplong(rankfileheader.usedslots);
rankfileheader.leader = swaplong(rankfileheader.leader);
rankfileheader.freeslot = swaplong(rankfileheader.freeslot);
if (!created && (rankfileheader.version != RANKFILE_VERSION || rankfileheader.ident != RANKFILE_IDENT))
{
Con_Printf("Rank file is version %i not %i\nEither delete the file or use an equivelent version of " DISTRIBUTION "\n");
fclose(rankfile);
rankfile = NULL;
return false;
}
return true; //success.
}
return true; //already open

View file

@ -136,13 +136,13 @@ void SV_New_f (void)
//NOTE: This doesn't go through ClientReliableWrite since it's before the user
//spawns. These functions are written to not overflow
if (host_client->num_backbuf)
/* if (host_client->num_backbuf)
{
Con_TPrintf(STL_BACKBUFSET, host_client->name, host_client->netchan.message.cursize);
host_client->num_backbuf = 0;
SZ_Clear(&host_client->netchan.message);
}
*/
if (sizeofcoord > 2 && !(host_client->fteprotocolextensions & PEXT_FLOATCOORDS))
{
SV_ClientPrintf(host_client, 2, "\n\n\n\nSorry, but your client does not appear to support FTE's bigcoords\nFTE users will need to set cl_nopext to 0 and then reconnect, or to upgrade\n");
@ -150,9 +150,10 @@ void SV_New_f (void)
return;
}
ClientReliableCheckBlock(host_client, 800); //okay, so it might be longer, but I'm too lazy to work out the real size.
// send the serverdata
MSG_WriteByte (&host_client->netchan.message, ISQ2CLIENT(host_client)?svcq2_serverdata:svc_serverdata);
ClientReliableWrite_Byte (host_client, ISQ2CLIENT(host_client)?svcq2_serverdata:svc_serverdata);
#ifdef PROTOCOL_VERSION_FTE
if (host_client->fteprotocolextensions)//let the client know
{
@ -163,11 +164,11 @@ void SV_New_f (void)
MSG_WriteLong (&host_client->netchan.message, host_client->fteprotocolextensions);
}
#endif
MSG_WriteLong (&host_client->netchan.message, ISQ2CLIENT(host_client)?PROTOCOL_VERSION_Q2:PROTOCOL_VERSION);
MSG_WriteLong (&host_client->netchan.message, svs.spawncount);
ClientReliableWrite_Long (host_client, ISQ2CLIENT(host_client)?PROTOCOL_VERSION_Q2:PROTOCOL_VERSION);
ClientReliableWrite_Long (host_client, svs.spawncount);
if (ISQ2CLIENT(host_client))
MSG_WriteByte (&host_client->netchan.message, 0);
MSG_WriteString (&host_client->netchan.message, gamedir);
ClientReliableWrite_Byte (host_client, 0);
ClientReliableWrite_String (host_client, gamedir);
splitnum = 0;
for (split = host_client; split; split = split->controlled)
@ -189,9 +190,9 @@ void SV_New_f (void)
playernum = -1;
if (ISQ2CLIENT(host_client))
MSG_WriteShort (&host_client->netchan.message, playernum);
ClientReliableWrite_Short (host_client, playernum);
else
MSG_WriteByte (&host_client->netchan.message, playernum);
ClientReliableWrite_Byte (host_client, playernum);
split->state = cs_connected;
split->connection_started = realtime;
@ -201,13 +202,13 @@ void SV_New_f (void)
splitnum++;
}
if (host_client->fteprotocolextensions & PEXT_SPLITSCREEN)
MSG_WriteByte (&host_client->netchan.message, 128);
ClientReliableWrite_Byte (host_client, 128);
// send full levelname
if (sv.demostatevalid)
MSG_WriteString (&host_client->netchan.message, sv.demfullmapname);
ClientReliableWrite_String (host_client, sv.demfullmapname);
else
MSG_WriteString (&host_client->netchan.message, sv.mapname);
ClientReliableWrite_String (host_client, sv.mapname);
//
// game server
@ -221,39 +222,48 @@ void SV_New_f (void)
memset (&host_client->lastcmd, 0, sizeof(host_client->lastcmd));
// begin fetching configstrings
MSG_WriteByte (&host_client->netchan.message, svcq2_stufftext);
MSG_WriteString (&host_client->netchan.message, va("cmd configstrings %i 0\n",svs.spawncount) );
ClientReliableWrite_Byte (host_client, svcq2_stufftext);
ClientReliableWrite_String (host_client, va("cmd configstrings %i 0\n",svs.spawncount) );
}
return;
}
#endif
// send the movevars
MSG_WriteFloat(&host_client->netchan.message, movevars.gravity);
MSG_WriteFloat(&host_client->netchan.message, movevars.stopspeed);
MSG_WriteFloat(&host_client->netchan.message, movevars.maxspeed);
MSG_WriteFloat(&host_client->netchan.message, movevars.spectatormaxspeed);
MSG_WriteFloat(&host_client->netchan.message, movevars.accelerate);
MSG_WriteFloat(&host_client->netchan.message, movevars.airaccelerate);
MSG_WriteFloat(&host_client->netchan.message, movevars.wateraccelerate);
MSG_WriteFloat(&host_client->netchan.message, movevars.friction);
MSG_WriteFloat(&host_client->netchan.message, movevars.waterfriction);
MSG_WriteFloat(&host_client->netchan.message, movevars.entgravity);
ClientReliableWrite_Float(host_client, movevars.gravity);
ClientReliableWrite_Float(host_client, movevars.stopspeed);
ClientReliableWrite_Float(host_client, movevars.maxspeed);
ClientReliableWrite_Float(host_client, movevars.spectatormaxspeed);
ClientReliableWrite_Float(host_client, movevars.accelerate);
ClientReliableWrite_Float(host_client, movevars.airaccelerate);
ClientReliableWrite_Float(host_client, movevars.wateraccelerate);
ClientReliableWrite_Float(host_client, movevars.friction);
ClientReliableWrite_Float(host_client, movevars.waterfriction);
ClientReliableWrite_Float(host_client, movevars.entgravity);
// send server info string
MSG_WriteByte (&host_client->netchan.message, svc_stufftext);
if (sv.demostatevalid)
MSG_WriteString (&host_client->netchan.message, va("fullserverinfo \"%s\"\n", sv.demoinfo));
{
ClientReliableCheckBlock(host_client, 20 + strlen(sv.demoinfo));
ClientReliableWrite_Byte (host_client, svc_stufftext);
ClientReliableWrite_String (host_client, va("fullserverinfo \"%s\"\n", sv.demoinfo) );
}
else
MSG_WriteString (&host_client->netchan.message, va("fullserverinfo \"%s\"\n", svs.info) );
{
ClientReliableCheckBlock(host_client, 20 + strlen(svs.info));
ClientReliableWrite_Byte (host_client, svc_stufftext);
ClientReliableWrite_String (host_client, va("fullserverinfo \"%s\"\n", svs.info) );
}
host_client->csqcactive = false;
// send music
MSG_WriteByte (&host_client->netchan.message, svc_cdtrack);
ClientReliableCheckBlock(host_client, 2);
ClientReliableWrite_Byte (host_client, svc_cdtrack);
if (svprogfuncs)
MSG_WriteByte (&host_client->netchan.message, sv.edicts->v->sounds);
ClientReliableWrite_Byte (host_client, sv.edicts->v->sounds);
else
MSG_WriteByte (&host_client->netchan.message, 0);
ClientReliableWrite_Byte (host_client, 0);
}
#define GAME_DEATHMATCH 0
#define GAME_COOP 1
@ -1245,7 +1255,10 @@ void SV_Begin_f (void)
{
// copy spawn parms out of the client_t
for (i=0 ; i< NUM_SPAWN_PARMS ; i++)
(&pr_global_struct->parm1)[i] = split->spawn_parms[i];
{
if (spawnparamglobals[i])
*spawnparamglobals[i] = split->spawn_parms[i];
}
// call the spawn function
pr_global_struct->time = sv.time;
@ -1273,7 +1286,10 @@ void SV_Begin_f (void)
if (eval2)
eval2->_float = 1;
for (j=0 ; j< NUM_SPAWN_PARMS ; j++)
(&pr_global_struct->parm1)[j] = split->spawn_parms[j];
{
if (spawnparamglobals[j])
*spawnparamglobals[j] = split->spawn_parms[j];
}
pr_global_struct->time = sv.time;
pr_global_struct->self = EDICT_TO_PROG(svprogfuncs, ent);
G_FLOAT(OFS_PARM0) = sv.time - split->spawninfotime;
@ -1283,7 +1299,10 @@ void SV_Begin_f (void)
{
// copy spawn parms out of the client_t
for (i=0 ; i< NUM_SPAWN_PARMS ; i++)
(&pr_global_struct->parm1)[i] = split->spawn_parms[i];
{
if (spawnparamglobals[i])
*spawnparamglobals[i] = split->spawn_parms[i];
}
// call the spawn function
pr_global_struct->time = sv.time;
@ -2702,7 +2721,12 @@ void Cmd_Join_f (void)
// call the progs to get default spawn parms for the new client
PR_ExecuteProgram (svprogfuncs, pr_global_struct->SetNewParms);
for (i=0 ; i<NUM_SPAWN_PARMS ; i++)
host_client->spawn_parms[i] = (&pr_global_struct->parm1)[i];
{
if (spawnparamglobals[i])
host_client->spawn_parms[i] = *spawnparamglobals[i];
else
host_client->spawn_parms[i] = 0;
}
// call the spawn function
pr_global_struct->time = sv.time;
@ -2779,7 +2803,12 @@ void Cmd_Observe_f (void)
// call the progs to get default spawn parms for the new client
PR_ExecuteProgram (svprogfuncs, pr_global_struct->SetNewParms);
for (i=0 ; i<NUM_SPAWN_PARMS ; i++)
host_client->spawn_parms[i] = (&pr_global_struct->parm1)[i];
{
if (spawnparamglobals[i])
host_client->spawn_parms[i] = *spawnparamglobals[i];
else
host_client->spawn_parms[i] = 0;
}
SV_SpawnSpectator ();
@ -3119,7 +3148,10 @@ void SVNQ_Begin_f (void)
{
// copy spawn parms out of the client_t
for (i=0 ; i< NUM_SPAWN_PARMS ; i++)
(&pr_global_struct->parm1)[i] = host_client->spawn_parms[i];
{
if (spawnparamglobals[i])
*spawnparamglobals[i] = host_client->spawn_parms[i];
}
// call the spawn function
pr_global_struct->time = sv.time;
@ -3131,7 +3163,10 @@ void SVNQ_Begin_f (void)
{
// copy spawn parms out of the client_t
for (i=0 ; i< NUM_SPAWN_PARMS ; i++)
(&pr_global_struct->parm1)[i] = host_client->spawn_parms[i];
{
if (spawnparamglobals[i])
*spawnparamglobals[i] = host_client->spawn_parms[i];
}
// call the spawn function
pr_global_struct->time = sv.time;
@ -3742,6 +3777,10 @@ int SV_PMTypeForClient (client_t *cl)
return PM_NORMAL;
}
//called for common csqc/server code (supposedly)
void SV_RunEntity (edict_t *ent);
/*
===========
SV_PreRunCmd
@ -3933,6 +3972,15 @@ void SV_RunCmd (usercmd_t *ucmd, qboolean recurse)
V_CalcRoll (sv_player->v->angles, sv_player->v->velocity)*4;
}
if (SV_PlayerPhysicsQC)
{ //csqc independant physics support
pr_global_struct->frametime = host_frametime;
pr_global_struct->time = sv.time;
SV_RunEntity(sv_player);
return;
}
if (!host_client->spectator)
{
vec_t oldvz;
@ -4306,8 +4354,9 @@ haveannothergo:
if (!sv.paused)
{
if (sv_nomsec.value || SV_PlayerPhysicsQC)
if (sv_nomsec.value)
{
cl->isindependant = false;
if (!sv_player->v->fixangle)
{
sv_player->v->v_angle[0] = newcmd.angles[0]* (360.0/65536);
@ -4349,6 +4398,7 @@ haveannothergo:
}
continue;
}
cl->isindependant = true;
SV_PreRunCmd();
if (net_drop < 20)
@ -4365,7 +4415,8 @@ haveannothergo:
}
SV_RunCmd (&newcmd, false);
SV_PostRunCmd();
if (!SV_PlayerPhysicsQC)
SV_PostRunCmd();
}
@ -4589,7 +4640,9 @@ void SVNQ_ReadClientMove (usercmd_t *move)
frame = &host_client->frames[host_client->netchan.incoming_acknowledged & UPDATE_MASK];
if (host_client->protocol == SCP_DARKPLACES7)
MSG_ReadLong ();
host_client->last_sequence = MSG_ReadLong ();
else
host_client->last_sequence = 0;
frame->ping_time = sv.time - MSG_ReadFloat ();
@ -4657,6 +4710,9 @@ void SVNQ_ReadClientMove (usercmd_t *move)
host_client->edict->v->button6 = ((bits >> 5) & 1);
host_client->edict->v->button7 = ((bits >> 6) & 1);
host_client->edict->v->button8 = ((bits >> 7) & 1);
if (host_client->last_sequence)
SV_RunEntity(host_client->edict);
}
void SVNQ_ExecuteClientMessage (client_t *cl)

View file

@ -32,24 +32,38 @@ R_AnimateLight
*/
void SWR_AnimateLight (void)
{
int i,j,k;
int i,j;
int v1, v2;
float f;
//
// light animations
// 'm' is normal light, 'a' is no light, 'z' is double bright
i = (int)(cl.time*10);
f = (cl.time*r_lightstylespeed.value);
if (f < 0)
f = 0;
i = (int)f;
if (r_lightstylesmooth.value)
f -= i; //this can require updates at 1000 times a second.. Depends on your framerate of course
else
f = 0; //only update them 10 times a second
for (j=0 ; j<MAX_LIGHTSTYLES ; j++)
{
if (!cl_lightstyle[j].length)
{
d_lightstylevalue[j] = 256;
cl_lightstyle[j].colour = 7;
continue;
}
k = i % cl_lightstyle[j].length;
k = cl_lightstyle[j].map[k] - 'a';
k = k*22;
d_lightstylevalue[j] = k;
}
v1 = i % cl_lightstyle[j].length;
v1 = cl_lightstyle[j].map[v1] - 'a';
v2 = (i+1) % cl_lightstyle[j].length;
v2 = cl_lightstyle[j].map[v2] - 'a';
d_lightstylevalue[j] = (v1*(1-f) + v2*(f))*22;
}
}