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

Rework GTX swizzle thanks to abood and rebuild nutexb

This commit is contained in:
KillzXGaming 2018-11-30 22:00:43 -05:00
parent 0c9bafe67f
commit 5cfec193bf
32 changed files with 3603 additions and 838 deletions

View File

@ -117,26 +117,33 @@ namespace FirstPlugin
if (ofd.ShowDialog() == DialogResult.OK)
{
Data = File.ReadAllBytes(ofd.FileName);
UpdateEditor();
}
}
public void UpdateEditor()
{
if (Viewport.Instance.gL_ControlModern1.Visible == false)
PluginRuntime.FSHPDockState = WeifenLuo.WinFormsUI.Docking.DockState.Document;
BFAVEditor docked = (BFAVEditor)LibraryGUI.Instance.GetContentDocked(new BFAVEditor());
if (docked == null)
{
docked = new BFAVEditor();
LibraryGUI.Instance.LoadDockContent(docked, PluginRuntime.FSHPDockState);
}
docked.Text = Text;
docked.Dock = DockStyle.Fill;
docked.LoadFile(this);
}
public override void OnClick(TreeView treeview)
{
if (Type == AudioType.Bfwav)
{
LoadBFWAVEditor();
UpdateEditor();
}
}
private void LoadBFWAVEditor()
{
BFAVEditor BFAVEditor = new BFAVEditor();
BFAVEditor.Text = Text;
BFAVEditor.Dock = DockStyle.Fill;
BFAVEditor.LoadFile(this);
LibraryGUI.Instance.LoadDockContent(BFAVEditor, PluginRuntime.FSHPDockState);
}
public bool EditorIsActive(DockContent dock)
} bool EditorIsActive(DockContent dock)
{
foreach (Control ctrl in dock.Controls)
{

View File

@ -433,7 +433,6 @@ namespace Bfres.Structs
shape.VertexBufferIndex = shapes.Count;
shape.vertices = obj.vertices;
shape.MaterialIndex = 0;
shape.VertexSkinCount = obj.GetMaxSkinInfluenceCount();
shape.vertexAttributes = csvsettings.CreateNewAttributes();
shape.boneIndx = 0;
shape.Text = obj.ObjectName;
@ -441,6 +440,7 @@ namespace Bfres.Structs
shape.CreateNewBoundingBoxes();
shape.CreateBoneList(obj, this);
shape.CreateIndexList(obj, this);
shape.VertexSkinCount = obj.GetMaxSkinInfluenceCount();
shape.ApplyImportSettings(csvsettings, GetMaterial(shape.MaterialIndex));
shape.SaveShape();
shape.SaveVertexBuffer();

View File

@ -819,8 +819,8 @@ namespace Bfres.Structs
// vtx.nrm = TransformLocal(vtx.nrm, false);
// Console.WriteLine("New " + vtx.pos);
}
// Console.WriteLine($"Weight count {vtx.boneWeights.Count}");
// Console.WriteLine($"Index count {vtx.boneIds.Count}");
//Console.WriteLine($"Weight count {vtx.boneWeights.Count}");
//Console.WriteLine($"Index count {vtx.boneIds.Count}");
verts.Add(new Syroot.Maths.Vector4F(vtx.pos.X, vtx.pos.Y, vtx.pos.Z, 1.0f));
norms.Add(new Syroot.Maths.Vector4F(vtx.nrm.X, vtx.nrm.Y, vtx.nrm.Z, 0));

View File

@ -272,9 +272,6 @@ namespace Bfres.Structs
}
private void AddFTEXTextures(ResU.ResFile resFile)
{
MessageBox.Show("Note! Textures are disabled atm.");
return;
FTEXContainer ftexContainer = new FTEXContainer();
Nodes.Add(ftexContainer);
foreach (ResU.Texture tex in resFile.Textures.Values)
@ -285,7 +282,7 @@ namespace Bfres.Structs
ftexContainer.Nodes.Add(texture);
ftexContainer.Textures.Add(texture.Text, texture);
}
PluginRuntime.ftexContainers.Add(ftexContainer);
// PluginRuntime.ftexContainers.Add(ftexContainer);
}
private void AddSkeletonAnims(ResU.ResFile resFile)
{

View File

@ -277,6 +277,17 @@ namespace FirstPlugin
foreach (float f in obj.weightsT[v])
obj.vertices[v].boneWeights.Add(f);
}
foreach (Vertex v in obj.vertices)
{
if (v.boneNames.Count == 1)
Console.WriteLine($"{v.boneNames[0]} {v.boneWeights[0]}");
if (v.boneNames.Count == 2)
Console.WriteLine($"{v.boneNames[0]} {v.boneWeights[0]} {v.boneNames[1]} {v.boneWeights[1]}");
if (v.boneNames.Count == 3)
Console.WriteLine($"{v.boneNames[0]} {v.boneWeights[0]} {v.boneNames[1]} {v.boneWeights[1]} {v.boneNames[2]} {v.boneWeights[2]}");
if (v.boneNames.Count == 4)
Console.WriteLine($"{v.boneNames[0]} {v.boneWeights[0]} {v.boneNames[1]} {v.boneWeights[1]} {v.boneNames[2]} {v.boneWeights[2]} {v.boneNames[3]} {v.boneWeights[3]}");
}
}
csv.Close();

View File

