- we don't really need a bBrightmap in a texture. All it did was duplicate some functionality of bMasked.

- renamed bBrightmapDisablesFullbright flag.
This commit is contained in:
Christoph Oelckers 2014-10-26 08:41:52 +01:00
parent bd811bea87
commit 3c7664a460
4 changed files with 9 additions and 11 deletions

View file

@ -676,7 +676,7 @@ void GLSprite::Process(AActor* thing,sector_t * sector)
// allow disabling of the fullbright flag by a brightmap definition
// (e.g. to do the gun flashes of Doom's zombies correctly.
fullbright = (thing->flags5 & MF5_BRIGHT) ||
((thing->renderflags & RF_FULLBRIGHT) && (!gltexture || !gltexture->tex->gl_info.bBrightmapDisablesFullbright));
((thing->renderflags & RF_FULLBRIGHT) && (!gltexture || !gltexture->tex->gl_info.bDisableFullbright));
lightlevel=fullbright? 255 :
gl_ClampLight(rendersector->GetTexture(sector_t::ceiling) == skyflatnum ?

View file

@ -211,7 +211,7 @@ void FGLRenderer::DrawPlayerSprites(sector_t * viewsector, bool hudModelStep)
{
FMaterial * tex=FMaterial::ValidateTexture(lump, false, false);
if (tex)
disablefullbright = tex->tex->gl_info.bBrightmapDisablesFullbright;
disablefullbright = tex->tex->gl_info.bDisableFullbright;
}
statebright[i] = !!psp->state->GetFullbright() && !disablefullbright;
}

View file

@ -158,7 +158,7 @@ void gl_GenerateGlobalBrightmapFromColormap()
if (cmapdata[i+j*256]!=i || (paldata[3*i]<10 && paldata[3*i+1]<10 && paldata[3*i+2]<10))
{
GlobalBrightmap.Remap[i]=black;
GlobalBrightmap.Palette[i]=PalEntry(0,0,0);
GlobalBrightmap.Palette[i] = PalEntry(255, 0, 0, 0);
}
}
}
@ -232,8 +232,7 @@ FTexture::MiscGLInfo::MiscGLInfo() throw()
bFullbright = false;
bSkyColorDone = false;
bBrightmapChecked = false;
bBrightmap = false;
bBrightmapDisablesFullbright = false;
bDisableFullbright = false;
bNoFilter = false;
bNoCompress = false;
areas = NULL;
@ -594,7 +593,7 @@ bool FTexture::SmoothEdges(unsigned char * buffer,int w, int h)
bool FTexture::ProcessData(unsigned char * buffer, int w, int h, bool ispatch)
{
if (bMasked && !gl_info.bBrightmap)
if (bMasked)
{
bMasked = SmoothEdges(buffer, w, h);
if (bMasked && !ispatch) FindHoles(buffer, w, h);
@ -620,7 +619,7 @@ FBrightmapTexture::FBrightmapTexture (FTexture *source)
bNoDecals = source->bNoDecals;
Rotations = source->Rotations;
UseType = source->UseType;
gl_info.bBrightmap = true;
bMasked = false;
id.SetInvalid();
SourceLump = -1;
}
@ -737,10 +736,10 @@ void gl_ParseBrightmap(FScanner &sc, int deflump)
return;
}
bmtex->gl_info.bBrightmap = true;
bmtex->bMasked = false;
tex->gl_info.Brightmap = bmtex;
}
tex->gl_info.bBrightmapDisablesFullbright = disable_fullbright;
tex->gl_info.bDisableFullbright = disable_fullbright;
}
//==========================================================================

View file

@ -347,8 +347,7 @@ public:
bool bSkybox:1; // This is a skybox
bool bSkyColorDone:1; // Fill color for sky
char bBrightmapChecked:1; // Set to 1 if brightmap has been checked
bool bBrightmap:1; // This is a brightmap
bool bBrightmapDisablesFullbright:1; // This disables fullbright display
bool bDisableFullbright:1; // This texture will not be displayed as fullbright sprite
bool bNoFilter:1;
bool bNoCompress:1;