mirror of
https://github.com/kwsch/PKHeX
synced 2024-11-26 22:10:21 +00:00
BDSP v1.3
This commit is contained in:
parent
434f89fa0f
commit
9aa5bbea2d
3 changed files with 11 additions and 3 deletions
|
@ -85,7 +85,7 @@ namespace PKHeX.Core
|
|||
Initialize();
|
||||
}
|
||||
|
||||
public SAV8BS() : this(new byte[SaveUtil.SIZE_G8BDSP_2], false) => SaveRevision = (int)Gem8Version.V1_2;
|
||||
public SAV8BS() : this(new byte[SaveUtil.SIZE_G8BDSP_3], false) => SaveRevision = (int)Gem8Version.V1_3;
|
||||
|
||||
private void Initialize()
|
||||
{
|
||||
|
|
|
@ -25,6 +25,12 @@ namespace PKHeX.Core
|
|||
/// </summary>
|
||||
/// <remarks><see cref="SaveUtil.SIZE_G8BDSP_2"/></remarks>
|
||||
V1_2 = 0x32, // 50
|
||||
|
||||
/// <summary>
|
||||
/// March patch.
|
||||
/// </summary>
|
||||
/// <remarks><see cref="SaveUtil.SIZE_G8BDSP_3"/></remarks>
|
||||
V1_3 = 0x34, // 52
|
||||
}
|
||||
|
||||
public static class Gem8VersionExtensions
|
||||
|
@ -38,6 +44,7 @@ namespace PKHeX.Core
|
|||
V1_0 => "-1.0.0", // Launch Revision
|
||||
V1_1 => "-1.1.0", // 1.1.0
|
||||
V1_2 => "-1.2.0", // 1.2.0
|
||||
V1_3 => "-1.2.0", // 1.3.0
|
||||
_ => throw new ArgumentOutOfRangeException(nameof(version)),
|
||||
};
|
||||
}
|
||||
|
|
|
@ -21,6 +21,7 @@ namespace PKHeX.Core
|
|||
public const int SIZE_G8BDSP = 0xE9828;
|
||||
public const int SIZE_G8BDSP_1 = 0xEDC20;
|
||||
public const int SIZE_G8BDSP_2 = 0xEED8C;
|
||||
public const int SIZE_G8BDSP_3 = 0xEF0A4;
|
||||
|
||||
public const int SIZE_G8SWSH = 0x1716B3; // 1.0
|
||||
public const int SIZE_G8SWSH_1 = 0x17195E; // 1.0 -> 1.1
|
||||
|
@ -101,7 +102,7 @@ namespace PKHeX.Core
|
|||
|
||||
private static readonly HashSet<int> Sizes = new(SizesGen2.Concat(SizesSWSH))
|
||||
{
|
||||
SIZE_G8LA, SIZE_G8LA_1, SIZE_G8BDSP, SIZE_G8BDSP_1, SIZE_G8BDSP_2,
|
||||
SIZE_G8LA, SIZE_G8LA_1, SIZE_G8BDSP, SIZE_G8BDSP_1, SIZE_G8BDSP_2, SIZE_G8BDSP_3,
|
||||
// SizesSWSH covers gen8 sizes since there's so many
|
||||
SIZE_G7SM, SIZE_G7USUM, SIZE_G7GG,
|
||||
SIZE_G6XY, SIZE_G6ORAS, SIZE_G6ORASDEMO,
|
||||
|
@ -507,7 +508,7 @@ namespace PKHeX.Core
|
|||
|
||||
private static GameVersion GetIsG8SAV_BDSP(ReadOnlySpan<byte> data)
|
||||
{
|
||||
if (data.Length is not (SIZE_G8BDSP or SIZE_G8BDSP_1 or SIZE_G8BDSP_2))
|
||||
if (data.Length is not (SIZE_G8BDSP or SIZE_G8BDSP_1 or SIZE_G8BDSP_2 or SIZE_G8BDSP_3))
|
||||
return Invalid;
|
||||
|
||||
return BDSP;
|
||||
|
|
Loading…
Reference in a new issue