]> de.git.xonotic.org Git - xonotic/darkplaces.git/blobdiff - client.h
mostly dynamic GL binding (more needs to be done, but it's closer)
[xonotic/darkplaces.git] / client.h
index d9dbbe5b844a5538bbff17297015b01ac1a6afa8..9430e3a4e7f9f109cd7f4ab843da42afe6930164 100644 (file)
--- a/client.h
+++ b/client.h
@@ -198,6 +198,7 @@ typedef struct
                                                                // throw out the first couple, so the player
                                                                // doesn't accidentally do something the
                                                                // first frame
+       float           sendnoptime;    // send a clc_nop periodically until connected
        usercmd_t       cmd;                    // last command sent to the server
 
 // information for local display
@@ -274,6 +275,14 @@ typedef struct
 
 // frag scoreboard
        scoreboard_t    *scores;                // [cl.maxclients]
+
+       vec3_t          viewentorigin;
+       float           viewzoom;                       // LordHavoc: sniping zoom, QC controlled
+       float           viewzoomold, viewzoomnew; // for interpolation
+
+       // entity database stuff
+       vec3_t          viewentoriginold, viewentoriginnew;
+       entity_database_t entitydatabase;
 }
 client_state_t;
 
@@ -344,12 +353,6 @@ void CL_EstablishConnection (char *host);
 void CL_Disconnect (void);
 void CL_Disconnect_f (void);
 
-// LordHavoc: fixme: move this to r_refdef?
-// LordHavoc: raised this from 256 to the maximum possible number of entities visible
-#define MAX_VISEDICTS (MAX_EDICTS + MAX_STATIC_ENTITIES + MAX_TEMP_ENTITIES)
-extern int                     cl_numvisedicts;
-extern entity_t        *cl_visedicts[MAX_VISEDICTS];
-
 //
 // cl_input
 //
@@ -368,7 +371,7 @@ void CL_InitInput (void);
 void CL_SendCmd (void);
 void CL_SendMove (usercmd_t *cmd);
 
-void CL_LerpUpdate(entity_t *e, int frame, int modelindex);
+void CL_LerpUpdate(entity_t *e);
 void CL_ParseTEnt (void);
 void CL_UpdateTEnts (void);
 
@@ -412,11 +415,10 @@ void CL_BitProfile_f(void);
 void V_StartPitchDrift (void);
 void V_StopPitchDrift (void);
 
-void V_RenderView (void);
+void V_Init (void);
+float V_CalcRoll (vec3_t angles, vec3_t velocity);
 void V_UpdateBlends (void);
-void V_Register (void);
 void V_ParseDamage (void);
-void V_SetContentsColor (int contents);
 
 
 //
@@ -433,17 +435,21 @@ void CL_InitTEnts (void);
 #define PARTICLE_UPRIGHT_FACING 2
 #define PARTICLE_ORIENTED_DOUBLESIDED 3
 
+/*
 typedef struct renderparticle_s
 {
-       int                     tex;
-       int                     orientation;
-       int                     dynlight;
-       float           scale;
-       float           org[3];
-       float           dir[3];
-       float           color[4];
+       int tex;
+       int orientation;
+       int additive;
+       int dynlight;
+       float scalex;
+       float scaley;
+       float org[3];
+       float dir[3];
+       float color[4];
 }
 renderparticle_t;
+*/
 
 void CL_Particles_Clear(void);
 void CL_Particles_Init(void);
@@ -453,7 +459,9 @@ void CL_RunParticleEffect (vec3_t org, vec3_t dir, int color, int count);
 void CL_RocketTrail (vec3_t start, vec3_t end, int type, entity_t *ent);
 void CL_RocketTrail2 (vec3_t start, vec3_t end, int color, entity_t *ent);
 void CL_SparkShower (vec3_t org, vec3_t dir, int count);
+void CL_PlasmaBurn (vec3_t org);
 void CL_BloodPuff (vec3_t org, vec3_t vel, int count);
+void CL_Stardust (vec3_t mins, vec3_t maxs, int count);
 void CL_FlameCube (vec3_t mins, vec3_t maxs, int count);
 void CL_Flames (vec3_t org, vec3_t vel, int count);
 void CL_BloodShower (vec3_t mins, vec3_t maxs, float velspeed, int count);
@@ -466,32 +474,49 @@ void CL_ParticleExplosion2 (vec3_t org, int colorStart, int colorLength);
 void CL_LavaSplash (vec3_t org);
 void CL_TeleportSplash (vec3_t org);
 void CL_MoveParticles(void);
-void CL_UpdateDecals(void);
 void R_MoveExplosions(void);
 void R_NewExplosion(vec3_t org);
 
-//
-// cl_decal
-//
+// if contents is not zero, it will impact on content changes
+// (leafs matching contents are considered empty, others are solid)
+extern int traceline_endcontents; // set by TraceLine
+// need to call this sometime before using TraceLine with hitbmodels
+void TraceLine_ScanForBModels(void);
+float TraceLine (vec3_t start, vec3_t end, vec3_t impact, vec3_t normal, int contents, int hitbmodels);
+
+#include "cl_screen.h"
 
-typedef struct renderdecal_s
+#define MAX_VISEDICTS (MAX_EDICTS + MAX_STATIC_ENTITIES + MAX_TEMP_ENTITIES)
+
+typedef struct
 {
-       entity_render_t *ent;
-       int tex;
-       int surface;
-       float scale;
-       vec3_t org;
-       vec3_t dir;
-       float color[4];
+       // area to render in
+       int x, y, width, height;
+       float fov_x, fov_y;
+
+       // view point
+       vec3_t vieworg;
+       vec3_t viewangles;
+
+       // fullscreen color blend
+       float viewblend[4];
+
+       // weapon model
+       entity_render_t viewent;
+
+       int numentities;
+       entity_render_t **entities;
+
+       //int numparticles;
+       //struct renderparticle_s *particles;
+
+       qbyte drawqueue[MAX_DRAWQUEUE];
+       int drawqueuesize;
 }
-renderdecal_t;
+refdef_t;
 
-void CL_Decals_Clear(void);
-void CL_Decals_Init(void);
-void CL_Decal(vec3_t origin, int tex, float scale, float red, float green, float blue, float alpha);
+refdef_t r_refdef;
 
-// if contents is not zero, it will impact on content changes
-// (leafs matching contents are considered empty, others are solid)
-extern int traceline_endcontents; // set by TraceLine
-float TraceLine (vec3_t start, vec3_t end, vec3_t impact, vec3_t normal, int contents);
+extern mempool_t *cl_refdef_mempool;
 
+#include "cgamevm.h"