Remove some unused bitflag regions

cuts down memory footprint by quite a bit (bool[] is 4bytes per bool)
This commit is contained in:
Kurt 2019-01-06 22:21:25 -08:00
parent c42c019149
commit f97417fe85
2 changed files with 11 additions and 1 deletions

View file

@ -7,7 +7,16 @@ namespace PKHeX.Core
/// </summary>
public class PersonalInfoGG : PersonalInfoSM
{
public PersonalInfoGG(byte[] data) : base(data) { }
public PersonalInfoGG(byte[] data)
{
if (data.Length != SIZE)
return;
Data = data;
TMHM = GetBits(Data, 0x28, 8); // only 60 TMs used
TypeTutors = GetBits(Data, 0x38, 1); // at most 8 flags used
}
public int GoSpecies { get => BitConverter.ToUInt16(Data, 0x48); set => BitConverter.GetBytes((ushort)value).CopyTo(Data, 0x48); }
}
}

View file

@ -7,6 +7,7 @@ namespace PKHeX.Core
/// </summary>
public class PersonalInfoSM : PersonalInfoXY
{
protected PersonalInfoSM() { } // For GG
public new const int SIZE = 0x54;
public PersonalInfoSM(byte[] data)