1
0
mirror of synced 2025-01-19 09:17:30 +01:00

Fix sub files issues

This commit is contained in:
KillzXGaming 2019-04-06 18:30:22 -04:00
parent 4865ca1a8f
commit c173edd611
13 changed files with 30 additions and 7 deletions

Binary file not shown.

View File

@ -237,6 +237,7 @@ namespace Bfres.Structs
fmdl.ModelU = new ResU.Model();
fmdl.ModelU.Name = ResourceName;
fmdl.ModelU.Shapes.Add("", new ResU.Shape());
fmdl.ModelU.Materials.Add("", new ResU.Material());
fmdl.ModelU.VertexBuffers.Add(new ResU.VertexBuffer());
var skeleton = new ResU.Skeleton();

View File

@ -99,6 +99,7 @@ namespace FirstPlugin
{
if (model == null)
model = new FMDL();
model.Text = mdl.Name;
model.Skeleton = new FSKL(mdl.Skeleton);

View File

@ -13,6 +13,7 @@ namespace FirstPlugin
{
public bool OverrideMipCounter = false;
bool IsLoaded = false;
public GTXTextureImporter()
{
InitializeComponent();
@ -68,8 +69,10 @@ namespace FirstPlugin
ImgDimComb.Items.Add(GX2.GX2SurfaceDimension.DIM_LAST);
ImgDimComb.SelectedItem = GX2.GX2SurfaceDimension.DIM_2D;
tileModeCB.SelectedItem = GX2.GX2TileMode.MODE_2D_TILED_THIN1;
tileModeCB.SelectedItem = GX2.GX2TileMode.MODE_DEFAULT;
formatComboBox.SelectedItem = GX2.GX2SurfaceFormat.T_BC1_SRGB;
IsLoaded = true;
}
public void LoadSupportedFormats(TEX_FORMAT[] Formats)
@ -150,11 +153,20 @@ namespace FirstPlugin
SelectedTexSettings.tileMode = (uint)tileModeCB.SelectedItem;
}
bool DialogShown = false;
private void formatComboBox_SelectedIndexChanged(object sender, EventArgs e)
{
if (formatComboBox.SelectedIndex > -1 && SelectedTexSettings != null)
{
SetupSettings();
if (formatComboBox.SelectedIndex != 0 && IsLoaded)
{
var result = MessageBox.Show("Warning! Only change the tile mode unless you know what you are doing!", "Texture Importer", MessageBoxButtons.OKCancel, MessageBoxIcon.Warning);
if (result == DialogResult.Cancel)
formatComboBox.SelectedIndex = 0;
}
}
}
@ -179,7 +191,7 @@ namespace FirstPlugin
MipmapNum.Value = SelectedTexSettings.MipCount;
SwizzleNum.Value = SelectedTexSettings.swizzle;
SwizzleNum.Value = SelectedTexSettings.swizzle >> 8;
}
}
@ -248,7 +260,7 @@ namespace FirstPlugin
this.SwizzleNum.ForeColor = System.Drawing.Color.White;
this.SwizzleNum.Location = new System.Drawing.Point(877, 142);
this.SwizzleNum.Maximum = new decimal(new int[] {
-1,
7,
0,
0,
0});
@ -268,10 +280,13 @@ namespace FirstPlugin
//
// tileModeCB
//
this.tileModeCB.DropDownStyle = Switch_Toolbox.Library.Forms.STComboBox.STDropDownStyle;
this.tileModeCB.BorderColor = System.Drawing.Color.Empty;
this.tileModeCB.BorderStyle = System.Windows.Forms.ButtonBorderStyle.Solid;
this.tileModeCB.ButtonColor = System.Drawing.Color.Empty;
this.tileModeCB.FormattingEnabled = true;
this.tileModeCB.Location = new System.Drawing.Point(877, 69);
this.tileModeCB.Name = "tileModeCB";
this.tileModeCB.ReadOnly = true;
this.tileModeCB.Size = new System.Drawing.Size(172, 21);
this.tileModeCB.TabIndex = 42;
this.tileModeCB.SelectedIndexChanged += new System.EventHandler(this.tileModeCB_SelectedIndexChanged);
@ -287,10 +302,13 @@ namespace FirstPlugin
//
// ImgDimComb
//
this.ImgDimComb.DropDownStyle = Switch_Toolbox.Library.Forms.STComboBox.STDropDownStyle;
this.ImgDimComb.BorderColor = System.Drawing.Color.Empty;
this.ImgDimComb.BorderStyle = System.Windows.Forms.ButtonBorderStyle.Solid;
this.ImgDimComb.ButtonColor = System.Drawing.Color.Empty;
this.ImgDimComb.FormattingEnabled = true;
this.ImgDimComb.Location = new System.Drawing.Point(875, 36);
this.ImgDimComb.Name = "ImgDimComb";
this.ImgDimComb.ReadOnly = true;
this.ImgDimComb.Size = new System.Drawing.Size(172, 21);
this.ImgDimComb.TabIndex = 40;
//
@ -356,10 +374,13 @@ namespace FirstPlugin
//
// formatComboBox
//
this.formatComboBox.DropDownStyle = Switch_Toolbox.Library.Forms.STComboBox.STDropDownStyle;
this.formatComboBox.BorderColor = System.Drawing.Color.Empty;
this.formatComboBox.BorderStyle = System.Windows.Forms.ButtonBorderStyle.Solid;
this.formatComboBox.ButtonColor = System.Drawing.Color.Empty;
this.formatComboBox.FormattingEnabled = true;
this.formatComboBox.Location = new System.Drawing.Point(875, 6);
this.formatComboBox.Name = "formatComboBox";
this.formatComboBox.ReadOnly = true;
this.formatComboBox.Size = new System.Drawing.Size(172, 21);
this.formatComboBox.TabIndex = 32;
this.formatComboBox.SelectedIndexChanged += new System.EventHandler(this.formatComboBox_SelectedIndexChanged);
@ -367,6 +388,7 @@ namespace FirstPlugin
// listViewCustom1
//
this.listViewCustom1.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64)))));
this.listViewCustom1.BorderStyle = System.Windows.Forms.BorderStyle.None;
this.listViewCustom1.Columns.AddRange(new System.Windows.Forms.ColumnHeader[] {
this.Name,
this.Format});
@ -416,7 +438,6 @@ namespace FirstPlugin
//
// pictureBox1
//
this.pictureBox1.BackColor = System.Drawing.Color.Empty;
this.pictureBox1.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("pictureBox1.BackgroundImage")));
this.pictureBox1.Dock = System.Windows.Forms.DockStyle.Left;
this.pictureBox1.Location = new System.Drawing.Point(237, 0);