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

Add latest

This commit is contained in:
KillzXGaming 2018-11-17 17:33:00 -05:00
parent db31730291
commit 5849962617
157 changed files with 3463 additions and 24346 deletions

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

File diff suppressed because it is too large Load Diff

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

File diff suppressed because it is too large Load Diff

Binary file not shown.

Binary file not shown.

View File

@ -20,11 +20,13 @@ namespace FirstPlugin
public CompressionType CompressionType { get; set; } = CompressionType.None;
public byte[] Data { get; set; }
public string FileName { get; set; }
public TreeNode EditorRoot { get; set; }
public TreeNodeFile EditorRoot { get; set; }
public bool IsActive { get; set; } = false;
public bool UseEditMenu { get; set; } = false;
public int Alignment { get; set; } = 0;
public string FilePath { get; set; }
public IFileInfo IFileInfo { get; set; }
public Type[] Types
{
get

Binary file not shown.

View File

@ -27,11 +27,13 @@ namespace FirstPlugin
public CompressionType CompressionType { get; set; } = CompressionType.None;
public byte[] Data { get; set; }
public string FileName { get; set; }
public TreeNode EditorRoot { get; set; }
public TreeNodeFile EditorRoot { get; set; }
public bool IsActive { get; set; } = false;
public bool UseEditMenu { get; set; } = false;
public int Alignment { get; set; } = 0;
public string FilePath { get; set; }
public IFileInfo IFileInfo { get; set; }
public Type[] Types
{
get
@ -174,7 +176,7 @@ namespace FirstPlugin
CanSave = true;
bars = new BarsLib.BARS(new MemoryStream(Data));
EditorRoot = new TreeNode(FileName);
EditorRoot = new TreeNodeFile(FileName, this);
EditorRoot.Nodes.Add("AMTA");
EditorRoot.Nodes.Add("Audio");
for (int i = 0; i < bars.AmtaList.Count; i++)

View File

@ -25,11 +25,13 @@ namespace FirstPlugin
public CompressionType CompressionType { get; set; } = CompressionType.None;
public byte[] Data { get; set; }
public string FileName { get; set; }
public TreeNode EditorRoot { get; set; }
public TreeNodeFile EditorRoot { get; set; }
public bool IsActive { get; set; } = false;
public bool UseEditMenu { get; set; } = false;
public int Alignment { get; set; } = 0;
public string FilePath { get; set; }
public IFileInfo IFileInfo { get; set; }
public Type[] Types
{
get
@ -117,7 +119,7 @@ namespace FirstPlugin
CanSave = true;
beaFile = new BezelEngineArchive(new MemoryStream(Data));
EditorRoot = new RootNode(Path.GetFileName(FileName));
EditorRoot = new RootNode(Path.GetFileName(FileName), this);
TreeNode root = EditorRoot;
FillTreeNodes(root, beaFile.FileList);
@ -158,11 +160,12 @@ namespace FirstPlugin
}
public class RootNode : TreeNodeCustom
public class RootNode : TreeNodeFile
{
public RootNode(string n)
public RootNode(string n, IFileFormat format)
{
Text = n;
FileHandler = format;
ContextMenu = new ContextMenu();
MenuItem previewFiles = new MenuItem("Preview Window");
@ -451,8 +454,6 @@ namespace FirstPlugin
format.EditorRoot.SelectedImageKey = SelectedImageKey;
Nodes.Add(format.EditorRoot);
// ReplaceNode(this.Parent, this, format.EditorRoot);
}
}
if (format.Magic == String.Empty) //Load by extension if magic isn't defined

View File

@ -22,11 +22,13 @@ namespace FirstPlugin
public CompressionType CompressionType { get; set; } = CompressionType.None;
public byte[] Data { get; set; }
public string FileName { get; set; }
public TreeNode EditorRoot { get; set; }
public TreeNodeFile EditorRoot { get; set; }
public bool IsActive { get; set; } = false;
public bool UseEditMenu { get; set; } = false;
public int Alignment { get; set; } = 0;
public string FilePath { get; set; }
public IFileInfo IFileInfo { get; set; }
public Type[] Types
{
get
@ -44,7 +46,7 @@ namespace FirstPlugin
TGLP tglp = bffnt.finf.tglp;
EditorRoot = new TreeNode(FileName);
EditorRoot = new TreeNodeFile(FileName, this);
int i = 0;
foreach (byte[] texture in tglp.SheetDataList)

View File

@ -20,11 +20,13 @@ namespace FirstPlugin
public CompressionType CompressionType { get; set; } = CompressionType.None;
public byte[] Data { get; set; }
public string FileName { get; set; }
public TreeNode EditorRoot { get; set; }
public TreeNodeFile EditorRoot { get; set; }
public bool IsActive { get; set; } = false;
public bool UseEditMenu { get; set; } = false;
public int Alignment { get; set; } = 0;
public string FilePath { get; set; }
public IFileInfo IFileInfo { get; set; }
public Type[] Types
{
get

View File

@ -20,11 +20,13 @@ namespace FirstPlugin
public CompressionType CompressionType { get; set; } = CompressionType.None;
public byte[] Data { get; set; }
public string FileName { get; set; }
public TreeNode EditorRoot { get; set; }
public TreeNodeFile EditorRoot { get; set; }
public bool IsActive { get; set; } = false;
public bool UseEditMenu { get; set; } = false;
public int Alignment { get; set; } = 0;
public string FilePath { get; set; }
public IFileInfo IFileInfo { get; set; }
public Type[] Types
{
get

View File

@ -152,7 +152,7 @@ namespace FirstPlugin
bfres.resFile.Models[CurMdl].Shapes.Clear();
bfres.resFile.Models[CurMdl].VertexBuffers.Clear();
bfres.resFile.Models[CurMdl].Materials.Clear();
bfres.resFile.Models[CurMdl].MaterialDict.Clear();
// bfres.resFile.Models[CurMdl].MaterialDict.Clear();
int i = 0;
var duplicates = model.shapes.GroupBy(c => c.Text).Where(g => g.Skip(1).Any()).SelectMany(c => c);

View File

@ -21,11 +21,13 @@ namespace FirstPlugin
public CompressionType CompressionType { get; set; } = CompressionType.None;
public byte[] Data { get; set; }
public string FileName { get; set; }
public TreeNode EditorRoot { get; set; }
public TreeNodeFile EditorRoot { get; set; }
public bool IsActive { get; set; } = false;
public bool UseEditMenu { get; set; } = false;
public int Alignment { get; set; } = 0;
public string FilePath { get; set; }
public IFileInfo IFileInfo { get; set; }
public Type[] Types
{
get
@ -41,7 +43,7 @@ namespace FirstPlugin
FSAR bfsar = new FSAR();
bfsar.Read(new FileReader(new MemoryStream(Data)));
EditorRoot = new TreeNode(FileName);
EditorRoot = new TreeNodeFile(FileName, this);
EditorRoot.Nodes.Add("Audio List");
EditorRoot.Nodes.Add("Audio Set List");

View File

@ -65,8 +65,7 @@ namespace FirstPlugin
IsActive = false;
CanSave = false;
// ByamlViewer.OpenByml(new System.IO.MemoryStream(Data), FileName);
ByamlViewer.OpenByml(new System.IO.MemoryStream(Data), FileName);
// BymlFileData byamlFile = ByamlFile.LoadN(new System.IO.MemoryStream(Data), false, Syroot.BinaryData.ByteOrder.LittleEndian);
// EditorRoot = LoadByamlNodes(byamlFile.RootNode);

View File

@ -0,0 +1,335 @@
using System;
using System.Collections.Generic;
using System.IO;
using System.Text;
using System.Threading.Tasks;
using Switch_Toolbox.Library;
using Switch_Toolbox.Library.Rendering;
using System.Windows.Forms;
using OpenTK;
namespace FirstPlugin
{
public class CsvModel : IFileFormat
{
public bool CanSave { get; set; } = false;
public bool FileIsEdited { get; set; } = false;
public bool FileIsCompressed { get; set; } = false;
public string[] Description { get; set; } = new string[] { "CSV Model" };
public string[] Extension { get; set; } = new string[] { "*.csv" };
public string Magic { get; set; } = "";
public CompressionType CompressionType { get; set; } = CompressionType.None;
public byte[] Data { get; set; }
public string FileName { get; set; }
public TreeNodeFile EditorRoot { get; set; }
public bool IsActive { get; set; } = false;
public bool UseEditMenu { get; set; } = false;
public string FilePath { get; set; }
public IFileInfo IFileInfo { get; set; }
public Type[] Types
{
get
{
List<Type> types = new List<Type>();
return types.ToArray();
}
}
public List<STGenericObject> objects = new List<STGenericObject>();
public class Model
{
public string Name { get; set; }
public int UVChannelCount { get; set; }
public DataType type;
public DataSubType subType;
public List<string[]> bones = new List<string[]>();
public List<float[]> weights = new List<float[]>();
}
public enum DataType : int
{
vertex = 1,
faces = 2,
bones = 3,
}
public enum DataSubType : int
{
position = 0,
normals = 1,
colors = 2,
uv0 = 3,
uv1 = 4,
uv2 = 5,
uv3 = 6,
}
float X, Y, Z, W;
public void Load()
{
LoadFile(FilePath);
}
public void LoadFile(string FileName, bool IsModel = false)
{
if (!IsModel)
{
MessageBox.Show("Not valid model csv");
return;
}
string line = null;
List<Model> models = new List<Model>();
TextReader csv = new StreamReader(FileName);
Model model = new Model();
STGenericObject STobj = new STGenericObject();
Vertex vtx = new Vertex();
GenericObject.LOD_Mesh lod = new GenericObject.LOD_Mesh();
int Index = 0;
int ww = 0;
while (true)
{
line = csv.ReadLine();
if (line != null)
{
if (line.StartsWith("Obj Name"))
{
model = new Model();
STobj = new STGenericObject();
model.Name = line.Split(':')[1].Replace("\n", "");
model.subType = DataSubType.position;
models.Add(model);
STobj.ObjectName = model.Name;
lod = new GenericObject.LOD_Mesh();
lod.IndexFormat = STIndexFormat.UInt16;
lod.PrimitiveType = STPolygonType.Triangle;
STobj.lodMeshes.Add(lod);
STobj.VertexBufferIndex = Index;
objects.Add(STobj);
Index++;
}
else if (line.StartsWith("tex_Array:"))
{
}
else if (line.StartsWith("Bone_Suport"))
{
}
else if (line.StartsWith("Color_Suport"))
{
}
else if (line.StartsWith("UV_Num:"))
{
int uvCount;
int.TryParse(line.Split(':')[1].Replace("\n", ""), out uvCount);
model.UVChannelCount = uvCount;
}
else if (line.StartsWith("vert_Array"))
{
model.type = DataType.vertex;
}
else if (line.StartsWith("face_Array"))
{
model.type = DataType.faces;
}
else if (line.StartsWith("bone_Array"))
{
model.type = DataType.bones;
}
else
{
string[] values = line.Replace("\n", "").Replace("\r", "").Split(',');
if (model.type == DataType.vertex)
{
switch (model.subType)
{
case DataSubType.position:
vtx = new Vertex();
STobj.vertices.Add(vtx);
STobj.HasPos = true;
float.TryParse(values[0], out X);
float.TryParse(values[1], out Y);
float.TryParse(values[2], out Z);
vtx.pos = new Vector3(X, Y, Z);
model.subType = DataSubType.normals;
break;
case DataSubType.normals:
STobj.HasNrm = true;
float.TryParse(values[0], out X);
float.TryParse(values[1], out Y);
float.TryParse(values[2], out Z);
vtx.nrm = new Vector3(X, Y, Z);
model.subType = DataSubType.colors;
break;
case DataSubType.colors:
STobj.HasVertColors = true;
float.TryParse(values[0], out X);
float.TryParse(values[1], out Y);
float.TryParse(values[2], out Z);
float.TryParse(values[3], out W);
vtx.col = new Vector4(X / 255, Y / 255, Z / 255, W / 255);
model.subType = DataSubType.uv0;
break;
case DataSubType.uv0:
STobj.HasUv0 = true;
float.TryParse(values[0], out X);
float.TryParse(values[1], out Y);
vtx.uv0 = new Vector2(X, Y);
if (model.UVChannelCount == 1)
model.subType = DataSubType.position;
else
model.subType = DataSubType.uv1;
break;
case DataSubType.uv1:
STobj.HasUv1 = true;
float.TryParse(values[0], out X);
float.TryParse(values[1], out Y);
vtx.uv1 = new Vector2(X, Y);
if (model.UVChannelCount == 2)
model.subType = DataSubType.position;
else
model.subType = DataSubType.uv2;
break;
case DataSubType.uv2:
STobj.HasUv2 = true;
float.TryParse(values[0], out X);
float.TryParse(values[1], out Y);
vtx.uv2 = new Vector2(X, Y);
if (model.UVChannelCount == 3)
model.subType = DataSubType.position;
else
model.subType = DataSubType.uv3;
break;
case DataSubType.uv3:
float.TryParse(values[0], out X);
float.TryParse(values[1], out Y);
model.subType = DataSubType.position;
break;
}
}
if (model.type == DataType.faces)
{
int face;
foreach (string v in values)
{
var cleaned = v.Replace(".0", string.Empty);
int.TryParse(cleaned, out face);
lod.faces.Add(face-1);
}
}
if (model.type == DataType.bones)
{
STobj.HasWeights = true;
STobj.HasIndices = true;
Array.Resize(ref values, values.Length - 1);
List<string> bones = new List<string>();
List<float> weights = new List<float>();
int bbs = 0;
foreach (string obj in values)
{
if (bbs == 0)
{
bones.Add(obj);
bbs += 1;
}
else
{
float.TryParse(obj, out X);
weights.Add(X);
bbs = 0;
}
}
STobj.bones.Add(bones.ToArray());
STobj.weightsT.Add(weights.ToArray());
}
}
}
else
break;
}
if (objects[0].weightsT.Count != objects[0].vertices.Count)
throw new Exception("Incorrect vertex amount");
foreach (GenericObject obj in objects)
{
obj.lodMeshes[0].GenerateSubMesh();
for (int v = 0; v < obj.vertices.Count; v++)
{
foreach (string bn in obj.bones[v])
obj.vertices[v].boneNames.Add(bn);
foreach (float f in obj.weightsT[v])
obj.vertices[v].boneWeights.Add(f);
}
}
csv.Close();
csv = null;
}
public void Unload()
{
}
public byte[] Save()
{
MemoryStream mem = new MemoryStream();
using (System.IO.StreamWriter file = new System.IO.StreamWriter(mem))
{
foreach (GenericObject obj in objects)
{
file.WriteLine($"Obj Name:" + obj.ObjectName);
file.WriteLine($"Bone_Suport");
file.WriteLine($"UV_Num:1");
file.WriteLine($"vert_Array");
foreach (Vertex v in obj.vertices)
{
file.WriteLine($"{v.pos.X},{v.pos.Y},{v.pos.Z}");
file.WriteLine($"{v.nrm.X},{v.nrm.Y},{v.nrm.Z}");
file.WriteLine($"{v.col.X * 255},{v.col.Y * 255},{v.col.Z * 255},{v.col.W * 255}");
file.WriteLine($"{v.uv0.X},{v.uv0.Y}");
// file.WriteLine($"{v.uv1.X},{v.uv1.Y}");
}
file.WriteLine($"face_Array");
for (int f = 0; f < obj.faces.Count / 3; f++)
{
file.WriteLine($"{obj.faces[f] + 1},{obj.faces[f++] + 1},{obj.faces[f++] + 1}");
}
file.WriteLine($"bone_Array");
foreach (Vertex v in obj.vertices)
{
if (v.boneNames.Count == 1)
file.WriteLine($"{v.boneNames[0]} {v.boneWeights[0]}");
if (v.boneNames.Count == 2)
file.WriteLine($"{v.boneNames[0]} {v.boneWeights[0]} {v.boneNames[1]} {v.boneWeights[1]}");
if (v.boneNames.Count == 3)
file.WriteLine($"{v.boneNames[0]} {v.boneWeights[0]} {v.boneNames[1]} {v.boneWeights[1]} {v.boneNames[2]} {v.boneWeights[2]}");
if (v.boneNames.Count == 4)
file.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]}");
}
}
file.Close();
}
return mem.ToArray();
}
}
}

View File

@ -22,11 +22,12 @@ namespace FirstPlugin
public CompressionType CompressionType { get; set; } = CompressionType.None;
public byte[] Data { get; set; }
public string FileName { get; set; }
public TreeNode EditorRoot { get; set; }
public TreeNodeFile EditorRoot { get; set; }
public bool IsActive { get; set; } = false;
public bool UseEditMenu { get; set; } = false;
public int Alignment { get; set; } = 0;
public string FilePath { get; set; }
public IFileInfo IFileInfo { get; set; }
public Type[] Types
{
get
@ -39,7 +40,7 @@ namespace FirstPlugin
public void Load()
{
IsActive = true;
EditorRoot = new TreeNode(FileName);
EditorRoot = new TreeNodeFile(FileName, this);
GFLXPACK gflx = new GFLXPACK();
gflx.Read(new FileReader(new MemoryStream(Data)), EditorRoot);

View File

@ -20,11 +20,12 @@ namespace FirstPlugin
public CompressionType CompressionType { get; set; } = CompressionType.None;
public byte[] Data { get; set; }
public string FileName { get; set; }
public TreeNode EditorRoot { get; set; }
public TreeNodeFile EditorRoot { get; set; }
public bool IsActive { get; set; } = false;
public bool UseEditMenu { get; set; } = false;
public int Alignment { get; set; } = 0;
public string FilePath { get; set; }
public IFileInfo IFileInfo { get; set; }
public Type[] Types
{
get

View File

@ -22,11 +22,11 @@ namespace FirstPlugin
public CompressionType CompressionType { get; set; } = CompressionType.None;
public byte[] Data { get; set; }
public string FileName { get; set; }
public TreeNode EditorRoot { get; set; }
public TreeNodeFile EditorRoot { get; set; }
public bool IsActive { get; set; } = false;
public bool UseEditMenu { get; set; } = false;
public int Alignment { get; set; } = 0;
public string FilePath { get; set; }
public IFileInfo IFileInfo { get; set; }
public Type[] Types
{
get
@ -37,6 +37,7 @@ namespace FirstPlugin
}
public SarcData sarcData;
public string SarcHash;
public void Load()
{
EditorRoot = new RootNode(Path.GetFileName(FileName), this);
@ -50,8 +51,11 @@ namespace FirstPlugin
sarcData.HashOnly = false;
sarcData.Files = SzsFiles.Files;
sarcData.endianness = Syroot.BinaryData.ByteOrder.LittleEndian;
SarcHash = Utils.GenerateUniqueHashID();
FillTreeNodes(EditorRoot, SzsFiles.Files);
IFileInfo = new IFileInfo();
FillTreeNodes(EditorRoot, SzsFiles.Files, SarcHash);
sarcData.Files.Clear();
}
@ -83,46 +87,57 @@ namespace FirstPlugin
Console.WriteLine("Saving " + node);
SaveFileEntryData((SarcEntry)node);
}
if (node is TreeNodeFile && node != EditorRoot)
{
TreeNodeFile treeNodeFile = (TreeNodeFile)node;
if (treeNodeFile.FileHandler != null && treeNodeFile.FileHandler.IFileInfo.ArchiveHash == SarcHash)
{
sarcData.Files.Add(SARC.SetSarcPath(node, (TreeNode)this.EditorRoot), STLibraryCompression.CompressFile(treeNodeFile.FileHandler.Save(), treeNodeFile.FileHandler));
}
}
}
Tuple<int, byte[]> sarc = SARCExt.SARC.PackN(sarcData);
Alignment = sarc.Item1;
IFileInfo.Alignment = sarc.Item1;
return sarc.Item2;
}
public static string SetSarcPath(TreeNode node, TreeNode sarcNode)
{
string nodePath = node.FullPath;
int startIndex = nodePath.IndexOf(sarcNode.Text);
if (startIndex > 0)
nodePath = nodePath.Substring(startIndex);
string slash = Path.DirectorySeparatorChar.ToString();
string slashAlt = Path.AltDirectorySeparatorChar.ToString();
string SetPath = nodePath.Replace(sarcNode.Text + slash, string.Empty).Replace(slash ?? "", slashAlt);
return !(SetPath == string.Empty) ? SetPath : node.Text;
}
private void SaveFileEntryData(SarcEntry sarc)
{
string dir = Path.GetDirectoryName(sarc.FullName);
Console.WriteLine(dir);
Console.WriteLine(sarc.FullName);
if (dir == string.Empty)
sarc.FullName = sarc.Text;
else
sarc.FullName = Path.Combine(dir, sarc.Text);
Console.WriteLine(sarc.FullName);
if (sarc.FileHandle != null)
{
IFileFormat file = sarc.FileHandle;
if (file.CanSave)
sarcData.Files.Add(sarc.FullName, file.Save());
else
sarcData.Files.Add(sarc.FullName, sarc.Data);
}
else
sarcData.Files.Add(sarc.FullName, sarc.Data);
sarcData.Files.Add(sarc.FullName, sarc.Data);
}
public static void ReplaceNode(TreeNode node, TreeNode replaceNode, TreeNode NewNode)
{
if (NewNode == null)
return;
int index = node.Nodes.IndexOf(replaceNode);
node.Nodes.RemoveAt(index);
node.Nodes.Insert(index, NewNode);
}
public class RootNode : TreeNodeCustom
public class RootNode : TreeNodeFile
{
SARC sarc;
public RootNode(string n, SARC s)
@ -147,7 +162,7 @@ namespace FirstPlugin
if (sfd.ShowDialog() == DialogResult.OK)
{
Cursor.Current = Cursors.WaitCursor;
SaveCompressFile(sarc.Save(), sfd.FileName, sarc.Alignment);
SaveCompressFile(sarc.Save(), sfd.FileName, sarc.IFileInfo.Alignment);
}
}
private void SaveCompressFile(byte[] data, string FileName, int Alignment = 0, bool EnableDialog = true)
@ -166,11 +181,11 @@ namespace FirstPlugin
public override void OnClick(TreeView treeview)
{
/* CallRecursive(treeview);
foreach (TreeNode n in Nodes)
{
n.ExpandAll();
}*/
/* CallRecursive(treeview);
foreach (TreeNode n in Nodes)
{
n.ExpandAll();
}*/
}
private void CallRecursive(TreeView treeView)
{
@ -206,6 +221,7 @@ namespace FirstPlugin
{
public SARC sarc; //Sarc file the entry is located in
public byte[] Data;
public string sarcHash;
public SarcEntry()
{
@ -230,70 +246,11 @@ namespace FirstPlugin
rename.Click += Rename;
}
public override void OnClick(TreeView treeView)
{
OpenFile(Name, Data, treeView);
}
public void OpenFile(string FileName, byte[] data, TreeView treeView, bool Compressed = false, CompressionType CompType = CompressionType.None)
{
FileReader f = new FileReader(data);
string Magic = f.ReadMagic(0, 4);
string Magic2 = f.ReadMagic(0, 2);
//Determine if the file is compressed or not
if (Magic == "Yaz0")
{
data = EveryFileExplorer.YAZ0.Decompress(data);
OpenFile(FileName, data, treeView, true, CompressionType.Yaz0);
return;
}
if (Magic == "ZLIB")
{
data = FileReader.InflateZLIB(f.getSection(64, data.Length - 64));
OpenFile(FileName, data, treeView, true, CompressionType.Zlib);
return;
}
f.Dispose();
f.Close();
IFileFormat[] SupportedFormats = FileManager.GetFileFormats();
foreach (IFileFormat format in SupportedFormats)
{
if (format.Magic == Magic || format.Magic == Magic2)
{
FileHandle = format;
format.CompressionType = CompType;
format.FileIsCompressed = Compressed;
format.Data = data;
format.FileName = Path.GetFileName(FileName);
format.Load();
format.FilePath = FileName;
if (format.EditorRoot != null)
{
format.EditorRoot.Text = Text;
format.EditorRoot.ImageKey = ImageKey;
format.EditorRoot.SelectedImageKey = SelectedImageKey;
Nodes.Add(format.EditorRoot);
// ReplaceNode(this.Parent, this, format.EditorRoot);
}
}
if (format.Magic == String.Empty) //Load by extension if magic isn't defined
{
foreach (string ext in format.Extension)
{
if (ext.Remove(0, 1) == Path.GetExtension(FileName))
{
format.Load();
}
}
}
}
}
public override void OnMouseClick(TreeView treeView)
{
ReplaceNode(this.Parent, this, OpenFile(Name, Data, this));
}
private void treeView1_AfterSelect(object sender, TreeViewEventArgs e)
@ -315,7 +272,7 @@ namespace FirstPlugin
if (ofd.ShowDialog() == DialogResult.OK)
{
Data = File.ReadAllBytes(ofd.FileName);
Data = File.ReadAllBytes(ofd.FileName);
}
}
private void Export(object sender, EventArgs args)
@ -350,7 +307,7 @@ namespace FirstPlugin
}
}
}
void FillTreeNodes(TreeNode root, Dictionary<string, byte[]> files)
void FillTreeNodes(TreeNode root, Dictionary<string, byte[]> files, string SarcHash)
{
var rootText = root.Text;
var rootTextLength = rootText.Length;
@ -381,7 +338,7 @@ namespace FirstPlugin
var temp = new TreeNode(parentName, 0, 0);
if (rootIndex == roots.Length - 1)
temp = SetupFileEntry(node.Value, parentName, node.Key);
temp = SetupFileEntry(node.Value, parentName, node.Key, SarcHash);
temp.Name = nodeName;
parentNode.Nodes.Add(temp);
@ -418,7 +375,73 @@ namespace FirstPlugin
return finalList;
}
public SarcEntry SetupFileEntry(byte[] data, string name, string fullName)
public static TreeNode OpenFile(string FileName, byte[] data, SarcEntry sarcEntry, bool Compressed = false, CompressionType CompType = 0)
{
Cursor.Current = Cursors.WaitCursor;
FileReader fileReader = new FileReader(data);
string Magic4 = fileReader.ReadMagic(0, 4);
string Magic2 = fileReader.ReadMagic(0, 2);
if (Magic4 == "Yaz0")
{
data = EveryFileExplorer.YAZ0.Decompress(data);
return OpenFile(FileName, data, sarcEntry, true, (CompressionType)1);
}
if (Magic4 == "ZLIB")
{
data = FileReader.InflateZLIB(fileReader.getSection(64, data.Length - 64));
return OpenFile(FileName, data, sarcEntry, true, (CompressionType)2);
}
fileReader.Dispose();
fileReader.Close();
foreach (IFileFormat fileFormat in FileManager.GetFileFormats())
{
if (fileFormat.Magic == Magic4 || fileFormat.Magic == Magic2)
{
fileFormat.CompressionType = CompType;
fileFormat.FileIsCompressed = Compressed;
fileFormat.Data = data;
fileFormat.Load();
fileFormat.FileName = Path.GetFileName(FileName);
fileFormat.FilePath = FileName;
fileFormat.IFileInfo = new IFileInfo();
fileFormat.IFileInfo.ArchiveHash = sarcEntry.sarcHash;
fileFormat.IFileInfo.InArchive = true;
if (fileFormat.EditorRoot == null)
return null;
fileFormat.EditorRoot.ImageKey = sarcEntry.ImageKey;
fileFormat.EditorRoot.SelectedImageKey = sarcEntry.SelectedImageKey;
fileFormat.EditorRoot.Text = sarcEntry.Text;
return fileFormat.EditorRoot;
}
if (fileFormat.Magic == string.Empty)
{
foreach (string str3 in fileFormat.Extension)
{
if (str3.Remove(0, 1) == Path.GetExtension(FileName))
{
fileFormat.Data = data;
fileFormat.Load();
fileFormat.FileName = Path.GetFileName(FileName);
fileFormat.FilePath = FileName;
fileFormat.IFileInfo = new IFileInfo();
fileFormat.IFileInfo.ArchiveHash = sarcEntry.sarcHash;
fileFormat.IFileInfo.InArchive = true;
if (fileFormat.EditorRoot == null)
return null;
fileFormat.EditorRoot.ImageKey = sarcEntry.ImageKey;
fileFormat.EditorRoot.SelectedImageKey = sarcEntry.SelectedImageKey;
fileFormat.EditorRoot.Text = sarcEntry.Text;
return fileFormat.EditorRoot;
}
}
}
}
return (TreeNode)null;
}
public SarcEntry SetupFileEntry(byte[] data, string name, string fullName, string SarchHash)
{
SarcEntry sarcEntry = new SarcEntry();
sarcEntry.FullName = fullName;
@ -426,6 +449,7 @@ namespace FirstPlugin
sarcEntry.Text = name;
sarcEntry.sarc = this;
sarcEntry.Data = data;
sarcEntry.sarcHash = SarcHash;
Console.WriteLine(name);

View File

@ -181,7 +181,6 @@ namespace FirstPlugin
}
public byte[] Save()
{
MessageBox.Show("Saving... " + bntx.Name);
return bntx.Save();
}
}
@ -233,8 +232,6 @@ namespace FirstPlugin
bntx.Flag = 0;
bntx.Save(mem);
File.WriteAllBytes("NewTex.bntx", mem.ToArray());
return mem.ToArray();
}
public void RemoveTexture(TextureData textureData)

