Example #1
0
 /// <summary>
 /// Write a single field to stream.
 /// </summary>
 /// <param name="bw">Binary Writer to use.</param>
 public void Write(DhBinaryWriter bw)
 {
     bw.WriteU32(Hash);
     bw.WriteU32(Bitmask);
     bw.WriteU16(Offset);
     bw.WriteS8(Shift);
     bw.WriteU8((byte)Type);
 }
Example #2
0
        /// <summary>
        /// Write a single texture with specified Binary Writer.
        /// </summary>
        /// <param name="bw">Binary Writer to use.</param>
        public void Write(DhBinaryWriter bw)
        {
            // Write texture width.
            bw.WriteU16(Width);

            // Write texture width.
            bw.WriteU16(Height);

            // Write texture format.
            bw.WriteU8((byte)Format);

            // Write texture unknown 1. (Flags?)
            bw.WriteU8(AlphaFlag);

            // Write texture unknown 2. (Padding)
            bw.WriteU16(Unknown1);

            // Write texture data offset.
            bw.WriteU32(DataOffset);
        }
Example #3
0
        /// <summary>
        /// Write a single field to stream.
        /// </summary>
        /// <param name="bw">Binary Writer to use.</param>
        public void Write(DhBinaryWriter bw)
        {
            // Write the field's hash.
            bw.WriteU32(Hash);

            // Write the field's bitmask.
            bw.WriteU32(Bitmask);

            // Write the field's offset.
            bw.WriteU16(Offset);

            // Write the field's shift.
            bw.WriteS8(Shift);

            // Write the field's type.
            bw.WriteU8((byte)Type);
        }