@ -803,6 +803,9 @@ namespace FirstPlugin
}
public void UpdateBNTXEditor()
{
if (Viewport.Instance.gL_ControlModern1.Visible == false)
PluginRuntime.FSHPDockState = WeifenLuo.WinFormsUI.Docking.DockState.Document;
BNTXEditor docked = (BNTXEditor)LibraryGUI.Instance.GetContentDocked(new BNTXEditor());
if (docked == null)
{

View File

@ -174,11 +174,28 @@ namespace FirstPlugin
GTX.GX2Surface surf = new GTX.GX2Surface();
surf.bpp = bpp;
surf.height = (int)tex.Height;
surf.width = (int)tex.Width;
surf.aa = (int)tex.AAMode;
surf.alignment = (int)tex.Alignment;
surf.depth = (int)tex.Depth;
surf.dim = (int)tex.Dim;
surf.format = (int)tex.Format;
surf.use = (int)tex.Use;
surf.pitch = (int)tex.Pitch;
surf.data = tex.Data;
surf.numMips = (int)tex.MipCount;
surf.mipOffset = tex.MipOffsets;
surf.mipData = tex.MipData;
surf.tileMode = (int)tex.TileMode;
surf.swizzle = (int)tex.Swizzle;
for (int surfaceLevel = 0; surfaceLevel < tex.ArrayLength; surfaceLevel++)
{
}
GTX.Decode(surf, tex.MipData);
List<byte[]> mips = GTX.Decode(surf);
renderedTex.mipmaps.Add(mips);
// LoadOpenGLTexture();
// else
// Console.WriteLine("Failed to load image!");
}
public void Export(string FileName, bool ExportSurfaceLevel = false,

File diff suppressed because it is too large Load Diff

View File

@ -28,10 +28,11 @@ namespace FirstPlugin
public string FilePath { get; set; }
public IFileInfo IFileInfo { get; set; }
public enum NUTEXImageFormat : uint
public enum NUTEXImageFormat : byte
{
R8G8B8A8_UNORM = 0x00,
R8G8B8A8_SRGB = 0x05,
R32G32B32A32_FLOAT = 0x34,
B8G8R8A8_UNORM = 0x50,
B8G8R8A8_SRGB = 0x55,
BC1_UNORM = 0x80,
@ -88,6 +89,7 @@ namespace FirstPlugin
case (byte)NUTEXImageFormat.BC4_SNORM:
return 8;
case (byte)NUTEXImageFormat.R32G32B32A32_FLOAT:
case (byte)NUTEXImageFormat.BC2_UNORM:
case (byte)NUTEXImageFormat.BC2_SRGB:
case (byte)NUTEXImageFormat.BC3_UNORM:
@ -169,15 +171,21 @@ namespace FirstPlugin
public bool BadSwizzle;
public uint Width;
public uint Height;
public byte Format;
public uint[] mipSizes;
public uint Alignment;
public uint unk;
public int unk2;
public int unk3;
public NUTEXImageFormat Format;
public List<uint[]> mipSizes = new List<uint[]>();
public int Alignment;
public List<List<byte[]>> mipmaps = new List<List<byte[]>>();
public List<List<byte[]>> blocksCompressed = new List<List<byte[]>>();
bool IsSwizzled = true;
public string ArcOffset; //Temp for exporting in batch
MenuItem save = new MenuItem("Save");
MenuItem export = new MenuItem("Export");
MenuItem replace = new MenuItem("Replace");
public NuTex()
{
@ -185,10 +193,41 @@ namespace FirstPlugin
SelectedImageKey = "Texture";
ContextMenu = new ContextMenu();
ContextMenu.MenuItems.Add(save);
ContextMenu.MenuItems.Add(export);
ContextMenu.MenuItems.Add(replace);
save.Click += Save;
replace.Click += Replace;
export.Click += Export;
}
private void Replace(object sender, EventArgs args)
{
OpenFileDialog ofd = new OpenFileDialog();
ofd.Filter = "Supported Formats|*.dds; *.png;*.tga;*.jpg;*.tiff|" +
"Microsoft DDS |*.dds|" +
"Portable Network Graphics |*.png|" +
"Joint Photographic Experts Group |*.jpg|" +
"Bitmap Image |*.bmp|" +
"Tagged Image File Format |*.tiff|" +
"All files(*.*)|*.*";
ofd.Multiselect = false;
if (ofd.ShowDialog() == DialogResult.OK)
{
throw new Exception("Not finished yet!");
var bntxFile = new BinaryTextureContainer();
var tex = new TextureData();
tex.Replace(ofd.FileName);
blocksCompressed = tex.Texture.TextureData;
mipmaps = tex.mipmaps;
Width = tex.Texture.Width;
Height = tex.Texture.Height;
UpdateEditor();
}
}
private void Export(object sender, EventArgs args)
{
SaveFileDialog sfd = new SaveFileDialog();
@ -207,6 +246,21 @@ namespace FirstPlugin
Export(sfd.FileName);
}
}
private void Save(object sender, EventArgs args)
{
List<IFileFormat> formats = new List<IFileFormat>();
formats.Add(FileHandler);
SaveFileDialog sfd = new SaveFileDialog();
sfd.Filter = Utils.GetAllFilters(formats);
sfd.FileName = FileHandler.FileName;
if (sfd.ShowDialog() == DialogResult.OK)
{
Cursor.Current = Cursors.WaitCursor;
System.IO.File.WriteAllBytes(sfd.FileName, FileHandler.Save());
}
}
public void Export(string FileName, bool ExportSurfaceLevel = false,
bool ExportMipMapLevel = false, int SurfaceLevel = 0, int MipLevel = 0)
{
@ -264,47 +318,94 @@ namespace FirstPlugin
uint padding2 = reader.ReadUInt32();
Width = reader.ReadUInt32();
Height = reader.ReadUInt32();
uint ArrayCount = reader.ReadUInt32(); //6 for cubemaps
Format = reader.ReadByte();
byte unk = reader.ReadByte(); //Might be unorm/snorm/srgb
unk3 = reader.ReadInt32();
Format = reader.ReadEnum<NUTEXImageFormat>(true);
unk = reader.ReadByte(); //Related to pixel size??
ushort padding3 = reader.ReadUInt16();
uint unk2 = reader.ReadUInt32();
unk2 = reader.ReadInt32();
uint mipCount = reader.ReadUInt32();
Alignment = reader.ReadUInt32();
int unk3 = reader.ReadInt32();
Alignment = reader.ReadInt32();
uint ArrayCount = reader.ReadUInt32(); //6 for cubemaps
int imagesize = reader.ReadInt32();
reader.Seek(pos - 176, System.IO.SeekOrigin.Begin); //Get mipmap sizes
mipSizes = reader.ReadUInt32s((int)mipCount);
reader.Seek(imagesize, System.IO.SeekOrigin.Begin); //Get mipmap sizes
for (int arrayLevel = 0; arrayLevel < ArrayCount; arrayLevel++)
{
long mipPos = reader.Position;
uint[] mips = reader.ReadUInt32s((int)mipCount);
mipSizes.Add(mips);
//Each mip section is 0x40 size for each array
//Seek to next one
reader.Seek(mipPos + 0x40, System.IO.SeekOrigin.Begin);
}
List<byte[]> mips = new List<byte[]>();
reader.Seek(0, System.IO.SeekOrigin.Begin);
for (int arrayLevel = 1; arrayLevel < ArrayCount + 1; arrayLevel++)
{
List<byte[]> mipmaps = new List<byte[]>();
if (mipCount == 1 && IsSwizzled)
{
mips.Add(reader.ReadBytes((int)imagesize));
blocksCompressed.Add(mips);
}
else
{
for (int arrayLevel = 0; arrayLevel < ArrayCount; arrayLevel++)
for (int mipLevel = 0; mipLevel < mipCount; mipLevel++)
{
for (int mipLevel = 0; mipLevel < mipCount; mipLevel++)
{
mips.Add(reader.ReadBytes((int)Width * (int)Height * (int)bpps(Format)));
break;
}
blocksCompressed.Add(mips);
}
}
}
//Get the size from the size array
int size = (int)mipSizes[arrayLevel - 1][mipLevel];
//Align the size
if (mipLevel == 0)
if (size % Alignment != 0) size = size + (Alignment - (size % Alignment));
mipmaps.Add(reader.ReadBytes(imagesize));
break;
}
blocksCompressed.Add(mipmaps);
//Seek the next array
reader.Seek(imagesize / (int)ArrayCount, System.IO.SeekOrigin.Begin);
}
LoadTexture();
}
public void Write(FileWriter writer)
{
int arrayCount = blocksCompressed.Count;
foreach (var array in blocksCompressed)
{
writer.Write(array[0]); //Write textue block first
}
long headerStart = writer.Position;
foreach (var mips in mipSizes)
{
long MipStart = writer.Position;
writer.Write(mips); //Write textue block first
writer.Seek(MipStart + 0x40, System.IO.SeekOrigin.Begin);
}
long stringPos = writer.Position;
writer.Write((byte)0x20);
writer.WriteString(Text);
writer.Seek(stringPos + 0x40, System.IO.SeekOrigin.Begin);
writer.Seek(4); //padding
writer.Write(Width);
writer.Write(Height);
writer.Write(unk3);
writer.Write((byte)Format);
writer.Write((byte)unk);
writer.Seek(2); //padding
writer.Write(unk2);
writer.Write(blocksCompressed[0].Count);
writer.Write(Alignment);
writer.Write(arrayCount);
writer.Write(blocksCompressed[0][0].Length * arrayCount);
writer.WriteSignature(" XET");
writer.Write(131073);
}
public override void OnClick(TreeView treeView)
{
UpdateEditor();
}
public Bitmap DisplayTexture(int DisplayMipIndex = 0, int ArrayIndex = 0)
public Bitmap DisplayTexture(int ArrayIndex = 0, int DisplayMipIndex = 0)
{
if (BadSwizzle)
return BitmapExtension.GetBitmap(Properties.Resources.Black, 32, 32);
@ -312,26 +413,28 @@ namespace FirstPlugin
if (IsSwizzled)
LoadTexture();
else
mipmaps.Add(blocksCompressed[0]);
mipmaps.Add(blocksCompressed[ArrayIndex]);
if (mipmaps[0].Count <= 0)
{
return BitmapExtension.GetBitmap(Properties.Resources.Black, 32, 32);
}
Console.WriteLine(ArrayIndex);
uint width = (uint)Math.Max(1, Width >> DisplayMipIndex);
uint height = (uint)Math.Max(1, Height >> DisplayMipIndex);
byte[] data = mipmaps[ArrayIndex][DisplayMipIndex];
return DecodeBlock(data, width, height, (NUTEXImageFormat)Format);
}
public static Bitmap DecodeBlock(byte[] data, uint Width, uint Height, NUTEXImageFormat Format)
{
Bitmap decomp;
Console.WriteLine(Format);
if (Format == NUTEXImageFormat.BC5_SNORM)
return DDSCompressor.DecompressBC5(data, (int)Width, (int)Height, true);
@ -352,31 +455,33 @@ namespace FirstPlugin
{
switch (Format)
{
case NUTEXImageFormat.R32G32B32A32_FLOAT: return DDS.DXGI_FORMAT.DXGI_FORMAT_R32G32B32A32_FLOAT;
case NUTEXImageFormat.R8G8B8A8_UNORM: return DDS.DXGI_FORMAT.DXGI_FORMAT_R8G8B8A8_UNORM;
case NUTEXImageFormat.R8G8B8A8_SRGB: return DDS.DXGI_FORMAT.DXGI_FORMAT_R8G8B8A8_UNORM_SRGB;
case NUTEXImageFormat.R8G8B8A8_SRGB: return DDS.DXGI_FORMAT.DXGI_FORMAT_R8G8B8A8_UNORM;
case NUTEXImageFormat.B8G8R8A8_UNORM: return DDS.DXGI_FORMAT.DXGI_FORMAT_B8G8R8A8_UNORM;
case NUTEXImageFormat.B8G8R8A8_SRGB: return DDS.DXGI_FORMAT.DXGI_FORMAT_B8G8R8A8_UNORM_SRGB;
case NUTEXImageFormat.B8G8R8A8_SRGB: return DDS.DXGI_FORMAT.DXGI_FORMAT_B8G8R8A8_UNORM;
default:
throw new Exception($"Cannot convert format {Format}");
}
}
private static DDS.DXGI_FORMAT GetCompressedDXGI_FORMAT(NUTEXImageFormat Format)
{
//This uses UNORM instead of SRGB due to decod
switch (Format)
{
case NUTEXImageFormat.BC1_UNORM: return DDS.DXGI_FORMAT.DXGI_FORMAT_BC1_UNORM;
case NUTEXImageFormat.BC1_SRGB: return DDS.DXGI_FORMAT.DXGI_FORMAT_BC1_UNORM_SRGB;
case NUTEXImageFormat.BC1_SRGB: return DDS.DXGI_FORMAT.DXGI_FORMAT_BC1_UNORM;
case NUTEXImageFormat.BC2_UNORM: return DDS.DXGI_FORMAT.DXGI_FORMAT_BC2_UNORM;
case NUTEXImageFormat.BC2_SRGB: return DDS.DXGI_FORMAT.DXGI_FORMAT_BC2_UNORM_SRGB;
case NUTEXImageFormat.BC2_SRGB: return DDS.DXGI_FORMAT.DXGI_FORMAT_BC2_UNORM;
case NUTEXImageFormat.BC3_UNORM: return DDS.DXGI_FORMAT.DXGI_FORMAT_BC3_UNORM;
case NUTEXImageFormat.BC3_SRGB: return DDS.DXGI_FORMAT.DXGI_FORMAT_BC3_UNORM_SRGB;
case NUTEXImageFormat.BC3_SRGB: return DDS.DXGI_FORMAT.DXGI_FORMAT_BC3_UNORM;
case NUTEXImageFormat.BC4_UNORM: return DDS.DXGI_FORMAT.DXGI_FORMAT_BC4_UNORM;
case NUTEXImageFormat.BC4_SNORM: return DDS.DXGI_FORMAT.DXGI_FORMAT_BC4_SNORM;
case NUTEXImageFormat.BC5_UNORM: return DDS.DXGI_FORMAT.DXGI_FORMAT_BC5_UNORM;
case NUTEXImageFormat.BC5_SNORM: return DDS.DXGI_FORMAT.DXGI_FORMAT_BC5_SNORM;
case NUTEXImageFormat.BC6_UFLOAT: return DDS.DXGI_FORMAT.DXGI_FORMAT_BC6H_UF16;
case NUTEXImageFormat.BC7_UNORM: return DDS.DXGI_FORMAT.DXGI_FORMAT_BC7_UNORM;
case NUTEXImageFormat.BC7_SRGB: return DDS.DXGI_FORMAT.DXGI_FORMAT_BC7_UNORM_SRGB;
case NUTEXImageFormat.BC7_SRGB: return DDS.DXGI_FORMAT.DXGI_FORMAT_BC7_UNORM;
default:
throw new Exception($"Cannot convert format {Format}");
}
@ -408,7 +513,7 @@ namespace FirstPlugin
{
mipmaps.Clear();
uint blk_dim = blk_dims(Format);
uint blk_dim = blk_dims((byte)Format);
uint blkWidth = blk_dim >> 4;
uint blkHeight = blk_dim & 0xF;
@ -418,7 +523,7 @@ namespace FirstPlugin
int linesPerBlockHeight = (1 << (int)BlockHeightLog2) * 8;
uint bpp = bpps(Format);
uint bpp = bpps((byte)Format);
for (int arrayLevel = 0; arrayLevel < blocksCompressed.Count; arrayLevel++)
{
@ -448,7 +553,7 @@ namespace FirstPlugin
}
catch (Exception e)
{
System.Windows.Forms.MessageBox.Show("Failed to swizzle texture!");
System.Windows.Forms.MessageBox.Show($"Failed to swizzle texture {Text}!");
Console.WriteLine(e);
BadSwizzle = true;
break;
@ -489,7 +594,9 @@ namespace FirstPlugin
}
public byte[] Save()
{
return null;
System.IO.MemoryStream mem = new System.IO.MemoryStream();
((NuTex)EditorRoot).Write(new FileWriter(mem));
return mem.ToArray();
}
}
}

View File

@ -76,7 +76,7 @@ namespace FirstPlugin
{
uint block_height = (uint)(1 << blockHeightLog2);
Console.WriteLine($"Swizzle {width} {height} {blkWidth} {blkHeight} {roundPitch} {bpp} {tileMode} {blockHeightLog2} {data.Length} {toSwizzle}");
// Console.WriteLine($"Swizzle {width} {height} {blkWidth} {blkHeight} {roundPitch} {bpp} {tileMode} {blockHeightLog2} {data.Length} {toSwizzle}");
width = DIV_ROUND_UP(width, blkWidth);
height = DIV_ROUND_UP(height, blkHeight);

View File

@ -75,13 +75,6 @@ namespace FirstPlugin
BC5S = 0x0000004c,
};
public enum BNTXImageTypes
{
UNORM = 0x01,
SNORM = 0x02,
SRGB = 0x06,
};
public static uint blk_dims(uint format)
{
switch (format)
@ -164,14 +157,18 @@ namespace FirstPlugin
public void UpdateEditor()
{
NuTexEditor docked = (NuTexEditor)LibraryGUI.Instance.GetContentDocked(new NuTexEditor());
if (Viewport.Instance.gL_ControlModern1.Visible == false)
PluginRuntime.FSHPDockState = WeifenLuo.WinFormsUI.Docking.DockState.Document;
XTXEditor docked = (XTXEditor)LibraryGUI.Instance.GetContentDocked(new XTXEditor());
if (docked == null)
{
docked = new NuTexEditor();
docked = new XTXEditor();
LibraryGUI.Instance.LoadDockContent(docked, PluginRuntime.FSHPDockState);
}
docked.Text = Text;
docked.Dock = DockStyle.Fill;
docked.LoadProperty(blockHeader.textureInfo);
}
public class BlockHeader
@ -222,7 +219,7 @@ namespace FirstPlugin
public uint[] MipOffsets { get; set; }
public BlockHeader DataBlockHeader { get; set; }
public List<byte[]> mipmaps = new List<byte[]>();
public byte[] data;
public List<byte[]> compressedBlocks = new List<byte[]>();
public void Read(FileReader reader)
{
@ -248,8 +245,25 @@ namespace FirstPlugin
DataBlockHeader.Read(reader);
reader.Seek(DataBlockOff + DataBlockHeader.DataOffset, SeekOrigin.Begin);
data = reader.ReadBytes((int)DataBlockHeader.DataSize);
// data = reader.ReadBytes((int)DataBlockHeader.DataSize);
long datastart = reader.Position;
Console.WriteLine(DataBlockHeader.DataSize);
for (int i = 0; i < MipCount; i++)
{
int size = (int)((int)DataBlockHeader.DataSize - MipOffsets[i]);
Console.WriteLine(size);
using (reader.TemporarySeek(datastart + MipOffsets[i], System.IO.SeekOrigin.Begin))
{
compressedBlocks.Add(reader.ReadBytes(size));
}
if (compressedBlocks[i].Length == 0)
throw new System.Exception("Empty mip size!");
break; //Only first mip level works?
}
reader.Seek(DataBlockOff + DataBlockHeader.DataOffset + (long)DataBlockHeader.DataSize, SeekOrigin.Begin);
BlockHeader EndBlockHeader = new BlockHeader();
EndBlockHeader.Read(reader);
}
@ -344,7 +358,7 @@ namespace FirstPlugin
uint bpp = XTXFormats.bpps((uint)Format);
int blockHeightShift = 0;
for (int mipLevel = 0; mipLevel < MipCount; mipLevel++)
for (int mipLevel = 0; mipLevel < compressedBlocks.Count; mipLevel++)
{
uint width = (uint)Math.Max(1, Width >> mipLevel);
uint height = (uint)Math.Max(1, Height >> mipLevel);
@ -352,12 +366,12 @@ namespace FirstPlugin
// uint size = width * height * bpp;
uint size = TegraX1Swizzle.DIV_ROUND_UP(width, blkWidth) * TegraX1Swizzle.DIV_ROUND_UP(height, blkHeight) * bpp;
byte[] mipData = GetMipBlock(MipOffsets[mipLevel], size);
Console.WriteLine(mipLevel + " " + size);
if (TegraX1Swizzle.pow2_round_up(TegraX1Swizzle.DIV_ROUND_UP(height, blkWidth)) < linesPerBlockHeight)
blockHeightShift += 1;
byte[] result = TegraX1Swizzle.deswizzle(width, height, blkWidth, blkHeight, (int)Target, bpp, (uint)TileMode, (int)Math.Max(0, BlockHeightLog2 - blockHeightShift), mipData);
byte[] result = TegraX1Swizzle.deswizzle(width, height, blkWidth, blkHeight, (int)Target, bpp, (uint)TileMode, (int)Math.Max(0, BlockHeightLog2 - blockHeightShift), compressedBlocks[mipLevel]);
//Create a copy and use that to remove uneeded data
byte[] result_ = new byte[size];
Array.Copy(result, 0, result_, 0, size);
@ -369,12 +383,6 @@ namespace FirstPlugin
Console.WriteLine("height " + height);
}
}
private byte[] GetMipBlock(uint offset, uint Size)
{
FileReader reader = new FileReader(new MemoryStream(data));
reader.Seek(offset, SeekOrigin.Begin);
return reader.ReadBytes((int)Size);
}
}
}