View File

@ -8,6 +8,7 @@ using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using Switch_Toolbox.Library;
using Bfres.Structs;
namespace FirstPlugin
{
@ -22,8 +23,8 @@ namespace FirstPlugin
rotMeasureCB.SelectedIndex = 1;
}
BFRESRender.BfresBone activeBone;
public void LoadBone(BFRESRender.BfresBone bone)
BfresBone activeBone;
public void LoadBone(BfresBone bone)
{
activeBone = bone;

View File

@ -7,7 +7,7 @@ using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using Bfres.Structs;
namespace FirstPlugin
{
@ -17,8 +17,8 @@ namespace FirstPlugin
{
InitializeComponent();
}
BFRESRender.FSHP ActiveShape;
public void LoadLODS(BFRESRender.FSHP fshp)
FSHP ActiveShape;
public void LoadLODS(FSHP fshp)
{
meshListView.Items.Clear();
subMeshListView.Items.Clear();

View File

@ -208,6 +208,9 @@
//
// textureRefListView
//
this.textureRefListView.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.textureRefListView.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(40)))), ((int)(((byte)(40)))), ((int)(((byte)(40)))));
this.textureRefListView.BorderStyle = System.Windows.Forms.BorderStyle.None;
this.textureRefListView.Columns.AddRange(new System.Windows.Forms.ColumnHeader[] {

View File

@ -11,12 +11,13 @@ using WeifenLuo.WinFormsUI.Docking;
using Syroot.NintenTools.NSW.Bfres;
using OpenTK;
using Switch_Toolbox.Library;
using Bfres.Structs;
namespace FirstPlugin
{
public partial class FMATEditor : UserControl
{
public BFRESRender.FMAT material;
public FMAT material;
public BFRESRender bfresRender;
@ -45,7 +46,7 @@ namespace FirstPlugin
{
}
public void LoadMaterial(BFRESRender.FMAT mat, BFRESRender bfres)
public void LoadMaterial(FMAT mat, BFRESRender bfres)
{
bfresRender = bfres;
material = mat;
@ -82,7 +83,7 @@ namespace FirstPlugin
else
return "";
}
private void InitializeShaderOptionList(BFRESRender.FMAT material)
private void InitializeShaderOptionList(FMAT material)
{
shaderOptionsListView.Items.Clear();
@ -91,7 +92,7 @@ namespace FirstPlugin
shaderOptionsListView.Items.Add(option.Key).SubItems.Add(option.Value);
}
}
private void InitializeShaderParamList(BFRESRender.FMAT material)
private void InitializeShaderParamList(FMAT material)
{
listView1.Items.Clear();
@ -162,13 +163,13 @@ namespace FirstPlugin
listView1.SmallImageList = il;
listView1.FullRowSelect = true;
}
public void InitializeTextureListView(BFRESRender.FMAT material)
public void InitializeTextureListView(FMAT material)
{
textureRefListView.Items.Clear();
textureRefListView.SmallImageList = textureImageList;
textureRefListView.FullRowSelect = true;
foreach (BFRESRender.MatTexture tex in material.textures)
foreach (MatTexture tex in material.textures)
{
ListViewItem item = new ListViewItem();
item.Text = tex.Name;
@ -186,7 +187,8 @@ namespace FirstPlugin
textureImageList.Images.Clear();
int CurTex = 0;
if (PluginRuntime.bntxContainers.Count == 0)
if (PluginRuntime.bntxContainers.Count == 0 &&
PluginRuntime.ftexContainers.Count == 0)
{
foreach (ListViewItem item in textureRefListView.Items)
{
@ -214,6 +216,24 @@ namespace FirstPlugin
temp.Dispose();
}
}
foreach (FTEXContainer ftexCont in PluginRuntime.ftexContainers)
{
if (ftexCont.Textures.ContainsKey(item.Text))
{
FoundTexture = true;
FTEX tex = ftexCont.Textures[item.Text];
FTEX.RenderableTex renderedTex = tex.renderedTex;
Bitmap temp = tex.GLTextureToBitmap(renderedTex, renderedTex.display);
textureImageList.Images.Add(tex.Text, temp);
item.ImageIndex = CurTex++;
var dummy = textureImageList.Handle;
temp.Dispose();
}
}
if (FoundTexture == false)
{
AddBlankTexture(item, item.Text, CurTex++);
@ -230,7 +250,7 @@ namespace FirstPlugin
var dummy = textureImageList.Handle;
temp.Dispose();
}
private void InitializeRenderInfoList(BFRESRender.FMAT material)
private void InitializeRenderInfoList(FMAT material)
{
renderInfoListView.Items.Clear();
@ -465,7 +485,7 @@ namespace FirstPlugin
private void btnSamplerEditor_Click(object sender, EventArgs e)
{
SamplerEditor samplerEditor = new SamplerEditor();
foreach (BFRESRender.MatTexture tex in material.textures)
foreach (MatTexture tex in material.textures)
{
if (tex.Name == textureRefListView.SelectedItems[0].Text)
{

View File

@ -4,6 +4,7 @@ using System.Windows.Forms;
using Syroot.NintenTools.NSW.Bfres.GFX;
using Switch_Toolbox.Library;
using Switch_Toolbox.Library.Rendering;
using Bfres.Structs;
namespace FirstPlugin
{
@ -82,76 +83,76 @@ namespace FirstPlugin
EnableUV1 = obj.HasUv1;
EnableUV2 = obj.HasUv2;
}
public List<BFRESRender.FSHP.VertexAttribute> CreateNewAttributes()
public List<FSHP.VertexAttribute> CreateNewAttributes()
{
List<BFRESRender.FSHP.VertexAttribute> attribute = new List<BFRESRender.FSHP.VertexAttribute>();
List<FSHP.VertexAttribute> attribute = new List<FSHP.VertexAttribute>();
if (EnablePositions)
{
BFRESRender.FSHP.VertexAttribute att = new BFRESRender.FSHP.VertexAttribute();
FSHP.VertexAttribute att = new FSHP.VertexAttribute();
att.Name = "_p0";
att.Format = SetAttribFormat(GetCmboxString(comboBoxFormatPositions));
attribute.Add(att);
}
if (EnableNormals)
{
BFRESRender.FSHP.VertexAttribute att = new BFRESRender.FSHP.VertexAttribute();
FSHP.VertexAttribute att = new FSHP.VertexAttribute();
att.Name = "_n0";
att.Format = SetAttribFormat(GetCmboxString(comboBoxFormatNormals));
attribute.Add(att);
}
if (EnableVertexColors)
{
BFRESRender.FSHP.VertexAttribute att = new BFRESRender.FSHP.VertexAttribute();
FSHP.VertexAttribute att = new FSHP.VertexAttribute();
att.Name = "_c0";
att.Format = SetAttribFormat(GetCmboxString(comboBoxFormatVertexColors));
attribute.Add(att);
}
if (EnableUV0)
{
BFRESRender.FSHP.VertexAttribute att = new BFRESRender.FSHP.VertexAttribute();
FSHP.VertexAttribute att = new FSHP.VertexAttribute();
att.Name = "_u0";
att.Format = SetAttribFormat(GetCmboxString(comboBoxFormatUvs));
attribute.Add(att);
}
if (EnableUV1 && EnableUV0)
{
BFRESRender.FSHP.VertexAttribute att = new BFRESRender.FSHP.VertexAttribute();
FSHP.VertexAttribute att = new FSHP.VertexAttribute();
att.Name = "_u1";
att.Format = SetAttribFormat(GetCmboxString(comboBoxFormatUvs));
attribute.Add(att);
}
if (EnableUV2 && EnableUV0)
{
BFRESRender.FSHP.VertexAttribute att = new BFRESRender.FSHP.VertexAttribute();
FSHP.VertexAttribute att = new FSHP.VertexAttribute();
att.Name = "_u2";
att.Format = SetAttribFormat(GetCmboxString(comboBoxFormatUvs));
attribute.Add(att);
}
if (EnableTangents)
{
BFRESRender.FSHP.VertexAttribute att = new BFRESRender.FSHP.VertexAttribute();
FSHP.VertexAttribute att = new FSHP.VertexAttribute();
att.Name = "_t0";
att.Format = SetAttribFormat(GetCmboxString(comboBoxFormatTangents));
attribute.Add(att);
}
if (EnableBitangents)
{
BFRESRender.FSHP.VertexAttribute att = new BFRESRender.FSHP.VertexAttribute();
FSHP.VertexAttribute att = new FSHP.VertexAttribute();
att.Name = "_b0";
att.Format = SetAttribFormat(GetCmboxString(comboBoxFormatBitans));
attribute.Add(att);
}
if (EnableWeights)
{
BFRESRender.FSHP.VertexAttribute att = new BFRESRender.FSHP.VertexAttribute();
FSHP.VertexAttribute att = new FSHP.VertexAttribute();
att.Name = "_w0";
att.Format = SetAttribFormat(GetCmboxString(comboBoxFormatWeights));
attribute.Add(att);
}
if (EnableIndices)
{
BFRESRender.FSHP.VertexAttribute att = new BFRESRender.FSHP.VertexAttribute();
FSHP.VertexAttribute att = new FSHP.VertexAttribute();
att.Name = "_i0";
att.Format = SetAttribFormat(GetCmboxString(comboBoxFormatIndices));
attribute.Add(att);

View File

@ -8,6 +8,7 @@ using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using Switch_Toolbox.Library;
using Bfres.Structs;
namespace FirstPlugin
{
@ -18,7 +19,7 @@ namespace FirstPlugin
InitializeComponent();
HideControls();
}
public void GetValues(BFRESRender.BfresShaderParam param)
public void GetValues(BfresShaderParam param)
{
switch (param.Type)
{

View File

@ -10,6 +10,7 @@ using System.Windows.Forms;
using Syroot.NintenTools.NSW.Bfres;
using Switch_Toolbox.Library;
using OpenTK;
using Bfres.Structs;
namespace FirstPlugin
{
@ -36,9 +37,9 @@ namespace FirstPlugin
BoolValuesPanel boolPanel;
SRTValuesPanel SRTPanel;
FloatsIntsValuePanel FloatIntsPanel;
public BFRESRender.BfresShaderParam activeParam;
public BfresShaderParam activeParam;
public void LoadParam(BFRESRender.BfresShaderParam param)
public void LoadParam(BfresShaderParam param)
{
panel1.Controls.Clear();
@ -123,7 +124,7 @@ namespace FirstPlugin
break;
}
}
public void SetColorBox(BFRESRender.BfresShaderParam param)
public void SetColorBox(BfresShaderParam param)
{
Vector4 color = new Vector4();
switch (param.Type)

View File

@ -60,7 +60,9 @@
this.rotUDY = new Switch_Toolbox.Library.Forms.NumericUpDownFloat();
this.rotUDZ = new Switch_Toolbox.Library.Forms.NumericUpDownFloat();
this.panel6 = new System.Windows.Forms.Panel();
this.label34 = new System.Windows.Forms.Label();
this.textBoxName = new System.Windows.Forms.TextBox();
this.LODMeshCB = new System.Windows.Forms.ComboBox();
this.label19 = new System.Windows.Forms.Label();
this.btnLODMeshes = new System.Windows.Forms.Button();
this.labelName = new System.Windows.Forms.Label();
@ -85,7 +87,6 @@
this.labelVertexSkinCount = new System.Windows.Forms.Label();
this.label24 = new System.Windows.Forms.Label();
this.button7 = new System.Windows.Forms.Button();
this.textBoxBoneName = new System.Windows.Forms.TextBox();
this.textBoxVertexSkinCount = new System.Windows.Forms.TextBox();
this.checkBoxUseSubMeshBoundryConsistent = new System.Windows.Forms.CheckBox();
this.panel4 = new System.Windows.Forms.Panel();
@ -109,8 +110,7 @@
this.panel12 = new System.Windows.Forms.Panel();
this.button9 = new System.Windows.Forms.Button();
this.label31 = new System.Windows.Forms.Label();
this.label34 = new System.Windows.Forms.Label();
this.LODMeshCB = new System.Windows.Forms.ComboBox();
this.bonesCB = new System.Windows.Forms.ComboBox();
this.panel2.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.numericUpDownFloat1)).BeginInit();
this.panel3.SuspendLayout();
@ -657,6 +657,15 @@
this.panel6.Size = new System.Drawing.Size(635, 131);
this.panel6.TabIndex = 27;
//
// label34
//
this.label34.AutoSize = true;
this.label34.Location = new System.Drawing.Point(6, 97);
this.label34.Name = "label34";
this.label34.Size = new System.Drawing.Size(110, 13);
this.label34.TabIndex = 43;
this.label34.Text = "Displayed LOD Mesh:";
//
// textBoxName
//
this.textBoxName.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(33)))), ((int)(((byte)(33)))), ((int)(((byte)(33)))));
@ -667,6 +676,18 @@
this.textBoxName.Size = new System.Drawing.Size(225, 20);
this.textBoxName.TabIndex = 33;
//
// LODMeshCB
//
this.LODMeshCB.BackColor = System.Drawing.Color.White;
this.LODMeshCB.Cursor = System.Windows.Forms.Cursors.Default;
this.LODMeshCB.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
this.LODMeshCB.FormattingEnabled = true;
this.LODMeshCB.Location = new System.Drawing.Point(133, 94);
this.LODMeshCB.Name = "LODMeshCB";
this.LODMeshCB.Size = new System.Drawing.Size(120, 21);
this.LODMeshCB.TabIndex = 42;
this.LODMeshCB.SelectedIndexChanged += new System.EventHandler(this.LODMeshCB_SelectedIndexChanged);
//
// label19
//
this.label19.AutoSize = true;
@ -919,18 +940,6 @@
this.button7.TabIndex = 34;
this.button7.UseVisualStyleBackColor = true;
//
// textBoxBoneName
//
this.textBoxBoneName.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(33)))), ((int)(((byte)(33)))), ((int)(((byte)(33)))));
this.textBoxBoneName.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
this.textBoxBoneName.ForeColor = System.Drawing.Color.White;
this.textBoxBoneName.Location = new System.Drawing.Point(116, 31);
this.textBoxBoneName.Name = "textBoxBoneName";
this.textBoxBoneName.ReadOnly = true;
this.textBoxBoneName.Size = new System.Drawing.Size(224, 20);
this.textBoxBoneName.TabIndex = 37;
this.textBoxBoneName.TextChanged += new System.EventHandler(this.textBoxBoneName_TextChanged);
//
// textBoxVertexSkinCount
//
this.textBoxVertexSkinCount.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(33)))), ((int)(((byte)(33)))), ((int)(((byte)(33)))));
@ -1064,12 +1073,12 @@
//
// panel1
//
this.panel1.Controls.Add(this.bonesCB);
this.panel1.Controls.Add(this.textBoxBoneIndex);
this.panel1.Controls.Add(this.label22);
this.panel1.Controls.Add(this.button6);
this.panel1.Controls.Add(this.label21);
this.panel1.Controls.Add(this.label23);
this.panel1.Controls.Add(this.textBoxBoneName);
this.panel1.Controls.Add(this.textBoxVertexSkinCount);
this.panel1.Controls.Add(this.panel10);
this.panel1.Controls.Add(this.labelVertexSkinCount);
@ -1184,26 +1193,20 @@
this.label31.TabIndex = 0;
this.label31.Text = "Advanced";
//
// label34
// bonesCB
//
this.label34.AutoSize = true;
this.label34.Location = new System.Drawing.Point(6, 97);
this.label34.Name = "label34";
this.label34.Size = new System.Drawing.Size(110, 13);
this.label34.TabIndex = 43;
this.label34.Text = "Displayed LOD Mesh:";
//
// LODMeshCB
//
this.LODMeshCB.BackColor = System.Drawing.Color.White;
this.LODMeshCB.Cursor = System.Windows.Forms.Cursors.Default;
this.LODMeshCB.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
this.LODMeshCB.FormattingEnabled = true;
this.LODMeshCB.Location = new System.Drawing.Point(133, 94);
this.LODMeshCB.Name = "LODMeshCB";
this.LODMeshCB.Size = new System.Drawing.Size(120, 21);
this.LODMeshCB.TabIndex = 42;
this.LODMeshCB.SelectedIndexChanged += new System.EventHandler(this.LODMeshCB_SelectedIndexChanged);
this.bonesCB.BackColor = System.Drawing.Color.White;
this.bonesCB.Cursor = System.Windows.Forms.Cursors.Default;
this.bonesCB.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
this.bonesCB.FlatStyle = System.Windows.Forms.FlatStyle.System;
this.bonesCB.FormattingEnabled = true;
this.bonesCB.Location = new System.Drawing.Point(116, 30);
this.bonesCB.Name = "bonesCB";
this.bonesCB.Size = new System.Drawing.Size(219, 21);
this.bonesCB.TabIndex = 33;
this.bonesCB.SelectedIndexChanged += new System.EventHandler(this.bonesCB_SelectedIndexChanged);
this.bonesCB.KeyDown += new System.Windows.Forms.KeyEventHandler(this.bonesCB_KeyDown);
this.bonesCB.MouseDown += new System.Windows.Forms.MouseEventHandler(this.bonesCB_MouseDown);
//
// FSHPEditor
//
@ -1317,7 +1320,6 @@
private System.Windows.Forms.CheckBox checkBoxUseSubMeshBoundryConsistent;
private System.Windows.Forms.CheckBox checkBoxUseVertexBuffer;
private System.Windows.Forms.TextBox textBoxVertexSkinCount;
private System.Windows.Forms.TextBox textBoxBoneName;
private System.Windows.Forms.TextBox textBoxName;
private System.Windows.Forms.Panel panel1;
private System.Windows.Forms.TextBox textBoxBoneIndex;
@ -1340,5 +1342,6 @@
private System.Windows.Forms.ComboBox shaderAttCB;
private System.Windows.Forms.Label label34;
private System.Windows.Forms.ComboBox LODMeshCB;
private System.Windows.Forms.ComboBox bonesCB;
}
}

