Ejemplo n.º 1
0
        /// <summary>
        /// Builds driving aids value to be written
        /// </summary>
        /// <param name="drivingAid"></param>
        /// <returns></returns>
        private static byte[] _BuildDrivingAid(DrivingAid drivingAid)
        {
            byte[] returnedValue = new byte[4];
            uint   val           = BinaryTools.ToBigEndian((uint)drivingAid);

            Array2.Write4Bytes(returnedValue, 0, val);
            return(returnedValue);
        }
Ejemplo n.º 2
0
        /// <summary>
        /// Builds challenge mode value to be written
        /// </summary>
        /// <param name="challengeMode"></param>
        /// <returns></returns>
        private static byte[] _BuildChallengeMode(GameMode challengeMode)
        {
            byte[] returnedValue = new byte[4];
            uint   val           = BinaryTools.ToBigEndian((uint)challengeMode);

            Array2.Write4Bytes(returnedValue, 0, val);
            return(returnedValue);
        }
Ejemplo n.º 3
0
        /// <summary>
        /// Builds 4-byte value to be written
        /// </summary>
        /// <param name="val"></param>
        /// <returns></returns>
        private static byte[] _Build4Bytes(uint val)
        {
            byte[] returnedValue = new byte[4];

            val = BinaryTools.ToBigEndian(val);

            Array2.Write4Bytes(returnedValue, 0, val);
            return(returnedValue);
        }