View File

@ -277,7 +277,7 @@ namespace FirstPlugin
list.AddVector4(vtx.bitan);
break;
case "_w0":
list.AddWeights(vtx.weights);
list.AddWeights(vtx.boneWeights);
break;
case "_i0":
List<string> boneNames = new List<string>();
@ -287,7 +287,7 @@ namespace FirstPlugin
boneNames = null;
break;
case "_w1":
list.AddWeights(vtx.weights);
list.AddWeights(vtx.boneWeights);
break;
case "_i1":
List<string> boneNames2 = new List<string>();

View File

@ -0,0 +1,353 @@
namespace FirstPlugin
{
partial class NuTexEditor
{
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// Clean up any resources being used.
/// </summary>
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
#region Component Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
this.components = new System.ComponentModel.Container();
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(NuTexEditor));
this.panel1 = new System.Windows.Forms.Panel();
this.propertyGrid1 = new System.Windows.Forms.PropertyGrid();
this.splitter1 = new System.Windows.Forms.Splitter();
this.panel2 = new System.Windows.Forms.Panel();
this.panel4 = new System.Windows.Forms.Panel();
this.pictureBoxCustom1 = new Switch_Toolbox.Library.Forms.PictureBoxCustom();
this.panel3 = new System.Windows.Forms.Panel();
this.label5 = new System.Windows.Forms.Label();
this.arrayLevelCounterLabel = new System.Windows.Forms.Label();
this.btnRightArray = new System.Windows.Forms.Button();
this.btnLeftArray = new System.Windows.Forms.Button();
this.imageBGComboBox = new System.Windows.Forms.ComboBox();
this.label1 = new System.Windows.Forms.Label();
this.texSizeMipsLabel = new System.Windows.Forms.Label();
this.mipLevelCounterLabel = new System.Windows.Forms.Label();
this.BtnMipsRight = new System.Windows.Forms.Button();
this.BtmMipsLeft = new System.Windows.Forms.Button();
this.button1 = new System.Windows.Forms.Button();
this.contextMenuStrip1 = new System.Windows.Forms.ContextMenuStrip(this.components);
this.replaceSurfaceLevelToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.exportSurfaceLevelToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.panel1.SuspendLayout();
this.panel2.SuspendLayout();
this.panel4.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.pictureBoxCustom1)).BeginInit();
this.panel3.SuspendLayout();
this.contextMenuStrip1.SuspendLayout();
this.SuspendLayout();
//
// panel1
//
this.panel1.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64)))));
this.panel1.Controls.Add(this.propertyGrid1);
this.panel1.Dock = System.Windows.Forms.DockStyle.Top;
this.panel1.Location = new System.Drawing.Point(0, 0);
this.panel1.Name = "panel1";
this.panel1.Size = new System.Drawing.Size(593, 296);
this.panel1.TabIndex = 1;
//
// propertyGrid1
//
this.propertyGrid1.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
| System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.propertyGrid1.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(40)))), ((int)(((byte)(40)))), ((int)(((byte)(40)))));
this.propertyGrid1.CategoryForeColor = System.Drawing.Color.WhiteSmoke;
this.propertyGrid1.CategorySplitterColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64)))));
this.propertyGrid1.CommandsActiveLinkColor = System.Drawing.Color.Red;
this.propertyGrid1.CommandsBorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(50)))), ((int)(((byte)(50)))), ((int)(((byte)(50)))));
this.propertyGrid1.CommandsDisabledLinkColor = System.Drawing.Color.FromArgb(((int)(((byte)(50)))), ((int)(((byte)(50)))), ((int)(((byte)(50)))));
this.propertyGrid1.CommandsForeColor = System.Drawing.Color.White;
this.propertyGrid1.DisabledItemForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(127)))), ((int)(((byte)(255)))), ((int)(((byte)(255)))), ((int)(((byte)(255)))));
this.propertyGrid1.HelpBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(40)))), ((int)(((byte)(40)))), ((int)(((byte)(40)))));
this.propertyGrid1.HelpBorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(45)))), ((int)(((byte)(45)))), ((int)(((byte)(45)))));
this.propertyGrid1.HelpForeColor = System.Drawing.Color.White;
this.propertyGrid1.LineColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64)))));
this.propertyGrid1.Location = new System.Drawing.Point(0, 0);
this.propertyGrid1.Name = "propertyGrid1";
this.propertyGrid1.SelectedItemWithFocusForeColor = System.Drawing.Color.Silver;
this.propertyGrid1.Size = new System.Drawing.Size(593, 299);
this.propertyGrid1.TabIndex = 2;
this.propertyGrid1.ToolbarVisible = false;
this.propertyGrid1.ViewBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(40)))), ((int)(((byte)(40)))), ((int)(((byte)(40)))));
this.propertyGrid1.ViewBorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64)))));
this.propertyGrid1.ViewForeColor = System.Drawing.Color.White;
this.propertyGrid1.PropertyValueChanged += new System.Windows.Forms.PropertyValueChangedEventHandler(this.propertyGrid1_PropertyValueChanged);
//
// splitter1
//
this.splitter1.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64)))));
this.splitter1.Dock = System.Windows.Forms.DockStyle.Top;
this.splitter1.Location = new System.Drawing.Point(0, 296);
this.splitter1.Name = "splitter1";
this.splitter1.Size = new System.Drawing.Size(593, 3);
this.splitter1.TabIndex = 2;
this.splitter1.TabStop = false;
//
// panel2
//
this.panel2.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64)))));
this.panel2.Controls.Add(this.panel4);
this.panel2.Controls.Add(this.panel3);
this.panel2.Controls.Add(this.button1);
this.panel2.Dock = System.Windows.Forms.DockStyle.Fill;
this.panel2.Location = new System.Drawing.Point(0, 299);
this.panel2.Name = "panel2";
this.panel2.Size = new System.Drawing.Size(593, 297);
this.panel2.TabIndex = 3;
//
// panel4
//
this.panel4.Controls.Add(this.pictureBoxCustom1);
this.panel4.Dock = System.Windows.Forms.DockStyle.Fill;
this.panel4.Location = new System.Drawing.Point(0, 80);
this.panel4.Name = "panel4";
this.panel4.Size = new System.Drawing.Size(593, 217);
this.panel4.TabIndex = 4;
//
// pictureBoxCustom1
//
this.pictureBoxCustom1.BackColor = System.Drawing.Color.Transparent;
this.pictureBoxCustom1.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("pictureBoxCustom1.BackgroundImage")));
this.pictureBoxCustom1.Dock = System.Windows.Forms.DockStyle.Fill;
this.pictureBoxCustom1.Location = new System.Drawing.Point(0, 0);
this.pictureBoxCustom1.Name = "pictureBoxCustom1";
this.pictureBoxCustom1.Size = new System.Drawing.Size(593, 217);
this.pictureBoxCustom1.SizeMode = System.Windows.Forms.PictureBoxSizeMode.Zoom;
this.pictureBoxCustom1.TabIndex = 0;
this.pictureBoxCustom1.TabStop = false;
//
// panel3
//
this.panel3.Controls.Add(this.label5);
this.panel3.Controls.Add(this.arrayLevelCounterLabel);
this.panel3.Controls.Add(this.btnRightArray);
this.panel3.Controls.Add(this.btnLeftArray);
this.panel3.Controls.Add(this.imageBGComboBox);
this.panel3.Controls.Add(this.label1);
this.panel3.Controls.Add(this.texSizeMipsLabel);
this.panel3.Controls.Add(this.mipLevelCounterLabel);
this.panel3.Controls.Add(this.BtnMipsRight);
this.panel3.Controls.Add(this.BtmMipsLeft);
this.panel3.Dock = System.Windows.Forms.DockStyle.Top;
this.panel3.Location = new System.Drawing.Point(0, 25);
this.panel3.Name = "panel3";
this.panel3.Size = new System.Drawing.Size(593, 55);
this.panel3.TabIndex = 2;
//
// label5
//
this.label5.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.label5.AutoSize = true;
this.label5.ForeColor = System.Drawing.Color.White;
this.label5.Location = new System.Drawing.Point(342, 30);
this.label5.Name = "label5";
this.label5.Size = new System.Drawing.Size(74, 13);
this.label5.TabIndex = 9;
this.label5.Text = "Array Counter:";
//
// arrayLevelCounterLabel
//
this.arrayLevelCounterLabel.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.arrayLevelCounterLabel.AutoSize = true;
this.arrayLevelCounterLabel.ForeColor = System.Drawing.Color.White;
this.arrayLevelCounterLabel.Location = new System.Drawing.Point(415, 30);
this.arrayLevelCounterLabel.Name = "arrayLevelCounterLabel";
this.arrayLevelCounterLabel.Size = new System.Drawing.Size(42, 13);
this.arrayLevelCounterLabel.TabIndex = 8;
this.arrayLevelCounterLabel.Text = "00 / 00";
//
// btnRightArray
//
this.btnRightArray.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.btnRightArray.Location = new System.Drawing.Point(533, 26);
this.btnRightArray.Name = "btnRightArray";
this.btnRightArray.Size = new System.Drawing.Size(57, 21);
this.btnRightArray.TabIndex = 7;
this.btnRightArray.Text = ">";
this.btnRightArray.UseVisualStyleBackColor = true;
this.btnRightArray.Click += new System.EventHandler(this.btnRightArray_Click);
//
// btnLeftArray
//
this.btnLeftArray.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.btnLeftArray.Enabled = false;
this.btnLeftArray.Location = new System.Drawing.Point(470, 26);
this.btnLeftArray.Name = "btnLeftArray";
this.btnLeftArray.Size = new System.Drawing.Size(57, 21);
this.btnLeftArray.TabIndex = 6;
this.btnLeftArray.Text = "<";
this.btnLeftArray.UseVisualStyleBackColor = true;
this.btnLeftArray.Click += new System.EventHandler(this.btnLeftArray_Click);
//
// imageBGComboBox
//
this.imageBGComboBox.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.imageBGComboBox.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
this.imageBGComboBox.FormattingEnabled = true;
this.imageBGComboBox.Location = new System.Drawing.Point(215, 7);
this.imageBGComboBox.Name = "imageBGComboBox";
this.imageBGComboBox.Size = new System.Drawing.Size(121, 21);
this.imageBGComboBox.TabIndex = 5;
this.imageBGComboBox.SelectedIndexChanged += new System.EventHandler(this.imageBGComboBox_SelectedIndexChanged);
//
// label1
//
this.label1.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.label1.AutoSize = true;
this.label1.ForeColor = System.Drawing.Color.White;
this.label1.Location = new System.Drawing.Point(342, 7);
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(67, 13);
this.label1.TabIndex = 4;
this.label1.Text = "Mip Counter:";
//
// texSizeMipsLabel
//
this.texSizeMipsLabel.AutoSize = true;
this.texSizeMipsLabel.ForeColor = System.Drawing.Color.White;
this.texSizeMipsLabel.Location = new System.Drawing.Point(127, 34);
this.texSizeMipsLabel.Name = "texSizeMipsLabel";
this.texSizeMipsLabel.Size = new System.Drawing.Size(42, 13);
this.texSizeMipsLabel.TabIndex = 3;
this.texSizeMipsLabel.Text = "00 / 00";
//
// mipLevelCounterLabel
//
this.mipLevelCounterLabel.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.mipLevelCounterLabel.AutoSize = true;
this.mipLevelCounterLabel.ForeColor = System.Drawing.Color.White;
this.mipLevelCounterLabel.Location = new System.Drawing.Point(415, 7);
this.mipLevelCounterLabel.Name = "mipLevelCounterLabel";
this.mipLevelCounterLabel.Size = new System.Drawing.Size(42, 13);
this.mipLevelCounterLabel.TabIndex = 2;
this.mipLevelCounterLabel.Text = "00 / 00";
//
// BtnMipsRight
//
this.BtnMipsRight.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.BtnMipsRight.Location = new System.Drawing.Point(533, 3);
this.BtnMipsRight.Name = "BtnMipsRight";
this.BtnMipsRight.Size = new System.Drawing.Size(57, 21);
this.BtnMipsRight.TabIndex = 1;
this.BtnMipsRight.Text = ">";
this.BtnMipsRight.UseVisualStyleBackColor = true;
this.BtnMipsRight.Click += new System.EventHandler(this.BtnMipsRight_Click);
//
// BtmMipsLeft
//
this.BtmMipsLeft.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.BtmMipsLeft.Enabled = false;
this.BtmMipsLeft.Location = new System.Drawing.Point(470, 3);
this.BtmMipsLeft.Name = "BtmMipsLeft";
this.BtmMipsLeft.Size = new System.Drawing.Size(57, 21);
this.BtmMipsLeft.TabIndex = 0;
this.BtmMipsLeft.Text = "<";
this.BtmMipsLeft.UseVisualStyleBackColor = true;
this.BtmMipsLeft.Click += new System.EventHandler(this.BtmMipsLeft_Click);
//
// button1
//
this.button1.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64)))));
this.button1.Dock = System.Windows.Forms.DockStyle.Top;
this.button1.FlatAppearance.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(90)))), ((int)(((byte)(90)))), ((int)(((byte)(90)))));
this.button1.FlatAppearance.MouseDownBackColor = System.Drawing.Color.Gray;
this.button1.FlatAppearance.MouseOverBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(90)))), ((int)(((byte)(90)))), ((int)(((byte)(90)))));
this.button1.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.button1.ForeColor = System.Drawing.Color.White;
this.button1.Location = new System.Drawing.Point(0, 0);
this.button1.Name = "button1";
this.button1.Size = new System.Drawing.Size(593, 25);
this.button1.TabIndex = 1;
this.button1.Text = "Hide";
this.button1.UseVisualStyleBackColor = false;
this.button1.Click += new System.EventHandler(this.button1_Click);
//
// contextMenuStrip1
//
this.contextMenuStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
this.replaceSurfaceLevelToolStripMenuItem,
this.exportSurfaceLevelToolStripMenuItem});
this.contextMenuStrip1.Name = "contextMenuStrip1";
this.contextMenuStrip1.Size = new System.Drawing.Size(188, 48);
//
// replaceSurfaceLevelToolStripMenuItem
//
this.replaceSurfaceLevelToolStripMenuItem.Name = "replaceSurfaceLevelToolStripMenuItem";
this.replaceSurfaceLevelToolStripMenuItem.Size = new System.Drawing.Size(187, 22);
this.replaceSurfaceLevelToolStripMenuItem.Text = "Replace Surface Level";
//
// exportSurfaceLevelToolStripMenuItem
//
this.exportSurfaceLevelToolStripMenuItem.Name = "exportSurfaceLevelToolStripMenuItem";
this.exportSurfaceLevelToolStripMenuItem.Size = new System.Drawing.Size(187, 22);
this.exportSurfaceLevelToolStripMenuItem.Text = "Export Surface Level";
//
// NuTexEditor
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.Controls.Add(this.panel2);
this.Controls.Add(this.splitter1);
this.Controls.Add(this.panel1);
this.Name = "NuTexEditor";
this.Size = new System.Drawing.Size(593, 596);
this.panel1.ResumeLayout(false);
this.panel2.ResumeLayout(false);
this.panel4.ResumeLayout(false);
((System.ComponentModel.ISupportInitialize)(this.pictureBoxCustom1)).EndInit();
this.panel3.ResumeLayout(false);
this.panel3.PerformLayout();
this.contextMenuStrip1.ResumeLayout(false);
this.ResumeLayout(false);
}
#endregion
private System.Windows.Forms.Panel panel1;
private System.Windows.Forms.Button button1;
private System.Windows.Forms.Splitter splitter1;
private System.Windows.Forms.Panel panel2;
private Switch_Toolbox.Library.Forms.PictureBoxCustom pictureBoxCustom1;
private System.Windows.Forms.PropertyGrid propertyGrid1;
private System.Windows.Forms.Panel panel4;
private System.Windows.Forms.Panel panel3;
private System.Windows.Forms.Label mipLevelCounterLabel;
private System.Windows.Forms.Button BtnMipsRight;
private System.Windows.Forms.Button BtmMipsLeft;
private System.Windows.Forms.Label texSizeMipsLabel;
private System.Windows.Forms.Label label1;
private System.Windows.Forms.ComboBox imageBGComboBox;
private System.Windows.Forms.Label label5;
private System.Windows.Forms.Label arrayLevelCounterLabel;
private System.Windows.Forms.Button btnRightArray;
private System.Windows.Forms.Button btnLeftArray;
private System.Windows.Forms.ContextMenuStrip contextMenuStrip1;
private System.Windows.Forms.ToolStripMenuItem replaceSurfaceLevelToolStripMenuItem;
private System.Windows.Forms.ToolStripMenuItem exportSurfaceLevelToolStripMenuItem;
}
}

