Added NoTrim for TEXTURES.
- This can be applied either in or outside of a definition of a sprite. - Simply adding "NoTrim" inside a definition will apply it. - Syntax outside of a sprite is `NoTrim <SpriteName>`.
This commit is contained in:
parent
2ce5b49cab
commit
bbd91be5d5
5 changed files with 26 additions and 1 deletions
|
|
@ -811,6 +811,22 @@ void FTextureManager::ParseTextureDef(int lump, FMultipatchTextureBuilder &build
|
|||
}
|
||||
//else Printf("Unable to define hires texture '%s'\n", tex->Name);
|
||||
}
|
||||
else if (sc.Compare("notrim"))
|
||||
{
|
||||
sc.MustGetString();
|
||||
|
||||
FTextureID id = TexMan.CheckForTexture(sc.String, ETextureType::Sprite);
|
||||
if (id.isValid())
|
||||
{
|
||||
FGameTexture *tex = TexMan.GetGameTexture(id);
|
||||
|
||||
if (tex) tex->SetNoTrimming(true);
|
||||
else sc.ScriptError("NoTrim: %s not found", sc.String);
|
||||
}
|
||||
else
|
||||
sc.ScriptError("NoTrim: %s is not a sprite", sc.String);
|
||||
|
||||
}
|
||||
else if (sc.Compare("texture"))
|
||||
{
|
||||
build.ParseTexture(sc, ETextureType::Override, lump);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue