diff --git a/File_Format_Library/FileFormats/Effects/PTCL_WiiU.cs b/File_Format_Library/FileFormats/Effects/PTCL_WiiU.cs index 5b8d3758..a0a17712 100644 --- a/File_Format_Library/FileFormats/Effects/PTCL_WiiU.cs +++ b/File_Format_Library/FileFormats/Effects/PTCL_WiiU.cs @@ -629,19 +629,12 @@ namespace FirstPlugin surf.data = data; surf.mipData = data; surf.numMips = MipCount; - surf.mipOffset = new uint[MipCount]; - surf.mipData = null; surf.tileMode = TileMode; surf.swizzle = Swizzle; surf.imageSize = ImageSize; // GX2.GenerateMipSurfaceData(surf); - foreach (var mipoffset in surf.mipOffset) - { - Console.WriteLine($"mipoffset {mipoffset}"); - } - return GX2.Decode(surf, ArrayLevel, MipLevel); } diff --git a/Switch_Toolbox_Library/Texture Decoding/Wii U/GX2.cs b/Switch_Toolbox_Library/Texture Decoding/Wii U/GX2.cs index f7dd1473..13ea67c1 100644 --- a/Switch_Toolbox_Library/Texture Decoding/Wii U/GX2.cs +++ b/Switch_Toolbox_Library/Texture Decoding/Wii U/GX2.cs @@ -778,6 +778,9 @@ namespace Toolbox.Library Console.WriteLine(" data size = " + tex.data.Length); Console.WriteLine(" realSize = " + tex.imageSize);*/ + if (tex.mipOffset == null || tex.mipOffset.Length == 0) + tex.mipOffset = GenerateMipOffsets(tex); + uint blkWidth, blkHeight; if (IsFormatBCN((GX2SurfaceFormat)tex.format)) { diff --git a/Switch_Toolbox_Library/Toolbox.Library.dll b/Switch_Toolbox_Library/Toolbox.Library.dll index f6d070a1..ae7ce42b 100644 Binary files a/Switch_Toolbox_Library/Toolbox.Library.dll and b/Switch_Toolbox_Library/Toolbox.Library.dll differ diff --git a/Switch_Toolbox_Library/Toolbox.Library.pdb b/Switch_Toolbox_Library/Toolbox.Library.pdb index 25471df1..2a5d4328 100644 Binary files a/Switch_Toolbox_Library/Toolbox.Library.pdb and b/Switch_Toolbox_Library/Toolbox.Library.pdb differ diff --git a/Toolbox/Program.cs b/Toolbox/Program.cs index ab764a6b..bb0072e9 100644 --- a/Toolbox/Program.cs +++ b/Toolbox/Program.cs @@ -42,7 +42,7 @@ namespace Toolbox bool LoadedDX = TryLoadDirectXTex(); if (!LoadedDX && !Toolbox.Library.Runtime.UseDirectXTexDecoder) { - var result = MessageBox.Show("Direct X Tex Failed to load! Make sure to install Visual C++ and Direct X Tex. Do you want to go to the install sites?"); + var result = MessageBox.Show("Direct X Tex Failed to load! Make sure to install Visual C++ and Direct X Tex. Do you want to go to the install sites?", "", MessageBoxButtons.YesNo); if (result == DialogResult.Yes) { System.Diagnostics.Process.Start("https://support.microsoft.com/en-us/help/2977003/the-latest-supported-visual-c-downloads");