]> de.git.xonotic.org Git - xonotic/darkplaces.git/blobdiff - client.h
renamed r_bloomstate to r_fb because it contains framebuffer settings
[xonotic/darkplaces.git] / client.h
index 4395eaafa1f1dd24ead0ac76849646f6d89677dd..f8acbcdd7c8b97151cf42c52cd2e866219d099dc 100644 (file)
--- a/client.h
+++ b/client.h
@@ -34,7 +34,8 @@ typedef struct tridecal_s
        // color and initial alpha value
        float                   texcoord2f[3][2];
        float                   vertex3f[3][3];
-       unsigned char   color4ub[3][4];
+       float                   color4f[3][4];
+       float                   plane[4]; // backface culling
        // how long this decal has lived so far (the actual fade begins at cl_decals_time)
        float                   lived;
        // if >= 0 this indicates the decal should follow an animated triangle
@@ -89,6 +90,13 @@ typedef struct beam_s
 }
 beam_t;
 
+typedef struct rtlight_particle_s
+{
+       float origin[3];
+       float color[3];
+}
+rtlight_particle_t;
+
 typedef struct rtlight_s
 {
        // shadow volumes are done entirely in model space, so there are no matrices for dealing with them...  they just use the origin
@@ -202,6 +210,15 @@ typedef struct rtlight_s
        /// masks of all shadowmap sides that have any potential static receivers or casters
        int static_shadowmap_receivers;
        int static_shadowmap_casters;
+       /// particle-tracing cache for global illumination
+       int particlecache_numparticles;
+       int particlecache_maxparticles;
+       int particlecache_updateparticle;
+       rtlight_particle_t *particlecache_particles;
+
+       /// bouncegrid light info
+       float photoncolor[3];
+       float photons;
 }
 rtlight_t;
 
@@ -278,18 +295,6 @@ typedef struct dlight_s
 }
 dlight_t;
 
-#define MAX_FRAMEGROUPBLENDS 4
-typedef struct framegroupblend_s
-{
-       // animation number and blend factor
-       // (for most models this is the frame number)
-       int frame;
-       float lerp;
-       // time frame began playing (for framegroup animations)
-       double start;
-}
-framegroupblend_t;
-
 // this is derived from processing of the framegroupblend array
 // note: technically each framegroupblend can produce two of these, but that
 // never happens in practice because no one blends between more than 2
@@ -369,8 +374,7 @@ typedef struct entity_render_s
        float *animcache_svector3f;
        float *animcache_tvector3f;
        // interleaved arrays for rendering and dynamic vertex buffers for them
-       r_vertexposition_t *animcache_vertexposition;
-       r_meshbuffer_t *animcache_vertexpositionbuffer;
+       r_meshbuffer_t *animcache_vertex3fbuffer;
        r_vertexmesh_t *animcache_vertexmesh;
        r_meshbuffer_t *animcache_vertexmeshbuffer;
 
@@ -537,7 +541,7 @@ qw_downloadtype_t;
 typedef enum capturevideoformat_e
 {
        CAPTUREVIDEOFORMAT_AVI_I420,
-       CAPTUREVIDEOFORMAT_OGG_VORBIS_THEORA,
+       CAPTUREVIDEOFORMAT_OGG_VORBIS_THEORA
 }
 capturevideoformat_t;
 
@@ -710,8 +714,19 @@ typedef struct client_static_s
        // password spectator name team skin topcolor bottomcolor rate noaim msg *ver *ip
        char userinfo[MAX_USERINFO_STRING];
 
+       // extra user info for the "connect" command
+       char connect_userinfo[MAX_USERINFO_STRING];
+
        // video capture stuff
        capturevideostate_t capturevideo;
+
+       // crypto channel
+       crypto_t crypto;
+
+       // ProQuake compatibility stuff
+       int proquake_servermod; // 0 = not proquake, 1 = proquake
+       int proquake_serverversion; // actual proquake server version * 10 (3.40 = 34, etc)
+       int proquake_serverflags; // 0 (PQF_CHEATFREE not supported)
 }
 client_static_t;
 
@@ -977,9 +992,9 @@ typedef struct client_state_s
        qboolean oldonground;
        double lastongroundtime;
        double hitgroundtime;
-
-       // used by bobroll
-       float bobroll_airtime;
+       float bob2_smooth;
+       float bobfall_speed;
+       float bobfall_swing;
 
        // don't change view angle, full screen, etc
        int intermission;
@@ -1193,6 +1208,7 @@ typedef struct client_state_s
        float movevars_maxairspeed;
        float movevars_stepheight;
        float movevars_airaccel_qw;
+       float movevars_airaccel_qw_stretchfactor;
        float movevars_airaccel_sideways_friction;
        float movevars_airstopaccelerate;
        float movevars_airstrafeaccelerate;
@@ -1200,6 +1216,7 @@ typedef struct client_state_s
        float movevars_airstrafeaccel_qw;
        float movevars_aircontrol;
        float movevars_aircontrol_power;