View File

@ -12,6 +12,7 @@ using Switch_Toolbox.Library;
using Switch_Toolbox.Library.Rendering;
using OpenTK;
using OpenTK.Graphics.OpenGL;
using Bfres.Structs;
namespace FirstPlugin
{
@ -21,16 +22,18 @@ namespace FirstPlugin
{
InitializeComponent();
}
BFRESRender.FSHP activeShape;
BFRESRender.FMDL activeModel;
FSHP activeShape;
FMDL activeModel;
public void LoadObject(BFRESRender.FMDL mdl, BFRESRender.FSHP shape)
public void LoadObject(FMDL mdl, FSHP shape)
{
InitializeControls();
activeShape = shape;
activeModel = mdl;
//Load all the material names unless there's alot
if (mdl.materials.Count < 1)
{
@ -50,16 +53,27 @@ namespace FirstPlugin
textBoxName.Text = shape.Text;
textBoxBoneIndex.Text = shape.BoneIndex.ToString();
textBoxMatIndex.Text = shape.MaterialIndex.ToString();
textBoxBoneName.Text = mdl.Skeleton.bones[shape.boneIndx].Text;
bonesCB.Items.Add(mdl.Skeleton.bones[shape.boneIndx].Text);
bonesCB.SelectedIndex = 0;
textBoxVertexSkinCount.Text = shape.VertexSkinCount.ToString();
if (shape.Shape.Flags == ShapeFlags.SubMeshBoundaryConsistent)
checkBoxUseSubMeshBoundryConsistent.Checked = true;
if (shape.Shape.Flags == ShapeFlags.HasVertexBuffer)
checkBoxUseVertexBuffer.Checked = true;
if (BFRES.IsWiiU)
{
}
else
{
if (shape.Shape.Flags == ShapeFlags.SubMeshBoundaryConsistent)
checkBoxUseSubMeshBoundryConsistent.Checked = true;
if (shape.Shape.Flags == ShapeFlags.HasVertexBuffer)
checkBoxUseVertexBuffer.Checked = true;
}
shaderAttCB.Items.Add("NONE");
foreach (BFRESRender.FSHP.VertexAttribute att in shape.vertexAttributes)
foreach (FSHP.VertexAttribute att in shape.vertexAttributes)
{
vtxAttributesCB.Items.Add(att.Name);
vtxFormatCB.Items.Add(att.Format);
@ -98,6 +112,8 @@ namespace FirstPlugin
private void InitializeControls()
{
IsLoaded = false;
IsBoneListLoaded = false;
bonesCB.Items.Clear();
materialComboBox1.Items.Clear();
vtxAttributesCB.Items.Clear();
vtxFormatCB.Items.Clear();
@ -118,6 +134,7 @@ namespace FirstPlugin
}
bool IsLoaded = false;
bool IsBoneListLoaded = false;
private void materialComboBox1_Click(object sender, EventArgs e)
{
}
@ -126,23 +143,52 @@ namespace FirstPlugin
{
ReloadMaterialList();
}
private void bonesCB_KeyDown(object sender, KeyEventArgs e)
{
ReloadBoneList();
}
private void materialComboBox1_MouseDown(object sender, MouseEventArgs e)
{
ReloadMaterialList();
}
private void bonesCB_MouseDown(object sender, MouseEventArgs e)
{
ReloadBoneList();
}
private void ReloadMaterialList()
{
//For optmization purposes. Load a list when used instead
if (!IsLoaded)
{
materialComboBox1.Items.Clear();
foreach (BFRESRender.FMAT mat in activeModel.materials.Values)
foreach (FMAT mat in activeModel.materials.Values)
materialComboBox1.Items.Add(mat.Text);
materialComboBox1.SelectedIndex = activeShape.MaterialIndex;
IsLoaded = true;
}
}
private void materialComboBox1_MouseDown(object sender, MouseEventArgs e)
private void ReloadBoneList()
{
ReloadMaterialList();
if (!IsBoneListLoaded)
{
bonesCB.Items.Clear();
foreach (var bn in activeModel.Skeleton.bones)
bonesCB.Items.Add(bn.Text);
bonesCB.SelectedIndex = activeShape.BoneIndex;
IsBoneListLoaded = true;
}
}
private void bonesCB_SelectedIndexChanged(object sender, EventArgs e)
{
if (bonesCB.SelectedIndex >= 0 && IsBoneListLoaded)
{
activeShape.boneIndx = bonesCB.SelectedIndex;
textBoxBoneIndex.Text = bonesCB.SelectedIndex.ToString();
}
Viewport.Instance.UpdateViewport();
}
bool IsSet = false;

View File

@ -7,6 +7,7 @@ using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using Bfres.Structs;
namespace FirstPlugin
{
@ -23,7 +24,7 @@ namespace FirstPlugin
Text = Name;
}
}
public void LoadMaterials(string SelectedMat, List<BFRESRender.FMDL> models)
public void LoadMaterials(string SelectedMat, List<FMDL> models)
{
foreach (var mdl in models)
{

View File

@ -8,6 +8,7 @@ using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using OpenTK.Graphics.OpenGL;
using Bfres.Structs;
namespace FirstPlugin
{
@ -24,11 +25,11 @@ namespace FirstPlugin
wrapWCB.Items.Add(type);
}
}
public void LoadSampler(BFRESRender.MatTexture texture)
public void LoadSampler(MatTexture texture)
{
wrapXCB.SelectedItem = BFRESRender.MatTexture.wrapmode[texture.wrapModeS];
wrapYCB.SelectedItem = BFRESRender.MatTexture.wrapmode[texture.wrapModeT];
wrapWCB.SelectedItem = BFRESRender.MatTexture.wrapmode[texture.wrapModeW];
wrapXCB.SelectedItem = MatTexture.wrapmode[texture.wrapModeS];
wrapYCB.SelectedItem = MatTexture.wrapmode[texture.wrapModeT];
wrapWCB.SelectedItem = MatTexture.wrapmode[texture.wrapModeW];
}
}
}

View File

@ -10,6 +10,7 @@ using System.Windows.Forms;
using Syroot.NintenTools.NSW.Bfres;
using Switch_Toolbox.Library;
using System.Reflection;
using Bfres.Structs;
namespace FirstPlugin
{
@ -33,7 +34,7 @@ namespace FirstPlugin
public List<int> valueInts = new List<int>();
public int ActiveItemIndex = 0;
public void LoadValues(BFRESRender.BfresRenderInfo info)
public void LoadValues(BfresRenderInfo info)
{
textBox1.Text = info.Name;
comboBox1.SelectedItem = info.Type;

View File

@ -0,0 +1,163 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Switch_Toolbox.Library;
using System.Windows.Forms;
using WeifenLuo.WinFormsUI.Docking;
using Bfres.Structs;
namespace FirstPlugin
{
class FormLoader
{
public static void LoadEditor(object type, string Text)
{
/* foreach (Control control in FirstPlugin.MainF.Controls)
{
if (control is DockPanel)
{
if (FirstPlugin.DockedEditorS == null)
{
FirstPlugin.DockedEditorS = new DockContent();
FirstPlugin.DockedEditorS.Show((DockPanel)control, PluginRuntime.FSHPDockState);
}
}
}
if (!PropEditorIsActive(FirstPlugin.DockedEditorS))
{
FirstPlugin.DockedEditorS.Controls.Clear();
BfresProperties BfresProperties = new BfresProperties();
BfresProperties.Text = Text;
BfresProperties.Dock = DockStyle.Fill;
BfresProperties.LoadProperty(type);
FirstPlugin.DockedEditorS.Controls.Add(BfresProperties);
}
bool PropEditorIsActive(DockContent dock)
{
foreach (Control ctrl in dock.Controls)
{
if (ctrl is BfresProperties)
{
((BfresProperties)ctrl).LoadProperty(type);
return true;
}
}
return false;
}*/
}
public static void LoadBoneEditor(BfresBone bone)
{
foreach (Control control in FirstPlugin.MainF.Controls)
{
if (control is DockPanel)
{
if (FirstPlugin.DockedEditorS == null)
{
FirstPlugin.DockedEditorS = new DockContent();
FirstPlugin.DockedEditorS.Show((DockPanel)control, PluginRuntime.FSHPDockState);
}
}
}
if (!BoneEditorIsActive(FirstPlugin.DockedEditorS, bone))
{
FirstPlugin.DockedEditorS.Controls.Clear();
BfresBoneEditor BfresBone = new BfresBoneEditor();
BfresBone.Text = bone.Text;
BfresBone.Dock = DockStyle.Fill;
BfresBone.LoadBone(bone);
FirstPlugin.DockedEditorS.Controls.Add(BfresBone);
}
}
public static bool BoneEditorIsActive(DockContent dock, BfresBone bone)
{
foreach (Control ctrl in dock.Controls)
{
if (ctrl is BfresBoneEditor)
{
((BfresBoneEditor)ctrl).LoadBone(bone);
return true;
}
}
return false;
}
public static void LoadMatEditor(FMAT mat)
{
foreach (Control control in FirstPlugin.MainF.Controls)
{
if (control is DockPanel)
{
if (FirstPlugin.DockedEditorS == null)
{
FirstPlugin.DockedEditorS = new DockContent();
FirstPlugin.DockedEditorS.Show((DockPanel)control, PluginRuntime.FSHPDockState);
}
}
}
if (!EditorIsActive(FirstPlugin.DockedEditorS))
{
FirstPlugin.DockedEditorS.Controls.Clear();
FMATEditor editor = new FMATEditor();
editor.Text = mat.Text;
editor.Dock = DockStyle.Fill;
editor.LoadMaterial(mat, mat.BFRESRender);
FirstPlugin.DockedEditorS.Controls.Add(editor);
}
bool EditorIsActive(DockContent dock)
{
foreach (Control ctrl in dock.Controls)
{
if (ctrl is FMATEditor)
{
((FMATEditor)ctrl).LoadMaterial(mat, mat.BFRESRender);
return true;
}
}
return false;
}
}
public static void LoadShapeEditor(FSHP fshp)
{
foreach (Control control in FirstPlugin.MainF.Controls)
{
if (control is DockPanel)
{
if (FirstPlugin.DockedEditorS == null)
{
FirstPlugin.DockedEditorS = new DockContent();
FirstPlugin.DockedEditorS.Show((DockPanel)control, PluginRuntime.FSHPDockState);
}
}
}
if (!EditorIsActive(FirstPlugin.DockedEditorS))
{
FirstPlugin.DockedEditorS.Controls.Clear();
FSHPEditor BfresProperties = new FSHPEditor();
BfresProperties.Text = fshp.Text;
BfresProperties.Dock = DockStyle.Fill;
BfresProperties.LoadObject((FMDL)fshp.Parent.Parent, fshp);
FirstPlugin.DockedEditorS.Controls.Add(BfresProperties);
}
bool EditorIsActive(DockContent dock)
{
foreach (Control ctrl in dock.Controls)
{
if (ctrl is FSHPEditor)
{
((FSHPEditor)ctrl).LoadObject((FMDL)fshp.Parent.Parent, fshp);
return true;
}
}
return false;
}
}
}
}

View File

@ -20,11 +20,24 @@ namespace FirstPlugin
public void LoadTexture()
{
foreach (BinaryTextureContainer bntx in PluginRuntime.bntxContainers)
if (BFRES.IsWiiU)
{
foreach (TextureData tex in bntx.Textures.Values)
listView1.Items.Add(tex.Text);
foreach (FTEXContainer ftexcont in PluginRuntime.ftexContainers)
{
foreach (FTEX tex in ftexcont.Textures.Values)
listView1.Items.Add(tex.Text);
}
}
else
{
foreach (BinaryTextureContainer bntx in PluginRuntime.bntxContainers)
{
foreach (TextureData tex in bntx.Textures.Values)
listView1.Items.Add(tex.Text);
}
}
if (listView1.Items.Count > 0)
{
listView1.Items[0].Selected = true;
@ -41,13 +54,38 @@ namespace FirstPlugin
if (listView1.SelectedItems.Count > 0)
{
string TexName = listView1.SelectedItems[0].Text;
foreach (BinaryTextureContainer bntx in PluginRuntime.bntxContainers)
if (BFRES.IsWiiU)
{
if (bntx.Textures.ContainsKey(TexName))
DisplayTexture(bntx.Textures[TexName]);
foreach (FTEXContainer ftexcont in PluginRuntime.ftexContainers)
{
if (ftexcont.Textures.ContainsKey(TexName))
DisplayTexture(ftexcont.Textures[TexName]);
}
}
else
{
foreach (BinaryTextureContainer bntx in PluginRuntime.bntxContainers)
{
if (bntx.Textures.ContainsKey(TexName))
DisplayTexture(bntx.Textures[TexName]);
}
}
}
}
private void DisplayTexture(FTEX texData)
{
if (Thread != null && Thread.IsAlive)
Thread.Abort();
Thread = new Thread((ThreadStart)(() =>
{
pictureBoxCustom1.Image = Switch_Toolbox.Library.Imaging.GetLoadingImage();
pictureBoxCustom1.Image = texData.DisplayTexture();
// texSizeMipsLabel.Text = $"Width = {pictureBoxCustom1.Image.Width} Height = {pictureBoxCustom1.Image.Height}";
}));
Thread.Start();
}
private void DisplayTexture(TextureData texData)
{
if (Thread != null && Thread.IsAlive)

View File

@ -28,6 +28,7 @@
/// </summary>
private void InitializeComponent()
{
this.components = new System.ComponentModel.Container();
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(BNTXEditor));
this.panel1 = new System.Windows.Forms.Panel();
this.propertyGrid1 = new System.Windows.Forms.PropertyGrid();
@ -36,18 +37,27 @@
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.imageBGComboBox = new System.Windows.Forms.ComboBox();
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.btnEdit = 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
@ -114,9 +124,9 @@
//
this.panel4.Controls.Add(this.pictureBoxCustom1);
this.panel4.Dock = System.Windows.Forms.DockStyle.Fill;
this.panel4.Location = new System.Drawing.Point(0, 53);
this.panel4.Location = new System.Drawing.Point(0, 80);
this.panel4.Name = "panel4";
this.panel4.Size = new System.Drawing.Size(593, 244);
this.panel4.Size = new System.Drawing.Size(593, 217);
this.panel4.TabIndex = 4;
//
// pictureBoxCustom1
@ -126,13 +136,18 @@
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, 244);
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.btnEdit);
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);
@ -142,9 +157,20 @@
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, 28);
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)));
@ -160,7 +186,7 @@
//
this.texSizeMipsLabel.AutoSize = true;
this.texSizeMipsLabel.ForeColor = System.Drawing.Color.White;
this.texSizeMipsLabel.Location = new System.Drawing.Point(3, 7);
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;
@ -217,16 +243,84 @@
this.button1.UseVisualStyleBackColor = false;
this.button1.Click += new System.EventHandler(this.button1_Click);
//
// imageBGComboBox
// label5
//
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, 4);
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);
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);
//
// btnEdit
//
this.btnEdit.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btnEdit.ForeColor = System.Drawing.Color.White;
this.btnEdit.Location = new System.Drawing.Point(6, 5);
this.btnEdit.Name = "btnEdit";
this.btnEdit.Size = new System.Drawing.Size(63, 23);
this.btnEdit.TabIndex = 12;
this.btnEdit.Text = "Edit";
this.btnEdit.UseVisualStyleBackColor = true;
this.btnEdit.Click += new System.EventHandler(this.btnEdit_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, 70);
//
// replaceSurfaceLevelToolStripMenuItem
//
this.replaceSurfaceLevelToolStripMenuItem.Name = "replaceSurfaceLevelToolStripMenuItem";
this.replaceSurfaceLevelToolStripMenuItem.Size = new System.Drawing.Size(187, 22);
this.replaceSurfaceLevelToolStripMenuItem.Text = "Replace Surface Level";
this.replaceSurfaceLevelToolStripMenuItem.Click += new System.EventHandler(this.replaceSurfaceLevelToolStripMenuItem_Click);
//
// exportSurfaceLevelToolStripMenuItem
//
this.exportSurfaceLevelToolStripMenuItem.Name = "exportSurfaceLevelToolStripMenuItem";
this.exportSurfaceLevelToolStripMenuItem.Size = new System.Drawing.Size(187, 22);
this.exportSurfaceLevelToolStripMenuItem.Text = "Export Surface Level";
this.exportSurfaceLevelToolStripMenuItem.Click += new System.EventHandler(this.exportSurfaceLevelToolStripMenuItem_Click);
//
// BNTXEditor
//
@ -243,6 +337,7 @@
((System.ComponentModel.ISupportInitialize)(this.pictureBoxCustom1)).EndInit();
this.panel3.ResumeLayout(false);
this.panel3.PerformLayout();
this.contextMenuStrip1.ResumeLayout(false);
this.ResumeLayout(false);
}
@ -263,5 +358,13 @@
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.Button btnEdit;
private System.Windows.Forms.ContextMenuStrip contextMenuStrip1;
private System.Windows.Forms.ToolStripMenuItem replaceSurfaceLevelToolStripMenuItem;
private System.Windows.Forms.ToolStripMenuItem exportSurfaceLevelToolStripMenuItem;
}
}

