From 220bfb551bac9181cd121366a3c858ef1499fcdf Mon Sep 17 00:00:00 2001 From: cloudwalk Date: Sat, 4 Jul 2020 14:09:34 +0000 Subject: [PATCH] Rename q3shaderinfo_t to shader_t, to be in line with other engines git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@12781 d7cf8633-e32d-0410-b094-e92efae38249 --- model_shared.c | 12 ++++++------ model_shared.h | 6 +++--- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/model_shared.c b/model_shared.c index 94da0da8..0ce27bc7 100644 --- a/model_shared.c +++ b/model_shared.c @@ -47,7 +47,7 @@ static memexpandablearray_t models; static mempool_t* q3shaders_mem; typedef struct q3shader_hash_entry_s { - q3shaderinfo_t shader; + shader_t shader; struct q3shader_hash_entry_s* chain; } q3shader_hash_entry_t; #define Q3SHADER_HASH_SIZE 1021 @@ -1370,7 +1370,7 @@ void Mod_FreeQ3Shaders(void) Mem_FreePool(&q3shaders_mem); } -static void Q3Shader_AddToHash (q3shaderinfo_t* shader) +static void Q3Shader_AddToHash (shader_t* shader) { unsigned short hash = CRC_Block_CaseInsensitive ((const unsigned char *)shader->name, strlen (shader->name)); q3shader_hash_entry_t* entry = q3shader_data->hash + (hash % Q3SHADER_HASH_SIZE); @@ -1425,7 +1425,7 @@ static void Q3Shader_AddToHash (q3shaderinfo_t* shader) /* else: head of chain, in hash entry array */ entry = lastEntry; } - memcpy (&entry->shader, shader, sizeof (q3shaderinfo_t)); + memcpy (&entry->shader, shader, sizeof (shader_t)); } void Mod_LoadQ3Shaders(void) @@ -1435,7 +1435,7 @@ void Mod_LoadQ3Shaders(void) fssearch_t *search; char *f; const char *text; - q3shaderinfo_t shader; + shader_t shader; q3shaderinfo_layer_t *layer; int numparameters; char parameter[TEXTURE_MAXFRAMES + 4][Q3PATHLENGTH]; @@ -2181,7 +2181,7 @@ void Mod_LoadQ3Shaders(void) Mem_Free(custsurfaceparmnames[j]); } -q3shaderinfo_t *Mod_LookupQ3Shader(const char *name) +shader_t *Mod_LookupQ3Shader(const char *name) { unsigned short hash; q3shader_hash_entry_t* entry; @@ -2241,7 +2241,7 @@ qboolean Mod_LoadTextureFromQ3Shader(mempool_t *mempool, const char *modelname, { int texflagsmask, texflagsor; qboolean success = true; - q3shaderinfo_t *shader; + shader_t *shader; if (!name) name = ""; strlcpy(texture->name, name, sizeof(texture->name)); diff --git a/model_shared.h b/model_shared.h index 807d1cab..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 { @@ -1127,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); -- 2.39.2