Move no-mipmapping from actor renderflag/particle flag, to a material property in GLDEFS, where it makes more sense. The feature was introduced in the short-lived engine version of 4.13 which was deemed too broken and needed to be replaced with a newer version anyway, so might as well perform an API-breaking change at this point in time. Note that this currently only works for sprites (its primary targeted use case) -- walls, flats and models can be patched in later.

This commit is contained in:
nashmuhandes 2024-10-18 21:36:16 +08:00 committed by Rachael Alexanderson
commit a45bf49616
No known key found for this signature in database
GPG key ID: 26A8ACCE97115EE0
8 changed files with 29 additions and 15 deletions

View file

@ -1270,6 +1270,7 @@ class GLDefsParser
bool disable_fullbright_specified = false;
bool thiswad = false;
bool iwad = false;
bool no_mipmap = false;
UserShaderDesc usershader;
TArray<FString> texNameList;
@ -1319,6 +1320,10 @@ class GLDefsParser
// only affects textures defined in the IWAD.
iwad = true;
}
else if (sc.Compare("nomipmap"))
{
no_mipmap = true;
}
else if (sc.Compare("glossiness"))
{
sc.MustGetFloat();
@ -1422,6 +1427,8 @@ class GLDefsParser
if (!useme) return;
}
tex->SetNoMipmap(no_mipmap);
FGameTexture **bindings[6] =
{
&mlay.Brightmap,
@ -1681,6 +1688,7 @@ class GLDefsParser
bool disable_fullbright = false;
bool thiswad = false;
bool iwad = false;
bool no_mipmap = false;
int maplump = -1;
UserShaderDesc desc;
desc.shaderType = SHADER_Default;
@ -1723,6 +1731,10 @@ class GLDefsParser
if (!found)
sc.ScriptError("Unknown material type '%s' specified\n", sc.String);
}
else if (sc.Compare("nomipmap"))
{
no_mipmap = true;
}
else if (sc.Compare("speed"))
{
sc.MustGetFloat();
@ -1784,6 +1796,8 @@ class GLDefsParser
return;
}
tex->SetNoMipmap(no_mipmap);
int firstUserTexture;
switch (desc.shaderType)
{