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

Fix errors

This commit is contained in:
KillzXGaming 2019-12-17 17:31:06 -05:00
parent 57b721c8af
commit c3f87fe24c
6 changed files with 7 additions and 5 deletions

View File

@ -7,6 +7,7 @@ using Toolbox.Library;
using Toolbox.Library.IO;
using Toolbox.Library.Forms;
using System.Windows.Forms;
using Syroot.NintenTools.NSW.Bntx.GFX;
namespace FirstPlugin.LuigisMansion3
{
@ -206,7 +207,7 @@ namespace FirstPlugin.LuigisMansion3
tex.Swizzle = 0;
tex.textureLayout = 0;
tex.Regs = new uint[0];
tex.AccessFlags = 0x20;
tex.AccessFlags = AccessFlags.Texture;
tex.ArrayLength = (uint)ArrayLevel;
tex.MipCount = MipCount;
tex.Depth = Depth;

View File

@ -553,7 +553,7 @@ namespace FirstPlugin
tex.Swizzle = 0;
tex.textureLayout = 0;
tex.Regs = new uint[0];
tex.AccessFlags = 0x20;
tex.AccessFlags = AccessFlags.Texture;
tex.ArrayLength = (uint)ArrayLevel;
tex.MipCount = MipCount;
tex.Depth = Depth;

View File

@ -9,6 +9,7 @@ using System.Windows.Forms;
using Toolbox.Library;
using Toolbox.Library.IO;
using Toolbox.Library.Forms;
using Syroot.NintenTools.NSW.Bntx.GFX;
namespace FirstPlugin
{
@ -708,7 +709,7 @@ namespace FirstPlugin
tex.Swizzle = 0;
tex.textureLayout = 0;
tex.Regs = new uint[0];
tex.AccessFlags = 0x20;
tex.AccessFlags = AccessFlags.Texture;
tex.ArrayLength = (uint)ArrayLevel;
tex.MipCount = MipCount;
tex.Depth = Depth;

View File

@ -24,7 +24,7 @@ namespace FirstPlugin
public bool GammaFix = false;
public string TexName;
public uint AccessFlags = 0x20;
public AccessFlags AccessFlags = AccessFlags.Texture;
public uint MipCount;
public uint Depth = 1;
public uint TexWidth;
@ -172,7 +172,7 @@ namespace FirstPlugin
int MipHeight = Math.Max(1, (int)TexHeight >> mipLevel);
if (mipLevel != 0)
Image = BitmapExtension.Resize(Image, MipWidth, MipHeight);
Image = BitmapExtension.ResizeImage(Image, MipWidth, MipHeight);
mipmaps.Add(STGenericTexture.CompressBlock(BitmapExtension.ImageToByte(Image),
Image.Width, Image.Height, TextureData.ConvertFormat(Format), alphaRef, multiThread, CompressionMode));