View File

@ -0,0 +1,208 @@
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Drawing;
using System.Data;
using System.Linq;
using System.Text;
using System.Threading;
using System.Windows.Forms;
using WeifenLuo.WinFormsUI.Docking;
using Syroot.NintenTools.NSW.Bntx;
using Syroot.NintenTools.NSW.Bntx.GFX;
using Switch_Toolbox.Library;
namespace FirstPlugin
{
public partial class NuTexEditor : UserControl
{
private Thread Thread;
public NuTexEditor()
{
InitializeComponent();
foreach (var type in Enum.GetValues(typeof(Runtime.PictureBoxBG)).Cast<Runtime.PictureBoxBG>())
imageBGComboBox.Items.Add(type);
imageBGComboBox.SelectedItem = Runtime.pictureBoxStyle;
UpdateBackgroundImage();
}
NUTEXB.NuTex textureData;
int CurMipDisplayLevel = 0;
int CurArrayDisplayLevel = 0;
class PropGridData
{
public string Name { get; set; }
public string Format { get; set; }
public uint Width { get; set; }
public uint Height { get; set; }
public uint MipCount { get; set; }
public uint ArrayCount { get; set; }
}
public void LoadProperty(NUTEXB.NuTex tex)
{
pictureBoxCustom1.Image = Imaging.GetLoadingImage();
LoadImage();
CurMipDisplayLevel = 0;
CurArrayDisplayLevel = 0;
textureData = tex;
UpdateMipDisplay();
PropGridData prop = new PropGridData();
prop.Name = textureData.Text;
prop.Width = textureData.Width;
prop.Height = textureData.Height;
if (textureData.mipmaps.Count > 0)
{
prop.MipCount = (uint)textureData.mipmaps[CurArrayDisplayLevel].Count;
prop.ArrayCount = (uint)textureData.mipmaps.Count;
}
prop.Height = textureData.Height;
prop.Format = ((NUTEXB.NUTEXImageFormat)textureData.Format).ToString();
propertyGrid1.PropertySort = PropertySort.Categorized;
propertyGrid1.SelectedObject = prop;
}
private void LoadImage()
{
Thread = new Thread((ThreadStart)(() =>
{
pictureBoxCustom1.Image = Imaging.GetLoadingImage();
pictureBoxCustom1.Image = textureData.DisplayTexture(CurArrayDisplayLevel, CurMipDisplayLevel);
}));
Thread.Start();
GC.Collect();
}
private void UpdateMipDisplay()
{
LoadImage();
int MipCount = 1;
if (textureData.mipmaps.Count <= 0)
return;
else
MipCount = textureData.mipmaps[CurArrayDisplayLevel].Count;
mipLevelCounterLabel.Text = $"{CurMipDisplayLevel} / {textureData.mipmaps[CurArrayDisplayLevel].Count - 1}";
arrayLevelCounterLabel.Text = $"{CurArrayDisplayLevel} / {textureData.mipmaps.Count - 1}";
if (CurMipDisplayLevel != MipCount - 1)
BtnMipsRight.Enabled = true;
else
BtnMipsRight.Enabled = false;
if (CurMipDisplayLevel != 0)
BtmMipsLeft.Enabled = true;
else
BtmMipsLeft.Enabled = false;
if (CurArrayDisplayLevel != textureData.mipmaps.Count - 1)
btnRightArray.Enabled = true;
else
btnRightArray.Enabled = false;
if (CurArrayDisplayLevel != 0)
btnLeftArray.Enabled = true;
else
btnLeftArray.Enabled = false;
}
bool IsHidden = false;
private void button1_Click(object sender, EventArgs e)
{
if (IsHidden)
{
panel1.Visible = true;
IsHidden = false;
button1.Text = "Hide";
}
else
{
panel1.Visible = false;
IsHidden = true;
button1.Text = "Show";
}
}
private void propertyGrid1_PropertyValueChanged(object s, PropertyValueChangedEventArgs e)
{
if (propertyGrid1.SelectedObject != null)
{
Texture tex = (Texture)propertyGrid1.SelectedObject;
textureData.Text = tex.Name;
}
}
private void BtmMipsLeft_Click(object sender, EventArgs e)
{
if (CurMipDisplayLevel != 0)
CurMipDisplayLevel -= 1;
UpdateMipDisplay();
}
private void BtnMipsRight_Click(object sender, EventArgs e)
{
if (CurMipDisplayLevel != textureData.mipmaps[CurArrayDisplayLevel].Count - 1)
CurMipDisplayLevel += 1;
UpdateMipDisplay();
}
private void btnLeftArray_Click(object sender, EventArgs e)
{
if (CurArrayDisplayLevel != 0)
CurArrayDisplayLevel -= 1;
UpdateMipDisplay();
}
private void btnRightArray_Click(object sender, EventArgs e)
{
if (CurArrayDisplayLevel != textureData.mipmaps.Count - 1)
CurArrayDisplayLevel += 1;
UpdateMipDisplay();
}
private void UpdateBackgroundImage()
{
switch (Runtime.pictureBoxStyle)
{
case Runtime.PictureBoxBG.Black:
pictureBoxCustom1.BackColor = Color.Black;
pictureBoxCustom1.BackgroundImage = null;
break;
case Runtime.PictureBoxBG.Checkerboard:
pictureBoxCustom1.BackColor = Color.Transparent;
pictureBoxCustom1.BackgroundImage = pictureBoxCustom1.GetCheckerBackground();
break;
}
}
private void imageBGComboBox_SelectedIndexChanged(object sender, EventArgs e)
{
Runtime.pictureBoxStyle = (Runtime.PictureBoxBG)imageBGComboBox.SelectedItem;
UpdateBackgroundImage();
}
private void btnEdit_Click(object sender, EventArgs e)
{
Button btnSender = (Button)sender;
Point ptLowerLeft = new Point(0, btnSender.Height);
ptLowerLeft = btnSender.PointToScreen(ptLowerLeft);
contextMenuStrip1.Show(ptLowerLeft);
}
}
}

