mirror of
https://github.com/ZDoom/qzdoom-gpl.git
synced 2025-02-27 21:50:47 +00:00
- 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:
parent
bd811bea87
commit
3c7664a460
4 changed files with 9 additions and 11 deletions
|
@ -676,7 +676,7 @@ void GLSprite::Process(AActor* thing,sector_t * sector)
|
||||||
// allow disabling of the fullbright flag by a brightmap definition
|
// allow disabling of the fullbright flag by a brightmap definition
|
||||||
// (e.g. to do the gun flashes of Doom's zombies correctly.
|
// (e.g. to do the gun flashes of Doom's zombies correctly.
|
||||||
fullbright = (thing->flags5 & MF5_BRIGHT) ||
|
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 :
|
lightlevel=fullbright? 255 :
|
||||||
gl_ClampLight(rendersector->GetTexture(sector_t::ceiling) == skyflatnum ?
|
gl_ClampLight(rendersector->GetTexture(sector_t::ceiling) == skyflatnum ?
|
||||||
|
|
|
@ -211,7 +211,7 @@ void FGLRenderer::DrawPlayerSprites(sector_t * viewsector, bool hudModelStep)
|
||||||
{
|
{
|
||||||
FMaterial * tex=FMaterial::ValidateTexture(lump, false, false);
|
FMaterial * tex=FMaterial::ValidateTexture(lump, false, false);
|
||||||
if (tex)
|
if (tex)
|
||||||
disablefullbright = tex->tex->gl_info.bBrightmapDisablesFullbright;
|
disablefullbright = tex->tex->gl_info.bDisableFullbright;
|
||||||
}
|
}
|
||||||
statebright[i] = !!psp->state->GetFullbright() && !disablefullbright;
|
statebright[i] = !!psp->state->GetFullbright() && !disablefullbright;
|
||||||
}
|
}
|
||||||
|
|
|
@ -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))
|
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.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;
|
bFullbright = false;
|
||||||
bSkyColorDone = false;
|
bSkyColorDone = false;
|
||||||
bBrightmapChecked = false;
|
bBrightmapChecked = false;
|
||||||
bBrightmap = false;
|
bDisableFullbright = false;
|
||||||
bBrightmapDisablesFullbright = false;
|
|
||||||
bNoFilter = false;
|
bNoFilter = false;
|
||||||
bNoCompress = false;
|
bNoCompress = false;
|
||||||
areas = NULL;
|
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)
|
bool FTexture::ProcessData(unsigned char * buffer, int w, int h, bool ispatch)
|
||||||
{
|
{
|
||||||
if (bMasked && !gl_info.bBrightmap)
|
if (bMasked)
|
||||||
{
|
{
|
||||||
bMasked = SmoothEdges(buffer, w, h);
|
bMasked = SmoothEdges(buffer, w, h);
|
||||||
if (bMasked && !ispatch) FindHoles(buffer, w, h);
|
if (bMasked && !ispatch) FindHoles(buffer, w, h);
|
||||||
|
@ -620,7 +619,7 @@ FBrightmapTexture::FBrightmapTexture (FTexture *source)
|
||||||
bNoDecals = source->bNoDecals;
|
bNoDecals = source->bNoDecals;
|
||||||
Rotations = source->Rotations;
|
Rotations = source->Rotations;
|
||||||
UseType = source->UseType;
|
UseType = source->UseType;
|
||||||
gl_info.bBrightmap = true;
|
bMasked = false;
|
||||||
id.SetInvalid();
|
id.SetInvalid();
|
||||||
SourceLump = -1;
|
SourceLump = -1;
|
||||||
}
|
}
|
||||||
|
@ -737,10 +736,10 @@ void gl_ParseBrightmap(FScanner &sc, int deflump)
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
bmtex->gl_info.bBrightmap = true;
|
bmtex->bMasked = false;
|
||||||
tex->gl_info.Brightmap = bmtex;
|
tex->gl_info.Brightmap = bmtex;
|
||||||
}
|
}
|
||||||
tex->gl_info.bBrightmapDisablesFullbright = disable_fullbright;
|
tex->gl_info.bDisableFullbright = disable_fullbright;
|
||||||
}
|
}
|
||||||
|
|
||||||
//==========================================================================
|
//==========================================================================
|
||||||
|
|
|
@ -347,8 +347,7 @@ public:
|
||||||
bool bSkybox:1; // This is a skybox
|
bool bSkybox:1; // This is a skybox
|
||||||
bool bSkyColorDone:1; // Fill color for sky
|
bool bSkyColorDone:1; // Fill color for sky
|
||||||
char bBrightmapChecked:1; // Set to 1 if brightmap has been checked
|
char bBrightmapChecked:1; // Set to 1 if brightmap has been checked
|
||||||
bool bBrightmap:1; // This is a brightmap
|
bool bDisableFullbright:1; // This texture will not be displayed as fullbright sprite
|
||||||
bool bBrightmapDisablesFullbright:1; // This disables fullbright display
|
|
||||||
bool bNoFilter:1;
|
bool bNoFilter:1;
|
||||||
bool bNoCompress:1;
|
bool bNoCompress:1;
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue