Exemplo n.º 1
0
 /// <summary>
 /// Determines whether or not the given file is a save file for Pokémon Mystery Dungeon: Explorers of Time and Darkness.
 /// </summary>
 /// <param name="file">The file to be checked</param>
 /// <returns>A boolean indicating whether or not the given file is supported by this class</returns>
 public virtual async Task <bool> IsOfType(GenericFile file)
 {
     if (file.Length > Offsets.ChecksumEnd)
     {
         return(await file.ReadUInt32Async(0) == Checksums.Calculate32BitChecksum(file, 4, Offsets.ChecksumEnd));
     }
     else
     {
         return(false);
     }
 }
Exemplo n.º 2
0
 /// <summary>
 /// Calculates the checksum of the backup save
 /// </summary>
 public virtual uint CalculateSecondaryChecksum()
 {
     return(Checksums.Calculate32BitChecksum(Bits, Offsets.BackupSaveStart + 4, Offsets.BackupSaveStart + Offsets.ChecksumEnd));
 }
Exemplo n.º 3
0
 /// <summary>
 /// Calculates the checksum of the primary save
 /// </summary>
 public virtual uint CalculatePrimaryChecksum()
 {
     return(Checksums.Calculate32BitChecksum(Bits, 4, Offsets.ChecksumEnd));
 }
Exemplo n.º 4
0
 /// <summary>
 /// Calculates the checksum of the QuickSave
 /// </summary>
 public uint CalculateQuicksaveChecksum()
 {
     return(Checksums.Calculate32BitChecksum(Bits, Offsets.QuicksaveChecksumStart, Offsets.QuicksaveChecksumEnd));
 }