X-Git-Url: http://de.git.xonotic.org/?a=blobdiff_plain;f=client.h;h=c57c01775394e16de7dab6ac670301616b387626;hb=c0b8da8b7012a02ffd416d83840ad2bae7056191;hp=c6a347fa1b64bd653d01723dd78e652f34e327b0;hpb=f7979501e5e4cbc90f9420bb1373207bcd470e6c;p=xonotic%2Fdarkplaces.git diff --git a/client.h b/client.h index c6a347fa..c57c0177 100644 --- a/client.h +++ b/client.h @@ -35,6 +35,33 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. #define LIGHTFLAG_NORMALMODE 1 #define LIGHTFLAG_REALTIMEMODE 2 +typedef struct tridecal_s +{ + // color and initial alpha value + unsigned char colors[3][4]; + // 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 + int triangleindex; +} +tridecal_t; + +typedef struct decalsystem_s +{ + dp_model_t *model; + double lastupdatetime; + int maxdecals; + int freedecal; + int numdecals; + tridecal_t *decals; + float *vertex3f; + float *texcoord2f; + float *color4f; + int *element3i; + unsigned short *element3s; +} +decalsystem_t; + typedef struct effect_s { int active; @@ -149,6 +176,9 @@ typedef struct rtlight_s /// (important on big surfaces such as terrain) int static_numlighttrispvsbytes; unsigned char *static_lighttrispvs; + /// masks of all shadowmap sides that have any potential static receivers or casters + int static_shadowmap_receivers; + int static_shadowmap_casters; } rtlight_t; @@ -315,6 +345,11 @@ typedef struct entity_render_s vec3_t modellight_diffuse; // q3bsp vec3_t modellight_lightdir; // q3bsp + // storage of decals on this entity + // (note: if allowdecals is set, be sure to call R_DecalSystem_Reset on removal!) + int allowdecals; + decalsystem_t decalsystem; + // FIELDS UPDATED BY RENDERER: // last time visible during trace culling double last_trace_visibility; @@ -1407,9 +1442,8 @@ void Debug_PolygonEnd(void); extern qboolean sb_showscores; -float FogPoint_World(const vec3_t p); -float FogPoint_Model(const vec3_t p); -float FogForDistance(vec_t dist); +float RSurf_FogVertex(const vec3_t p); +float RSurf_FogPoint(const vec3_t p); typedef struct r_refdef_stats_s { @@ -1617,10 +1651,14 @@ typedef struct r_refdef_s r_refdef_scene_t scene; - vec3_t fogcolor; - vec_t fogrange; - vec_t fograngerecip; - vec_t fogmasktabledistmultiplier; + float fogplane[4]; + float fogplaneviewdist; + qboolean fogplaneviewabove; + float fogheightfade; + float fogcolor[3]; + float fogrange; + float fograngerecip; + float fogmasktabledistmultiplier; #define FOGMASKTABLEWIDTH 1024 float fogmasktable[FOGMASKTABLEWIDTH]; float fogmasktable_start, fogmasktable_alpha, fogmasktable_range, fogmasktable_density; @@ -1631,6 +1669,8 @@ typedef struct r_refdef_s float fog_alpha; float fog_start; float fog_end; + float fog_height; + float fog_fadedepth; qboolean fogenabled; qboolean oldgl_fogenable;