mirror of
https://github.com/KillzXGaming/Switch-Toolbox
synced 2024-11-17 01:58:03 +00:00
More fixes with bffnt
This commit is contained in:
parent
6e02fbea4b
commit
532600a0d9
1 changed files with 9 additions and 9 deletions
|
@ -63,7 +63,7 @@ namespace FirstPlugin
|
||||||
{
|
{
|
||||||
var surface = new Gx2ImageBlock();
|
var surface = new Gx2ImageBlock();
|
||||||
surface.Text = "Sheet_0";
|
surface.Text = "Sheet_0";
|
||||||
surface.Load(bffnt.GetFontSection());
|
surface.Load(tglp);
|
||||||
textureFolder.Nodes.Add(surface);
|
textureFolder.Nodes.Add(surface);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -206,14 +206,14 @@ namespace FirstPlugin
|
||||||
|
|
||||||
public class Gx2ImageBlock : STGenericTexture
|
public class Gx2ImageBlock : STGenericTexture
|
||||||
{
|
{
|
||||||
public FINF TextureFINF;
|
public TGLP TextureTGLP;
|
||||||
|
|
||||||
public void Load(FINF texture)
|
public void Load(TGLP texture)
|
||||||
{
|
{
|
||||||
TextureFINF = texture;
|
TextureTGLP = texture;
|
||||||
Height = TextureFINF.Height;
|
Height = TextureTGLP.SheetHeight;
|
||||||
Width = TextureFINF.Width;
|
Width = TextureTGLP.SheetWidth;
|
||||||
var BFNTFormat = (Gx2ImageFormats)TextureFINF.tglp.Format;
|
var BFNTFormat = (Gx2ImageFormats)TextureTGLP.Format;
|
||||||
Format = ConvertToGeneric(BFNTFormat);
|
Format = ConvertToGeneric(BFNTFormat);
|
||||||
|
|
||||||
ImageKey = "Texture";
|
ImageKey = "Texture";
|
||||||
|
@ -275,7 +275,7 @@ namespace FirstPlugin
|
||||||
surf.format = (uint)Bfres.Structs.FTEX.ConvertToGx2Format(Format);
|
surf.format = (uint)Bfres.Structs.FTEX.ConvertToGx2Format(Format);
|
||||||
surf.use = (uint)GX2.GX2SurfaceUse.USE_COLOR_BUFFER;
|
surf.use = (uint)GX2.GX2SurfaceUse.USE_COLOR_BUFFER;
|
||||||
surf.pitch = 0;
|
surf.pitch = 0;
|
||||||
surf.data = TextureFINF.tglp.SheetDataList[ArrayLevel];
|
surf.data = TextureTGLP.SheetDataList[ArrayLevel];
|
||||||
surf.numMips = 1;
|
surf.numMips = 1;
|
||||||
surf.mipOffset = new uint[0];
|
surf.mipOffset = new uint[0];
|
||||||
surf.mipData = null;
|
surf.mipData = null;
|
||||||
|
@ -309,7 +309,7 @@ namespace FirstPlugin
|
||||||
prop.Depth = Depth;
|
prop.Depth = Depth;
|
||||||
prop.MipCount = MipCount;
|
prop.MipCount = MipCount;
|
||||||
prop.ArrayCount = ArrayCount;
|
prop.ArrayCount = ArrayCount;
|
||||||
prop.ImageSize = (uint)TextureFINF.tglp.SheetDataList[0].Length;
|
prop.ImageSize = (uint)TextureTGLP.SheetDataList[0].Length;
|
||||||
prop.Format = Format;
|
prop.Format = Format;
|
||||||
|
|
||||||
editor.Text = Text;
|
editor.Text = Text;
|
||||||
|
|
Loading…
Reference in a new issue