Esempio n. 1
0
        // ---- CONSTRUCTORS & DESTRUCTOR ------------------------------------------------------------------------------

        internal VehicleInfo(Stream stream)
        {
            XorStream xorStream = new XorStream(stream, _key);

            DisplayName = xorStream.ReadFixedString(_maxDisplayNameLength);
            Name        = xorStream.ReadFixedString(_maxNameLength);
            ImageFile1  = xorStream.ReadFixedString(_maxImageFile1Length);
            ImageFile2  = xorStream.ReadFixedString(_maxImageFile2Length);
            ImageFile3  = xorStream.ReadFixedString(_maxImageFile3Length);
            uint runtime = xorStream.ReadUInt32();
        }
Esempio n. 2
0
        // ---- CONSTRUCTORS & DESTRUCTOR ------------------------------------------------------------------------------

        internal CircuitInfo(Stream stream)
        {
            XorStream xorStream = new XorStream(stream, _key);

            Name        = xorStream.ReadFixedString(_maxNameLength);
            DisplayName = xorStream.ReadFixedString(_maxDisplayNameLength);
            ImageFile1  = xorStream.ReadFixedString(_maxImageFile1Length);
            ImageFile2  = xorStream.ReadFixedString(_maxImageFile2Length);
            ImageFile3  = xorStream.ReadFixedString(_maxImageFile3Length);
            Flags       = (CircuitFlags)xorStream.ReadByte();
            Version     = (byte)xorStream.ReadByte();
            ID          = (byte)xorStream.ReadByte();
            byte alignment1 = (byte)xorStream.ReadByte();

            Length = xorStream.ReadInt32();
            Laps   = (byte)xorStream.ReadByte();
            Level  = (byte)xorStream.ReadByte();
            ushort alignment2 = xorStream.ReadUInt16();
            uint   runtime    = xorStream.ReadUInt32();
        }