mirror of
https://github.com/kwsch/PKHeX
synced 2025-02-17 13:58:33 +00:00
Remove some unused bitflag regions
cuts down memory footprint by quite a bit (bool[] is 4bytes per bool)
This commit is contained in:
parent
c42c019149
commit
f97417fe85
2 changed files with 11 additions and 1 deletions
|
@ -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); }
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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)
|
||||
|
|
Loading…
Add table
Reference in a new issue