From 1be98dcf084a72c0c200d1c1e92295307ecb9b25 Mon Sep 17 00:00:00 2001 From: Ragnvald Maartmann-Moe IV Date: Tue, 23 Dec 2003 20:05:52 +0000 Subject: [PATCH] gl_external_textures -> gl_textures_external, plus whitespace & codingstyle. --- include/QF/model.h | 2 +- libs/models/brush/gl_model_brush.c | 4 +--- libs/models/model.c | 14 +++++++------- 3 files changed, 9 insertions(+), 11 deletions(-) diff --git a/include/QF/model.h b/include/QF/model.h index 37ec3d043..2bd7d6cee 100644 --- a/include/QF/model.h +++ b/include/QF/model.h @@ -463,7 +463,7 @@ void Mod_Print (void); extern struct cvar_s *gl_mesh_cache; extern struct cvar_s *gl_subdivide_size; extern struct cvar_s *gl_alias_render_tri; -extern struct cvar_s *gl_external_textures; +extern struct cvar_s *gl_textures_external; extern model_t *loadmodel; extern char *loadname; extern byte *mod_base; diff --git a/libs/models/brush/gl_model_brush.c b/libs/models/brush/gl_model_brush.c index 76fa45973..fe6640ec8 100644 --- a/libs/models/brush/gl_model_brush.c +++ b/libs/models/brush/gl_model_brush.c @@ -70,7 +70,6 @@ Mod_ProcessTexture (miptex_t *mt, texture_t *tx) true, false, 1); } - static tex_t * Mod_LoadAnExternalTexture (char * tname, char *mname) { @@ -121,7 +120,6 @@ Mod_LoadExternalTextures (model_t *mod) mod->name); tx->gl_fb_texturenum = 0; - if (luma) { tx->gl_fb_texturenum = GL_LoadTexture (va ("fb_%s", tx->name), luma->width, @@ -130,7 +128,7 @@ Mod_LoadExternalTextures (model_t *mod) } else if (base->format == 1) { tx->gl_fb_texturenum = Mod_Fullbright (luma->data, luma->width, luma->height, - va("fb_%s", tx->name)); + va ("fb_%s", tx->name)); } } } diff --git a/libs/models/model.c b/libs/models/model.c index 1ca4e0ec4..028921b89 100644 --- a/libs/models/model.c +++ b/libs/models/model.c @@ -61,7 +61,7 @@ texture_t *r_notexture_mip; cvar_t *gl_mesh_cache; cvar_t *gl_subdivide_size; cvar_t *gl_alias_render_tri; -cvar_t *gl_external_textures; +cvar_t *gl_textures_external; static void Mod_CallbackLoad (void *object, cache_allocator_t allocator); @@ -105,11 +105,11 @@ Mod_Init_Cvars (void) "minimum triangle count in a model for its mesh" " to be cached. 0 to disable caching"); gl_alias_render_tri = - Cvar_Get("gl_alias_render_tri", "0", CVAR_ARCHIVE, NULL, - "When loading alias models mesh for pure triangle rendering"); - gl_external_textures = - Cvar_Get("gl_external_textures", "1", CVAR_ARCHIVE, NULL, - "Use external .png, .tga or .pcx to replace BSP textures"); + Cvar_Get ("gl_alias_render_tri", "0", CVAR_ARCHIVE, NULL, "When " + "loading alias models mesh for pure triangle rendering"); + gl_textures_external = + Cvar_Get ("gl_textures_external", "1", CVAR_ARCHIVE, NULL, + "Use external textures to replace BSP textures"); } void @@ -210,7 +210,7 @@ Mod_RealLoadModel (model_t *mod, qboolean crash, cache_allocator_t allocator) default: Mod_LoadBrushModel (mod, buf); - if (gl_external_textures->int_val) + if (gl_textures_external->int_val) Mod_LoadExternalTextures (mod); break; }