mirror of
https://github.com/KillzXGaming/Switch-Toolbox
synced 2024-11-22 12:33:12 +00:00
Update nutexb settings and fix unswizzled file detection.
This commit is contained in:
parent
ae515217b5
commit
2acb2389c6
2 changed files with 4 additions and 12 deletions
|
@ -194,7 +194,7 @@ namespace FirstPlugin
|
|||
|
||||
public override void Replace(string FileName)
|
||||
{
|
||||
if (Runtime.NUTEXBSettings.IsSwizzled)
|
||||
if (Alignment != 0)
|
||||
{
|
||||
var tex = new TextureData();
|
||||
tex.Replace(FileName, MipCount, 0, Format);
|
||||
|
@ -463,7 +463,7 @@ namespace FirstPlugin
|
|||
|
||||
public override void SetImageData(Bitmap bitmap, int ArrayLevel)
|
||||
{
|
||||
if (!Runtime.NUTEXBSettings.IsSwizzled)
|
||||
if (Alignment == 0)
|
||||
{
|
||||
MipCount = GenerateMipCount(bitmap.Width, bitmap.Height);
|
||||
ImageData = GenerateMipsAndCompress(bitmap, MipCount, Format);
|
||||
|
@ -513,7 +513,7 @@ namespace FirstPlugin
|
|||
|
||||
public override byte[] GetImageData(int ArrayLevel = 0, int MipLevel = 0, int DepthLevel = 0)
|
||||
{
|
||||
if (!Runtime.NUTEXBSettings.IsSwizzled)
|
||||
if (Alignment == 0)
|
||||
return DDS.GetArrayFaces(this, ImageData, ArrayCount)[ArrayLevel].mipmaps[MipLevel];
|
||||
|
||||
return TegraX1Swizzle.GetImageData(this, ImageData, ArrayLevel, MipLevel, DepthLevel, 1);
|
||||
|
@ -540,8 +540,6 @@ namespace FirstPlugin
|
|||
{ Checked = Runtime.NUTEXBSettings.LimitFileSize, CheckOnClick = true });
|
||||
|
||||
Items.Add(new STToolStipMenuItem("Save", null, SaveAction, Keys.Control | Keys.T));
|
||||
Items.Add(new STToolStipMenuItem("Taiko no Tatsujin fix", null, SwizzleToggle, Keys.Control | Keys.S)
|
||||
{ Checked = !Runtime.NUTEXBSettings.IsSwizzled, CheckOnClick = true });
|
||||
|
||||
Items.Add(new STToolStipMenuItem("Force padding for smaller file sizes", null, PaddingToggle, Keys.Control | Keys.P)
|
||||
{ Checked = Runtime.NUTEXBSettings.PadFileSize, CheckOnClick = true });
|
||||
|
@ -550,11 +548,6 @@ namespace FirstPlugin
|
|||
return Items.ToArray();
|
||||
}
|
||||
|
||||
private void SwizzleToggle(object sender, EventArgs args) {
|
||||
Runtime.NUTEXBSettings.IsSwizzled = ((STToolStipMenuItem)sender).Checked ? false : true;
|
||||
UpdateEditor();
|
||||
}
|
||||
|
||||
private void PaddingToggle(object sender, EventArgs args) {
|
||||
Runtime.NUTEXBSettings.PadFileSize = ((STToolStipMenuItem)sender).Checked ? true : false;
|
||||
}
|
||||
|
|
|
@ -74,9 +74,8 @@ namespace Toolbox.Library
|
|||
|
||||
public class NUTEXBSettings
|
||||
{
|
||||
public static bool LimitFileSize = true;
|
||||
public static bool LimitFileSize = false;
|
||||
public static bool PadFileSize = true;
|
||||
public static bool IsSwizzled = true;
|
||||
}
|
||||
|
||||
public class MessageEditor
|
||||
|
|
Loading…
Reference in a new issue