mirror of
https://github.com/kwsch/PKHeX.git
synced 2026-10-02 05:28:34 -05:00
Make current box reads s8 instead of s32
https://projectpokemon.org/home/forums/topic/55168-bug-report-pkhex-unable-to-load-pokemon-platinum-save/ saves with un-initialized boxes (FF'd) have 00 FF FF FF in the first 4 bytes
This commit is contained in:
@@ -79,11 +79,11 @@ private void GetSAVOffsets()
|
||||
private static int GetBoxNameOffset(int box) => BOX_NAME + (box * BOX_NAME_LEN);
|
||||
protected override int GetBoxWallpaperOffset(int box) => BOX_WP + box;
|
||||
|
||||
// 8 bytes current & (stored count?)
|
||||
// 8 bytes current box (align 32) & (stored count?)
|
||||
public override int CurrentBox
|
||||
{
|
||||
get => BitConverter.ToInt32(Storage, BOX_END);
|
||||
set => SetData(Storage, BitConverter.GetBytes(value), BOX_END);
|
||||
get => Storage[BOX_END];
|
||||
set => Storage[BOX_END] = (byte)value;
|
||||
}
|
||||
|
||||
public int Counter
|
||||
|
||||
@@ -31,10 +31,10 @@ public abstract class SAV4Sinnoh : SAV4
|
||||
private static int GetBoxNameOffset(int box) => BOX_NAME + (box * BOX_NAME_LEN);
|
||||
protected override int GetBoxWallpaperOffset(int box) => BOX_WP + box;
|
||||
|
||||
public override int CurrentBox
|
||||
public override int CurrentBox // (align 32)
|
||||
{
|
||||
get => BitConverter.ToInt32(Storage, 0);
|
||||
set => SetData(Storage, BitConverter.GetBytes(value), 0);
|
||||
get => Storage[0];
|
||||
set => Storage[0] = (byte)value;
|
||||
}
|
||||
|
||||
public int Unknown
|
||||
|
||||
Reference in New Issue
Block a user