don't bother with fullbright skins for models that are allways fullbright and

clean up a misplaced function prototype
This commit is contained in:
Bill Currie 2001-11-20 08:45:26 +00:00
parent b836566a3d
commit ec75b71711
3 changed files with 6 additions and 11 deletions

View file

@ -460,6 +460,8 @@ model_t *Mod_FindName (const char *name);
void Mod_ProcessTexture(miptex_t *mt, texture_t *tx);
void Mod_LoadLighting (lump_t *l);
int Mod_CalcFullbright (byte *in, byte *out, int pixels);
int Mod_Fullbright (byte * skin, int width, int height, char *name);
void *Mod_LoadAliasFrame (void *pin, int *posenum, maliasframedesc_t *frame);
void *Mod_LoadAliasGroup (void *pin, int *posenum, maliasframedesc_t *frame);

View file

@ -135,13 +135,11 @@ Mod_FloodFillSkin (byte * skin, int skinwidth, int skinheight)
}
}
int Mod_Fullbright (byte * skin, int width, int height, char *name);
void *
Mod_LoadSkin (byte * skin, int skinsize, int snum, int gnum, qboolean group)
{
char name[32];
int fbtexnum;
int fbtexnum = 0;
Mod_FloodFillSkin (skin, pheader->mdl.skinwidth, pheader->mdl.skinheight);
// save 8 bit texels for the player model to remap
@ -161,9 +159,9 @@ Mod_LoadSkin (byte * skin, int skinsize, int snum, int gnum, qboolean group)
} else {
snprintf (name, sizeof (name), "fb_%s_%i", loadmodel->name, snum);
}
fbtexnum =
Mod_Fullbright (skin + 1, pheader->mdl.skinwidth,
pheader->mdl.skinheight, name);
if (!loadmodel->fullbright)
fbtexnum = Mod_Fullbright (skin + 1, pheader->mdl.skinwidth,
pheader->mdl.skinheight, name);
if ((loadmodel->hasfullbrights = (fbtexnum))) {
pheader->gl_fb_texturenum[snum][gnum] = fbtexnum;
}

View file

@ -48,13 +48,8 @@ static const char rcsid[] =
#include "compat.h"
int Mod_Fullbright (byte * skin, int width, int height, char *name);
const int mod_lightmap_bytes = 3;
void
Mod_ProcessTexture (miptex_t *mt, texture_t *tx)
{