View File

@ -0,0 +1,331 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<data name="pictureBoxCustom1.BackgroundImage" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>
iVBORw0KGgoAAAANSUhEUgAAAlgAAAJYCAMAAACJuGjuAAAABGdBTUEAALGPC/xhBQAAACBjSFJNAAB6
JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAADAFBMVEXMzMzNzc3Ozs7Pz8/Q0NDR0dHS
0tLT09PU1NTV1dXW1tbX19fY2NjZ2dna2trb29vc3Nzd3d3e3t7f39/g4ODh4eHi4uLj4+Pk5OTl5eXm
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xEAIUwAAAABJRU5ErkJggg==
</value>
</data>
<metadata name="contextMenuStrip1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>17, 17</value>
</metadata>
</root>

View File

@ -0,0 +1,296 @@
namespace FirstPlugin
{
partial class XTXEditor
{
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// Clean up any resources being used.
/// </summary>
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
#region Component Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
this.components = new System.ComponentModel.Container();
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(XTXEditor));
this.panel1 = new System.Windows.Forms.Panel();
this.propertyGrid1 = new System.Windows.Forms.PropertyGrid();
this.splitter1 = new System.Windows.Forms.Splitter();
this.panel2 = new System.Windows.Forms.Panel();
this.panel4 = new System.Windows.Forms.Panel();
this.pictureBoxCustom1 = new Switch_Toolbox.Library.Forms.PictureBoxCustom();
this.panel3 = new System.Windows.Forms.Panel();
this.imageBGComboBox = new System.Windows.Forms.ComboBox();
this.label1 = new System.Windows.Forms.Label();
this.texSizeMipsLabel = new System.Windows.Forms.Label();
this.mipLevelCounterLabel = new System.Windows.Forms.Label();
this.BtnMipsRight = new System.Windows.Forms.Button();
this.BtmMipsLeft = new System.Windows.Forms.Button();
this.button1 = new System.Windows.Forms.Button();
this.contextMenuStrip1 = new System.Windows.Forms.ContextMenuStrip(this.components);
this.replaceSurfaceLevelToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.exportSurfaceLevelToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.panel1.SuspendLayout();
this.panel2.SuspendLayout();
this.panel4.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.pictureBoxCustom1)).BeginInit();
this.panel3.SuspendLayout();
this.contextMenuStrip1.SuspendLayout();
this.SuspendLayout();
//
// panel1
//
this.panel1.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64)))));
this.panel1.Controls.Add(this.propertyGrid1);
this.panel1.Dock = System.Windows.Forms.DockStyle.Top;
this.panel1.Location = new System.Drawing.Point(0, 0);
this.panel1.Name = "panel1";
this.panel1.Size = new System.Drawing.Size(593, 296);
this.panel1.TabIndex = 1;
//
// propertyGrid1
//
this.propertyGrid1.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
| System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.propertyGrid1.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(40)))), ((int)(((byte)(40)))), ((int)(((byte)(40)))));
this.propertyGrid1.CategoryForeColor = System.Drawing.Color.WhiteSmoke;
this.propertyGrid1.CategorySplitterColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64)))));
this.propertyGrid1.CommandsActiveLinkColor = System.Drawing.Color.Red;
this.propertyGrid1.CommandsBorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(50)))), ((int)(((byte)(50)))), ((int)(((byte)(50)))));
this.propertyGrid1.CommandsDisabledLinkColor = System.Drawing.Color.FromArgb(((int)(((byte)(50)))), ((int)(((byte)(50)))), ((int)(((byte)(50)))));
this.propertyGrid1.CommandsForeColor = System.Drawing.Color.White;
this.propertyGrid1.DisabledItemForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(127)))), ((int)(((byte)(255)))), ((int)(((byte)(255)))), ((int)(((byte)(255)))));
this.propertyGrid1.HelpBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(40)))), ((int)(((byte)(40)))), ((int)(((byte)(40)))));
this.propertyGrid1.HelpBorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(45)))), ((int)(((byte)(45)))), ((int)(((byte)(45)))));
this.propertyGrid1.HelpForeColor = System.Drawing.Color.White;
this.propertyGrid1.LineColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64)))));
this.propertyGrid1.Location = new System.Drawing.Point(0, 0);
this.propertyGrid1.Name = "propertyGrid1";
this.propertyGrid1.SelectedItemWithFocusForeColor = System.Drawing.Color.Silver;
this.propertyGrid1.Size = new System.Drawing.Size(593, 299);
this.propertyGrid1.TabIndex = 2;
this.propertyGrid1.ToolbarVisible = false;
this.propertyGrid1.ViewBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(40)))), ((int)(((byte)(40)))), ((int)(((byte)(40)))));
this.propertyGrid1.ViewBorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64)))));
this.propertyGrid1.ViewForeColor = System.Drawing.Color.White;
this.propertyGrid1.PropertyValueChanged += new System.Windows.Forms.PropertyValueChangedEventHandler(this.propertyGrid1_PropertyValueChanged);
//
// splitter1
//
this.splitter1.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64)))));
this.splitter1.Dock = System.Windows.Forms.DockStyle.Top;
this.splitter1.Location = new System.Drawing.Point(0, 296);
this.splitter1.Name = "splitter1";
this.splitter1.Size = new System.Drawing.Size(593, 3);
this.splitter1.TabIndex = 2;
this.splitter1.TabStop = false;
//
// panel2
//
this.panel2.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64)))));
this.panel2.Controls.Add(this.panel4);
this.panel2.Controls.Add(this.panel3);
this.panel2.Controls.Add(this.button1);
this.panel2.Dock = System.Windows.Forms.DockStyle.Fill;
this.panel2.Location = new System.Drawing.Point(0, 299);
this.panel2.Name = "panel2";
this.panel2.Size = new System.Drawing.Size(593, 297);
this.panel2.TabIndex = 3;
//
// panel4
//
this.panel4.Controls.Add(this.pictureBoxCustom1);
this.panel4.Dock = System.Windows.Forms.DockStyle.Fill;
this.panel4.Location = new System.Drawing.Point(0, 80);
this.panel4.Name = "panel4";
this.panel4.Size = new System.Drawing.Size(593, 217);
this.panel4.TabIndex = 4;
//
// pictureBoxCustom1
//
this.pictureBoxCustom1.BackColor = System.Drawing.Color.Transparent;
this.pictureBoxCustom1.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("pictureBoxCustom1.BackgroundImage")));
this.pictureBoxCustom1.Dock = System.Windows.Forms.DockStyle.Fill;
this.pictureBoxCustom1.Location = new System.Drawing.Point(0, 0);
this.pictureBoxCustom1.Name = "pictureBoxCustom1";
this.pictureBoxCustom1.Size = new System.Drawing.Size(593, 217);
this.pictureBoxCustom1.SizeMode = System.Windows.Forms.PictureBoxSizeMode.Zoom;
this.pictureBoxCustom1.TabIndex = 0;
this.pictureBoxCustom1.TabStop = false;
//
// panel3
//
this.panel3.Controls.Add(this.imageBGComboBox);
this.panel3.Controls.Add(this.label1);
this.panel3.Controls.Add(this.texSizeMipsLabel);
this.panel3.Controls.Add(this.mipLevelCounterLabel);
this.panel3.Controls.Add(this.BtnMipsRight);
this.panel3.Controls.Add(this.BtmMipsLeft);
this.panel3.Dock = System.Windows.Forms.DockStyle.Top;
this.panel3.Location = new System.Drawing.Point(0, 25);
this.panel3.Name = "panel3";
this.panel3.Size = new System.Drawing.Size(593, 55);
this.panel3.TabIndex = 2;
//
// imageBGComboBox
//
this.imageBGComboBox.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.imageBGComboBox.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
this.imageBGComboBox.FormattingEnabled = true;
this.imageBGComboBox.Location = new System.Drawing.Point(215, 7);
this.imageBGComboBox.Name = "imageBGComboBox";
this.imageBGComboBox.Size = new System.Drawing.Size(121, 21);
this.imageBGComboBox.TabIndex = 5;
this.imageBGComboBox.SelectedIndexChanged += new System.EventHandler(this.imageBGComboBox_SelectedIndexChanged);
//
// label1
//
this.label1.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.label1.AutoSize = true;
this.label1.ForeColor = System.Drawing.Color.White;
this.label1.Location = new System.Drawing.Point(342, 7);
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(67, 13);
this.label1.TabIndex = 4;
this.label1.Text = "Mip Counter:";
//
// texSizeMipsLabel
//
this.texSizeMipsLabel.AutoSize = true;
this.texSizeMipsLabel.ForeColor = System.Drawing.Color.White;
this.texSizeMipsLabel.Location = new System.Drawing.Point(127, 34);
this.texSizeMipsLabel.Name = "texSizeMipsLabel";
this.texSizeMipsLabel.Size = new System.Drawing.Size(42, 13);
this.texSizeMipsLabel.TabIndex = 3;
this.texSizeMipsLabel.Text = "00 / 00";
//
// mipLevelCounterLabel
//
this.mipLevelCounterLabel.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.mipLevelCounterLabel.AutoSize = true;
this.mipLevelCounterLabel.ForeColor = System.Drawing.Color.White;
this.mipLevelCounterLabel.Location = new System.Drawing.Point(415, 7);
this.mipLevelCounterLabel.Name = "mipLevelCounterLabel";
this.mipLevelCounterLabel.Size = new System.Drawing.Size(42, 13);
this.mipLevelCounterLabel.TabIndex = 2;
this.mipLevelCounterLabel.Text = "00 / 00";
//
// BtnMipsRight
//
this.BtnMipsRight.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.BtnMipsRight.Location = new System.Drawing.Point(533, 3);
this.BtnMipsRight.Name = "BtnMipsRight";
this.BtnMipsRight.Size = new System.Drawing.Size(57, 21);
this.BtnMipsRight.TabIndex = 1;
this.BtnMipsRight.Text = ">";
this.BtnMipsRight.UseVisualStyleBackColor = true;
this.BtnMipsRight.Click += new System.EventHandler(this.BtnMipsRight_Click);
//
// BtmMipsLeft
//
this.BtmMipsLeft.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.BtmMipsLeft.Enabled = false;
this.BtmMipsLeft.Location = new System.Drawing.Point(470, 3);
this.BtmMipsLeft.Name = "BtmMipsLeft";
this.BtmMipsLeft.Size = new System.Drawing.Size(57, 21);
this.BtmMipsLeft.TabIndex = 0;
this.BtmMipsLeft.Text = "<";
this.BtmMipsLeft.UseVisualStyleBackColor = true;
this.BtmMipsLeft.Click += new System.EventHandler(this.BtmMipsLeft_Click);
//
// button1
//
this.button1.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64)))));
this.button1.Dock = System.Windows.Forms.DockStyle.Top;
this.button1.FlatAppearance.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(90)))), ((int)(((byte)(90)))), ((int)(((byte)(90)))));
this.button1.FlatAppearance.MouseDownBackColor = System.Drawing.Color.Gray;
this.button1.FlatAppearance.MouseOverBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(90)))), ((int)(((byte)(90)))), ((int)(((byte)(90)))));
this.button1.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.button1.ForeColor = System.Drawing.Color.White;
this.button1.Location = new System.Drawing.Point(0, 0);
this.button1.Name = "button1";
this.button1.Size = new System.Drawing.Size(593, 25);
this.button1.TabIndex = 1;
this.button1.Text = "Hide";
this.button1.UseVisualStyleBackColor = false;
this.button1.Click += new System.EventHandler(this.button1_Click);
//
// contextMenuStrip1
//
this.contextMenuStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
this.replaceSurfaceLevelToolStripMenuItem,
this.exportSurfaceLevelToolStripMenuItem});
this.contextMenuStrip1.Name = "contextMenuStrip1";
this.contextMenuStrip1.Size = new System.Drawing.Size(188, 48);
//
// replaceSurfaceLevelToolStripMenuItem
//
this.replaceSurfaceLevelToolStripMenuItem.Name = "replaceSurfaceLevelToolStripMenuItem";
this.replaceSurfaceLevelToolStripMenuItem.Size = new System.Drawing.Size(187, 22);
this.replaceSurfaceLevelToolStripMenuItem.Text = "Replace Surface Level";
//
// exportSurfaceLevelToolStripMenuItem
//
this.exportSurfaceLevelToolStripMenuItem.Name = "exportSurfaceLevelToolStripMenuItem";
this.exportSurfaceLevelToolStripMenuItem.Size = new System.Drawing.Size(187, 22);
this.exportSurfaceLevelToolStripMenuItem.Text = "Export Surface Level";
//
// XTXEditor
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.Controls.Add(this.panel2);
this.Controls.Add(this.splitter1);
this.Controls.Add(this.panel1);
this.Name = "XTXEditor";
this.Size = new System.Drawing.Size(593, 596);
this.panel1.ResumeLayout(false);
this.panel2.ResumeLayout(false);
this.panel4.ResumeLayout(false);
((System.ComponentModel.ISupportInitialize)(this.pictureBoxCustom1)).EndInit();
this.panel3.ResumeLayout(false);
this.panel3.PerformLayout();
this.contextMenuStrip1.ResumeLayout(false);
this.ResumeLayout(false);
}
#endregion
private System.Windows.Forms.Panel panel1;
private System.Windows.Forms.Button button1;
private System.Windows.Forms.Splitter splitter1;
private System.Windows.Forms.Panel panel2;
private Switch_Toolbox.Library.Forms.PictureBoxCustom pictureBoxCustom1;
private System.Windows.Forms.PropertyGrid propertyGrid1;
private System.Windows.Forms.Panel panel4;
private System.Windows.Forms.Panel panel3;
private System.Windows.Forms.Label mipLevelCounterLabel;
private System.Windows.Forms.Button BtnMipsRight;
private System.Windows.Forms.Button BtmMipsLeft;
private System.Windows.Forms.Label texSizeMipsLabel;
private System.Windows.Forms.Label label1;
private System.Windows.Forms.ComboBox imageBGComboBox;
private System.Windows.Forms.ContextMenuStrip contextMenuStrip1;
private System.Windows.Forms.ToolStripMenuItem replaceSurfaceLevelToolStripMenuItem;
private System.Windows.Forms.ToolStripMenuItem exportSurfaceLevelToolStripMenuItem;
}
}

