From c960404f42eb35dec9215f2d27a87d62002a4be1 Mon Sep 17 00:00:00 2001 From: KillzXGaming Date: Sun, 8 Sep 2019 17:45:57 -0400 Subject: [PATCH] Fix build errors one more time --- .../FileFormats/Layout/BxlytShader.cs | 6 ++++-- .../FileFormats/Layout/CAFE/BFLYT.cs | 21 ++++++++++++------- 2 files changed, 18 insertions(+), 9 deletions(-) diff --git a/File_Format_Library/FileFormats/Layout/BxlytShader.cs b/File_Format_Library/FileFormats/Layout/BxlytShader.cs index a61d3738..208f9049 100644 --- a/File_Format_Library/FileFormats/Layout/BxlytShader.cs +++ b/File_Format_Library/FileFormats/Layout/BxlytShader.cs @@ -118,7 +118,8 @@ namespace LayoutBXLYT for (int i = 0; i < activeAttributeCount; i++) { int size = 0; - string name = GL.GetActiveAttrib(program, i, out size, out ActiveAttribType type); + ActiveAttribType type; + string name = GL.GetActiveAttrib(program, i, out size, out type); int location = GL.GetAttribLocation(program, name); // Overwrite existing vertex attributes. @@ -134,7 +135,8 @@ namespace LayoutBXLYT for (int i = 0; i < activeAttributeCount; i++) { int size = 0; - string name = GL.GetActiveUniform(program, i, out size, out ActiveUniformType type); + ActiveUniformType type; + string name = GL.GetActiveUniform(program, i, out size, out type); int location = GL.GetUniformLocation(program, name); // Overwrite existing vertex attributes. diff --git a/File_Format_Library/FileFormats/Layout/CAFE/BFLYT.cs b/File_Format_Library/FileFormats/Layout/CAFE/BFLYT.cs index e5fa8f45..505ccf71 100644 --- a/File_Format_Library/FileFormats/Layout/CAFE/BFLYT.cs +++ b/File_Format_Library/FileFormats/Layout/CAFE/BFLYT.cs @@ -921,10 +921,13 @@ namespace LayoutBXLYT.Cafe [TypeConverter(typeof(ExpandableObjectConverter))] public WindowContent Content { get; set; } - public List WindowFrames = new List(); + [TypeConverter(typeof(ExpandableObjectConverter))] + public List WindowFrames { get; set; } public WND1(FileReader reader, Header header) : base(reader) { + WindowFrames = new List(); + long pos = reader.Position - 0x54; StretchLeft = reader.ReadUInt16(); @@ -950,7 +953,7 @@ namespace LayoutBXLYT.Cafe foreach (int offset in offsets) { reader.SeekBegin(pos + offset); - WindowFrames.Add(new WindowFrame(reader)); + WindowFrames.Add(new WindowFrame(reader, header)); } } @@ -1054,20 +1057,24 @@ namespace LayoutBXLYT.Cafe public class WindowFrame { - public ushort MaterialIndex; - public byte Flip; + public Material material { get; set; } - public WindowFrame(FileReader reader) + public ushort MaterialIndex; + public byte TextureFlip; + + public WindowFrame(FileReader reader, Header header) { MaterialIndex = reader.ReadUInt16(); - Flip = reader.ReadByte(); + TextureFlip = reader.ReadByte(); reader.ReadByte(); //padding + + material = header.MaterialList.Materials[MaterialIndex]; } public void Write(FileWriter writer) { writer.Write(MaterialIndex); - writer.Write(Flip); + writer.Write(TextureFlip); writer.Write((byte)0); } }