mirror of
https://github.com/KillzXGaming/Switch-Toolbox
synced 2024-11-22 20:43:09 +00:00
Fix references to layout header to access certain data
This commit is contained in:
parent
5e4ec3d131
commit
24b33aae15
8 changed files with 15 additions and 9 deletions
|
@ -48,6 +48,7 @@ namespace LayoutBXLYT.Cafe
|
||||||
|
|
||||||
public PAN1(BxlytHeader header, string name) : base()
|
public PAN1(BxlytHeader header, string name) : base()
|
||||||
{
|
{
|
||||||
|
LayoutFile = header;
|
||||||
LoadDefaults();
|
LoadDefaults();
|
||||||
Name = name;
|
Name = name;
|
||||||
}
|
}
|
||||||
|
|
|
@ -47,6 +47,7 @@ namespace LayoutBXLYT.CTR
|
||||||
}
|
}
|
||||||
|
|
||||||
public PAN1(BxlytHeader header, string name) : base() {
|
public PAN1(BxlytHeader header, string name) : base() {
|
||||||
|
LayoutFile = header;
|
||||||
LoadDefaults();
|
LoadDefaults();
|
||||||
Name = name;
|
Name = name;
|
||||||
}
|
}
|
||||||
|
@ -80,6 +81,7 @@ namespace LayoutBXLYT.CTR
|
||||||
|
|
||||||
public PAN1(FileReader reader, BxlytHeader header) : base()
|
public PAN1(FileReader reader, BxlytHeader header) : base()
|
||||||
{
|
{
|
||||||
|
LayoutFile = header;
|
||||||
_flags1 = reader.ReadByte();
|
_flags1 = reader.ReadByte();
|
||||||
byte origin = reader.ReadByte();
|
byte origin = reader.ReadByte();
|
||||||
Alpha = reader.ReadByte();
|
Alpha = reader.ReadByte();
|
||||||
|
|
|
@ -113,8 +113,8 @@ namespace LayoutBXLYT
|
||||||
foreach (var tex in tpl.TextureList)
|
foreach (var tex in tpl.TextureList)
|
||||||
{
|
{
|
||||||
//Only need the first texture
|
//Only need the first texture
|
||||||
if (!textures.ContainsKey(file.FileName))
|
if (!textures.ContainsKey(tpl.FileName))
|
||||||
textures.Add(file.FileName, tex);
|
textures.Add(tpl.FileName, tex);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -374,7 +374,7 @@ namespace LayoutBXLYT
|
||||||
MaterialList = new MAT1(reader, this);
|
MaterialList = new MAT1(reader, this);
|
||||||
break;
|
break;
|
||||||
case "pan1":
|
case "pan1":
|
||||||
var panel = new PAN1(reader);
|
var panel = new PAN1(reader, this);
|
||||||
AddPaneToTable(panel);
|
AddPaneToTable(panel);
|
||||||
if (!setRoot)
|
if (!setRoot)
|
||||||
{
|
{
|
||||||
|
@ -400,7 +400,7 @@ namespace LayoutBXLYT
|
||||||
currentPane = textPanel;
|
currentPane = textPanel;
|
||||||
break;
|
break;
|
||||||
case "bnd1":
|
case "bnd1":
|
||||||
var boundsPanel = new BND1(reader);
|
var boundsPanel = new BND1(reader, this);
|
||||||
AddPaneToTable(boundsPanel);
|
AddPaneToTable(boundsPanel);
|
||||||
|
|
||||||
SetPane(boundsPanel, parentPane);
|
SetPane(boundsPanel, parentPane);
|
||||||
|
|
|
@ -22,7 +22,7 @@ namespace LayoutBXLYT.Revolution
|
||||||
Name = name;
|
Name = name;
|
||||||
}
|
}
|
||||||
|
|
||||||
public BND1(FileReader reader) : base(reader)
|
public BND1(FileReader reader, BxlytHeader header) : base(reader, header)
|
||||||
{
|
{
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -49,6 +49,8 @@ namespace LayoutBXLYT.Revolution
|
||||||
|
|
||||||
public PAN1(BxlytHeader header, string name) : base()
|
public PAN1(BxlytHeader header, string name) : base()
|
||||||
{
|
{
|
||||||
|
LayoutFile = header;
|
||||||
|
|
||||||
LoadDefaults();
|
LoadDefaults();
|
||||||
Name = name;
|
Name = name;
|
||||||
}
|
}
|
||||||
|
@ -73,8 +75,9 @@ namespace LayoutBXLYT.Revolution
|
||||||
Bottom = 2
|
Bottom = 2
|
||||||
};
|
};
|
||||||
|
|
||||||
public PAN1(FileReader reader) : base()
|
public PAN1(FileReader reader, BxlytHeader header) : base()
|
||||||
{
|
{
|
||||||
|
LayoutFile = header;
|
||||||
_flags1 = reader.ReadByte();
|
_flags1 = reader.ReadByte();
|
||||||
byte origin = reader.ReadByte();
|
byte origin = reader.ReadByte();
|
||||||
Alpha = reader.ReadByte();
|
Alpha = reader.ReadByte();
|
||||||
|
|
|
@ -70,7 +70,7 @@ namespace LayoutBXLYT.Revolution
|
||||||
Material = (BxlytMaterial)Material.Clone();
|
Material = (BxlytMaterial)Material.Clone();
|
||||||
}
|
}
|
||||||
|
|
||||||
public PIC1(FileReader reader, BRLYT.Header header) : base(reader)
|
public PIC1(FileReader reader, BRLYT.Header header) : base(reader, header)
|
||||||
{
|
{
|
||||||
ParentLayout = header;
|
ParentLayout = header;
|
||||||
|
|
||||||
|
|
|
@ -208,7 +208,7 @@ namespace LayoutBXLYT.Revolution
|
||||||
ShadowItalic = 0;
|
ShadowItalic = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
public TXT1(FileReader reader, BxlytHeader header) : base(reader)
|
public TXT1(FileReader reader, BxlytHeader header) : base(reader, header)
|
||||||
{
|
{
|
||||||
layoutFile = header;
|
layoutFile = header;
|
||||||
|
|
||||||
|
|
|
@ -175,7 +175,7 @@ namespace LayoutBXLYT.Revolution
|
||||||
SetFrames(header);
|
SetFrames(header);
|
||||||
}
|
}
|
||||||
|
|
||||||
public WND1(BxlytHeader header, FileReader reader) : base(reader)
|
public WND1(BxlytHeader header, FileReader reader) : base(reader, header)
|
||||||
{
|
{
|
||||||
layoutHeader = header;
|
layoutHeader = header;
|
||||||
WindowFrames = new List<BxlytWindowFrame>();
|
WindowFrames = new List<BxlytWindowFrame>();
|
||||||
|
|
Loading…
Reference in a new issue