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
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);
/* 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)
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];
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;
{
int texflagsmask, texflagsor;
qboolean success = true;
- q3shaderinfo_t *shader;
+ shader_t *shader;
if (!name)
name = "";
strlcpy(texture->name, name, sizeof(texture->name));
TRANSPARENTSORT_HUD,
}dptransparentsortcategory_t;
-typedef struct q3shaderinfo_s
+typedef struct shader_s
{
char name[Q3PATHLENGTH];
#define Q3SHADERINFO_COMPARE_START surfaceparms
float rtlightambient;
#define Q3SHADERINFO_COMPARE_END rtlightambient
}
-q3shaderinfo_t;
+shader_t;
typedef struct texture_shaderpass_s
{
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);