View File

@ -30,13 +30,17 @@ namespace FirstPlugin
}
public void LoadPicture(Bitmap image)
{
// pictureBoxCustom1.Image = image;
// pictureBoxCustom1.Image = image;
}
TextureData textureData;
int CurMipDisplayLevel = 0;
int CurArrayDisplayLevel = 0;
public void LoadProperty(TextureData tex)
{
CurMipDisplayLevel = 0;
CurArrayDisplayLevel = 0;
textureData = tex;
Texture texture = tex.Texture;
@ -46,22 +50,24 @@ namespace FirstPlugin
}
private void UpdateMipDisplay()
{
mipLevelCounterLabel.Text = $"{CurMipDisplayLevel} / {textureData.mipmaps.Count - 1}";
mipLevelCounterLabel.Text = $"{CurMipDisplayLevel} / {textureData.mipmaps[CurArrayDisplayLevel].Count - 1}";
arrayLevelCounterLabel.Text = $"{CurArrayDisplayLevel} / {textureData.mipmaps.Count - 1}";
if (Thread != null && Thread.IsAlive)
Thread.Abort();
Thread = new Thread((ThreadStart)(() =>
{
pictureBoxCustom1.Image = Imaging.GetLoadingImage();
pictureBoxCustom1.Image = textureData.DisplayTexture(CurMipDisplayLevel);
// texSizeMipsLabel.Text = $"Width = {pictureBoxCustom1.Image.Width} Height = {pictureBoxCustom1.Image.Height}";
pictureBoxCustom1.Image = textureData.DisplayTexture(CurMipDisplayLevel, CurArrayDisplayLevel);
// texSizeMipsLabel.Text = $"Width = {pictureBoxCustom1.Image.Width} Height = {pictureBoxCustom1.Image.Height}";
}));
Thread.Start();
if (CurMipDisplayLevel != textureData.mipmaps.Count - 1)
if (CurMipDisplayLevel != textureData.mipmaps[CurArrayDisplayLevel].Count - 1)
BtnMipsRight.Enabled = true;
else
BtnMipsRight.Enabled = false;
@ -70,6 +76,16 @@ namespace FirstPlugin
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;
@ -109,12 +125,29 @@ namespace FirstPlugin
private void BtnMipsRight_Click(object sender, EventArgs e)
{
if (CurMipDisplayLevel != textureData.mipmaps.Count - 1)
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)
@ -135,5 +168,52 @@ namespace FirstPlugin
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);
}
private void replaceSurfaceLevelToolStripMenuItem_Click(object sender, EventArgs e)
{
OpenFileDialog ofd = new OpenFileDialog();
ofd.Filter = "Supported Formats|*.dds|" +
"Microsoft DDS |*.dds|" +
"All files(*.*)|*.*";
if (ofd.ShowDialog() == DialogResult.OK)
{
DDS dds = new DDS(ofd.FileName);
textureData.Texture.MipCount = (uint)dds.header.mipmapCount;
if (textureData.Texture.Height != (uint)dds.header.height)
throw new Exception("Invalid height! Must be same as original!");
if (textureData.Texture.Width != (uint)dds.header.width)
throw new Exception("Invalid Width! Must be same as original!");
List<byte[]> Mipmaps = TextureImporterSettings.SwizzleSurfaceMipMaps(textureData.Texture, dds.bdata, TileMode.Default);
textureData.mipmaps[CurArrayDisplayLevel] = Mipmaps;
UpdateMipDisplay();
textureData.LoadOpenGLTexture();
}
}
private void exportSurfaceLevelToolStripMenuItem_Click(object sender, EventArgs e)
{
SaveFileDialog sfd = new SaveFileDialog();
sfd.Filter = "Supported Formats|*.dds|" +
"Microsoft DDS |*.dds|" +
"All files(*.*)|*.*";
if (sfd.ShowDialog() == DialogResult.OK)
{
textureData.Export(sfd.FileName, true, false, CurArrayDisplayLevel, CurMipDisplayLevel);
}
}
}
}

