- added automatic brightmaps.
Everything in the brightmaps/auto directory will automatically be assigned to the same-named texture.
This commit is contained in:
parent
7011010ff2
commit
bde73fc530
2 changed files with 31 additions and 0 deletions
|
|
@ -665,11 +665,13 @@ void gl_ParseBrightmap(FScanner &sc, int deflump)
|
|||
|
||||
if (bmtex != NULL)
|
||||
{
|
||||
/* I do not think this is needed any longer
|
||||
if (tex->bWarped != 0)
|
||||
{
|
||||
Printf("Cannot combine warping with brightmap on texture '%s'\n", tex->Name.GetChars());
|
||||
return;
|
||||
}
|
||||
*/
|
||||
|
||||
bmtex->bMasked = false;
|
||||
tex->gl_info.Brightmap = bmtex;
|
||||
|
|
@ -677,6 +679,33 @@ void gl_ParseBrightmap(FScanner &sc, int deflump)
|
|||
tex->gl_info.bDisableFullbright = disable_fullbright;
|
||||
}
|
||||
|
||||
//==========================================================================
|
||||
//
|
||||
//
|
||||
//
|
||||
//==========================================================================
|
||||
|
||||
void AddAutoBrightmaps()
|
||||
{
|
||||
int num = Wads.GetNumLumps();
|
||||
for (unsigned i = 0; i < num; i++)
|
||||
{
|
||||
const char *name = Wads.GetLumpFullName(i);
|
||||
if (strstr(name, "brightmaps/auto/") == name)
|
||||
{
|
||||
TArray<FTextureID> list;
|
||||
FString texname = ExtractFileBase(name, false);
|
||||
TexMan.ListTextures(texname, list);
|
||||
auto bmtex = TexMan.FindTexture(name, FTexture::TEX_Any, FTextureManager::TEXMAN_TryAny);
|
||||
for (auto texid : list)
|
||||
{
|
||||
bmtex->bMasked = false;
|
||||
TexMan[texid]->gl_info.Brightmap = bmtex;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//==========================================================================
|
||||
//
|
||||
// Parses a GLBoom+ detail texture definition
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue