protected virtual void ReadCompressedHeaderData(PrimitiveReader reader) { IndexedString[] names = new IndexedString[maxPlayersCount]; for (int i = 0; i < names.Length; i++) { string asciiName = reader.ReadAsciiFixedString(playerNameLength); names[i] = new IndexedString(asciiName); } for (int i = 0; i < names.Length; i++) { names[i].Index = reader.ReadUInt32(); } PlayerNames = names; PlayerInfo[] playersData = new PlayerInfo[maxPlayersCount]; for (int i = 0; i < playersData.Length; i++) { PlayerInfo info = new PlayerInfo(); info.Active = reader.ReadUInt32() != 0; info.Human = reader.ReadUInt32() != 0; info.CivilizationId = reader.ReadUInt32(); info.Unknown = reader.ReadUInt32(); playersData[i] = info; } PlayersInfo = playersData; chUnknown1 = reader.ReadUInt32(); chUnknown2 = reader.ReadUInt8(); chUnknown3 = reader.ReadUInt32(); OriginalFilename = Utils.ReadUInt16LengthPrefixedString(reader); }
protected virtual void ReadMessages(PrimitiveReader reader) { Instructions = new IndexedString(); Hints = new IndexedString(); Victory = new IndexedString(); Loss = new IndexedString(); History = new IndexedString(); Instructions.Index = reader.ReadUInt32(); Hints.Index = reader.ReadUInt32(); Victory.Index = reader.ReadUInt32(); Loss.Index = reader.ReadUInt32(); History.Index = reader.ReadUInt32(); Instructions.rawValue = Utils.ReadUInt16LengthPrefixedString(reader); Hints.rawValue = Utils.ReadUInt16LengthPrefixedString(reader); Victory.rawValue = Utils.ReadUInt16LengthPrefixedString(reader); Loss.rawValue = Utils.ReadUInt16LengthPrefixedString(reader); History.rawValue = Utils.ReadUInt16LengthPrefixedString(reader); }