Exemple #1
0
        protected virtual void ReadPlayerData3(PrimitiveReader reader)
        {
            uint playersCount = reader.ReadUInt32();

            PlayerData3[] players = new PlayerData3[8];
            for (int i = 0; i < players.Length; i++)
            {
                players[i] = PlayerData3.ReadFrom(reader, Version1, Version2);
            }
        }
Exemple #2
0
        public static PlayerData3 ReadFrom(PrimitiveReader reader, Version version1, Version version2)
        {
            PlayerData3 data = new PlayerData3();

            data.ConstantName   = Utils.ReadUInt16LengthPrefixedString(reader);
            data.InitialCameraX = reader.ReadFloat32();
            data.InitialCameraY = reader.ReadFloat32();
            data.Unknown1       = reader.ReadInt16();
            data.Unknown2       = reader.ReadInt16();
            data.AlliedVictory  = reader.ReadUInt8();
            ushort diplomacyCount = reader.ReadUInt16();

            data.DiplomacyCount = diplomacyCount;
            byte[] diplomacy1 = reader.ReadBytes(diplomacyCount);
            uint[] diplomacy2 = new uint[diplomacyCount];
            if (version1.Minor >= 9)
            {
                for (int i = 0; i < diplomacy2.Length; i++)
                {
                    diplomacy2[i] = reader.ReadUInt32();
                }
            }
            data.Diplomacy1 = diplomacy1;
            data.Diplomacy2 = diplomacy2;
            if (version1.Minor >= 18)
            {
                data.ColourId = reader.ReadUInt32();
            }
            float  unknown3 = reader.ReadFloat32();
            ushort unknown4 = reader.ReadUInt16();

            data.Unknown3 = unknown3;
            data.Unknown4 = unknown4;
            if (unknown3 == 2f)
            {
                data.Unknown5 = reader.ReadBytes(8);
            }
            byte[][] unknown6 = new byte[unknown4][];
            for (int i = 0; i < unknown6.Length; i++)
            {
                unknown6[i] = reader.ReadBytes(44);
            }
            data.Unknown6 = unknown6;
            data.Unknown7 = reader.ReadBytes(7);
            data.Unknown8 = reader.ReadInt32();
            return(data);
        }
Exemple #3
0
        static void ReadPlayerData3(PrimitiveReader reader)
        {
            //System.Diagnostics.Debugger.Break();
            uint playersCount = reader.ReadUInt32();

            PlayerData3[] players = new PlayerData3[8];
            for (int i = 0; i < players.Length; i++)
            {
                                #if DEBUG_ALPHA
                players[i] = PlayerData3.ReadFrom2(reader, vv1, vv2);
                                #else
                players[i] = PlayerData3.ReadFrom(reader, vv1, vv2);
                                #endif
            }
            //System.Diagnostics.Debugger.Break();
            if (minorVersion >= 18)
            {
                double unknown = reader.ReadFloat64();
            }
        }