コード例 #1
0
 public void Read(BinaryReader br, int i)
 {
     Name = Memory.Strings.Read(Strings.FileID.KERNEL, id, i * 2);
     //0x0000	2 bytes Offset to name
     Description = Memory.Strings.Read(Strings.FileID.KERNEL, id, i * 2 + 1);
     //0x0002	2 bytes Offset to description
     br.BaseStream.Seek(4, SeekOrigin.Current);
     MagicID = (Magic_ID)br.ReadUInt16();
     //0x0004  2 bytes Magic ID
     Attack_Type = (AttackType)br.ReadByte();
     //0x0006  1 byte Attack type
     Attack_Power = br.ReadByte();
     //0x0007  1 byte Attack power
     Attack_Flags = (AttackFlags)br.ReadByte();
     //0x0008  1 byte Attack flags
     Unknown0 = br.ReadByte();
     //0x0009  1 byte Unknown
     Target = (Target)br.ReadByte();
     //0x000A  1 byte Target Info
     Unknown1 = br.ReadByte();
     //0x000B  1 bytes Unknown
     Hit_Count = br.ReadByte();
     //0x000C  1 byte Hit Count
     Element = (Element)br.ReadByte();
     //0x000D  1 byte Element Attack
     Element_Percent = br.ReadByte();
     //0x000E  1 byte Element Attack %
     Status_Attack = br.ReadByte();
     //0x000F  1 byte Status Attack Enabler
     Button_Combo = new List <IReadOnlyList <FF8TextTagKey> >(5);
     for (int b = 0; b < 5; b++)
     {
         Button_Combo.Add(Input2.Convert_Flags((Button_Flags)br.ReadUInt16()));
     }
     //0x0010  2 bytes Sequence Button 1
     //0x0012  2 bytes Sequence Button 2
     //0x0014  2 bytes Sequence Button 3
     //0x0016  2 bytes Sequence Button 4
     //0x0018  2 bytes Sequence Button 5
     Statuses0 = (Persistent_Statuses)br.ReadUInt16();
     //0x001A  2 bytes status_0; //statuses 0-7
     Statuses1 = (Battle_Only_Statuses)br.ReadUInt32();
     //0x001C  4 bytes status_1; //statuses 8-39
 }