Fix build errors one more time

This commit is contained in:
KillzXGaming 2019-09-08 17:45:57 -04:00
parent ffb41778c3
commit c960404f42
2 changed files with 18 additions and 9 deletions

View file

@ -118,7 +118,8 @@ namespace LayoutBXLYT
for (int i = 0; i < activeAttributeCount; i++) for (int i = 0; i < activeAttributeCount; i++)
{ {
int size = 0; 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); int location = GL.GetAttribLocation(program, name);
// Overwrite existing vertex attributes. // Overwrite existing vertex attributes.
@ -134,7 +135,8 @@ namespace LayoutBXLYT
for (int i = 0; i < activeAttributeCount; i++) for (int i = 0; i < activeAttributeCount; i++)
{ {
int size = 0; 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); int location = GL.GetUniformLocation(program, name);
// Overwrite existing vertex attributes. // Overwrite existing vertex attributes.

View file

@ -921,10 +921,13 @@ namespace LayoutBXLYT.Cafe
[TypeConverter(typeof(ExpandableObjectConverter))] [TypeConverter(typeof(ExpandableObjectConverter))]
public WindowContent Content { get; set; } public WindowContent Content { get; set; }
public List<WindowFrame> WindowFrames = new List<WindowFrame>(); [TypeConverter(typeof(ExpandableObjectConverter))]
public List<WindowFrame> WindowFrames { get; set; }
public WND1(FileReader reader, Header header) : base(reader) public WND1(FileReader reader, Header header) : base(reader)
{ {
WindowFrames = new List<WindowFrame>();
long pos = reader.Position - 0x54; long pos = reader.Position - 0x54;
StretchLeft = reader.ReadUInt16(); StretchLeft = reader.ReadUInt16();
@ -950,7 +953,7 @@ namespace LayoutBXLYT.Cafe
foreach (int offset in offsets) foreach (int offset in offsets)
{ {
reader.SeekBegin(pos + offset); 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 class WindowFrame
{ {
public ushort MaterialIndex; public Material material { get; set; }
public byte Flip;
public WindowFrame(FileReader reader) public ushort MaterialIndex;
public byte TextureFlip;
public WindowFrame(FileReader reader, Header header)
{ {
MaterialIndex = reader.ReadUInt16(); MaterialIndex = reader.ReadUInt16();
Flip = reader.ReadByte(); TextureFlip = reader.ReadByte();
reader.ReadByte(); //padding reader.ReadByte(); //padding
material = header.MaterialList.Materials[MaterialIndex];
} }
public void Write(FileWriter writer) public void Write(FileWriter writer)
{ {
writer.Write(MaterialIndex); writer.Write(MaterialIndex);
writer.Write(Flip); writer.Write(TextureFlip);
writer.Write((byte)0); writer.Write((byte)0);
} }
} }