X-Git-Url: http://git.xonotic.org/?a=blobdiff_plain;f=client.h;h=16427924bdad29d9df8fcb6bd418fbf75d37670d;hb=a737a50df4004443459e818e1e463141ef246280;hp=29c8e34971603eb99927482f7d1ebb23fde6bff9;hpb=b2bc40de23857c762b317d4b02230246e142ff48;p=xonotic%2Fdarkplaces.git diff --git a/client.h b/client.h index 29c8e349..16427924 100644 --- a/client.h +++ b/client.h @@ -222,10 +222,27 @@ typedef struct dlight_s } dlight_t; -typedef struct frameblend_s +#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 +// framegroups at once +#define MAX_FRAMEBLENDS MAX_FRAMEGROUPBLENDS +typedef struct frameblend_s +{ + int subframe; + float lerp; } frameblend_t; @@ -271,18 +288,9 @@ typedef struct entity_render_s // colormod tinting of models float colormod[3]; - // interpolated animation + // interpolated animation - active framegroups and blend factors + framegroupblend_t framegroupblend[MAX_FRAMEGROUPBLENDS]; - // frame that the model is interpolating from - int frame1; - // frame that the model is interpolating to - int frame2; - // interpolation factor, usually computed from frame2time - float framelerp; - // time frame1 began playing (for framegroup animations) - double frame1time; - // time frame2 began playing (for framegroup animations) - double frame2time; // time of last model change (for shader animations) double shadertime; @@ -290,8 +298,8 @@ typedef struct entity_render_s // calculated during R_AddModelEntities vec3_t mins, maxs; - // 4 frame numbers (-1 if not used) and their blending scalers (0-1), if interpolation is not desired, use frame instead - frameblend_t frameblend[4]; + // subframe numbers (-1 if not used) and their blending scalers (0-1), if interpolation is not desired, use subframeblend[0].subframe + frameblend_t frameblend[MAX_FRAMEBLENDS]; // current lighting from map (updated ONLY by client code, not renderer) vec3_t modellight_ambient; @@ -474,10 +482,14 @@ typedef struct capturevideostate_s int width, height; // precomputed RGB to YUV tables - // if a capturevideo module uses these, it doesn't need to care for scr_screenshot_gammaboost.value + // converts the RGB values to YUV (see cap_avi.c for how to use them) short rgbtoyuvscaletable[3][3][256]; unsigned char yuvnormalizetable[3][256]; + // precomputed gamma ramp (only needed if the capturevideo module uses RGB output) + // note: to map from these values to RGB24, you have to multiply by 255.0/65535.0, then add 0.5, then cast to integer + unsigned short vidramp[256 * 3]; + // stuff to be filled in by the video format module capturevideoformat_t format; const char *formatextension; @@ -673,7 +685,7 @@ ptype_t; typedef struct decal_s { - // fields used by rendering: (40 bytes) + // fields used by rendering: (44 bytes) unsigned short typeindex; unsigned short texnum; vec3_t org; @@ -682,6 +694,7 @@ typedef struct decal_s float alpha; // 0-255 unsigned char color[3]; unsigned char unused1; + int clusterindex; // cheap culling by pvs // fields not used by rendering: (36 bytes in 32bit, 40 bytes in 64bit) float time2; // used for decal fade @@ -1250,6 +1263,7 @@ void CL_Parse_DumpPacket(void); void CL_Parse_ErrorCleanUp(void); void QW_CL_StartUpload(unsigned char *data, int size); extern cvar_t qport; +void CL_KeepaliveMessage(qboolean readmessages); // call this during loading of large content // // view