mirror of
https://github.com/kwsch/PKHeX
synced 2024-12-13 22:22:34 +00:00
a681783f1a
External users shouldn't be using SaveBlock
28 lines
587 B
C#
28 lines
587 B
C#
using System.ComponentModel;
|
|
|
|
namespace PKHeX.Core;
|
|
|
|
/// <summary>
|
|
/// Base class for a savegame data reader.
|
|
/// </summary>
|
|
public abstract class SaveBlock<T> : IDataIndirect where T : SaveFile
|
|
{
|
|
protected readonly T SAV;
|
|
|
|
[Browsable(false)] public byte[] Data { get; }
|
|
[Browsable(false)] public int Offset { get; protected init; }
|
|
|
|
protected SaveBlock(T sav) : this(sav, sav.Data) { }
|
|
|
|
protected SaveBlock(T sav, byte[] data)
|
|
{
|
|
SAV = sav;
|
|
Data = data;
|
|
}
|
|
}
|
|
|
|
public interface IDataIndirect
|
|
{
|
|
int Offset { get; }
|
|
byte[] Data { get; }
|
|
}
|