View File

@ -325,4 +325,7 @@
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

@ -44,7 +44,7 @@ namespace FirstPlugin
GPUAccessFlgComb.Items.Add("Texture");
ImgDimComb.SelectedIndex = 1;
GPUAccessFlgComb.SelectedIndex = 0;
formatComboBox.SelectedItem = SurfaceFormat.R8_G8_B8_A8_SRGB;
formatComboBox.SelectedItem = SurfaceFormat.BC1_SRGB;
}
TextureImporterSettings SelectedTexSettings;
BinaryTextureContainer bntx;
@ -63,6 +63,30 @@ namespace FirstPlugin
}
}
public bool IsCompressed(SurfaceFormat format)
{
switch (format)
{
case SurfaceFormat.BC1_UNORM:
case SurfaceFormat.BC1_SRGB:
case SurfaceFormat.BC2_UNORM:
case SurfaceFormat.BC2_SRGB:
case SurfaceFormat.BC3_UNORM:
case SurfaceFormat.BC3_SRGB:
case SurfaceFormat.BC4_UNORM:
case SurfaceFormat.BC4_SNORM:
case SurfaceFormat.BC5_UNORM:
case SurfaceFormat.BC5_SNORM:
case SurfaceFormat.BC6_UFLOAT:
case SurfaceFormat.BC6_FLOAT:
case SurfaceFormat.BC7_UNORM:
case SurfaceFormat.BC7_SRGB:
return true;
default:
return false;
}
}
public void SetupSettings(Bitmap bitmap)
{
if (SelectedTexSettings.Format == SurfaceFormat.Invalid)
@ -74,6 +98,53 @@ namespace FirstPlugin
if (formatComboBox.SelectedItem is SurfaceFormat)
SelectedTexSettings.Format = (SurfaceFormat)formatComboBox.SelectedItem;
if (IsCompressed(SelectedTexSettings.Format))
{
//Compress first!
switch (SelectedTexSettings.Format)
{
case SurfaceFormat.BC1_UNORM:
// SelectedTexSettings.DataBlockOutput = TexConv.CompressBC1(FileName);
break;
case SurfaceFormat.BC1_SRGB:
case SurfaceFormat.BC2_UNORM:
case SurfaceFormat.BC2_SRGB:
case SurfaceFormat.BC3_UNORM:
case SurfaceFormat.BC3_SRGB:
case SurfaceFormat.BC4_UNORM:
case SurfaceFormat.BC4_SNORM:
case SurfaceFormat.BC5_UNORM:
case SurfaceFormat.BC5_SNORM:
case SurfaceFormat.BC6_UFLOAT:
case SurfaceFormat.BC6_FLOAT:
case SurfaceFormat.BC7_UNORM:
case SurfaceFormat.BC7_SRGB:
break;
}
System.IO.File.WriteAllBytes("temp.dds", SelectedTexSettings.DataBlockOutput);
switch (SelectedTexSettings.Format)
{
case SurfaceFormat.BC1_UNORM:
// SelectedTexSettings.DataBlockOutput = TexConv.DecompressDDS(FileName);
break;
case SurfaceFormat.BC1_SRGB:
case SurfaceFormat.BC2_UNORM:
case SurfaceFormat.BC2_SRGB:
case SurfaceFormat.BC3_UNORM:
case SurfaceFormat.BC3_SRGB:
case SurfaceFormat.BC4_UNORM:
case SurfaceFormat.BC4_SNORM:
case SurfaceFormat.BC5_UNORM:
case SurfaceFormat.BC5_SNORM:
case SurfaceFormat.BC6_UFLOAT:
case SurfaceFormat.BC6_FLOAT:
case SurfaceFormat.BC7_UNORM:
case SurfaceFormat.BC7_SRGB:
break;
}
}
}
private void button1_Click(object sender, EventArgs e)

