private void StoreMisc(int i) { int j = 12 * i; gs.StoreByte(j, mc.prus); gs.StoreByte(j + 1, mc.met); gs.StoreUShort(j + 2, mc.origins); gs.StoreUInt(j + 4, mc.IvEggAbility); gs.StoreUInt(j + 8, mc.ribbons); }
void Checksum() { uint sum = 0; for (int off = 0; off < data.Length; off += 4) { sum += gs.GetUInt(off); } ushort part1 = (ushort)(sum >> 16); ushort part2 = (ushort)(sum & 0xFFFF); ushort res = (ushort)(part1 + part2); gs.StoreUShort(0x0FF6, res); }