diff --git a/.vs/Toolbox/v16/.suo b/.vs/Toolbox/v16/.suo index 7700c9e0..37456c18 100644 Binary files a/.vs/Toolbox/v16/.suo and b/.vs/Toolbox/v16/.suo differ diff --git a/.vs/Toolbox/v16/Server/sqlite3/storage.ide b/.vs/Toolbox/v16/Server/sqlite3/storage.ide index 6ef0cf16..a2927cc5 100644 Binary files a/.vs/Toolbox/v16/Server/sqlite3/storage.ide and b/.vs/Toolbox/v16/Server/sqlite3/storage.ide differ diff --git a/.vs/Toolbox/v16/Server/sqlite3/storage.ide-shm b/.vs/Toolbox/v16/Server/sqlite3/storage.ide-shm new file mode 100644 index 00000000..26a8d3ed Binary files /dev/null and b/.vs/Toolbox/v16/Server/sqlite3/storage.ide-shm differ diff --git a/.vs/Toolbox/v16/Server/sqlite3/storage.ide-wal b/.vs/Toolbox/v16/Server/sqlite3/storage.ide-wal new file mode 100644 index 00000000..c13d8e67 Binary files /dev/null and b/.vs/Toolbox/v16/Server/sqlite3/storage.ide-wal differ diff --git a/File_Format_Library/FileFormats/Texture/BCLIM.cs b/File_Format_Library/FileFormats/Texture/BCLIM.cs index c1bfa786..2be84740 100644 --- a/File_Format_Library/FileFormats/Texture/BCLIM.cs +++ b/File_Format_Library/FileFormats/Texture/BCLIM.cs @@ -385,27 +385,27 @@ namespace FirstPlugin var data = GenerateMipsAndCompress(bitmap, MipCount, Format); //Swizzle and create surface - /* var surface = GX2.CreateGx2Texture(data, Text, - (uint)image.TileMode, - (uint)0, - (uint)image.Width, - (uint)image.Height, - (uint)1, - (uint)Gx2Format, - (uint)0, - (uint)1, - (uint)MipCount - ); + /* var surface = GX2.CreateGx2Texture(data, Text, + (uint)image.TileMode, + (uint)0, + (uint)image.Width, + (uint)image.Height, + (uint)1, + (uint)Gx2Format, + (uint)0, + (uint)1, + (uint)MipCount + ); - image.Swizzle = (byte)surface.swizzle; - image.BCLIMFormat = ConvertFormatGenericToBflim(Format); - image.Height = (ushort)surface.height; - image.Width = (ushort)surface.width;*/ + image.Swizzle = (byte)surface.swizzle; + image.BCLIMFormat = ConvertFormatGenericToBflim(Format); + image.Height = (ushort)surface.height; + image.Width = (ushort)surface.width;*/ Width = image.Width; Height = image.Height; - // ImageData = surface.data; + // ImageData = surface.data; IsEdited = true; LoadOpenGLTexture(); diff --git a/File_Format_Library/FileFormats/Texture/TXE.cs b/File_Format_Library/FileFormats/Texture/TXE.cs index fa30e515..e787de1d 100644 --- a/File_Format_Library/FileFormats/Texture/TXE.cs +++ b/File_Format_Library/FileFormats/Texture/TXE.cs @@ -43,16 +43,12 @@ namespace AmbrosiaPikmin1.FileFormats.TXE stream.Seek((~(offset - 1) & (stream.Position + offset - 1)) - stream.Position); } - public void Load(System.IO.Stream stream) + private Texture Read(System.IO.Stream stream) { - //Set this if you want to save the file format - CanSave = true; - //You can add a FileReader with Toolbox.Library.IO namespace using (var reader = new FileReader(stream)) { Texture tex = new Texture(); - tex.CanEdit = false; reader.SetByteOrder(true); @@ -67,17 +63,28 @@ namespace AmbrosiaPikmin1.FileFormats.TXE tex.PlatformSwizzle = PlatformSwizzle.Platform_Gamecube; int imageDataSize = reader.ReadInt32(); - SkipPadding(reader, 0x20); - tex.ImageData = reader.ReadBytes(imageDataSize); tex.Name = FileName; - tex.ToolTipText = "Binary Texture Image, used for 2D textures like fonts"; - _ = Nodes.Add(tex); + return tex; } } + public void Load(System.IO.Stream stream) + { + Text = FileName; + //Set this if you want to save the file format + CanSave = false; + + Texture tex = Read(stream); + + ImageKey = "Texture"; + SelectedImageKey = "Texture"; + + Nodes.Add(tex); + } + public byte[] Save() { return null; @@ -102,8 +109,8 @@ namespace AmbrosiaPikmin1.FileFormats.TXE { TEX_FORMAT.I4, TEX_FORMAT.I8, - TEX_FORMAT.I4, - TEX_FORMAT.I8, + TEX_FORMAT.IA4, + TEX_FORMAT.IA8, TEX_FORMAT.RGB565, TEX_FORMAT.RGB5A3, TEX_FORMAT.RGBA32,