From cc5e17e984fbc79f213aad913260f9a42cdaaeee Mon Sep 17 00:00:00 2001 From: KillzXGaming Date: Sun, 10 Nov 2019 13:17:41 -0500 Subject: [PATCH] Add more texture formats to batch export --- .../NLG/MarioStrikers/StrikersRLG.cs | 4 +++- .../FileFormats/Texture/GTXFile.cs | 18 +++++++++++++++++- File_Format_Library/FileFormats/Texture/XTX.cs | 17 ++++++++++++++++- 3 files changed, 36 insertions(+), 3 deletions(-) diff --git a/File_Format_Library/FileFormats/NLG/MarioStrikers/StrikersRLG.cs b/File_Format_Library/FileFormats/NLG/MarioStrikers/StrikersRLG.cs index 0616ed25..6ae61fc4 100644 --- a/File_Format_Library/FileFormats/NLG/MarioStrikers/StrikersRLG.cs +++ b/File_Format_Library/FileFormats/NLG/MarioStrikers/StrikersRLG.cs @@ -375,7 +375,7 @@ namespace FirstPlugin.NLG else if (pointer.Stride == 12) vert.pos = new Vector3(reader.ReadSingle(), reader.ReadSingle(), reader.ReadSingle()); - vert.pos = Vector3.TransformPosition(vert.pos, TransformMatrix); + // vert.pos = Vector3.TransformPosition(vert.pos, TransformMatrix); } if (pointer.Type == 1) @@ -569,6 +569,8 @@ namespace FirstPlugin.NLG reader.ReadSingle()); reader.ReadSingle(); //1 + // bone.Translate = Vector3.TransformPosition(bone.Translate, TransformMatrix); + entry.Bones.Add(bone); } } diff --git a/File_Format_Library/FileFormats/Texture/GTXFile.cs b/File_Format_Library/FileFormats/Texture/GTXFile.cs index 01a9bef1..651f49c1 100644 --- a/File_Format_Library/FileFormats/Texture/GTXFile.cs +++ b/File_Format_Library/FileFormats/Texture/GTXFile.cs @@ -34,7 +34,7 @@ namespace FirstPlugin UserBlock = 0x16, } - public class GTXFile : TreeNodeFile, IFileFormat, IContextMenuNode + public class GTXFile : TreeNodeFile, IFileFormat, IContextMenuNode, ITextureContainer { public FileType FileType { get; set; } = FileType.Image; @@ -61,6 +61,22 @@ namespace FirstPlugin return types.ToArray(); } } + + public bool DisplayIcons => false; + + public List TextureList + { + get + { + List texList = new List(); + foreach (STGenericTexture node in textures) + texList.Add(node); + + return texList; + } + set { } + } + private GTXHeader header; public List data = new List(); diff --git a/File_Format_Library/FileFormats/Texture/XTX.cs b/File_Format_Library/FileFormats/Texture/XTX.cs index f12b7e07..582309ac 100644 --- a/File_Format_Library/FileFormats/Texture/XTX.cs +++ b/File_Format_Library/FileFormats/Texture/XTX.cs @@ -12,7 +12,7 @@ using Toolbox.Library.Forms; namespace FirstPlugin { - public class XTX : TreeNodeFile, IFileFormat, IContextMenuNode + public class XTX : TreeNodeFile, IFileFormat, IContextMenuNode, ITextureContainer { public FileType FileType { get; set; } = FileType.Image; @@ -31,6 +31,21 @@ namespace FirstPlugin } } + public bool DisplayIcons => true; + + public List TextureList + { + get + { + List textures = new List(); + foreach (STGenericTexture node in Nodes) + textures.Add(node); + + return textures; + } + set { } + } + public Type[] Types { get