View File

@ -0,0 +1,177 @@
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Drawing;
using System.Data;
using System.Linq;
using System.Text;
using System.Threading;
using System.Windows.Forms;
using WeifenLuo.WinFormsUI.Docking;
using Syroot.NintenTools.NSW.Bntx;
using Syroot.NintenTools.NSW.Bntx.GFX;
using Switch_Toolbox.Library;
namespace FirstPlugin
{
public partial class XTXEditor : UserControl
{
private Thread Thread;
public XTXEditor()
{
InitializeComponent();
foreach (var type in Enum.GetValues(typeof(Runtime.PictureBoxBG)).Cast<Runtime.PictureBoxBG>())
imageBGComboBox.Items.Add(type);
imageBGComboBox.SelectedItem = Runtime.pictureBoxStyle;
UpdateBackgroundImage();
}
XTX.XTXFile.TextureInfo textureData;
int CurMipDisplayLevel = 0;
int CurArrayDisplayLevel = 0;
class PropGridData
{
public string Name { get; set; }
public string Format { get; set; }
public uint Width { get; set; }
public uint Height { get; set; }
public uint MipCount { get; set; }
public uint ArrayCount { get; set; }
}
public void LoadProperty(XTX.XTXFile.TextureInfo tex)
{
pictureBoxCustom1.Image = Imaging.GetLoadingImage();
LoadImage();
CurMipDisplayLevel = 0;
CurArrayDisplayLevel = 0;
textureData = tex;
UpdateMipDisplay();
PropGridData prop = new PropGridData();
prop.Name = textureData.Text;
prop.Width = textureData.Width;
prop.Height = textureData.Height;
// prop.MipCount = (uint)textureData.blocksCompressed[0].Count;
// prop.ArrayCount = (uint)textureData.blocksCompressed.Count;
prop.Height = textureData.Height;
prop.Format = ((NUTEXB.NUTEXImageFormat)textureData.Format).ToString();
propertyGrid1.PropertySort = PropertySort.Categorized;
propertyGrid1.SelectedObject = prop;
}
private void LoadImage()
{
Thread = new Thread((ThreadStart)(() =>
{
pictureBoxCustom1.Image = Imaging.GetLoadingImage();
pictureBoxCustom1.Image = textureData.DisplayImage(CurMipDisplayLevel, CurArrayDisplayLevel);
}));
Thread.Start();
GC.Collect();
}
private void UpdateMipDisplay()
{
LoadImage();
int MipCount = 1;
if (textureData.mipmaps.Count <= 0)
return;
else
MipCount = textureData.mipmaps.Count;
mipLevelCounterLabel.Text = $"{CurMipDisplayLevel} / {textureData.mipmaps.Count - 1}";
if (CurMipDisplayLevel != MipCount - 1)
BtnMipsRight.Enabled = true;
else
BtnMipsRight.Enabled = false;
if (CurMipDisplayLevel != 0)
BtmMipsLeft.Enabled = true;
else
BtmMipsLeft.Enabled = false;
}
bool IsHidden = false;
private void button1_Click(object sender, EventArgs e)
{
if (IsHidden)
{
panel1.Visible = true;
IsHidden = false;
button1.Text = "Hide";
}
else
{
panel1.Visible = false;
IsHidden = true;
button1.Text = "Show";
}
}
private void propertyGrid1_PropertyValueChanged(object s, PropertyValueChangedEventArgs e)
{
if (propertyGrid1.SelectedObject != null)
{
Texture tex = (Texture)propertyGrid1.SelectedObject;
textureData.Text = tex.Name;
}
}
private void BtmMipsLeft_Click(object sender, EventArgs e)
{
if (CurMipDisplayLevel != 0)
CurMipDisplayLevel -= 1;
UpdateMipDisplay();
}
private void BtnMipsRight_Click(object sender, EventArgs e)
{
if (CurMipDisplayLevel != textureData.mipmaps.Count - 1)
CurMipDisplayLevel += 1;
UpdateMipDisplay();
}
private void UpdateBackgroundImage()
{
switch (Runtime.pictureBoxStyle)
{
case Runtime.PictureBoxBG.Black:
pictureBoxCustom1.BackColor = Color.Black;
pictureBoxCustom1.BackgroundImage = null;
break;
case Runtime.PictureBoxBG.Checkerboard:
pictureBoxCustom1.BackColor = Color.Transparent;
pictureBoxCustom1.BackgroundImage = pictureBoxCustom1.GetCheckerBackground();
break;
}
}
private void imageBGComboBox_SelectedIndexChanged(object sender, EventArgs e)
{
Runtime.pictureBoxStyle = (Runtime.PictureBoxBG)imageBGComboBox.SelectedItem;
UpdateBackgroundImage();
}
private void btnEdit_Click(object sender, EventArgs e)
{
Button btnSender = (Button)sender;
Point ptLowerLeft = new Point(0, btnSender.Height);
ptLowerLeft = btnSender.PointToScreen(ptLowerLeft);
contextMenuStrip1.Show(ptLowerLeft);
}
}
}

