コード例 #1
0
ファイル: SaveTree.cs プロジェクト: acalius/daggerfall-unity
 /// <summary>
 /// Write Position data to a binary stream.
 /// </summary>
 /// <param name="writer">BinaryWriter positioned at start of Position data.</param>
 /// <param name="position">RecordPosition data to write.</param>
 public static void WritePosition(BinaryWriter writer, RecordPosition position)
 {
     writer.Write(position.WorldX);
     writer.Write(position.YOffset);
     writer.Write(position.YBase);
     writer.Write(position.WorldZ);
 }
コード例 #2
0
        /// <summary>
        /// Read RecordPosition data from binary stream.
        /// </summary>
        /// <param name="reader">BinaryReader positioned at start of Position data.</param>
        /// <returns>RecordPosition struct.</returns>
        public static RecordPosition ReadPosition(BinaryReader reader)
        {
            RecordPosition position = new RecordPosition();

            position.WorldX = reader.ReadInt32();
            position.WorldY = reader.ReadInt32();
            position.WorldZ = reader.ReadInt32();

            return(position);
        }
コード例 #3
0
ファイル: SaveTree.cs プロジェクト: acalius/daggerfall-unity
        /// <summary>
        /// Read RecordPosition data from binary stream.
        /// </summary>
        /// <param name="reader">BinaryReader positioned at start of Position data.</param>
        /// <returns>RecordPosition struct.</returns>
        public static RecordPosition ReadPosition(BinaryReader reader)
        {
            RecordPosition position = new RecordPosition();

            position.WorldX  = reader.ReadInt32();
            position.YOffset = reader.ReadUInt16();
            position.YBase   = reader.ReadUInt16();
            position.WorldZ  = reader.ReadInt32();

            return(position);
        }
コード例 #4
0
ファイル: SaveTree.cs プロジェクト: my0pic/daggerfall-unity
 /// <summary>
 /// Write Position data to a binary stream.
 /// </summary>
 /// <param name="writer">BinaryWriter positioned at start of Position data.</param>
 /// <param name="position">RecordPosition data to write.</param>
 public static void WritePosition(BinaryWriter writer, RecordPosition position)
 {
     writer.Write(position.WorldX);
     writer.Write(position.YOffset);
     writer.Write(position.YBase);
     writer.Write(position.WorldZ);
 }
コード例 #5
0
ファイル: SaveTree.cs プロジェクト: my0pic/daggerfall-unity
        /// <summary>
        /// Read RecordPosition data from binary stream.
        /// </summary>
        /// <param name="reader">BinaryReader positioned at start of Position data.</param>
        /// <returns>RecordPosition struct.</returns>
        public static RecordPosition ReadPosition(BinaryReader reader)
        {
            RecordPosition position = new RecordPosition();
            position.WorldX = reader.ReadInt32();
            position.YOffset = reader.ReadUInt16();
            position.YBase = reader.ReadUInt16();
            position.WorldZ = reader.ReadInt32();

            return position;
        }