Skip to content

Commit

Permalink
Fixed gibdt, mapbdt, hkxbdt and tpfbdt files not being unpacked corre…
Browse files Browse the repository at this point in the history
…ctly
  • Loading branch information
Atvaark committed Feb 27, 2015
1 parent 046c287 commit 6badb91
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 7 deletions.
4 changes: 2 additions & 2 deletions BinderTool.Core/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,5 @@
[assembly: AssemblyCulture("")]
[assembly: ComVisible(false)]
[assembly: Guid("615e60b8-3eb0-4f54-ad9b-4fa1a9fe0df0")]
[assembly: AssemblyVersion("0.1.0.0")]
[assembly: AssemblyFileVersion("0.1.0.0")]
[assembly: AssemblyVersion("0.1.1.0")]
[assembly: AssemblyFileVersion("0.1.1.0")]
5 changes: 2 additions & 3 deletions BinderTool/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -310,15 +310,14 @@ private static void UnpackDcxFile(string dcxPath, string outputPath)
private static void UnpackBdf4File(string bdfPath, string outputPath)
{
var bdfDirectory = Path.GetDirectoryName(bdfPath);
var fileNameWithoutExtension = Path.GetFileNameWithoutExtension(bdfPath);
// TODO: Add a command line option to specify the bhf file. (Since bhf4 and bdf4 have different hashes)

var bhf4FilePath = Path.Combine(bdfDirectory, fileNameWithoutExtension + ".bhd");
var bhf4FilePath = bdfPath.Substring(0, bdfPath.Length - 3) + "bhd";

if (File.Exists(bhf4FilePath) == false)
{
// HACK: Adding 132 to a hash of a text that ends with XXX.bdt will give you the hash of XXX.bhd.
string[] split = fileNameWithoutExtension.Split('_');
string[] split = Path.GetFileNameWithoutExtension(bdfPath).Split('_');
uint hash;
if (uint.TryParse(split[0], out hash))
{
Expand Down
4 changes: 2 additions & 2 deletions BinderTool/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,5 @@
[assembly: AssemblyCulture("")]
[assembly: ComVisible(false)]
[assembly: Guid("5d388695-6078-4404-8f5a-0bb1a94df97b")]
[assembly: AssemblyVersion("0.1.0.0")]
[assembly: AssemblyFileVersion("0.1.0.0")]
[assembly: AssemblyVersion("0.1.1.0")]
[assembly: AssemblyFileVersion("0.1.1.0")]

0 comments on commit 6badb91

Please sign in to comment.