View File

@ -0,0 +1,331 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<data name="pictureBoxCustom1.BackgroundImage" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>
iVBORw0KGgoAAAANSUhEUgAAAlgAAAJYCAMAAACJuGjuAAAABGdBTUEAALGPC/xhBQAAACBjSFJNAAB6
JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAADAFBMVEXMzMzNzc3Ozs7Pz8/Q0NDR0dHS
0tLT09PU1NTV1dXW1tbX19fY2NjZ2dna2trb29vc3Nzd3d3e3t7f39/g4ODh4eHi4uLj4+Pk5OTl5eXm
5ubn5+fo6Ojp6enq6urr6+vs7Ozt7e3u7u7v7+/w8PDx8fHy8vLz8/P09PT19fX29vb39/f4+Pj5+fn6
+vr7+/v8/Pz9/f3+/v7///8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA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jF
MrpjGRXLqVikYjkVi1Qs96sUS3+PZVQspzsWqVhOxSIVy6lYRsUy9WLlQRHhuMHhVxAYHH4FgcFhg8MO
xw0Ov4LA4bjBYYPDDscNDr+CwOE44ajDcYPDDsdfQWBw+BUEBocNDjscNzjscPwVBAaHDQ6/goBw1OTv
PhP65gOeCX1AQPGZ0HfvPxM6PEv5hzwT+owEas+Ebnz8M6GfZwhMfNjyu8+EPn/8M6Fv6s+ERkL/xjOh
cesy2vNO2vPu4g8z8ZunPkzhVCyjYjkVi1Qsp2KRiuVULKNiGRXLqFhGxXIqFqlYTsUiFcupWEbFMiqW
UbGMiuVULFKxnIpFKpZTsYyKZVQso2KZH1Is/D4jM+80LrRKBLQZIoHmCIFJmoigv0FAZZjRKRDQqYuE
kvArnu7TMGOwQkBrBGaOgI59BJSFX8p1KhBQJ17HuoWEyvhbosYIaBiu4xxnNGq/GayHAJq139oVZ/QQ
mGk4zW7tt3aFGa0JAhPXKv5Grfv8ckaj93+veSuXxEAIUwAAAABJRU5ErkJggg==
</value>
</data>
<metadata name="contextMenuStrip1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>17, 17</value>
</metadata>
</root>

