Skip to content

Commit

Permalink
Merge pull request #3 from xombiemp/master
Browse files Browse the repository at this point in the history
Fix Hero's Path file conversion.
  • Loading branch information
DeltaJordan authored Mar 23, 2019
2 parents 7f072bd + 0919778 commit 20adfcc
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions BotWSaveManager.Conversion/Save.cs
Original file line number Diff line number Diff line change
Expand Up @@ -168,6 +168,19 @@ public Dictionary<string, byte[]> ConvertSave(string outputLocation = null)
{
for (int h = 0; h < ms.Length / 4; h++)
{
if (file.Contains("trackblock") && h == 0)
{
br.BaseStream.Position = 4;
byte[] reverseHeader = br.ReadBytes(2);

Array.Reverse(reverseHeader);

BinaryWriter endianUpd = new BinaryWriter(ms);
ms.Position = 4;
endianUpd.Write(reverseHeader);
h = 2;
}

br.BaseStream.Position = h * 4;
byte[] endianConv = br.ReadBytes(4);

Expand Down

0 comments on commit 20adfcc

Please sign in to comment.