internal void Read(IBitReader reader, uint version) { reader.PushFrameLength(20); this._Unknown1 = reader.ReadUInt32(); this._Unknown2 = reader.ReadTransform(); if (version >= 5) { this._Unknown3 = reader.ReadBoolean(); if (this._Unknown3 == true) { this._Unknown4 = reader.ReadGuid(); this._Unknown5 = reader.ReadGuid(); this._Unknown6 = reader.ReadGuid(); } } reader.PopFrameLength(); }
internal void Read(IBitReader reader) { this._Bools.Clear(); this._Ints.Clear(); this._Floats.Clear(); this._Transforms.Clear(); this._Unknown.Clear(); reader.PushFrameLength(24); var version = reader.ReadUInt16(); if (version >= 2) { var marker = reader.ReadString(); if (marker != "BioMetrics_PlotStartMarker") { throw new SaveFormatException(); } } if (version >= 1) { var falseCount = reader.ReadUInt32(version >= 4 ? 31 : 16); for (int i = 0; i < falseCount; i++) { var key = reader.ReadGuid(); this._Bools.Add(key, false); } var trueCount = reader.ReadUInt32(version >= 4 ? 31 : 16); for (int i = 0; i < trueCount; i++) { var key = reader.ReadGuid(); this._Bools.Add(key, true); } var intCount = reader.ReadUInt16(); for (int i = 0; i < intCount; i++) { var key = reader.ReadGuid(); var value = reader.ReadInt32(); this._Ints.Add(key, value); } var floatCount = reader.ReadUInt16(); for (int i = 0; i < floatCount; i++) { var key = reader.ReadGuid(); var value = reader.ReadFloat32(); this._Floats.Add(key, value); } var transformCount = reader.ReadUInt16(); for (int i = 0; i < transformCount; i++) { var key = reader.ReadGuid(); var value = reader.ReadTransform(); this._Transforms.Add(key, value); } } if (version >= 3) { var unknownCount = reader.ReadUInt16(); for (int i = 0; i < unknownCount; i++) { reader.PushFrameLength(24); var key = reader.ReadUInt32(); var value = reader.ReadGuid(); reader.PopFrameLength(); this._Unknown.Add(key, value); } } reader.PopFrameLength(); }
internal void Read(IBitReader reader) { var version = reader.ReadUInt32(); if (version > 12) { throw new SaveFormatException("unsupported version"); } this._Unknown1.Clear(); this._MemberRawData.Clear(); this._MemberSnapshots.Clear(); this._Unknown2.Clear(); this._Unknown3.Clear(); this._Unknown5.Clear(); this._Unknown7.Clear(); if (version >= 1) { var unknown1Count = reader.ReadUInt16(); for (int i = 0; i < unknown1Count; i++) { reader.PushFrameLength(24); this._Unknown1.Add(reader.ReadUInt32()); if (version < 2) { throw new NotImplementedException(); } reader.PopFrameLength(); } var progressionDataCount = reader.ReadUInt16(); for (int i = 0; i < progressionDataCount; i++) { var progressionData = new PartyMemberRawData(); progressionData.Read(reader, version); this._MemberRawData.Add(progressionData); } if (version >= 7) { var progressionSnapshotCount = reader.ReadUInt16(); for (int i = 0; i < progressionSnapshotCount; i++) { var progressionSnapshot = new PartyMemberSnapshot(); progressionSnapshot.Read(reader, version); this._MemberSnapshots.Add(progressionSnapshot); } } if (version < 4) { var unknown2Count = reader.ReadUInt16(); for (int i = 0; i < unknown2Count; i++) { this._Unknown2.Add(reader.ReadUInt32()); } var unknown3Count = reader.ReadUInt16(); for (int i = 0; i < unknown3Count; i++) { this._Unknown3.Add(reader.ReadUInt32()); } } if (version >= 10) { for (int i = 0; i < 4; i++) { this._Unknown4[i] = reader.ReadUInt32(); } } var unknown5Count = reader.ReadUInt16(); for (int i = 0; i < unknown5Count; i++) { var unknown5 = new PartySquadUnknown3(); unknown5.Read(reader, version); this._Unknown5.Add(unknown5); } if (version >= 3) { this._Unknown6 = reader.ReadUInt32(); } if (version >= 8) { var unknown7Count = reader.ReadUInt16(); for (int i = 0; i < unknown7Count; i++) { this._Unknown7.Add(reader.ReadUInt32()); } } if (version >= 12) { this._Unknown8 = reader.ReadTransform(); } } }