+       float movevars_aircontrol_penalty;
        float movevars_warsowbunny_airforwardaccel;
        float movevars_warsowbunny_accel;
        float movevars_warsowbunny_topspeed;
@@ -1231,8 +1248,11 @@ typedef struct client_state_s
        // server entity number corresponding to a clientside entity
        unsigned short csqc_server2csqcentitynumber[MAX_EDICTS];
        qboolean csqc_loaded;
-       vec3_t csqc_origin;
-       vec3_t csqc_angles;
+       vec3_t csqc_vieworigin;
+       vec3_t csqc_viewangles;
+       vec3_t csqc_vieworiginfromengine;
+       vec3_t csqc_viewanglesfromengine;
+       matrix4x4_t csqc_viewmodelmatrixfromengine;
        qboolean csqc_usecsqclistener;
        matrix4x4_t csqc_listenermatrix;
        char csqc_printtextbuf[MAX_INPUTLINE];
@@ -1250,6 +1270,9 @@ typedef struct client_state_s
        // freed on each level change
        size_t buildlightmapmemorysize;
        unsigned char *buildlightmapmemory;
+
+       // used by EntityState5_ReadUpdate
+       skeleton_t *engineskeletonobjects;
 }
 client_state_t;
 
@@ -1333,7 +1356,7 @@ void CL_Locs_FindLocationName(char *buffer, size_t buffersize, vec3_t point);
 void CL_Shutdown (void);
 void CL_Init (void);
 
-void CL_EstablishConnection(const char *host);
+void CL_EstablishConnection(const char *host, int firstarg);
 
 void CL_Disconnect (void);
 void CL_Disconnect_f (void);
@@ -1541,14 +1564,24 @@ typedef struct r_refdef_stats_s
        int particles;
        int drawndecals;
        int totaldecals;
-       int meshes;
-       int meshes_elements;
+       int draws;
+       int draws_vertices;
+       int draws_elements;
        int lights;
        int lights_clears;
        int lights_scissored;
        int lights_lighttriangles;
        int lights_shadowtriangles;
        int lights_dynamicshadowtriangles;
+       int bouncegrid_lights;
+       int bouncegrid_particles;
+       int bouncegrid_traces;
+       int bouncegrid_hits;
+       int bouncegrid_splats;
+       int bouncegrid_bounces;
+       int collisioncache_animated;
+       int collisioncache_cached;
+       int collisioncache_traced;
        int bloom;
        int bloom_copypixels;
        int bloom_drawpixels;
@@ -1556,6 +1589,8 @@ typedef struct r_refdef_stats_s
        int indexbufferuploadsize;
        int vertexbufferuploadcount;
        int vertexbufferuploadsize;
+       int framedatacurrent;
+       int framedatasize;
 }
 r_refdef_stats_t;
 
@@ -1621,12 +1656,12 @@ typedef struct r_refdef_view_s
        int width;
        int height;
        int depth;
-       r_viewport_t viewport;
+       r_viewport_t viewport; // note: if r_viewscale is used, the viewport.width and viewport.height may be less than width and height
 
        // which color components to allow (for anaglyph glasses)
        int colormask[4];
 
-       // global RGB color multiplier for rendering, this is required by HDR
+       // global RGB color multiplier for rendering
        float colorscale;
 
        // whether to call R_ClearScreen before rendering stuff
@@ -1635,7 +1670,7 @@ typedef struct r_refdef_view_s
        qboolean isoverlay;
 
        // whether to draw r_showtris and such, this is only true for the main
-       // view render, all secondary renders (HDR, mirrors, portals, cameras,
+       // view render, all secondary renders (mirrors, portals, cameras,
        // distortion effects, etc) omit such debugging information
        qboolean showdebug;
 
@@ -1697,6 +1732,7 @@ typedef struct r_refdef_scene_s {
        entity_render_t *tempentities;
        int numtempentities;
        int maxtempentities;
+       qboolean expandtempentities;
 
        // renderable dynamic lights
        rtlight_t *lights[MAX_DLIGHTS];
@@ -1774,7 +1810,7 @@ typedef struct r_refdef_s
        float fog_height_texcoordscale;
        char fogheighttexturename[64]; // detects changes to active fog height texture
 
-       qboolean draw2dstage;
+       int draw2dstage; // 0 = no, 1 = yes, other value = needs setting up again
 
        // true during envmap command capture
        qboolean envmap;
@@ -1788,6 +1824,9 @@ typedef struct r_refdef_s
        float shadowpolygonfactor;
        float shadowpolygonoffset;
 
+       // how long R_RenderView took on the previous frame
+       double lastdrawscreentime;
+
        // rendering stats for r_speeds display
        // (these are incremented in many places)
        r_refdef_stats_t stats;
@@ -1796,5 +1835,8 @@ r_refdef_t;
 
 extern r_refdef_t r_refdef;
 
+// warpzone prediction hack (CSQC builtin)
+void CL_RotateMoves(const matrix4x4_t *m);
+
 #endif