public static void ChecksumsUpdate() { var save = GetSave(); var originalChecksumInfo = save.ChecksumInfo; var newSave = new SAV7SM(save.Write()); save.ChecksumInfo.Should().BeEquivalentTo(originalChecksumInfo, "because the checksum should have been modified"); save.ChecksumsValid.Should().BeTrue("because the checksum should be valid after write"); newSave.ChecksumsValid.Should().BeTrue("because the checksums should be valid after reopening the save"); newSave.ChecksumInfo.Should().BeEquivalentTo(save.ChecksumInfo, "because the checksums should be the same since write and open"); }
public static LiveHeXVersion[] GetValidVersions(SaveFile sf) { return(sf switch { SAV8SWSH _ => new[] { LiveHeXVersion.SWSH_Orion, LiveHeXVersion.SWSH_Rigel1, LiveHeXVersion.SWSH_Rigel2 }, SAV7b _ => new[] { LiveHeXVersion.LGPE_v102 }, SAV7USUM _ => new[] { LiveHeXVersion.UM_v12, LiveHeXVersion.US_v12 }, SAV7SM _ => new[] { LiveHeXVersion.SM_v12 }, SAV6AO _ => new[] { LiveHeXVersion.ORAS }, SAV6XY _ => new[] { LiveHeXVersion.XY }, _ => new[] { LiveHeXVersion.SWSH_Rigel2 } });
public BattleTree7(SAV7SM sav, int offset) : base(sav) => Offset = offset;
public const int DaycareSeedSize = 32; // 128 bits public Daycare7(SAV7SM sav, int offset) : base(sav) => Offset = offset;
public FieldMoveModelSave7(SAV7SM sav, int offset) : base(sav) => Offset = offset;
private const int ZCrystals = Berry + (4 * 72); // 30 (Case 5) public MyItem7SM(SAV7SM SAV, int offset) : base(SAV) => Offset = offset;
public FieldMenu7(SAV7SM sav, int offset) : base(sav) => Offset = offset;
public FashionBlock7(SAV7SM sav, int offset) : base(sav) => Offset = offset;
public Zukan7(SAV7SM sav, int dex, int langflag) : this(sav, dex, langflag, DexFormUtil.GetDexFormIndexSM) { }
public RecordBlock6(SAV7SM sav, int offset) : base(sav) { Offset = offset; RecordMax = Records.MaxType_SM; }
public BoxLayout7(SAV7SM sav, int offset) : base(sav) => Offset = offset;
public HallOfFame7(SAV7SM sav, int offset) : base(sav) => Offset = offset;
/* ===32 bits=== * talkSpeed:2 0,1 * battleAnim:1 2 * battleStyle:1 3 * unknown:9 4..12 * buttonMode:2 13,14 * boxStatus:1 15 * everything else: unknown */ public ConfigSave7(SAV7SM sav, int offset) : base(sav) => Offset = offset;
public JoinFesta7(SAV7SM sav, int offset) : base(sav) => Offset = offset;