Inheritance: MissionStructure
Exemple #1
0
        internal void Read(BinaryReader reader)
        {
            reader.BaseStream.Position = Offset + 12;
            Unknowns.ReadInt32s(reader, 1);
            Unknowns.ReadInt16s(reader, 2);
            Unknowns.ReadInt32s(reader, 1);

            if (Format != null)
            {
                int length = DataLength;

                if (Format.Header != null)
                {
                    Header  = new MissionTableHeader(this, Format.Header, reader);
                    length -= Format.Header.Size;
                }

                if (length % Format.Row.Size != 0)
                {
                    throw new InvalidDataException();
                }
                int count = length / Format.Row.Size;
                for (int index = 0; index < count; index++)
                {
                    new MissionRow(this, Format.Row, reader);
                }
            }
        }
Exemple #2
0
        internal void Read(BinaryReader reader)
        {
            reader.BaseStream.Position = Offset + 12;
            Unknowns.ReadInt32s(reader, 1);
            Unknowns.ReadInt16s(reader, 2);
            Unknowns.ReadInt32s(reader, 1);

            if (Format != null) {
                int length = DataLength;

                if (Format.Header != null) {
                    Header = new MissionTableHeader(this, Format.Header, reader);
                    length -= Format.Header.Size;
                }

                if (length % Format.Row.Size != 0)
                    throw new InvalidDataException();
                int count = length / Format.Row.Size;
                for (int index = 0; index < count; index++)
                    new MissionRow(this, Format.Row, reader);
            }
        }