View File

@ -0,0 +1,370 @@
namespace FirstPlugin
{
partial class FTEXEditor
{
/// <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(BNTXEditor));
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.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.btnEdit = 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.btnEdit);
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;
//
// 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);
//
// 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);
//
// btnEdit
//
this.btnEdit.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btnEdit.ForeColor = System.Drawing.Color.White;
this.btnEdit.Location = new System.Drawing.Point(6, 5);
this.btnEdit.Name = "btnEdit";
this.btnEdit.Size = new System.Drawing.Size(63, 23);
this.btnEdit.TabIndex = 12;
this.btnEdit.Text = "Edit";
this.btnEdit.UseVisualStyleBackColor = true;
this.btnEdit.Click += new System.EventHandler(this.btnEdit_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, 70);
//
// replaceSurfaceLevelToolStripMenuItem
//
this.replaceSurfaceLevelToolStripMenuItem.Name = "replaceSurfaceLevelToolStripMenuItem";
this.replaceSurfaceLevelToolStripMenuItem.Size = new System.Drawing.Size(187, 22);
this.replaceSurfaceLevelToolStripMenuItem.Text = "Replace Surface Level";
this.replaceSurfaceLevelToolStripMenuItem.Click += new System.EventHandler(this.replaceSurfaceLevelToolStripMenuItem_Click);
//
// exportSurfaceLevelToolStripMenuItem
//
this.exportSurfaceLevelToolStripMenuItem.Name = "exportSurfaceLevelToolStripMenuItem";
this.exportSurfaceLevelToolStripMenuItem.Size = new System.Drawing.Size(187, 22);
this.exportSurfaceLevelToolStripMenuItem.Text = "Export Surface Level";
this.exportSurfaceLevelToolStripMenuItem.Click += new System.EventHandler(this.exportSurfaceLevelToolStripMenuItem_Click);
//
// BNTXEditor
//
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 = "BNTXEditor";
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.Button btnEdit;
private System.Windows.Forms.ContextMenuStrip contextMenuStrip1;
private System.Windows.Forms.ToolStripMenuItem replaceSurfaceLevelToolStripMenuItem;
private System.Windows.Forms.ToolStripMenuItem exportSurfaceLevelToolStripMenuItem;
}
}

View File

