diff --git a/src/gl/scene/gl_sprite.cpp b/src/gl/scene/gl_sprite.cpp index df6f37dd0..89ff9cdb9 100644 --- a/src/gl/scene/gl_sprite.cpp +++ b/src/gl/scene/gl_sprite.cpp @@ -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 ? diff --git a/src/gl/scene/gl_weapon.cpp b/src/gl/scene/gl_weapon.cpp index 35cf93183..67950ce0e 100644 --- a/src/gl/scene/gl_weapon.cpp +++ b/src/gl/scene/gl_weapon.cpp @@ -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; } diff --git a/src/gl/textures/gl_texture.cpp b/src/gl/textures/gl_texture.cpp index 53a07d437..8b314f02f 100644 --- a/src/gl/textures/gl_texture.cpp +++ b/src/gl/textures/gl_texture.cpp @@ -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; } //========================================================================== diff --git a/src/textures/textures.h b/src/textures/textures.h index df2707401..fbdce0f5c 100644 --- a/src/textures/textures.h +++ b/src/textures/textures.h @@ -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;