1
0
mirror of synced 2025-02-26 14:51:47 +01:00

Fix swizzle pattern setting

This commit is contained in:
KillzXGaming 2019-06-23 18:09:07 -04:00
parent 71d91e470d
commit a317c88e3c
9 changed files with 7 additions and 4 deletions

Binary file not shown.

View File

@ -454,7 +454,6 @@ namespace Bfres.Structs
//Note this may be rarely needed or not at all
public byte[] Value_Unk;
private void ReadSRT2D(FileReader reader)
{
ValueSrt2D = new Srt2D();

View File

@ -256,8 +256,9 @@ namespace FirstPlugin
}
private void SwizzleNum_ValueChanged(object sender, EventArgs e) {
SelectedTexSettings.Swizzle &= GX2.SwizzleMask;
SelectedTexSettings.Swizzle |= (uint)SwizzleNum.Value << 8;
// SelectedTexSettings.Swizzle &= GX2.SwizzleMask;
// SelectedTexSettings.Swizzle |= (uint)SwizzleNum.Value << 8;
SelectedTexSettings.Swizzle = (uint)SwizzleNum.Value;
}
/// <summary>

View File

@ -247,10 +247,11 @@ namespace Switch_Toolbox.Library.Forms
if (ActiveObjects.Count <= 0 || ActiveMaterial == null || Runtime.OpenTKInitialized == false)
return;
gL_ControlLegacy2D1.MakeCurrent();
SetupRendering(1);
gL_ControlLegacy2D1.MakeCurrent();
GL.ClearColor(System.Drawing.Color.FromArgb(40, 40, 40));
GL.Clear(ClearBufferMask.ColorBufferBit | ClearBufferMask.DepthBufferBit);

View File

@ -501,6 +501,8 @@ namespace Switch_Toolbox.Library
if (dataSize <= 0)
throw new Exception($"Image is empty!!");
Console.WriteLine("swizzle pattern " + swizzle);
uint s = (swizzle << 8);
uint blkWidth, blkHeight;