@ -0,0 +1,214 @@
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 FTEXEditor : UserControl
{
private Thread Thread;
public FTEXEditor()
{
InitializeComponent();
foreach (var type in Enum.GetValues(typeof(Runtime.PictureBoxBG)).Cast<Runtime.PictureBoxBG>())
imageBGComboBox.Items.Add(type);
imageBGComboBox.SelectedItem = Runtime.pictureBoxStyle;
UpdateBackgroundImage();
}
public void LoadPicture(Bitmap image)
{
// pictureBoxCustom1.Image = image;
}
FTEX textureData;
int CurMipDisplayLevel = 0;
int CurArrayDisplayLevel = 0;
public void LoadProperty(FTEX tex)
{
CurMipDisplayLevel = 0;
CurArrayDisplayLevel = 0;
textureData = tex;
propertyGrid1.PropertySort = PropertySort.Categorized;
UpdateMipDisplay();
}
private void UpdateMipDisplay()
{
mipLevelCounterLabel.Text = $"{CurMipDisplayLevel} / {textureData.renderedTex.mipmaps[CurArrayDisplayLevel].Count - 1}";
arrayLevelCounterLabel.Text = $"{CurArrayDisplayLevel} / {textureData.renderedTex.mipmaps.Count - 1}";
if (Thread != null && Thread.IsAlive)
Thread.Abort();
Thread = new Thread((ThreadStart)(() =>
{
pictureBoxCustom1.Image = Imaging.GetLoadingImage();
pictureBoxCustom1.Image = textureData.DisplayTexture(CurMipDisplayLevel, CurArrayDisplayLevel);
// texSizeMipsLabel.Text = $"Width = {pictureBoxCustom1.Image.Width} Height = {pictureBoxCustom1.Image.Height}";
}));
Thread.Start();
if (CurMipDisplayLevel != textureData.renderedTex.mipmaps[CurArrayDisplayLevel].Count - 1)
BtnMipsRight.Enabled = true;
else
BtnMipsRight.Enabled = false;
if (CurMipDisplayLevel != 0)
BtmMipsLeft.Enabled = true;
else
BtmMipsLeft.Enabled = false;
if (CurArrayDisplayLevel != textureData.renderedTex.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;
pictureBoxCustom1.Image = textureData.UpdateBitmap(new Bitmap(pictureBoxCustom1.Image));
}
}
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.renderedTex.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.renderedTex.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);
}
private void replaceSurfaceLevelToolStripMenuItem_Click(object sender, EventArgs e)
{
OpenFileDialog ofd = new OpenFileDialog();
ofd.Filter = "Supported Formats|*.dds|" +
"Microsoft DDS |*.dds|" +
"All files(*.*)|*.*";
if (ofd.ShowDialog() == DialogResult.OK)
{
DDS dds = new DDS(ofd.FileName);
if (textureData.renderedTex.height != (uint)dds.header.height)
throw new Exception("Invalid height! Must be same as original!");
if (textureData.renderedTex.width != (uint)dds.header.width)
throw new Exception("Invalid Width! Must be same as original!");
List<byte[]> Mipmaps = TextureImporterSettings.SwizzleSurfaceMipMaps(textureData, dds.bdata);
textureData.renderedTex.mipmaps[CurArrayDisplayLevel] = Mipmaps;
UpdateMipDisplay();
textureData.LoadOpenGLTexture();
}
}
private void exportSurfaceLevelToolStripMenuItem_Click(object sender, EventArgs e)
{
SaveFileDialog sfd = new SaveFileDialog();
sfd.Filter = "Supported Formats|*.dds|" +
"Microsoft DDS |*.dds|" +
"All files(*.*)|*.*";
if (sfd.ShowDialog() == DialogResult.OK)
{
textureData.Export(sfd.FileName, true, false, CurArrayDisplayLevel, CurMipDisplayLevel);
}
}
}
}

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
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA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gFmdEsB0goCzMOOQIqF17zmh47muzCjM28TmjQwR0niCgzhYJVeE5o+3a
s0zjs2WH4YGq91l4lmm/9izTcB2156Xeh5NoJuFZpqf4TNZemHHeITCz8FjXfXwEbnxe6qlEYLZhueMz
WZtFWIratmJtTTba8+60592oWEbFMiqWUbHcP6NY+iS0UbGc7likYjkVi1Qsp2IZFcuoWOYjiqWfsUjF
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

