X-Git-Url: http://git.xonotic.org/?a=blobdiff_plain;f=model_shared.h;h=066051ed432466353e3e26dbfa31b1c002be144b;hb=2af1e9af4d4c9398a788424f88e6b6234b84cd9a;hp=cd8eb168e986f78591ad9c7da840df403aa48fd9;hpb=afb7b0da2236ce8357305a3205fef6e5d22e550b;p=xonotic%2Fdarkplaces.git diff --git a/model_shared.h b/model_shared.h index cd8eb168..066051ed 100644 --- a/model_shared.h +++ b/model_shared.h @@ -409,7 +409,7 @@ typedef enum dptransparentsort_category_e TRANSPARENTSORT_HUD, }dptransparentsortcategory_t; -typedef struct q3shaderinfo_s +typedef struct shader_s { char name[Q3PATHLENGTH]; #define Q3SHADERINFO_COMPARE_START surfaceparms @@ -469,7 +469,7 @@ typedef struct q3shaderinfo_s float rtlightambient; #define Q3SHADERINFO_COMPARE_END rtlightambient } -q3shaderinfo_t; +shader_t; typedef struct texture_shaderpass_s { @@ -487,9 +487,10 @@ texture_shaderpass_t; typedef struct texture_s { - // q1bsp // name - //char name[16]; + char name[64]; + + // q1bsp // size unsigned int width, height; // SURF_ flags @@ -572,7 +573,8 @@ typedef struct texture_s // MATERIALFLAG_MODELLIGHT uses these parameters float render_modellight_ambient[3]; float render_modellight_diffuse[3]; - float render_modellight_lightdir[3]; + float render_modellight_lightdir_world[3]; + float render_modellight_lightdir_local[3]; float render_modellight_specular[3]; // lightmap rendering (not MATERIALFLAG_MODELLIGHT) float render_lightmap_ambient[3]; @@ -590,7 +592,6 @@ typedef struct texture_s int customblendfunc[2]; // q3bsp - char name[64]; int surfaceflags; int supercontents; @@ -687,10 +688,6 @@ typedef struct msurface_s struct q3deffect_s *effect; // q3bsp // mesh information for collisions (only used by q3bsp curves) int num_firstcollisiontriangle; - int *deprecatedq3data_collisionelement3i; // q3bsp - float *deprecatedq3data_collisionvertex3f; // q3bsp - float *deprecatedq3data_collisionbbox6f; // collision optimization - contains combined bboxes of every data_collisionstride triangles - float *deprecatedq3data_bbox6f; // collision optimization - contains combined bboxes of every data_collisionstride triangles // surfaces own ranges of vertices and triangles in the model->surfmesh int num_triangles; // number of triangles @@ -701,10 +698,6 @@ typedef struct msurface_s // mesh information for collisions (only used by q3bsp curves) int num_collisiontriangles; // q3bsp int num_collisionvertices; // q3bsp - int deprecatedq3num_collisionbboxstride; - int deprecatedq3num_bboxstride; - // FIXME: collisionmarkframe should be kept in a separate array - int deprecatedq3collisionmarkframe; // q3bsp // don't collide twice in one trace // used by Mod_Mesh_Finalize when building sortedmodelsurfaces qboolean included; @@ -1068,6 +1061,8 @@ typedef struct model_s // if set, the model contains light information (lightmap, or vertexlight) qboolean lit; float lightmapscale; + + qboolean nolerp; } dp_model_t; @@ -1132,7 +1127,7 @@ void Mod_CreateCollisionMesh(dp_model_t *mod); void Mod_FreeQ3Shaders(void); void Mod_LoadQ3Shaders(void); -q3shaderinfo_t *Mod_LookupQ3Shader(const char *name); +shader_t *Mod_LookupQ3Shader(const char *name); qboolean Mod_LoadTextureFromQ3Shader(mempool_t *mempool, const char *modelname, texture_t *texture, const char *name, qboolean warnmissing, qboolean fallback, int defaulttexflags, int defaultmaterialflags); texture_shaderpass_t *Mod_CreateShaderPass(mempool_t *mempool, skinframe_t *skinframe); texture_shaderpass_t *Mod_CreateShaderPassFromQ3ShaderLayer(mempool_t *mempool, const char *modelname, q3shaderinfo_layer_t *layer, int layerindex, int texflags, const char *texturename);