public Actor(SaveIO.SaveReader reader, Squad squad, uint datumIndex, long offset) { _dataPosition = offset; _datumIndex = datumIndex; _squad = squad; reader.SeekTo(offset + 0x2C); _team = reader.ReadByte(); reader.SeekTo(offset + 0x343); _blind = (reader.ReadByte() == 1); _deaf = (reader.ReadByte() == 1); }
public Squad(SaveIO.SaveReader reader, uint datumIndex, long offset) { _dataPosition = offset; _datumIndex = datumIndex; reader.SeekTo(offset + 2); _flags = new BitVector32((int)reader.ReadInt16()); reader.SeekTo(offset + 0xA0); _actorIndex = reader.ReadUInt32(); reader.SeekTo(offset + 0xE7); _team = reader.ReadByte(); }
/*public override void PickUp(GameObject obj) * { * base.PickUp(obj); * * WeaponObject weapon = obj as WeaponObject; * if (weapon != null && _weapons.Count < 4) * _weapons.Add(weapon); * }*/ protected override void DoLoad(SaveIO.SaveReader reader, long start) { base.DoLoad(reader, start); reader.Seek(start + 0x1BE, SeekOrigin.Begin); _actorId = reader.ReadUInt16(); reader.Seek(start + 0x1C4, SeekOrigin.Begin); _unitFlags = new BitVector32(reader.ReadInt32()); reader.Seek(start + 0x1C8, SeekOrigin.Begin); _team = reader.ReadByte(); reader.Seek(start + 0x342, SeekOrigin.Begin); _currentWeaponIndex = reader.ReadSByte(); reader.Seek(start + 0x346, SeekOrigin.Begin); _backupWeaponIndex = reader.ReadSByte(); reader.Seek(start + 0x348, SeekOrigin.Begin); for (int i = 0; i < 4; i++) { _weaponId[i] = (ushort)(reader.ReadUInt32() & 0xFFFF); } }