diff --git a/PKHeX.Core/Saves/SAV8BlockIndex.cs b/PKHeX.Core/Saves/SAV8BlockIndex.cs deleted file mode 100644 index 3f458a466..000000000 --- a/PKHeX.Core/Saves/SAV8BlockIndex.cs +++ /dev/null @@ -1,26 +0,0 @@ -namespace PKHeX.Core -{ - public enum SAV8BlockIndex - { - // todo - MyItem, - Situation, - RandomGroup, - MyStatus, - PokePartySave, - EventWork, - ZukanData, - GtsData, - UnionPokemon, - Misc, - FieldMenu, - ConfigSave, - GameTime, - BOX, - BoxPokemon, - PlayTime, - FieldMoveModelSave, - Records, - Pokedex - } -} \ No newline at end of file diff --git a/PKHeX.Core/Saves/SAV4BlockDetection.cs b/PKHeX.Core/Saves/Substructures/Gen4/SAV4BlockDetection.cs similarity index 100% rename from PKHeX.Core/Saves/SAV4BlockDetection.cs rename to PKHeX.Core/Saves/Substructures/Gen4/SAV4BlockDetection.cs diff --git a/PKHeX.Core/Saves/Substructures/Gen6/BattleBox6.cs b/PKHeX.Core/Saves/Substructures/Gen6/BattleBox6.cs new file mode 100644 index 000000000..dc38d0377 --- /dev/null +++ b/PKHeX.Core/Saves/Substructures/Gen6/BattleBox6.cs @@ -0,0 +1,27 @@ +namespace PKHeX.Core +{ + public sealed class BattleBox6 : SaveBlock + { + public BattleBox6(SaveFile SAV, int offset) : base(SAV) => Offset = offset; + + private int LockedFlagOffset => Offset + (6 * PokeCrypto.SIZE_6STORED); + + public bool Locked + { + get => LockedWiFiTournament || LockedLiveTournament; + set => LockedWiFiTournament = LockedLiveTournament = value; + } + + public bool LockedWiFiTournament + { + get => (Data[LockedFlagOffset] & 1) != 0; + set => Data[LockedFlagOffset] = (byte)((Data[Offset + LockedFlagOffset] & ~1) | (value ? 1 : 0)); + } + + public bool LockedLiveTournament + { + get => (Data[LockedFlagOffset] & 2) != 0; + set => Data[LockedFlagOffset] = (byte)((Data[Offset + LockedFlagOffset] & ~2) | (value ? 2 : 0)); + } + } +} diff --git a/PKHeX.Core/Saves/Substructures/Gen6/Puff6.cs b/PKHeX.Core/Saves/Substructures/Gen6/Puff6.cs index a9a6ac50a..8d438c719 100644 --- a/PKHeX.Core/Saves/Substructures/Gen6/Puff6.cs +++ b/PKHeX.Core/Saves/Substructures/Gen6/Puff6.cs @@ -57,29 +57,4 @@ namespace PKHeX.Core Array.Reverse(Data, Offset, PuffCount); } } - - public sealed class BattleBox6 : SaveBlock - { - public BattleBox6(SaveFile SAV, int offset) : base(SAV) => Offset = offset; - - private int LockedFlagOffset => Offset + (6 * PokeCrypto.SIZE_6STORED); - - public bool Locked - { - get => LockedWiFiTournament || LockedLiveTournament; - set => LockedWiFiTournament = LockedLiveTournament = value; - } - - public bool LockedWiFiTournament - { - get => (Data[LockedFlagOffset] & 1) != 0; - set => Data[LockedFlagOffset] = (byte)((Data[Offset + LockedFlagOffset] & ~1) | (value ? 1 : 0)); - } - - public bool LockedLiveTournament - { - get => (Data[LockedFlagOffset] & 2) != 0; - set => Data[LockedFlagOffset] = (byte)((Data[Offset + LockedFlagOffset] & ~2) | (value ? 2 : 0)); - } - } -} \ No newline at end of file +} diff --git a/PKHeX.Core/Saves/SAV7BlockIndex.cs b/PKHeX.Core/Saves/Substructures/Gen7/SAV7BlockIndex.cs similarity index 100% rename from PKHeX.Core/Saves/SAV7BlockIndex.cs rename to PKHeX.Core/Saves/Substructures/Gen7/SAV7BlockIndex.cs