X-Git-Url: http://de.git.xonotic.org/?a=blobdiff_plain;ds=sidebyside;f=model_shared.h;h=dedd4d8ce04d589a8bfd76a9d384e967e9106663;hb=2048a824c4d5c5d4d031e519dd3a125db35415fd;hp=8b73377e53f1c6ce1fae104337d6bf13858e6b99;hpb=a14d8ac6ca1ca641b68a666983531298ee036576;p=xonotic%2Fdarkplaces.git diff --git a/model_shared.h b/model_shared.h index 8b73377e..dedd4d8c 100644 --- a/model_shared.h +++ b/model_shared.h @@ -251,6 +251,7 @@ shadowmesh_t; #define Q3TEXTUREFLAG_REFLECTION 512 #define Q3TEXTUREFLAG_WATERSHADER 1024 #define Q3TEXTUREFLAG_CAMERA 2048 +#define Q3TEXTUREFLAG_TRANSPARENTSORT 4096 #define Q3PATHLENGTH 64 #define TEXTURE_MAXFRAMES 64 @@ -426,12 +427,19 @@ typedef enum dpoffsetmapping_technique_s OFFSETMAPPING_RELIEF // relief }dpoffsetmapping_technique_t; +typedef enum dptransparentsort_category_e +{ + TRANSPARENTSORT_SKY, + TRANSPARENTSORT_DISTANCE, + TRANSPARENTSORT_HUD, +}dptransparentsortcategory_t; typedef struct q3shaderinfo_s { char name[Q3PATHLENGTH]; #define Q3SHADERINFO_COMPARE_START surfaceparms int surfaceparms; + int surfaceflags; int textureflags; int numlayers; qboolean lighting; @@ -452,6 +460,9 @@ typedef struct q3shaderinfo_s // add collisions to all triangles of the surface qboolean dpmeshcollisions; + // kill shader based on cvar checks + qboolean dpshaderkill; + // fake reflection char dpreflectcube[Q3PATHLENGTH]; @@ -468,17 +479,21 @@ typedef struct q3shaderinfo_s // offsetmapping dpoffsetmapping_technique_t offsetmapping; float offsetscale; + float offsetbias; // 0 is normal, 1 leads to alpha 0 being neutral and alpha 1 pushing "out" // polygonoffset (only used if Q3TEXTUREFLAG_POLYGONOFFSET) float biaspolygonoffset, biaspolygonfactor; + // transparent sort category + dptransparentsortcategory_t transparentsort; + // gloss float specularscalemod; float specularpowermod; // rtlightning ambient addition float rtlightambient; -#define Q3SHADERINFO_COMPARE_END specularpowermod +#define Q3SHADERINFO_COMPARE_END rtlightambient } q3shaderinfo_t; @@ -595,7 +610,6 @@ typedef struct texture_s char name[64]; int surfaceflags; int supercontents; - int surfaceparms; int textureflags; // reflection @@ -612,6 +626,10 @@ typedef struct texture_s // offsetmapping dpoffsetmapping_technique_t offsetmapping; float offsetscale; + float offsetbias; + + // transparent sort category + dptransparentsortcategory_t transparentsort; // gloss float specularscalemod; @@ -719,6 +737,8 @@ typedef struct model_brush_s { // true if this model is a HalfLife .bsp file qboolean ishlbsp; + // true if this model is a BSP2 .bsp file (expanded 32bit bsp format for DarkPlaces, RMQ, others?) + qboolean isbsp2; // string of entity definitions (.map format) char *entities; @@ -794,7 +814,7 @@ typedef struct model_brush_s int (*FindBoxClusters)(struct model_s *model, const vec3_t mins, const vec3_t maxs, int maxclusters, int *clusterlist); void (*LightPoint)(struct model_s *model, const vec3_t p, vec3_t ambientcolor, vec3_t diffusecolor, vec3_t diffusenormal); void (*FindNonSolidLocation)(struct model_s *model, const vec3_t in, vec3_t out, vec_t radius); - mleaf_t *(*PointInLeaf)(struct model_s *model, const float *p); + mleaf_t *(*PointInLeaf)(struct model_s *model, const vec3_t p); // these are actually only found on brushq1, but NULL is handled gracefully void (*AmbientSoundLevelsForPoint)(struct model_s *model, const vec3_t p, unsigned char *out, int outsize); void (*RoundUpToHullSize)(struct model_s *cmodel, const vec3_t inmins, const vec3_t inmaxs, vec3_t outmins, vec3_t outmaxs); @@ -816,7 +836,7 @@ model_brush_t; typedef struct model_brushq1_s { - dmodel_t *submodels; + mmodel_t *submodels; int numvertexes; mvertex_t *vertexes; @@ -974,10 +994,10 @@ typedef struct model_s // for skeletal models int num_bones; aliasbone_t *data_bones; - float num_posescale; // scaling factor from origin in poses6s format (includes divide by 32767) - float num_poseinvscale; // scaling factor to origin in poses6s format (includes multiply by 32767) + float num_posescale; // scaling factor from origin in poses7s format (includes divide by 32767) + float num_poseinvscale; // scaling factor to origin in poses7s format (includes multiply by 32767) int num_poses; - short *data_poses6s; // origin xyz, quat xyz, w implied negative, unit length, values normalized to +/-32767 range + short *data_poses7s; // origin xyz, quat xyzw, unit length, values normalized to +/-32767 range float *data_baseboneposeinverse; // textures of this model int num_textures; @@ -1044,6 +1064,7 @@ typedef struct model_s // if set, the model contains light information (lightmap, or vertexlight) qboolean lit; + float lightmapscale; } dp_model_t;