Beispiel #1
0
        //========= CONSTRUCTORS =========
        #region Constructors

        /** <summary> Constructs the default attraction car header. </summary> */
        public CarHeader()
        {
            this.LastRotationFrame = 0;
            this.Reserved0x01      = new byte[3];

            this.Unknown0x04 = 0;

            this.CarSpacing    = 0;
            this.Reserved0x07  = 0;
            this.CarFriction   = 0;
            this.CarTabHeight  = 0;
            this.RiderSettings = 0;
            this.SpriteFlags   = CarSpriteFlags.None;

            this.Unknown0x0E = new byte[3];
            for (int i = 0; i < this.Unknown0x0E.Length; i++)
            {
                this.Unknown0x0E[i] = 0;
            }

            this.Flags = CarFlags.None;

            this.Reserved0x16 = new byte[59];
            for (int i = 0; i < this.Reserved0x16.Length; i++)
            {
                this.Reserved0x16[i] = 0;
            }

            this.RiderSprites     = 0;
            this.SpinningInertia  = 0;
            this.SpinningFriction = 0;

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

            this.PoweredAcceleration = 0;
            this.PoweredMaxSpeed     = 0;
            this.CarVisual           = CarVisuals.Default;
            this.UnknownSetting      = CarUnknownSettings.Default;
            this.DrawOrder           = 0;
            this.SpecialFrames       = 0;
            this.Reserved0x61        = 0;
        }
Beispiel #2
0
        //=========== READING ============
        #region Reading

        /** <summary> Reads the object header. </summary> */
        public void Read(BinaryReader reader)
        {
            this.LastRotationFrame = reader.ReadByte();

            reader.Read(this.Reserved0x01, 0, this.Reserved0x01.Length);

            this.Unknown0x04 = reader.ReadByte();

            this.CarSpacing    = reader.ReadUInt16();
            this.Reserved0x07  = reader.ReadByte();
            this.CarFriction   = reader.ReadUInt16();
            this.CarTabHeight  = reader.ReadByte();
            this.RiderSettings = reader.ReadByte();
            this.SpriteFlags   = (CarSpriteFlags)reader.ReadUInt16();

            reader.Read(this.Unknown0x0E, 0, this.Unknown0x0E.Length);

            this.Flags = (CarFlags)reader.ReadUInt64();

            reader.Read(this.Reserved0x16, 0, this.Reserved0x16.Length);

            this.RiderSprites     = reader.ReadByte();
            this.SpinningInertia  = reader.ReadByte();
            this.SpinningFriction = reader.ReadByte();

            reader.Read(this.Unknown0x57, 0, this.Unknown0x57.Length);

            this.PoweredAcceleration = reader.ReadByte();
            this.PoweredMaxSpeed     = reader.ReadByte();
            this.CarVisual           = (CarVisuals)reader.ReadByte();
            this.UnknownSetting      = (CarUnknownSettings)reader.ReadByte();
            this.DrawOrder           = reader.ReadByte();
            this.SpecialFrames       = reader.ReadByte();

            this.Reserved0x61 = reader.ReadUInt32();
        }