mirror of
https://github.com/KillzXGaming/Switch-Toolbox
synced 2024-11-22 20:43:09 +00:00
Some more bfxfnt fixes with gx2. Also fix the character selector
This commit is contained in:
parent
c9ea004446
commit
446568f641
2 changed files with 14 additions and 8 deletions
|
@ -27,10 +27,10 @@ namespace FirstPlugin
|
|||
Format = ConvertToGeneric(BFNTFormat);
|
||||
if (Format == TEX_FORMAT.BC4_UNORM)
|
||||
{
|
||||
RedChannel = STChannelType.One;
|
||||
/* RedChannel = STChannelType.One;
|
||||
GreenChannel = STChannelType.One;
|
||||
BlueChannel = STChannelType.One;
|
||||
AlphaChannel = STChannelType.Red;
|
||||
AlphaChannel = STChannelType.Red;*/
|
||||
}
|
||||
|
||||
ImageKey = "Texture";
|
||||
|
@ -78,7 +78,15 @@ namespace FirstPlugin
|
|||
Width = ftex.texture.Width;
|
||||
Height = ftex.texture.Height;
|
||||
|
||||
UpdateEditor();
|
||||
if (Format == TEX_FORMAT.BC4_UNORM)
|
||||
{
|
||||
/* RedChannel = STChannelType.One;
|
||||
GreenChannel = STChannelType.One;
|
||||
BlueChannel = STChannelType.One;
|
||||
AlphaChannel = STChannelType.Red;*/
|
||||
}
|
||||
|
||||
// UpdateEditor();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -289,12 +289,13 @@ namespace FirstPlugin.Forms
|
|||
|
||||
PanelImage = BitmapExtension.Resize(PanelImage, textureGlyph.SheetWidth, textureGlyph.SheetHeight);
|
||||
|
||||
int y = 0;
|
||||
for (int c = 0; c < (int)textureGlyph.ColumnCount; c++)
|
||||
{
|
||||
int x = 0;
|
||||
for (int r = 0; r < (int)textureGlyph.RowCount; r++)
|
||||
{
|
||||
int x = r * textureGlyph.CellWidth;
|
||||
int y = c * textureGlyph.CellHeight;
|
||||
|
||||
var rect = new Rectangle(x, y, textureGlyph.CellWidth, textureGlyph.CellHeight);
|
||||
|
||||
Cells.Add(new FontCell()
|
||||
|
@ -307,10 +308,7 @@ namespace FirstPlugin.Forms
|
|||
glyphImage.Image.Save($"Glpyh{c} {r}.png");
|
||||
images.Add(glyphImage);*/
|
||||
|
||||
|
||||
x += (int)textureGlyph.CellWidth;
|
||||
}
|
||||
y += (int)textureGlyph.CellHeight;
|
||||
}
|
||||
|
||||
GlyphImages = images.ToArray();
|
||||
|
|
Loading…
Reference in a new issue