Add additional game paths for later file size calculating
This commit is contained in:
parent
d1b6d51293
commit
577466dcdd
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -53,6 +53,9 @@ namespace FirstPlugin
|
||||
|
||||
public void Load(System.IO.Stream stream)
|
||||
{
|
||||
TPFileSizeTable table = new TPFileSizeTable();
|
||||
table.Read(new FileReader("G:\\Wii U\\DATA\\USA\\GAMES\\THE LEGEND OF ZELDA Twilight Princess HD[000500001019E500]\\content\\FileSizeList.txt"));
|
||||
|
||||
Text = FileName;
|
||||
|
||||
CanSave = true;
|
||||
|
@ -0,0 +1,30 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using Switch_Toolbox.Library.IO;
|
||||
using Syroot.BinaryData;
|
||||
|
||||
namespace FirstPlugin
|
||||
{
|
||||
public class TPFileSizeTable
|
||||
{
|
||||
public Dictionary<string, uint> FileSizes = new Dictionary<string, uint>();
|
||||
|
||||
public void Read(FileReader reader)
|
||||
{
|
||||
while (reader.Position < reader.BaseStream.Length)
|
||||
{
|
||||
string FileName = reader.ReadString(BinaryStringFormat.ZeroTerminated);
|
||||
string Size = reader.ReadString(BinaryStringFormat.ZeroTerminated);
|
||||
|
||||
uint sizeNum = 0;
|
||||
uint.TryParse(Size, out sizeNum);
|
||||
FileSizes.Add(FileName, sizeNum);
|
||||
|
||||
Console.WriteLine(FileName + " " + Size);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
@ -212,6 +212,7 @@
|
||||
<Compile Include="FileFormats\Audio\Archives\BFGRP.cs" />
|
||||
<Compile Include="FileFormats\Hashes\SAHT.cs" />
|
||||
<Compile Include="FileFormats\Shader\SHARCFBNX.cs" />
|
||||
<Compile Include="FileFormats\SizeLists\TPFileSizeTable.cs" />
|
||||
<Compile Include="FileFormats\Texture\BFLIM.cs" />
|
||||
<Compile Include="FileFormats\Layout\BFLAN.cs" />
|
||||
<Compile Include="FileFormats\Layout\BFLYT.cs" />
|
||||
|
@ -1 +1 @@
|
||||
00baaa26ab24ed622a4872ef7187472151f2eea3
|
||||
3b03006b7b29c0b0451fd6a30a22d1a6e904e30f
|
||||
|
Binary file not shown.
@ -163,6 +163,12 @@ namespace Switch_Toolbox.Library
|
||||
case "Mk8dGamePath":
|
||||
Runtime.Mk8dGamePath = node.InnerText;
|
||||
break;
|
||||
case "TpGamePath":
|
||||
Runtime.TpGamePath = node.InnerText;
|
||||
break;
|
||||
case "BotwGamePath":
|
||||
Runtime.BotwGamePath = node.InnerText;
|
||||
break;
|
||||
case "renderBoundingBoxes":
|
||||
bool.TryParse(node.InnerText, out Runtime.renderBoundingBoxes);
|
||||
break;
|
||||
@ -309,6 +315,8 @@ namespace Switch_Toolbox.Library
|
||||
PathsNode.AppendChild(createNode(doc, "SmoGamePath", Runtime.SmoGamePath.ToString()));
|
||||
PathsNode.AppendChild(createNode(doc, "Mk8GamePath", Runtime.Mk8GamePath.ToString()));
|
||||
PathsNode.AppendChild(createNode(doc, "Mk8dGamePath", Runtime.Mk8dGamePath.ToString()));
|
||||
PathsNode.AppendChild(createNode(doc, "TpGamePath", Runtime.TpGamePath.ToString()));
|
||||
PathsNode.AppendChild(createNode(doc, "BotwGamePath", Runtime.BotwGamePath.ToString()));
|
||||
}
|
||||
private static void AppendEditorSettings(XmlDocument doc, XmlNode parentNode)
|
||||
{
|
||||
|
@ -18,6 +18,8 @@ namespace Switch_Toolbox.Library
|
||||
public static string Mk8GamePath = "";
|
||||
public static string Mk8dGamePath = "";
|
||||
public static string SmoGamePath = "";
|
||||
public static string TpGamePath = "";
|
||||
public static string BotwGamePath = "";
|
||||
|
||||
public class ImageEditor
|
||||
{
|
||||
|
66
Toolbox/GUI/Settings.Designer.cs
generated
66
Toolbox/GUI/Settings.Designer.cs
generated
@ -33,6 +33,7 @@
|
||||
this.chkBoxNormalMap = new Switch_Toolbox.Library.Forms.STCheckBox();
|
||||
this.shadingComboBox = new System.Windows.Forms.ComboBox();
|
||||
this.panel2 = new Switch_Toolbox.Library.Forms.STPanel();
|
||||
this.displayBoundingBoxeChk = new Switch_Toolbox.Library.Forms.STCheckBox();
|
||||
this.boneXRayChk = new Switch_Toolbox.Library.Forms.STCheckBox();
|
||||
this.stLabel9 = new Switch_Toolbox.Library.Forms.STLabel();
|
||||
this.cameraMaxSpeedUD = new Switch_Toolbox.Library.Forms.NumericUpDownFloat();
|
||||
@ -94,7 +95,10 @@
|
||||
this.mk8DPathTB = new Switch_Toolbox.Library.Forms.STTextBox();
|
||||
this.stLabel10 = new Switch_Toolbox.Library.Forms.STLabel();
|
||||
this.mk8PathTB = new Switch_Toolbox.Library.Forms.STTextBox();
|
||||
this.displayBoundingBoxeChk = new Switch_Toolbox.Library.Forms.STCheckBox();
|
||||
this.stLabel13 = new Switch_Toolbox.Library.Forms.STLabel();
|
||||
this.botwGamePathTB = new Switch_Toolbox.Library.Forms.STTextBox();
|
||||
this.stLabel14 = new Switch_Toolbox.Library.Forms.STLabel();
|
||||
this.tpGamePathTB = new Switch_Toolbox.Library.Forms.STTextBox();
|
||||
this.contentContainer.SuspendLayout();
|
||||
this.panel2.SuspendLayout();
|
||||
((System.ComponentModel.ISupportInitialize)(this.cameraMaxSpeedUD)).BeginInit();
|
||||
@ -205,6 +209,16 @@
|
||||
this.panel2.Size = new System.Drawing.Size(534, 293);
|
||||
this.panel2.TabIndex = 4;
|
||||
//
|
||||
// displayBoundingBoxeChk
|
||||
//
|
||||
this.displayBoundingBoxeChk.AutoSize = true;
|
||||
this.displayBoundingBoxeChk.Location = new System.Drawing.Point(252, 183);
|
||||
this.displayBoundingBoxeChk.Name = "displayBoundingBoxeChk";
|
||||
this.displayBoundingBoxeChk.Size = new System.Drawing.Size(140, 17);
|
||||
this.displayBoundingBoxeChk.TabIndex = 31;
|
||||
this.displayBoundingBoxeChk.Text = "Display Bounding Boxes";
|
||||
this.displayBoundingBoxeChk.CheckedChanged += new System.EventHandler(this.displayBoundingBoxeChk_CheckedChanged);
|
||||
//
|
||||
// boneXRayChk
|
||||
//
|
||||
this.boneXRayChk.AutoSize = true;
|
||||
@ -910,6 +924,10 @@
|
||||
//
|
||||
// tabPage3
|
||||
//
|
||||
this.tabPage3.Controls.Add(this.stLabel13);
|
||||
this.tabPage3.Controls.Add(this.botwGamePathTB);
|
||||
this.tabPage3.Controls.Add(this.stLabel14);
|
||||
this.tabPage3.Controls.Add(this.tpGamePathTB);
|
||||
this.tabPage3.Controls.Add(this.stLabel12);
|
||||
this.tabPage3.Controls.Add(this.SMOPathTB);
|
||||
this.tabPage3.Controls.Add(this.stLabel11);
|
||||
@ -978,15 +996,41 @@
|
||||
this.mk8PathTB.TabIndex = 0;
|
||||
this.mk8PathTB.Click += new System.EventHandler(this.mk8PathTB_Click);
|
||||
//
|
||||
// displayBoundingBoxeChk
|
||||
// stLabel13
|
||||
//
|
||||
this.displayBoundingBoxeChk.AutoSize = true;
|
||||
this.displayBoundingBoxeChk.Location = new System.Drawing.Point(252, 183);
|
||||
this.displayBoundingBoxeChk.Name = "displayBoundingBoxeChk";
|
||||
this.displayBoundingBoxeChk.Size = new System.Drawing.Size(140, 17);
|
||||
this.displayBoundingBoxeChk.TabIndex = 31;
|
||||
this.displayBoundingBoxeChk.Text = "Display Bounding Boxes";
|
||||
this.displayBoundingBoxeChk.CheckedChanged += new System.EventHandler(this.displayBoundingBoxeChk_CheckedChanged);
|
||||
this.stLabel13.AutoSize = true;
|
||||
this.stLabel13.Location = new System.Drawing.Point(6, 122);
|
||||
this.stLabel13.Name = "stLabel13";
|
||||
this.stLabel13.Size = new System.Drawing.Size(98, 13);
|
||||
this.stLabel13.TabIndex = 9;
|
||||
this.stLabel13.Text = "Breath Of The Wild";
|
||||
//
|
||||
// botwGamePathTB
|
||||
//
|
||||
this.botwGamePathTB.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
|
||||
this.botwGamePathTB.Location = new System.Drawing.Point(112, 120);
|
||||
this.botwGamePathTB.Name = "botwGamePathTB";
|
||||
this.botwGamePathTB.Size = new System.Drawing.Size(258, 20);
|
||||
this.botwGamePathTB.TabIndex = 8;
|
||||
this.botwGamePathTB.TextChanged += new System.EventHandler(this.botwGamePathTB_TextChanged);
|
||||
//
|
||||
// stLabel14
|
||||
//
|
||||
this.stLabel14.AutoSize = true;
|
||||
this.stLabel14.Location = new System.Drawing.Point(6, 96);
|
||||
this.stLabel14.Name = "stLabel14";
|
||||
this.stLabel14.Size = new System.Drawing.Size(105, 13);
|
||||
this.stLabel14.TabIndex = 7;
|
||||
this.stLabel14.Text = "Twilight Princess HD";
|
||||
//
|
||||
// tpGamePathTB
|
||||
//
|
||||
this.tpGamePathTB.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
|
||||
this.tpGamePathTB.Location = new System.Drawing.Point(112, 94);
|
||||
this.tpGamePathTB.Name = "tpGamePathTB";
|
||||
this.tpGamePathTB.Size = new System.Drawing.Size(258, 20);
|
||||
this.tpGamePathTB.TabIndex = 6;
|
||||
this.tpGamePathTB.TextChanged += new System.EventHandler(this.tpGamePathTB_TextChanged);
|
||||
//
|
||||
// Settings
|
||||
//
|
||||
@ -1095,5 +1139,9 @@
|
||||
private Switch_Toolbox.Library.Forms.STLabel stLabel10;
|
||||
private Switch_Toolbox.Library.Forms.STTextBox mk8PathTB;
|
||||
private Switch_Toolbox.Library.Forms.STCheckBox displayBoundingBoxeChk;
|
||||
private Switch_Toolbox.Library.Forms.STLabel stLabel13;
|
||||
private Switch_Toolbox.Library.Forms.STTextBox botwGamePathTB;
|
||||
private Switch_Toolbox.Library.Forms.STLabel stLabel14;
|
||||
private Switch_Toolbox.Library.Forms.STTextBox tpGamePathTB;
|
||||
}
|
||||
}
|
@ -72,6 +72,9 @@ namespace Toolbox
|
||||
mk8DPathTB.Text = Runtime.Mk8dGamePath;
|
||||
mk8PathTB.Text = Runtime.Mk8GamePath;
|
||||
SMOPathTB.Text = Runtime.SmoGamePath;
|
||||
botwGamePathTB.Text = Runtime.BotwGamePath;
|
||||
tpGamePathTB.Text = Runtime.TpGamePath;
|
||||
|
||||
displayBoundingBoxeChk.Checked = Runtime.renderBoundingBoxes;
|
||||
|
||||
mk8DPathTB.ReadOnly = true;
|
||||
@ -409,6 +412,24 @@ namespace Toolbox
|
||||
}
|
||||
}
|
||||
|
||||
private void tpGamePathTB_TextChanged(object sender, EventArgs e) {
|
||||
FolderSelectDialog sfd = new FolderSelectDialog();
|
||||
if (sfd.ShowDialog() == DialogResult.OK)
|
||||
{
|
||||
SMOPathTB.Text = sfd.SelectedPath;
|
||||
Runtime.TpGamePath = SMOPathTB.Text;
|
||||
}
|
||||
}
|
||||
|
||||
private void botwGamePathTB_TextChanged(object sender, EventArgs e) {
|
||||
FolderSelectDialog sfd = new FolderSelectDialog();
|
||||
if (sfd.ShowDialog() == DialogResult.OK)
|
||||
{
|
||||
SMOPathTB.Text = sfd.SelectedPath;
|
||||
Runtime.BotwGamePath = SMOPathTB.Text;
|
||||
}
|
||||
}
|
||||
|
||||
private void displayBoundingBoxeChk_CheckedChanged(object sender, EventArgs e)
|
||||
{
|
||||
Runtime.renderBoundingBoxes = displayBoundingBoxeChk.Checked;
|
||||
|
Loading…
Reference in New Issue
Block a user