Fix errors
This commit is contained in:
parent
57b721c8af
commit
c3f87fe24c
@ -7,6 +7,7 @@ using Toolbox.Library;
|
|||||||
using Toolbox.Library.IO;
|
using Toolbox.Library.IO;
|
||||||
using Toolbox.Library.Forms;
|
using Toolbox.Library.Forms;
|
||||||
using System.Windows.Forms;
|
using System.Windows.Forms;
|
||||||
|
using Syroot.NintenTools.NSW.Bntx.GFX;
|
||||||
|
|
||||||
namespace FirstPlugin.LuigisMansion3
|
namespace FirstPlugin.LuigisMansion3
|
||||||
{
|
{
|
||||||
@ -206,7 +207,7 @@ namespace FirstPlugin.LuigisMansion3
|
|||||||
tex.Swizzle = 0;
|
tex.Swizzle = 0;
|
||||||
tex.textureLayout = 0;
|
tex.textureLayout = 0;
|
||||||
tex.Regs = new uint[0];
|
tex.Regs = new uint[0];
|
||||||
tex.AccessFlags = 0x20;
|
tex.AccessFlags = AccessFlags.Texture;
|
||||||
tex.ArrayLength = (uint)ArrayLevel;
|
tex.ArrayLength = (uint)ArrayLevel;
|
||||||
tex.MipCount = MipCount;
|
tex.MipCount = MipCount;
|
||||||
tex.Depth = Depth;
|
tex.Depth = Depth;
|
||||||
|
@ -553,7 +553,7 @@ namespace FirstPlugin
|
|||||||
tex.Swizzle = 0;
|
tex.Swizzle = 0;
|
||||||
tex.textureLayout = 0;
|
tex.textureLayout = 0;
|
||||||
tex.Regs = new uint[0];
|
tex.Regs = new uint[0];
|
||||||
tex.AccessFlags = 0x20;
|
tex.AccessFlags = AccessFlags.Texture;
|
||||||
tex.ArrayLength = (uint)ArrayLevel;
|
tex.ArrayLength = (uint)ArrayLevel;
|
||||||
tex.MipCount = MipCount;
|
tex.MipCount = MipCount;
|
||||||
tex.Depth = Depth;
|
tex.Depth = Depth;
|
||||||
|
@ -9,6 +9,7 @@ using System.Windows.Forms;
|
|||||||
using Toolbox.Library;
|
using Toolbox.Library;
|
||||||
using Toolbox.Library.IO;
|
using Toolbox.Library.IO;
|
||||||
using Toolbox.Library.Forms;
|
using Toolbox.Library.Forms;
|
||||||
|
using Syroot.NintenTools.NSW.Bntx.GFX;
|
||||||
|
|
||||||
namespace FirstPlugin
|
namespace FirstPlugin
|
||||||
{
|
{
|
||||||
@ -708,7 +709,7 @@ namespace FirstPlugin
|
|||||||
tex.Swizzle = 0;
|
tex.Swizzle = 0;
|
||||||
tex.textureLayout = 0;
|
tex.textureLayout = 0;
|
||||||
tex.Regs = new uint[0];
|
tex.Regs = new uint[0];
|
||||||
tex.AccessFlags = 0x20;
|
tex.AccessFlags = AccessFlags.Texture;
|
||||||
tex.ArrayLength = (uint)ArrayLevel;
|
tex.ArrayLength = (uint)ArrayLevel;
|
||||||
tex.MipCount = MipCount;
|
tex.MipCount = MipCount;
|
||||||
tex.Depth = Depth;
|
tex.Depth = Depth;
|
||||||
|
@ -24,7 +24,7 @@ namespace FirstPlugin
|
|||||||
|
|
||||||
public bool GammaFix = false;
|
public bool GammaFix = false;
|
||||||
public string TexName;
|
public string TexName;
|
||||||
public uint AccessFlags = 0x20;
|
public AccessFlags AccessFlags = AccessFlags.Texture;
|
||||||
public uint MipCount;
|
public uint MipCount;
|
||||||
public uint Depth = 1;
|
public uint Depth = 1;
|
||||||
public uint TexWidth;
|
public uint TexWidth;
|
||||||
@ -172,7 +172,7 @@ namespace FirstPlugin
|
|||||||
int MipHeight = Math.Max(1, (int)TexHeight >> mipLevel);
|
int MipHeight = Math.Max(1, (int)TexHeight >> mipLevel);
|
||||||
|
|
||||||
if (mipLevel != 0)
|
if (mipLevel != 0)
|
||||||
Image = BitmapExtension.Resize(Image, MipWidth, MipHeight);
|
Image = BitmapExtension.ResizeImage(Image, MipWidth, MipHeight);
|
||||||
|
|
||||||
mipmaps.Add(STGenericTexture.CompressBlock(BitmapExtension.ImageToByte(Image),
|
mipmaps.Add(STGenericTexture.CompressBlock(BitmapExtension.ImageToByte(Image),
|
||||||
Image.Width, Image.Height, TextureData.ConvertFormat(Format), alphaRef, multiThread, CompressionMode));
|
Image.Width, Image.Height, TextureData.ConvertFormat(Format), alphaRef, multiThread, CompressionMode));
|
||||||
|
Binary file not shown.
Binary file not shown.
Loading…
Reference in New Issue
Block a user