Skip to content

Commit

Permalink
Fix G5 save box r/w
Browse files Browse the repository at this point in the history
There's a 0x10 byte gap in between each box (presumably updateCounter
and Checksum)
  • Loading branch information
kwsch committed May 17, 2016
1 parent a6d94f2 commit 06f615b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Misc/SAV5.cs
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ public PK5[] BoxData
PK5[] data = new PK5[24 * 30];
for (int i = 0; i < data.Length; i++)
{
data[i] = getPK5Stored(Box + PK5.SIZE_STORED * i);
data[i] = getPK5Stored(Box + i/30 * 0x10 + PK5.SIZE_STORED * i);
data[i].Identifier = $"B{(i / 30 + 1).ToString("00")}:{(i % 30 + 1).ToString("00")}";
}
return data;
Expand All @@ -77,7 +77,7 @@ public PK5[] BoxData
throw new ArgumentException("Expected 720, got " + value.Length);

for (int i = 0; i < value.Length; i++)
setPK5Stored(value[i], Box + PK5.SIZE_STORED * i);
setPK5Stored(value[i], Box + i/30 * 0x10 + PK5.SIZE_STORED * i);
}
}
public PK5[] PartyData
Expand Down

0 comments on commit 06f615b

Please sign in to comment.