Skip to content

Commit

Permalink
* Minor changes & fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
derplayer committed Aug 31, 2018
1 parent d318366 commit 6b13d3c
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 17 deletions.
7 changes: 3 additions & 4 deletions Project/About.Designer.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion Project/About.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Globalization;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
Expand All @@ -19,7 +20,7 @@ public About()

private void About_Load(object sender, EventArgs e)
{

this.labelAbout.Text += ShenmueHDTools.Version.actualVerison.ToString(CultureInfo.InvariantCulture);
}
}
}
5 changes: 3 additions & 2 deletions Project/Form1.cs
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,8 @@ public MainWindow()
if (!System.Diagnostics.Debugger.IsAttached)
{
WebClient w = new WebClient(); //TODO: Shorter Timeout Range?
w.Headers.Add("user-agent", "Mozilla/5.0 (Shenmue HD ModTools; Linux; rv:1.0) Gecko/20160408 ShenmueHD-Client/" + ShenmueHDTools.Version.actualVerison);
w.Headers.Add("user-agent", "Mozilla/5.0 (Shenmue HD ModTools v" + ShenmueHDTools.Version.actualVerison.ToString(CultureInfo.InvariantCulture) +
"; Linux; rv:1.0) Gecko/20160408 ShenmueHD-Client/" + ShenmueHDTools.Version.actualVerison.ToString(CultureInfo.InvariantCulture));
Version_JSON actualVersion;

try
Expand Down Expand Up @@ -73,7 +74,7 @@ public MainWindow()
}
}

base.Text += ShenmueHDTools.Version.actualVerison.ToString("0.0", System.Globalization.CultureInfo.InvariantCulture);
base.Text += ShenmueHDTools.Version.actualVerison.ToString(System.Globalization.CultureInfo.InvariantCulture);
}

private void ExecuteButton_Click(object sender, EventArgs e)
Expand Down
18 changes: 9 additions & 9 deletions Project/Main/Data.cs
Original file line number Diff line number Diff line change
Expand Up @@ -88,14 +88,14 @@ public List<DataEntry> LoadVFS(string path, string directory)
headerTmp.Reserved2 = reader.ReadBytes(4);
headerTmp.RenderType = reader.ReadBytes(4);
headerTmp.Reserved3 = reader.ReadBytes(4);
headerTmp.Unknown4 = reader.ReadBytes(4);
headerTmp.Unknown4 = reader.ReadBytes(4); //Hash of the header
headerTmp.Reserved4 = reader.ReadBytes(4);
headerTmp.TacSize = reader.ReadBytes(4);
headerTmp.TacSize = reader.ReadBytes(4); //Uint32 tac legth
headerTmp.Reserved5 = reader.ReadBytes(4);
headerTmp.Unknown5 = reader.ReadBytes(4);
headerTmp.Unknown5 = reader.ReadBytes(4); //filecound in tac
headerTmp.Reserved6 = reader.ReadBytes(4);
headerTmp.Unknown6 = reader.ReadBytes(4);
headerTmp.Unknown7 = reader.ReadBytes(12);
headerTmp.Unknown6 = reader.ReadBytes(4); //filecound in tac (again?)
headerTmp.Unknown7 = reader.ReadBytes(12); //unknown? seems to be uninportant? shenmue still loads tac/d stuff :)

//if (headerTmp.RenderType != "dx11") return null; //tac identifier? TODO
DataCollector.header = headerTmp;
Expand Down Expand Up @@ -407,7 +407,7 @@ private string ExtFinder(byte[] dataArray)
fileExt = ".wav";

if (semiIdentifier4 == "DXBC")
fileExt = ".dxbc";
fileExt = ".hlsl";

if (semiIdentifier4 == "PAKS") //IPAC Browser
fileExt = ".pks";
Expand All @@ -427,9 +427,9 @@ private string ExtFinder(byte[] dataArray)
//7B 0A 09
if (dataArray.Length > 0)
{
if ((dataArray[0] == 0x7B && dataArray[1] == 0x0A && dataArray[2] == 0x09)
|| (dataArray[0] == 0x7B && dataArray[1] == 0x0D && dataArray[2] == 0x0A)
|| (dataArray[0] == 0x7B && dataArray[1] == 0x09 && dataArray[2] == 0x0D))
if ((dataArray[0] == 0x7B && dataArray[1] == 0x0A)
|| (dataArray[0] == 0x7B && dataArray[1] == 0x0D)
|| (dataArray[0] == 0x7B && dataArray[1] == 0x09))
fileExt = ".json";

if (dataArray[0] == 0x12 && dataArray[1] == 0x98 && dataArray[2] == 0xEE && dataArray[3] == 0x51 && dataArray[4] == 0x40)
Expand Down
2 changes: 1 addition & 1 deletion Project/Version.cs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ namespace ShenmueHDTools
public static class Version
{
//Version
public static double actualVerison = 1.0;
public static double actualVerison = 1.01;
public static string urlversion = "https://goo.gl/pWe4jg"; //version.json for update messages
}

Expand Down

0 comments on commit 6b13d3c

Please sign in to comment.