diff --git a/.vs/Switch_Toolbox/v15/.suo b/.vs/Switch_Toolbox/v15/.suo index a93d9ff2..fe6348cd 100644 Binary files a/.vs/Switch_Toolbox/v15/.suo and b/.vs/Switch_Toolbox/v15/.suo differ diff --git a/.vs/Switch_Toolbox/v15/Server/sqlite3/storage.ide b/.vs/Switch_Toolbox/v15/Server/sqlite3/storage.ide index 21013d32..17015a4b 100644 Binary files a/.vs/Switch_Toolbox/v15/Server/sqlite3/storage.ide and b/.vs/Switch_Toolbox/v15/Server/sqlite3/storage.ide differ diff --git a/.vs/Switch_Toolbox/v15/Server/sqlite3/storage.ide-wal b/.vs/Switch_Toolbox/v15/Server/sqlite3/storage.ide-wal index 26eb25cc..38bc4fda 100644 Binary files a/.vs/Switch_Toolbox/v15/Server/sqlite3/storage.ide-wal and b/.vs/Switch_Toolbox/v15/Server/sqlite3/storage.ide-wal differ diff --git a/Switch_FileFormatsMain/FileFormats/BFRES/BFRESGroup.cs b/Switch_FileFormatsMain/FileFormats/BFRES/BFRESGroup.cs index 83c9e643..00aee2b3 100644 --- a/Switch_FileFormatsMain/FileFormats/BFRES/BFRESGroup.cs +++ b/Switch_FileFormatsMain/FileFormats/BFRES/BFRESGroup.cs @@ -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(); diff --git a/Switch_FileFormatsMain/FileFormats/BFRES/BfresWiiU.cs b/Switch_FileFormatsMain/FileFormats/BFRES/BfresWiiU.cs index c0c49d57..303bb4fb 100644 --- a/Switch_FileFormatsMain/FileFormats/BFRES/BfresWiiU.cs +++ b/Switch_FileFormatsMain/FileFormats/BFRES/BfresWiiU.cs @@ -99,6 +99,7 @@ namespace FirstPlugin { if (model == null) model = new FMDL(); + model.Text = mdl.Name; model.Skeleton = new FSKL(mdl.Skeleton); diff --git a/Switch_FileFormatsMain/GUI/TextureUI/Importers/GTXTextureImporter.cs b/Switch_FileFormatsMain/GUI/TextureUI/Importers/GTXTextureImporter.cs index 639d06d8..2d20a369 100644 --- a/Switch_FileFormatsMain/GUI/TextureUI/Importers/GTXTextureImporter.cs +++ b/Switch_FileFormatsMain/GUI/TextureUI/Importers/GTXTextureImporter.cs @@ -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); diff --git a/Switch_FileFormatsMain/obj/Release/DesignTimeResolveAssemblyReferences.cache b/Switch_FileFormatsMain/obj/Release/DesignTimeResolveAssemblyReferences.cache index 41eeb312..a0c7d1ff 100644 Binary files a/Switch_FileFormatsMain/obj/Release/DesignTimeResolveAssemblyReferences.cache and b/Switch_FileFormatsMain/obj/Release/DesignTimeResolveAssemblyReferences.cache differ diff --git a/Switch_FileFormatsMain/obj/Release/FirstPlugin.Plg.dll b/Switch_FileFormatsMain/obj/Release/FirstPlugin.Plg.dll index c08c5f54..1914a3d0 100644 Binary files a/Switch_FileFormatsMain/obj/Release/FirstPlugin.Plg.dll and b/Switch_FileFormatsMain/obj/Release/FirstPlugin.Plg.dll differ diff --git a/Switch_FileFormatsMain/obj/Release/FirstPlugin.Plg.pdb b/Switch_FileFormatsMain/obj/Release/FirstPlugin.Plg.pdb index 72433779..0cb53d69 100644 Binary files a/Switch_FileFormatsMain/obj/Release/FirstPlugin.Plg.pdb and b/Switch_FileFormatsMain/obj/Release/FirstPlugin.Plg.pdb differ diff --git a/Switch_FileFormatsMain/obj/Release/Switch_FileFormatsMain.csproj.GenerateResource.cache b/Switch_FileFormatsMain/obj/Release/Switch_FileFormatsMain.csproj.GenerateResource.cache index 509587c1..f9d58f71 100644 Binary files a/Switch_FileFormatsMain/obj/Release/Switch_FileFormatsMain.csproj.GenerateResource.cache and b/Switch_FileFormatsMain/obj/Release/Switch_FileFormatsMain.csproj.GenerateResource.cache differ diff --git a/Switch_FileFormatsMain/obj/Release/Switch_FileFormatsMain.csprojAssemblyReference.cache b/Switch_FileFormatsMain/obj/Release/Switch_FileFormatsMain.csprojAssemblyReference.cache index d71923e9..107e544e 100644 Binary files a/Switch_FileFormatsMain/obj/Release/Switch_FileFormatsMain.csprojAssemblyReference.cache and b/Switch_FileFormatsMain/obj/Release/Switch_FileFormatsMain.csprojAssemblyReference.cache differ diff --git a/Toolbox/Lib/Syroot.NintenTools.Bfres.dll b/Toolbox/Lib/Syroot.NintenTools.Bfres.dll index 03279db2..238a501d 100644 Binary files a/Toolbox/Lib/Syroot.NintenTools.Bfres.dll and b/Toolbox/Lib/Syroot.NintenTools.Bfres.dll differ diff --git a/Toolbox/Lib/Syroot.NintenTools.Bfres.pdb b/Toolbox/Lib/Syroot.NintenTools.Bfres.pdb index 09da0f67..bef1ffd9 100644 Binary files a/Toolbox/Lib/Syroot.NintenTools.Bfres.pdb and b/Toolbox/Lib/Syroot.NintenTools.Bfres.pdb differ