@ -184,7 +184,7 @@ namespace FirstPlugin
{
return data.Skip((int)offset).Take((int)length).ToArray();
}
private Tuple<uint, uint> GetCurrentMipSize(uint width, uint height, uint blkHeight, uint blkWidth, uint bpp, int CurLevel)
private static Tuple<uint, uint> GetCurrentMipSize(uint width, uint height, uint blkHeight, uint blkWidth, uint bpp, int CurLevel)
{
uint offset = 0;
uint width_ = 0;
@ -213,42 +213,11 @@ namespace FirstPlugin
tex.Format = Format;
tex.Name = settings.TexName;
tex.Path = "";
tex.TextureData = new List<List<byte[]>>();
if (settings.MipCount == 0)
settings.MipCount = 1;
uint blockHeight = 0;
uint blk_dim = Formats.blk_dims((uint)((int)tex.Format >> 8));
uint blkWidth = blk_dim >> 4;
uint blkHeight = blk_dim & 0xF;
uint linesPerBlockHeight = 0;
Console.WriteLine("blkWidth " + blkWidth);
Console.WriteLine("blkHeight " + blkHeight);
uint bpp = Formats.bpps((uint)((int)tex.Format >> 8));
if ((int)settings.TileMode == 1)
{
blockHeight = 1;
tex.BlockHeightLog2 = 0;
tex.Alignment = 1;
linesPerBlockHeight = 1;
tex.ReadTextureLayout = 0;
}
else
{
blockHeight = TegraX1Swizzle.GetBlockHeight(DIV_ROUND_UP(tex.Height, blkHeight));
tex.BlockHeightLog2 = (uint)Convert.ToString(blockHeight, 2).Length - 1;
Console.WriteLine("BlockHeightLog2 " + tex.BlockHeightLog2);
Console.WriteLine("blockHeight " + blockHeight);
tex.Alignment = 512;
tex.ReadTextureLayout = 1;
linesPerBlockHeight = blockHeight * 8;
}
tex.sparseBinding = settings.sparseBinding;
tex.sparseResidency = settings.sparseResidency;
tex.AccessFlags = settings.AccessFlags;
@ -270,14 +239,56 @@ namespace FirstPlugin
tex.Regs = settings.Regs;
tex.Pitch = settings.Pitch;
uint SurfaceSize = 0;
tex.MipOffsets = new long[tex.MipCount];
List<byte[]> mipmaps = SwizzleSurfaceMipMaps(tex, data, tex.TileMode);
tex.TextureData.Add(mipmaps);
byte[] test = Combine(mipmaps);
tex.TextureData[0][0] = test;
return tex;
}
public static List<byte[]> SwizzleSurfaceMipMaps(FTEX tex, byte[] data)
{
throw new Exception("Unimplemented");
}
public static List<byte[]> SwizzleSurfaceMipMaps(Texture tex,byte[] data, TileMode TileMode)
{
int blockHeightShift = 0;
int target = 1;
uint Pitch = 0;
uint SurfaceSize = 0;
uint blockHeight = 0;
uint blk_dim = Formats.blk_dims((uint)((int)tex.Format >> 8));
uint blkWidth = blk_dim >> 4;
uint blkHeight = blk_dim & 0xF;
uint linesPerBlockHeight = 0;
tex.TextureData = new byte[tex.MipCount][];
uint bpp = Formats.bpps((uint)((int)tex.Format >> 8));
if ((int)TileMode == 1)
{
blockHeight = 1;
tex.BlockHeightLog2 = 0;
tex.Alignment = 1;
linesPerBlockHeight = 1;
tex.ReadTextureLayout = 0;
}
else
{
blockHeight = TegraX1Swizzle.GetBlockHeight(DIV_ROUND_UP(tex.Height, blkHeight));
tex.BlockHeightLog2 = (uint)Convert.ToString(blockHeight, 2).Length - 1;
Console.WriteLine("BlockHeightLog2 " + tex.BlockHeightLog2);
Console.WriteLine("blockHeight " + blockHeight);
tex.Alignment = 512;
tex.ReadTextureLayout = 1;
linesPerBlockHeight = blockHeight * 8;
}
List<byte[]> mipmaps = new List<byte[]>();
for (int mipLevel = 0; mipLevel < tex.MipCount; mipLevel++)
{
var result = GetCurrentMipSize(tex.Width, tex.Height, blkWidth, blkHeight, bpp, mipLevel);
@ -301,10 +312,6 @@ namespace FirstPlugin
Console.WriteLine("MipOffsets " + SurfaceSize);
tex.MipOffsets[mipLevel] = SurfaceSize;
// Console.WriteLine("MipOffsets " + SurfaceSize);
// Console.WriteLine("mipamp " + mipLevel);
if (tex.TileMode == TileMode.LinearAligned)
{
Pitch = width__ * bpp;
@ -335,18 +342,14 @@ namespace FirstPlugin
byte[] SwizzledData = TegraX1Swizzle.swizzle(width_, height_, blkWidth, blkHeight, target, bpp, (uint)tex.TileMode, (int)Math.Max(0, tex.BlockHeightLog2 - blockHeightShift), data_);
tex.TextureData[mipLevel] = AlignedData.Concat(SwizzledData).ToArray();
mipmaps.Add(AlignedData.Concat(SwizzledData).ToArray());
}
}
tex.ImageSize = SurfaceSize;
byte[] test = Combine(tex.TextureData);
tex.TextureData[0] = test;
return tex;
return mipmaps;
}
private byte[] Combine(params byte[][] arrays)
private byte[] Combine(List<byte[]> arrays)
{
byte[] rv = new byte[arrays.Sum(a => a.Length)];
int offset = 0;

View File

@ -25,7 +25,7 @@ namespace FirstPlugin
{
get
{
return "Main File Formats Plugin";
return "First Plugin";
}
set
{
@ -125,15 +125,15 @@ namespace FirstPlugin
Formats.Add(typeof(BNTX));
Formats.Add(typeof(BEA));
Formats.Add(typeof(BYAML));
// Formats.Add(typeof(XTX));
Formats.Add(typeof(XTX));
Formats.Add(typeof(KCL));
Formats.Add(typeof(BFFNT));
// Formats.Add(typeof(MSBT));
Formats.Add(typeof(MSBT));
Formats.Add(typeof(BFSAR));
Formats.Add(typeof(BARS));
// Formats.Add(typeof(BFLAN));
// Formats.Add(typeof(BFLYT));
// Formats.Add(typeof(CsvModel));
Formats.Add(typeof(BFLAN));
Formats.Add(typeof(BFLYT));
Formats.Add(typeof(CsvModel));
Formats.Add(typeof(GFPAK));

View File

@ -10,8 +10,10 @@ namespace FirstPlugin
public class PluginRuntime
{
public static List<BinaryTextureContainer> bntxContainers = new List<BinaryTextureContainer>();
public static List<FTEXContainer> ftexContainers = new List<FTEXContainer>();
public static DockState FSHPDockState = DockState.DockRight;
public static string ExternalFMATPath = "";
public static string OdysseyGamePath = "";
public static List<string> SarcHashes = new List<string>(); //Each sarc has their own hash
}
}

View File

@ -50,20 +50,21 @@
<Private>False</Private>
</Reference>
<Reference Include="ByamlExt">
<HintPath>..\EditorCore-master\EditorCore\bin\Debug\Ext\ByamlExt.dll</HintPath>
<Private>False</Private>
<HintPath>..\Switch_Toolbox\Lib\ByamlExt.dll</HintPath>
</Reference>
<Reference Include="Costura, Version=3.1.4.0, Culture=neutral, PublicKeyToken=9919ef960d84173d, processorArchitecture=MSIL">
<HintPath>..\packages\Costura.Fody.3.1.4\lib\net46\Costura.dll</HintPath>
<Private>False</Private>
</Reference>
<Reference Include="EditorCoreCommon">
<HintPath>..\EditorCore-master\EditorCore\bin\Debug\EditorCoreCommon.dll</HintPath>
<HintPath>..\Switch_Toolbox\Lib\EditorCoreCommon.dll</HintPath>
<Private>False</Private>
</Reference>
<Reference Include="KCLExt">
<HintPath>Externals\KCLExt.dll</HintPath>
<Reference Include="KCLExt, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\Switch_Toolbox\Lib\KCLExt.dll</HintPath>
</Reference>
<Reference Include="Microsoft.VisualBasic" />
<Reference Include="NAudio">
<HintPath>Externals\NAudio.dll</HintPath>
<Private>False</Private>
@ -78,6 +79,10 @@
<Private>False</Private>
<EmbedInteropTypes>False</EmbedInteropTypes>
</Reference>
<Reference Include="PresentationCore">
<Private>False</Private>
<EmbedInteropTypes>False</EmbedInteropTypes>
</Reference>
<Reference Include="SARCExt">
<HintPath>Externals\SARCExt.dll</HintPath>
<Private>False</Private>
@ -98,6 +103,10 @@
<HintPath>..\..\..\..\Documents\Visual Studio 2017\Projects\WindowsFormsApp2\WindowsFormsApp2\Lib\Syroot.Maths.dll</HintPath>
<Private>False</Private>
</Reference>
<Reference Include="Syroot.NintenTools.Bfres">
<HintPath>..\Switch_Toolbox\Lib\Syroot.NintenTools.Bfres.dll</HintPath>
<Private>False</Private>
</Reference>
<Reference Include="Syroot.NintenTools.NSW.Bfres, Version=1.2.3.0, Culture=neutral, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>Externals\Syroot.NintenTools.NSW.Bfres.dll</HintPath>
@ -162,7 +171,10 @@
<Compile Include="FileFormats\MSBT.cs" />
<Compile Include="FileFormats\SARC.cs" />
<Compile Include="FileFormats\Texture\BNTX.cs" />
<Compile Include="FileFormats\Texture\FTEX.cs" />
<Compile Include="FileFormats\Texture\GTX.cs" />
<Compile Include="FileFormats\Texture\TegraX1Swizzle.cs" />
<Compile Include="FileFormats\Texture\TexConv.cs" />
<Compile Include="FileFormats\Texture\XTX.cs" />
<Compile Include="GL\BFRES_Render.cs" />
<Compile Include="GUI\Advanced Editor\TextureOpenEditor.cs">
@ -255,6 +267,13 @@
<Compile Include="GUI\BFRES\BfresShapeEditor.Designer.cs">
<DependentUpon>BfresShapeEditor.cs</DependentUpon>
</Compile>
<Compile Include="GUI\FormLoader.cs" />
<Compile Include="GUI\TextureUI\FTEXEditor.cs">
<SubType>UserControl</SubType>
</Compile>
<Compile Include="GUI\TextureUI\FTEXEditor.Designer.cs">
<DependentUpon>FTEXEditor.cs</DependentUpon>
</Compile>
<Compile Include="GUI\TextureUI\BNTXEditor.cs">
<SubType>UserControl</SubType>
</Compile>
@ -388,6 +407,9 @@
<EmbeddedResource Include="GUI\BFRES\BfresShapeEditor.resx">
<DependentUpon>BfresShapeEditor.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="GUI\TextureUI\FTEXEditor.resx">
<DependentUpon>FTEXEditor.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="GUI\TextureUI\BNTXEditor.resx">
<DependentUpon>BNTXEditor.cs</DependentUpon>
</EmbeddedResource>

View File

@ -6,12 +6,13 @@ using System.Threading.Tasks;
using System.Xml;
using Syroot.NintenTools.NSW.Bfres;
using System.IO;
using Bfres.Structs;
namespace FirstPlugin
{
public class FMAT2XML
{
public static void Read(BFRESRender.FMAT mat, string FileName, bool OnlyMatParams = false)
public static void Read(FMAT mat, string FileName, bool OnlyMatParams = false)
{
XmlDocument doc = new XmlDocument();
doc.Load(FileName);
@ -29,13 +30,13 @@ namespace FirstPlugin
}
}
public static void ReadShaderParams(XmlDocument doc, XmlNode parentNode, BFRESRender.FMAT mat)
public static void ReadShaderParams(XmlDocument doc, XmlNode parentNode, FMAT mat)
{
mat.matparam.Clear();
foreach (XmlNode node in parentNode.ChildNodes)
{
string Value = node.Attributes[0].Value;
BFRESRender.BfresShaderParam param = new BFRESRender.BfresShaderParam();
BfresShaderParam param = new BfresShaderParam();
param.Name = node.Name;
Console.WriteLine(node.Name);
@ -262,7 +263,7 @@ namespace FirstPlugin
}
return texSrtEx;
}
public static void Save(BFRESRender.FMAT mat, string FileName, bool OnlyMaterialParams = false)
public static void Save(FMAT mat, string FileName, bool OnlyMaterialParams = false)
{
XmlDocument doc = new XmlDocument();
XmlNode mainNode = doc.CreateElement("FMAT");
@ -279,7 +280,7 @@ namespace FirstPlugin
}
doc.Save(FileName);
}
private static void AppendMaterialParams(BFRESRender.FMAT mat, XmlDocument doc, XmlNode parentNode)
private static void AppendMaterialParams(FMAT mat, XmlDocument doc, XmlNode parentNode)
{
XmlNode matParamsNode = doc.CreateElement("MaterialParameters");
parentNode.AppendChild(matParamsNode);

View File

@ -6,6 +6,14 @@
<assemblyIdentity name="OpenTK" publicKeyToken="bad199fe84eb3df4" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-3.0.1.0" newVersion="3.0.1.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="LZ4pn" publicKeyToken="62e1b5ec1eec9bdd" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-1.0.10.93" newVersion="1.0.10.93" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="K4os.Hash.xxHash" publicKeyToken="32cd54395057cec3" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-1.0.5.0" newVersion="1.0.5.0" />
</dependentAssembly>
</assemblyBinding>
</runtime>
<startup><supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.6.2" /></startup></configuration>

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -0,0 +1 @@
44a48ef301f1824a84225f67b574ad4e4c364865

View File

@ -0,0 +1,41 @@
C:\Users\Nathan\source\repos\Switch_Toolbox\Switch_Toolbox\bin\Release\Lib\Plugins\FirstPlugin.Plg.dll.config
C:\Users\Nathan\source\repos\Switch_Toolbox\Switch_Toolbox\bin\Release\Lib\Plugins\FirstPlugin.Plg.dll
C:\Users\Nathan\source\repos\Switch_Toolbox\Switch_Toolbox\bin\Release\Lib\Plugins\FirstPlugin.Plg.pdb
C:\Users\Nathan\source\repos\Switch_Toolbox\Switch_FileFormatsMain\obj\Release\Switch_FileFormatsMain.csprojAssemblyReference.cache
C:\Users\Nathan\source\repos\Switch_Toolbox\Switch_FileFormatsMain\obj\Release\Interop.WMPLib.dll
C:\Users\Nathan\source\repos\Switch_Toolbox\Switch_FileFormatsMain\obj\Release\AxInterop.WMPLib.dll
C:\Users\Nathan\source\repos\Switch_Toolbox\Switch_FileFormatsMain\obj\Release\Switch_FileFormatsMain.csproj.ResolveComReference.cache
C:\Users\Nathan\source\repos\Switch_Toolbox\Switch_FileFormatsMain\obj\Release\FirstPlugin.TextureOpenEditor.resources
C:\Users\Nathan\source\repos\Switch_Toolbox\Switch_FileFormatsMain\obj\Release\FirstPlugin.TextureViewer.resources
C:\Users\Nathan\source\repos\Switch_Toolbox\Switch_FileFormatsMain\obj\Release\FirstPlugin.BfresModelImportSettings.resources
C:\Users\Nathan\source\repos\Switch_Toolbox\Switch_FileFormatsMain\obj\Release\FirstPlugin.FloatsIntsValuePanel.resources
C:\Users\Nathan\source\repos\Switch_Toolbox\Switch_FileFormatsMain\obj\Release\FirstPlugin.BoolValuesPanel.resources
C:\Users\Nathan\source\repos\Switch_Toolbox\Switch_FileFormatsMain\obj\Release\FirstPlugin.SamplerEditor.resources
C:\Users\Nathan\source\repos\Switch_Toolbox\Switch_FileFormatsMain\obj\Release\FirstPlugin.BntxSelector.resources
C:\Users\Nathan\source\repos\Switch_Toolbox\Switch_FileFormatsMain\obj\Release\FirstPlugin.CopyMaterialMenu.resources
C:\Users\Nathan\source\repos\Switch_Toolbox\Switch_FileFormatsMain\obj\Release\FirstPlugin.BFAVEditor.resources
C:\Users\Nathan\source\repos\Switch_Toolbox\Switch_FileFormatsMain\obj\Release\FirstPlugin.BfresBoneEditor.resources
C:\Users\Nathan\source\repos\Switch_Toolbox\Switch_FileFormatsMain\obj\Release\FirstPlugin.BfresLODMeshEditor.resources
C:\Users\Nathan\source\repos\Switch_Toolbox\Switch_FileFormatsMain\obj\Release\FirstPlugin.BfresProperties.resources
C:\Users\Nathan\source\repos\Switch_Toolbox\Switch_FileFormatsMain\obj\Release\FirstPlugin.FMATEditor.resources
C:\Users\Nathan\source\repos\Switch_Toolbox\Switch_FileFormatsMain\obj\Release\FirstPlugin.BfresShaderOptionsEditor.resources
C:\Users\Nathan\source\repos\Switch_Toolbox\Switch_FileFormatsMain\obj\Release\FirstPlugin.FSHPEditor.resources
C:\Users\Nathan\source\repos\Switch_Toolbox\Switch_FileFormatsMain\obj\Release\FirstPlugin.FTEXEditor.resources
C:\Users\Nathan\source\repos\Switch_Toolbox\Switch_FileFormatsMain\obj\Release\FirstPlugin.BNTXEditor.resources
C:\Users\Nathan\source\repos\Switch_Toolbox\Switch_FileFormatsMain\obj\Release\FirstPlugin.ByamlEditor.resources
C:\Users\Nathan\source\repos\Switch_Toolbox\Switch_FileFormatsMain\obj\Release\FirstPlugin.PreviewEditor.resources
C:\Users\Nathan\source\repos\Switch_Toolbox\Switch_FileFormatsMain\obj\Release\FirstPlugin.GUI.Editors.FSKLEditor.resources
C:\Users\Nathan\source\repos\Switch_Toolbox\Switch_FileFormatsMain\obj\Release\FirstPlugin.RenderInfoValueEditor.resources
C:\Users\Nathan\source\repos\Switch_Toolbox\Switch_FileFormatsMain\obj\Release\FirstPlugin.VertexAttributeDataList.resources
C:\Users\Nathan\source\repos\Switch_Toolbox\Switch_FileFormatsMain\obj\Release\FirstPlugin.PreviewFormatList.resources
C:\Users\Nathan\source\repos\Switch_Toolbox\Switch_FileFormatsMain\obj\Release\FirstPlugin.SetParamDialog.resources
C:\Users\Nathan\source\repos\Switch_Toolbox\Switch_FileFormatsMain\obj\Release\FirstPlugin.SRTValuesPanel.resources
C:\Users\Nathan\source\repos\Switch_Toolbox\Switch_FileFormatsMain\obj\Release\FirstPlugin.Texture_Selector.resources
C:\Users\Nathan\source\repos\Switch_Toolbox\Switch_FileFormatsMain\obj\Release\FirstPlugin.BinaryTextureImporterList.resources
C:\Users\Nathan\source\repos\Switch_Toolbox\Switch_FileFormatsMain\obj\Release\FirstPlugin.TextureFormatExport.resources
C:\Users\Nathan\source\repos\Switch_Toolbox\Switch_FileFormatsMain\obj\Release\FirstPlugin.Properties.Resources.resources
C:\Users\Nathan\source\repos\Switch_Toolbox\Switch_FileFormatsMain\obj\Release\Switch_FileFormatsMain.csproj.GenerateResource.cache
C:\Users\Nathan\source\repos\Switch_Toolbox\Switch_FileFormatsMain\obj\Release\Switch_FileFormatsMain.csproj.CoreCompileInputs.cache
C:\Users\Nathan\source\repos\Switch_Toolbox\Switch_FileFormatsMain\obj\Release\Switch_FileFormatsMain.csproj.CopyComplete
C:\Users\Nathan\source\repos\Switch_Toolbox\Switch_FileFormatsMain\obj\Release\FirstPlugin.Plg.dll
C:\Users\Nathan\source\repos\Switch_Toolbox\Switch_FileFormatsMain\obj\Release\FirstPlugin.Plg.pdb

Some files were not shown because too many files have changed in this diff Show More