Beispiel #1
0
 public void Save(ReadAndWrite rw, int num)
 {
     rw.Seek(rw.getStructOffset(typeof(Evo), evo_table, num * EVO_PER_POKE));
     for (int i = 0; i < EVO_PER_POKE; i++)
     {
         Evo e = evo[i];
         DataGridViewCellCollection cell = grid.Rows[i].Cells;
         e.method    = (byte)(int)cell[0].Value;
         e.padd0     = Operation.ParseByte((string)cell[1].Value);
         e.parameter = (ushort)Operation.ParseShort((string)cell[3].Value);
         e.padd1     = Operation.ParseShort((string)cell[4].Value);
         rw.Bw.Write(StructsUtil.StructToByte(e));
     }
 }
Beispiel #2
0
 public void Save(int offset, int num, ValueType obj)
 {
     byte[] data = StructsUtil.StructToByte(obj);
     WriteBytes(offset, num, data);
 }