1
0
mirror of synced 2024-11-12 02:00:50 +01:00

BFRES : Fix DDS replacing causing larger sizes for batch replacing

This commit is contained in:
KillzXGaming 2020-01-23 21:19:12 -05:00
parent 65de09fffc
commit da0875cb83

View File

@ -190,16 +190,13 @@ namespace Bfres.Structs
}
else if (ext == ".dds" || ext == ".dds2")
{
ftex.texture = new ResU.Texture();
GTXImporterSettings setting = FTEX.SetImporterSettings(file);
if (setting.DataBlockOutput != null)
{
var surface = GTXSwizzle.CreateGx2Texture(setting.DataBlockOutput[0], setting);
var tex = FTEX.FromGx2Surface(surface, setting.TexName);
ftex.UpdateTex(tex);
ftex.IsEdited = true;
ftex.IsReplaced = true;
ftex.Read(ftex.texture);
ftex.LoadOpenGLTexture();
}
@ -241,7 +238,7 @@ namespace Bfres.Structs
var surface = GTXSwizzle.CreateGx2Texture(setting.DataBlockOutput[0], setting);
var tex = FTEX.FromGx2Surface(surface, setting.TexName);
ftex.UpdateTex(tex);
tex.Name = Text;
tex.Name = ftex.Text;
ftex.IsEdited = true;
ftex.Read(ftex.texture);
ftex.LoadOpenGLTexture();