mirror of
https://github.com/nzp-team/quakespasm.git
synced 2024-11-14 16:30:48 +00:00
Add support for dp-style glow/luma textures when loading externally
This commit is contained in:
parent
82c2680747
commit
a56558ceb9
1 changed files with 14 additions and 2 deletions
|
@ -2498,8 +2498,20 @@ void *Mod_LoadAllSkins (int numskins, daliasskintype_t *pskintype)
|
||||||
if (data) {
|
if (data) {
|
||||||
pheader->gltextures[i][0] = TexMgr_LoadImage (loadmodel, filename, fwidth, fheight,
|
pheader->gltextures[i][0] = TexMgr_LoadImage (loadmodel, filename, fwidth, fheight,
|
||||||
SRC_RGBA, data, filename, 0, TEXPREF_ALPHA|texflags|TEXPREF_MIPMAP );
|
SRC_RGBA, data, filename, 0, TEXPREF_ALPHA|texflags|TEXPREF_MIPMAP );
|
||||||
//pheader->gltextures[i][0] = loadtextureimage(loadmodel->name);
|
|
||||||
pheader->fbtextures[i][0] = NULL;
|
//now try to load glow/luma image from the same place
|
||||||
|
Hunk_FreeToLowMark (mark);
|
||||||
|
q_snprintf (filename2, sizeof(filename2), "%s_glow", filename);
|
||||||
|
data = Image_LoadImage (filename2, &fwidth, &fheight);
|
||||||
|
if (!data)
|
||||||
|
{
|
||||||
|
q_snprintf (filename2, sizeof(filename2), "%s_luma", filename);
|
||||||
|
data = Image_LoadImage (filename2, &fwidth, &fheight);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (data)
|
||||||
|
tx->fullbright = TexMgr_LoadImage (loadmodel, filename2, fwidth, fheight,
|
||||||
|
SRC_RGBA, data, filename, 0, TEXPREF_MIPMAP | extraflags );
|
||||||
} else {
|
} else {
|
||||||
|
|
||||||
//johnfitz -- rewritten
|
//johnfitz -- rewritten
|
||||||
|
|
Loading…
Reference in a new issue