Remove duplicate PK6 class

Has been redefined elsewhere and this instance was never used.
This commit is contained in:
Kurt 2015-10-03 08:01:48 -07:00
parent 28dd4b2903
commit 08969a979c

View file

@ -3,7 +3,6 @@ using System.Data;
using System.Drawing;
using System.Drawing.Text;
using System.Linq;
using System.Text;
namespace PKHeX
{
@ -557,144 +556,6 @@ namespace PKHeX
public class Structures
{
public struct PK6
{
public uint EC;
public ushort Checksum, Sanity;
public uint PID, Experience;
public ushort Species, HeldItem, TID, SID;
public byte Ability, AbilityNumber, Nature, Gender, Form;
public bool Fateful;
public byte HP_EV, ATK_EV, DEF_EV, SPA_EV, SPD_EV, SPE_EV;
public byte HP_IV, ATK_IV, DEF_IV, SPA_IV, SPD_IV, SPE_IV;
public byte CNT_Cool, CNT_Beauty, CNT_Cute, CNT_Clever, CNT_Tough, CNT_Sheen;
public bool MARK_Circle, MARK_Triangle, MARK_Square, MARK_Heart, MARK_Star, MARK_Diamond;
public byte PKRS_Strain, PKRS_Duration;
public string Nickname, OT, CT;
public ushort Move1, Move2, Move3, Move4, Relearn1, Relearn2, Relearn3, Relearn4;
public byte Move1_PP, Move2_PP, Move3_PP, Move4_PP, Move1_PPUps, Move2_PPUps, Move3_PPUps, Move4_PPUps;
public bool isNicknamed, isEgg, notWithOT;
public byte Ball, MetLevel, OTGender, CTGender, OTFriendship, OTAffection, CTFriendship, CTAffection;
public ushort MetLocation, EggLocation;
public byte MetYear, MetMonth, MetDay, EggYear, EggMonth, EggDay;
public byte Gen4EncounterType, GameLanguage, GameVersion, ConsoleRegionID, CountryID, SubRegionID;
// Misc
public byte HitsRemaining, TrainingBag;
public PK6(byte[] pk6)
{
// Encryption Constant
EC = BitConverter.ToUInt32(pk6, 0);
Sanity = BitConverter.ToUInt16(pk6, 4);
Checksum = BitConverter.ToUInt16(pk6, 6);
// Block A
Species = BitConverter.ToUInt16(pk6, 0x08);
HeldItem = BitConverter.ToUInt16(pk6, 0x0A);
TID = BitConverter.ToUInt16(pk6, 0x0C);
SID = BitConverter.ToUInt16(pk6, 0x0E);
Experience = BitConverter.ToUInt32(pk6, 0x10);
Ability = pk6[0x14];
AbilityNumber = pk6[0x15];
HitsRemaining = pk6[0x16];
TrainingBag = pk6[0x17];
PID = BitConverter.ToUInt32(pk6, 0x18);
Nature = pk6[0x1C];
Fateful = (pk6[0x1D] % 2 == 0);
Gender = (byte)((pk6[0x1D] >> 1) & 0x3);
Form = (byte)(pk6[0x1D] >> 3);
HP_EV = pk6[0x1E];
ATK_EV = pk6[0x1F];
DEF_EV = pk6[0x20];
SPA_EV = pk6[0x22];
SPD_EV = pk6[0x23];
SPE_EV = pk6[0x21];
CNT_Cool = pk6[0x24];
CNT_Beauty = pk6[0x25];
CNT_Cute = pk6[0x26];
CNT_Clever = pk6[0x27];
CNT_Tough = pk6[0x28];
CNT_Sheen = pk6[0x29];
MARK_Circle = ((pk6[0x2A] >> 0) & 1) == 1;
MARK_Triangle = ((pk6[0x2A] >> 1) & 1) == 1;
MARK_Square = ((pk6[0x2A] >> 2) & 1) == 1;
MARK_Heart = ((pk6[0x2A] >> 3) & 1) == 1;
MARK_Star = ((pk6[0x2A] >> 4) & 1) == 1;
MARK_Diamond = ((pk6[0x2A] >> 5) & 1) == 1;
PKRS_Strain = (byte)(pk6[0x2B] >> 4);
PKRS_Duration = (byte)(pk6[0x2B] % 0x10);
// Block B
Nickname = Util.TrimFromZero(Encoding.Unicode.GetString(pk6, 0x40, 24));
// 0x58, 0x59 - Null Terminator
Move1 = BitConverter.ToUInt16(pk6, 0x5A);
Move2 = BitConverter.ToUInt16(pk6, 0x5C);
Move3 = BitConverter.ToUInt16(pk6, 0x5E);
Move4 = BitConverter.ToUInt16(pk6, 0x60);
Move1_PP = pk6[0x62];
Move2_PP = pk6[0x63];
Move3_PP = pk6[0x64];
Move4_PP = pk6[0x65];
Move1_PPUps = pk6[0x66];
Move2_PPUps = pk6[0x67];
Move3_PPUps = pk6[0x68];
Move4_PPUps = pk6[0x69];
Relearn1 = BitConverter.ToUInt16(pk6, 0x6A);
Relearn2 = BitConverter.ToUInt16(pk6, 0x6C);
Relearn3 = BitConverter.ToUInt16(pk6, 0x6E);
Relearn4 = BitConverter.ToUInt16(pk6, 0x70);
// 0x72 - Super Training Flag - Passed with buff to new form
// 0x73 - unused/unknown
uint IV32 = BitConverter.ToUInt32(pk6, 0x74);
HP_IV = (byte)(IV32 & 0x1F);
ATK_IV = (byte)((IV32 >> 5) & 0x1F);
DEF_IV = (byte)((IV32 >> 10) & 0x1F);
SPE_IV = (byte)((IV32 >> 15) & 0x1F);
SPA_IV = (byte)((IV32 >> 20) & 0x1F);
SPD_IV = (byte)((IV32 >> 25) & 0x1F);
isEgg = ((IV32 >> 30) & 1) == 1;
isNicknamed = (IV32 >> 31) == 1;
// Block C
CT = Util.TrimFromZero(Encoding.Unicode.GetString(pk6, 0x78, 24));
CTGender = pk6[0x92];
notWithOT = pk6[0x93] == 1;
CTFriendship = pk6[0xA2];
CTAffection = pk6[0xA3];
// Memory Editor edits everything else with buff in a new form
// Block D
OT = Util.TrimFromZero(Encoding.Unicode.GetString(pk6, 0xB0, 24));
// 0xC8, 0xC9 - unused
OTFriendship = pk6[0xCA];
OTAffection = pk6[0xCB];
// 0xCC, 0xCD, 0xCE, 0xCF, 0xD0 unused
EggYear = pk6[0xD1];
EggMonth = pk6[0xD2];
EggDay = pk6[0xD3];
MetYear = pk6[0xD4];
MetMonth = pk6[0xD5];
MetDay = pk6[0xD6];
// 0xD7 - unused
EggLocation = BitConverter.ToUInt16(pk6, 0xD8);
MetLocation = BitConverter.ToUInt16(pk6, 0xDA);
Ball = pk6[0xDC];
MetLevel = (byte)(pk6[0xDD] & 0x7F);
OTGender = (byte)(pk6[0xDD] >> 7);
Gen4EncounterType = pk6[0xDE];
GameVersion = pk6[0xDF];
CountryID = pk6[0xE0];
SubRegionID = pk6[0xE1];
ConsoleRegionID = pk6[0xE2];
GameLanguage = pk6[0xE3];
}
}
public struct SaveGame
{
public class Inventory