Esempio n. 1
0
 public void Save(BinaryWriter writer, PSDLFile parent)
 {
     writer.Write((ushort)parent.GetFloatIndex(Height));
     writer.Write((ushort)parent.GetFloatIndex(TextureScale));
     writer.Write((ushort)parent.GetVertexIndex(Vertices[0]));
     writer.Write((ushort)parent.GetVertexIndex(Vertices[1]));
 }
Esempio n. 2
0
 public void Save(BinaryWriter writer, PSDLFile parent)
 {
     writer.Write((ushort)parent.GetFloatIndex(BottomHeight));
     writer.Write((ushort)parent.GetFloatIndex(TopHeight));
     writer.Write(UTiling);
     writer.Write(VTiling);
     writer.Write((ushort)parent.GetVertexIndex(Vertices[0]));
     writer.Write((ushort)parent.GetVertexIndex(Vertices[1]));
 }
Esempio n. 3
0
 public void Save(BinaryWriter writer, PSDLFile parent)
 {
     for (var i = 0; i < 4; i++)
     {
         writer.Write((ushort)parent.GetVertexIndex(Vertices[i]));
     }
 }
        public void Save(BinaryWriter writer, PSDLFile parent)
        {
            var subType = Subtype;

            if (subType == 0)
            {
                var bias = 0;
                if (IsStartCap || IsEndCap)
                {
                    bias += 1;
                }

                bias += (Vertices.Count / 2);

                writer.Write((ushort)bias);
            }

            if (IsStartCap)
            {
                writer.Write((ushort)0);
                writer.Write((ushort)0);
            }
            else if (IsEndCap)
            {
                writer.Write((ushort)1);
                writer.Write((ushort)1);
            }

            for (var i = 0; i < Vertices.Count; i++)
            {
                writer.Write((ushort)parent.GetVertexIndex(Vertices[i]));
            }
        }
Esempio n. 5
0
        public void Save(BinaryWriter writer, PSDLFile parent)
        {
            //write count if applicable
            var subtype = Subtype;

            if (subtype == 0)
            {
                writer.Write((ushort)(Vertices.Count / 4));
            }

            //write indices
            for (var i = 0; i < Vertices.Count; i++)
            {
                writer.Write((ushort)parent.GetVertexIndex(Vertices[i]));
            }
        }
Esempio n. 6
0
        public void Save(BinaryWriter writer, PSDLFile parent)
        {
            //write count if applicable
            var subtype = Subtype;

            if (subtype == 0)
            {
                writer.Write((ushort)(Vertices.Count / 6));
            }

            writer.Write((byte)(((byte)DividerFlags << 2) | (byte)DividerType));
            writer.Write(DividerTexture);
            writer.Write(Value);

            //write indices
            for (var i = 0; i < Vertices.Count; i++)
            {
                writer.Write((ushort)parent.GetVertexIndex(Vertices[i]));
            }
        }