1
0
mirror of synced 2025-02-22 05:19:50 +01:00

Fix wii u bffnt having invalid tiling on import

This commit is contained in:
KillzXGaming 2019-07-16 16:19:47 -04:00
parent 67d5949e57
commit 9a9d310e96

View File

@ -256,14 +256,9 @@ namespace FirstPlugin
public override string ReplaceFilter => FileFilters.GTX;
public override void Replace(string FileName)
{
OpenFileDialog ofd = new OpenFileDialog();
ofd.Filter = FileFilters.GTX;
ofd.Multiselect = false;
if (ofd.ShowDialog() == DialogResult.OK)
{
Bfres.Structs.FTEX ftex = new Bfres.Structs.FTEX();
ftex.ReplaceTexture(ofd.FileName, Format, 1, SupportedFormats, true, true, false, (uint)(SheetIndex * 2));
ftex.ReplaceTexture(FileName, Format, 1, SupportedFormats, true, true, false, SwizzlePattern);
if (ftex.texture != null)
{
TextureTGLP.Format = (ushort)ConvertToGx2(Format);
@ -274,7 +269,6 @@ namespace FirstPlugin
UpdateEditor();
}
}
}
public override TEX_FORMAT[] SupportedFormats
{
@ -367,13 +361,13 @@ namespace FirstPlugin
//Swizzle and create surface
var surface = GX2.CreateGx2Texture(data, Text,
(uint)2,
(uint)4,
(uint)0,
(uint)Width,
(uint)Height,
(uint)1,
(uint)Gx2Format,
(uint)Swizzle,
(uint)SwizzlePattern,
(uint)1,
(uint)MipCount
);