//=========== READING ============
        #region Reading

        /**<summary>Reads the object header.</summary>*/
        internal override void Read(BinaryReader reader)
        {
            long startPosition = reader.BaseStream.Position;

            Reserved0x00 = reader.ReadUInt64();
            Flags        = (AttractionFlags)reader.ReadUInt32();

            for (int i = 0; i < 3; i++)
            {
                TrackTypeList[i] = (TrackTypes)reader.ReadByte();
            }

            MinCarsPerTrain = reader.ReadByte();
            MaxCarsPerTrain = reader.ReadByte();
            CarsPerFlatRide = reader.ReadByte();

            ZeroCars    = reader.ReadByte();
            CarTabIndex = reader.ReadByte();

            DefaultCarType = (CarTypes)reader.ReadByte();
            FrontCarType   = (CarTypes)reader.ReadByte();
            SecondCarType  = (CarTypes)reader.ReadByte();
            RearCarType    = (CarTypes)reader.ReadByte();
            ThirdCarType   = (CarTypes)reader.ReadByte();

            Padding0x19 = reader.ReadByte();

            for (int i = 0; i < 4; i++)
            {
                CarTypeList[i].Read(reader);
            }

            reader.BaseStream.Position = startPosition + 0x1B2;

            Excitement = reader.ReadByte();
            Intensity  = reader.ReadByte();
            Nausea     = reader.ReadByte();
            MaxHeight  = reader.ReadByte();

            AvailableTrackSections = (TrackSections)reader.ReadUInt64();

            RideCategory          = (RideCategories)reader.ReadByte();
            RideCategoryAlternate = (RideCategories)reader.ReadByte();
            SoldItem1             = (ItemTypes)reader.ReadByte();
            SoldItem2             = (ItemTypes)reader.ReadByte();
        }
Esempio n. 2
0
        //=========== READING ============
        #region Reading

        /** <summary> Reads the object header. </summary> */
        internal override void Read(BinaryReader reader)
        {
            long startPosition = reader.BaseStream.Position;

            this.Reserved0x00 = reader.ReadUInt64();
            this.Flags        = (AttractionFlags)reader.ReadUInt32();

            for (int i = 0; i < 3; i++)
            {
                this.TrackTypeList[i] = (TrackTypes)reader.ReadByte();
            }

            this.MinCarsPerTrain = reader.ReadByte();
            this.MaxCarsPerTrain = reader.ReadByte();
            this.CarsPerFlatRide = reader.ReadByte();

            this.ZeroCars    = reader.ReadByte();
            this.CarTabIndex = reader.ReadByte();

            this.DefaultCarType = (CarTypes)reader.ReadByte();
            this.FrontCarType   = (CarTypes)reader.ReadByte();
            this.SecondCarType  = (CarTypes)reader.ReadByte();
            this.RearCarType    = (CarTypes)reader.ReadByte();
            this.ThirdCarType   = (CarTypes)reader.ReadByte();

            this.Padding0x19 = reader.ReadByte();

            for (int i = 0; i < 4; i++)
            {
                this.CarTypeList[i].Read(reader);
            }

            reader.BaseStream.Position = startPosition + 0x1B2;

            this.Excitement = reader.ReadByte();
            this.Intensity  = reader.ReadByte();
            this.Nausea     = reader.ReadByte();
            this.MaxHeight  = reader.ReadByte();

            this.AvailableTrackSections = (TrackSections)reader.ReadUInt64();

            this.RideType          = (RideTypes)reader.ReadByte();
            this.RideTypeAlternate = (RideTypes)reader.ReadByte();
            this.SoldItem1         = (ItemTypes)reader.ReadByte();
            this.SoldItem2         = (ItemTypes)reader.ReadByte();
        }
        //========= CONSTRUCTORS =========
        #region Constructors

        /**<summary>Constructs the default object header.</summary>*/
        public AttractionHeader()
        {
            Reserved0x00 = 0;

            Flags         = AttractionFlags.None;
            TrackTypeList = new TrackTypes[3];
            for (int i = 0; i < TrackTypeList.Length; i++)
            {
                TrackTypeList[i] = TrackTypes.None;
            }

            MinCarsPerTrain = 0;
            MaxCarsPerTrain = 0;
            CarsPerFlatRide = 0;

            ZeroCars    = 0;
            CarTabIndex = 0;

            DefaultCarType = CarTypes.CarType0;
            FrontCarType   = CarTypes.None;
            SecondCarType  = CarTypes.None;
            RearCarType    = CarTypes.None;
            ThirdCarType   = CarTypes.None;

            Padding0x19 = 0;

            CarTypeList = new CarHeader[4];
            for (int i = 0; i < CarTypeList.Length; i++)
            {
                CarTypeList[i] = new CarHeader();
            }

            Excitement = 0;
            Intensity  = 0;
            Nausea     = 0;
            MaxHeight  = 0;

            AvailableTrackSections = TrackSections.None;

            RideCategory          = RideCategories.None;
            RideCategoryAlternate = RideCategories.None;
            SoldItem1             = ItemTypes.None;
            SoldItem2             = ItemTypes.None;
        }
Esempio n. 4
0
        //========= CONSTRUCTORS =========
        #region Constructors

        /** <summary> Constructs the default object header. </summary> */
        public AttractionHeader()
        {
            this.Reserved0x00 = 0;

            this.Flags         = AttractionFlags.None;
            this.TrackTypeList = new TrackTypes[3];
            for (int i = 0; i < this.TrackTypeList.Length; i++)
            {
                this.TrackTypeList[i] = TrackTypes.None;
            }

            this.MinCarsPerTrain = 0;
            this.MaxCarsPerTrain = 0;
            this.CarsPerFlatRide = 0;

            this.ZeroCars    = 0;
            this.CarTabIndex = 0;

            this.DefaultCarType = CarTypes.CarType0;
            this.FrontCarType   = CarTypes.None;
            this.SecondCarType  = CarTypes.None;
            this.RearCarType    = CarTypes.None;
            this.ThirdCarType   = CarTypes.None;

            this.Padding0x19 = 0;

            this.CarTypeList = new CarHeader[4];
            for (int i = 0; i < this.CarTypeList.Length; i++)
            {
                this.CarTypeList[i] = new CarHeader();
            }

            this.Excitement = 0;
            this.Intensity  = 0;
            this.Nausea     = 0;
            this.MaxHeight  = 0;

            this.AvailableTrackSections = TrackSections.None;

            this.RideType          = RideTypes.None;
            this.RideTypeAlternate = RideTypes.None;
            this.SoldItem1         = ItemTypes.None;
            this.SoldItem2         = ItemTypes.None;
        }