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 = (Attack_Type)br.ReadByte();
     //0x0006  1 byte Attack Type
     Attack_Power = br.ReadByte();
     //0x0007  1 byte Attack Power
     Unknown0 = br.ReadBytes(2);
     //0x0008  2 bytes Unknown
     Target = (Target)br.ReadByte();
     //0x000A  1 byte Target Info
     Attack_Flags = (Attack_Flags)br.ReadByte();
     //0x000B  1 byte Attack Flags
     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
     Statuses0 = (Persistent_Statuses)br.ReadUInt16();
     //0x0010  2 bytes status_0; //statuses 0-7
     Unknown1 = br.ReadBytes(2);
     //0x0012  2 bytes Unknown
     Statuses1 = (Battle_Only_Statuses)br.ReadUInt32();
     //0x0014  4 bytes status_1; //statuses 8-39
 }
Exemple #2
0
            public void Read(BinaryReader br, int i)
            {
                var offset = br.ReadUInt16();

                Name = Memory.Strings.Read(Strings.FileID.KERNEL, Memory.Strings.Files[Strings.FileID.KERNEL].subPositions[(int)Memory.Strings.Kernel_LocSTR[id].Item1] + offset);
                //0x0000	2 bytes Offset to name
                //br.BaseStream.Seek(2, SeekOrigin.Current);
                MagicID = (Magic_ID)br.ReadUInt16();
                //0x0002  2 bytes Magic ID
                Attack_Type = (Attack_Type)br.ReadByte();
                //0x0004  1 byte Attack type
                Attack_Power = br.ReadByte();
                //0x0005  1 byte Attack power
                Attack_Flags = (Attack_Flags)br.ReadByte();
                //0x0006  1 byte Attack flags
                Unknown0 = br.ReadByte();
                //0x0007  1 byte Unknown
                Target = (Target)br.ReadByte();
                //0x0008  1 byte Target info
                Unknown1 = br.ReadByte();
                //0x0009  1 byte Unknown
                Hit_Count = br.ReadByte();
                //0x000A  1 byte Hit Count
                Element = (Element)br.ReadByte();
                //0x000B  1 byte Element Attack
                Element_Percent = br.ReadByte();
                //0x000C  1 byte Element Attack %
                Status_Attack = br.ReadByte();
                //0x000D  1 byte Status Attack Enabler
                Statuses0 = (Persistant_Statuses)br.ReadUInt16();
                //0x000E  2 bytes status_0; //statuses 0-7
                Statuses1 = (Battle_Only_Statuses)br.ReadUInt32();
                //0x0010  4 bytes status_1; //statuses 8-39
            }
Exemple #3
0
 }                                                          //0x10	4 bytes status_1; //statuses 8-31
 public void Read(BinaryReader br, int i)
 {
     if (i == 2)
     {
         Name = Kernel_bin.BattleCommands[1].Name;
     }
     else
     {
         Name = Memory.Strings.Read(Strings.FileID.KERNEL, id, i);
     }
     br.BaseStream.Seek(2, SeekOrigin.Current);
     MagicID          = (Magic_ID)br.ReadUInt16();      //0x02	2 bytes Magic ID
     CameraChange     = br.ReadByte();                  //0x04	1 byte Camera Change
     Unknown0         = br.ReadByte();                  //0x05	1 byte Unknown
     Attack_type      = (Attack_Type)br.ReadByte();     //0x06	1 byte Attack type
     Attack_power     = br.ReadByte();                  //0x07	1 byte Attack power
     Attack_flags     = (Attack_Flags)(br.ReadByte());  //0x08	1 byte Attack flags
     Unknown1         = br.ReadByte();                  //0x09	1 byte Unknown
     Element          = (Element)br.ReadByte();         //0x0A	1 byte Element
     Unknown2         = br.ReadByte();                  //0x0B	1 byte Unknown
     StatusAttack     = br.ReadByte();                  //0x0C	1 byte Status attack enabler
     Attack_parameter = br.ReadByte();                  //0x0D	1 byte Attack Parameter
     //Statuses = new BitArray(br.ReadBytes(6));
     Statuses0 = (Persistant_Statuses)br.ReadUInt16();  //0x0E	2 bytes status_0; //statuses 0-7
     Statuses1 = (Battle_Only_Statuses)br.ReadUInt32(); //0x10	4 bytes status_1; //statuses 8-31
 }
 public void Read(BinaryReader br, byte i)
 {
     Statuses1 = (Battle_Only_Statuses)br.ReadUInt32();
     //0x0000  4 bytes Status 1
     Statuses0 = (Persistent_Statuses)br.ReadUInt16();
     //0x0004  2 bytes Status 0
     Attack_Power = br.ReadByte();
     //0x0006  1 bytes Attack Power
     Attack_Param = br.ReadByte();
     //0x0007  1 byte Attack Param
     Crisis_Level = i;
 }
 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 = (Attack_Type)br.ReadByte();
     //0x0006  1 byte Attack type
     Attack_Power = br.ReadByte();
     //0x0007  1 byte Attack power
     Attack_Flags = (Attack_Flags)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 Buttons[5];
     for (int b = 0; b < Button_Combo.Length; b++)
     {
         Button_Flags key = (Button_Flags)br.ReadUInt16();
         if (Input.Convert_Button.ContainsKey(key))
         {
             Button_Combo[b] = Input.Convert_Button[key];
         }
     }
     //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 = (Persistant_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
 }