View File

@ -267,10 +267,16 @@
<DependentUpon>BfresShapeEditor.cs</DependentUpon>
</Compile>
<Compile Include="GUI\FormLoader.cs" />
<Compile Include="GUI\NuTexEditor.cs">
<Compile Include="GUI\TextureUI\XTXEditor.cs">
<SubType>UserControl</SubType>
</Compile>
<Compile Include="GUI\NuTexEditor.Designer.cs">
<Compile Include="GUI\TextureUI\XTXEditor.Designer.cs">
<DependentUpon>XTXEditor.cs</DependentUpon>
</Compile>
<Compile Include="GUI\TextureUI\NuTexEditor.cs">
<SubType>UserControl</SubType>
</Compile>
<Compile Include="GUI\TextureUI\NuTexEditor.Designer.cs">
<DependentUpon>NuTexEditor.cs</DependentUpon>
</Compile>
<Compile Include="GUI\TexturePatternEditor.cs">
@ -418,7 +424,10 @@
<EmbeddedResource Include="GUI\BFRES\BfresShapeEditor.resx">
<DependentUpon>BfresShapeEditor.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="GUI\NuTexEditor.resx">
<EmbeddedResource Include="GUI\TextureUI\XTXEditor.resx">
<DependentUpon>XTXEditor.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="GUI\TextureUI\NuTexEditor.resx">
<DependentUpon>NuTexEditor.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="GUI\TexturePatternEditor.resx">

View File

@ -18,6 +18,8 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Updater", "Updater\Updater.
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "DirectXTex", "Switch_Toolbox\Lib\DirectXTex\DirectXTex.vcxproj", "{755AB64B-16B4-4C90-AA3B-BFF448E5A21E}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "GTXDEBUG", "GTXDEBUG\GTXDEBUG.csproj", "{C610B02F-97AE-48A8-B967-1F4E97DB2903}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
@ -73,6 +75,14 @@ Global
{755AB64B-16B4-4C90-AA3B-BFF448E5A21E}.Release|Any CPU.Build.0 = Release|Win32
{755AB64B-16B4-4C90-AA3B-BFF448E5A21E}.Release|x64.ActiveCfg = Release|x64
{755AB64B-16B4-4C90-AA3B-BFF448E5A21E}.Release|x64.Build.0 = Release|x64
{C610B02F-97AE-48A8-B967-1F4E97DB2903}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{C610B02F-97AE-48A8-B967-1F4E97DB2903}.Debug|Any CPU.Build.0 = Debug|Any CPU
{C610B02F-97AE-48A8-B967-1F4E97DB2903}.Debug|x64.ActiveCfg = Debug|Any CPU
{C610B02F-97AE-48A8-B967-1F4E97DB2903}.Debug|x64.Build.0 = Debug|Any CPU
{C610B02F-97AE-48A8-B967-1F4E97DB2903}.Release|Any CPU.ActiveCfg = Release|Any CPU
{C610B02F-97AE-48A8-B967-1F4E97DB2903}.Release|Any CPU.Build.0 = Release|Any CPU
{C610B02F-97AE-48A8-B967-1F4E97DB2903}.Release|x64.ActiveCfg = Release|Any CPU
{C610B02F-97AE-48A8-B967-1F4E97DB2903}.Release|x64.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -55,6 +55,7 @@ namespace DirectXTex
inputImage.slicePitch = slicePitch;
DirectX::ScratchImage outputImage;
// decompress image
DirectX::Decompress(inputImage, DXGI_FORMAT_R8G8B8A8_UNORM, outputImage);

Binary file not shown.

View File

@ -418,6 +418,7 @@ namespace Switch_Toolbox.Library
case DXGI_FORMAT.DXGI_FORMAT_BC6H_SF16:
case DXGI_FORMAT.DXGI_FORMAT_BC7_UNORM:
case DXGI_FORMAT.DXGI_FORMAT_BC7_UNORM_SRGB:
header.ddspf.flags = (uint)DDPF.FOURCC;
header.ddspf.fourCC = "DX10";
if (DX10header == null)
DX10header = new DX10Header();

View File

@ -158,6 +158,10 @@ namespace Switch_Toolbox.Library.IO
{
Write(Encoding.ASCII.GetBytes(value));
}
public void WriteString(string value)
{
Write(value, BinaryStringFormat.ZeroTerminated);
}
public void WriteUint64Offset(long target)
{
long pos = Position;

View File

@ -473,7 +473,6 @@ namespace Switch_Toolbox.Library.Rendering
public List<float> boneWeights = new List<float>();
public List<string> boneNames = new List<string>();
public List<float> weights = new List<float>();
public List<Bone> boneList = new List<Bone>();
public class Bone

View File

@ -108,7 +108,6 @@
<Compile Include="FileFormats\ANIM.cs" />
<Compile Include="FileFormats\Assimp\Assimp.cs" />
<Compile Include="FileFormats\Assimp\AssimpHelper.cs" />
<Compile Include="FileFormats\CSV.cs" />
<Compile Include="FileFormats\DDS.cs" />
<Compile Include="FileFormats\DDSCompressor.cs" />
<Compile Include="GUI Custom\ListViewCustom.cs">