Don't use the miptex_t after converting to texture_t.

This commit is contained in:
Bill Currie 2012-01-07 17:08:07 +09:00
parent 29a0dc0b68
commit 204c1aba03
6 changed files with 8 additions and 9 deletions

View file

@ -431,7 +431,7 @@ void Mod_TouchModel (const char *name);
mleaf_t *Mod_PointInLeaf (const vec3_t p, model_t *model);
byte *Mod_LeafPVS (mleaf_t *leaf, model_t *model);
model_t *Mod_FindName (const char *name);
void Mod_ProcessTexture(miptex_t *mt, texture_t *tx);
void Mod_ProcessTexture(texture_t *tx);
void Mod_LoadExternalSkins (model_t * mod);
void Mod_LoadExternalTextures (model_t * mod);
void Mod_LoadLighting (bsp_t *bsp);

View file

@ -56,15 +56,15 @@ static __attribute__ ((used)) const char rcsid[] =
void
Mod_ProcessTexture (miptex_t *mt, texture_t *tx)
Mod_ProcessTexture (texture_t *tx)
{
char name[32];
snprintf (name, sizeof (name), "fb_%s", mt->name);
snprintf (name, sizeof (name), "fb_%s", tx->name);
tx->gl_fb_texturenum =
Mod_Fullbright ((byte *) (tx + 1), tx->width, tx->height, name);
tx->gl_texturenum =
GL_LoadTexture (mt->name, tx->width, tx->height, (byte *) (tx + 1),
GL_LoadTexture (tx->name, tx->width, tx->height, (byte *) (tx + 1),
true, false, 1);
}

View file

@ -57,7 +57,7 @@ static __attribute__ ((used)) const char rcsid[] = "$Id$";
#include "compat.h"
void
Mod_ProcessTexture (miptex_t *mt, texture_t *tx)
Mod_ProcessTexture (texture_t *tx)
{
}

View file

@ -194,7 +194,6 @@ Mod_LoadTextures (bsp_t *bsp)
memcpy (tx->name, mt->name, sizeof (tx->name));
mod_unique_miptex_name (loadmodel->textures, tx, i);
memcpy (mt->name, tx->name, sizeof (tx->name));//FIXME ext tex
tx->width = mt->width;
tx->height = mt->height;
for (j = 0; j < MIPLEVELS; j++)
@ -206,7 +205,7 @@ Mod_LoadTextures (bsp_t *bsp)
if (!strncmp (mt->name, "sky", 3))
loadmodel->skytexture = tx;
else {
Mod_ProcessTexture (mt, tx);
Mod_ProcessTexture (tx);
}
}

View file

@ -50,7 +50,7 @@ Mod_SubdivideSurface (msurface_t *fa)
}
void
Mod_ProcessTexture (miptex_t *mt, texture_t *tx)
Mod_ProcessTexture (texture_t *tx)
{
}

View file

@ -56,7 +56,7 @@ R_InitSky (struct texture_s *mt)
}
void
Mod_ProcessTexture (miptex_t *mx, texture_t *tx)
Mod_ProcessTexture (texture_t *tx)
{
}