internal static void WritePropertyList(WzBinaryWriter writer, List <WzImageProperty> properties) { if (properties.Count == 1 && properties[0] is WzLuaProperty) { properties[0].WriteValue(writer); } else { writer.WriteStringValue("Property", 0x73, 0x1B); writer.Write((ushort)0); writer.WriteCompressedInt(properties.Count); for (int i = 0; i < properties.Count; i++) { writer.WriteStringValue(properties[i].Name, 0x00, 0x01); if (properties[i] is WzExtended) { WriteExtendedValue(writer, (WzExtended)properties[i]); } else { properties[i].WriteValue(writer); } } } }
public override void WriteValue(WzBinaryWriter writer) { writer.WriteStringValue("Canvas", WzImage.WzImageHeaderByte_WithoutOffset, WzImage.WzImageHeaderByte_WithOffset); writer.Write((byte)0); if (properties.Count > 0) // subproperty in the canvas { writer.Write((byte)1); WzImageProperty.WritePropertyList(writer, properties); } else { writer.Write((byte)0); } // Image info writer.WriteCompressedInt(PngProperty.Width); writer.WriteCompressedInt(PngProperty.Height); writer.WriteCompressedInt(PngProperty.Format); writer.Write((byte)PngProperty.Format2); writer.Write((Int32)0); // Write image byte[] bytes = PngProperty.GetCompressedBytes(false); writer.Write(bytes.Length + 1); writer.Write((byte)0); // header? see WzImageProperty.ParseExtendedProp "0x00" writer.Write(bytes); }
public override void WriteValue(WzBinaryWriter writer) { writer.WriteStringValue("Canvas", 0x73, 0x1B); writer.Write((byte)0); if (WzProperties.Count > 0) { writer.Write((byte)1); WritePropertyList(writer, WzProperties); } else { writer.Write((byte)0); } writer.WriteCompressedInt(PngProperty.Width); writer.WriteCompressedInt(PngProperty.Height); writer.WriteCompressedInt(PngProperty.Format1); writer.Write((byte)PngProperty.Format2); writer.Write(0); var bytes = PngProperty.GetCompressedBytes(false); writer.Write(bytes.Length + 1); writer.Write((byte)0); writer.Write(bytes); }
public override void WriteValue(WzBinaryWriter writer) { var extendedProps = _properties.Where(x => x is WzExtended).ToList(); writer.WriteStringValue("Shape2D#Convex2D", 0x73, 0x1B); writer.WriteCompressedInt(extendedProps.Count); extendedProps.ForEach(x => x.WriteValue(writer)); }
public override void WriteValue(WzBinaryWriter writer) { writer.WriteStringValue("Sound_DX8", 0x73, 0x1B); writer.Write((byte)0); writer.WriteCompressedInt(SoundData.Length); writer.WriteCompressedInt(0); writer.Write(SoundData); }
public override void WriteValue(WzBinaryWriter pWriter) { byte[] data = GetBytes(); pWriter.WriteStringValue("Sound_DX8", 0x73, 0x1B); pWriter.Write((byte)0); pWriter.WriteCompressedInt(data.Length); pWriter.WriteCompressedInt(0); pWriter.Write(data); }
public override void WriteValue(WzBinaryWriter pWriter) { pWriter.WriteStringValue("Shape2D#Convex2D", 0x73, 0x1B); pWriter.WriteCompressedInt(mProperties.Count); foreach (AWzImageProperty prop in mProperties) { prop.WriteValue(pWriter); } }
internal static void WritePropertyList(WzBinaryWriter writer, IWzImageProperty[] properties) { writer.Write((ushort)0); writer.WriteCompressedInt(properties.Length); for (int i = 0; i < properties.Length; i++) { writer.WriteStringValue(properties[i].Name, 0x00, 0x01); properties[i].WriteValue(writer); } }
public override void WriteValue(WzBinaryWriter writer) { byte[] data = GetBytes(false); writer.WriteStringValue("Sound_DX8", WzImage.WzImageHeaderByte_WithoutOffset, WzImage.WzImageHeaderByte_WithOffset); writer.Write((byte)0); writer.WriteCompressedInt(data.Length); writer.WriteCompressedInt(len_ms); writer.Write(header); writer.Write(data); }
public override void WriteValue(WzBinaryWriter writer) { byte[] data = GetBytes(false); writer.WriteStringValue("Sound_DX8", 0x73, 0x1B); writer.Write((byte)0); writer.WriteCompressedInt(data.Length); writer.WriteCompressedInt(len_ms); writer.Write(header); writer.Write(data); }
public override void WriteValue(WzBinaryWriter writer) { bool bIsLuaProperty = false; if (properties.Count == 1 && properties[0] is WzLuaProperty) { bIsLuaProperty = true; } if (!bIsLuaProperty) { writer.WriteStringValue("Property", WzImage.WzImageHeaderByte_WithoutOffset, WzImage.WzImageHeaderByte_WithOffset); } WzImageProperty.WritePropertyList(writer, properties); }
internal static void WritePropertyList(WzBinaryWriter pWriter, List <AWzImageProperty> pProperties) { pWriter.Write((ushort)0); pWriter.WriteCompressedInt(pProperties.Count); foreach (AWzImageProperty prop in pProperties) { pWriter.WriteStringValue(prop.Name, 0x00, 0x01); if (prop is IExtended) { WriteExtendedProperty(pWriter, prop); } else { prop.WriteValue(pWriter); } } }
internal static void WritePropertyList(WzBinaryWriter writer, List <IWzImageProperty> properties) { writer.Write((ushort)0); writer.WriteCompressedInt(properties.Count); for (int i = 0; i < properties.Count; i++) { writer.WriteStringValue(properties[i].Name, 0x00, 0x01); if (properties[i] is IExtended) { WriteExtendedValue(writer, (IExtended)properties[i]); } else { properties[i].WriteValue(writer); } } }
public override void WriteValue(WzBinaryWriter writer) { List <WzExtended> extendedProps = new List <WzExtended>(properties.Count); foreach (WzImageProperty prop in properties) { if (prop is WzExtended) { extendedProps.Add((WzExtended)prop); } } writer.WriteStringValue("Shape2D#Convex2D", WzImage.WzImageHeaderByte_WithoutOffset, WzImage.WzImageHeaderByte_WithOffset); writer.WriteCompressedInt(extendedProps.Count); foreach (WzImageProperty imgProperty in properties) { imgProperty.WriteValue(writer); } }
/// <summary> /// Gets a wz property by it's name /// </summary> /// <param name="pWriter">The name of the property</param> /// <returns>The wz property with the specified name</returns> public override void WriteValue(WzBinaryWriter pWriter) { pWriter.WriteStringValue("Canvas", 0x73, 0x1B); pWriter.Write((byte)0); if (mProperties.Count > 0) { pWriter.Write((byte)1); WritePropertyList(pWriter, mProperties); } else { pWriter.Write((byte)0); } pWriter.WriteCompressedInt(PngProperty.Width); pWriter.WriteCompressedInt(PngProperty.Height); pWriter.WriteCompressedInt(PngProperty.mFormat); pWriter.Write((byte)PngProperty.mFormat2); pWriter.Write(0); byte[] bytes = PngProperty.GetCompressedBytes(); pWriter.Write(bytes.Length + 1); pWriter.Write((byte)0); pWriter.Write(bytes); }
internal static void WritePropertyList(WzBinaryWriter writer, List <WzImageProperty> properties) { if (properties.Count == 1 && properties[0] is WzLuaProperty) { properties[0].WriteValue(writer); } else { writer.Write((ushort)0); writer.WriteCompressedInt(properties.Count); foreach (WzImageProperty imgProperty in properties) { writer.WriteStringValue(imgProperty.Name, 0x00, 0x01); if (imgProperty is WzExtended extended) { WriteExtendedValue(writer, extended); } else { imgProperty.WriteValue(writer); } } } }
public override void WriteValue(WzBinaryWriter writer) { writer.WriteStringValue("UOL", WzImage.WzImageHeaderByte_WithoutOffset, WzImage.WzImageHeaderByte_WithOffset); writer.Write((byte)0); writer.WriteStringValue(Value, 0, 1); }
public override void WriteValue(WzBinaryWriter writer) { writer.WriteStringValue("Shape2D#Vector2D", WzImage.WzImageHeaderByte_WithoutOffset, WzImage.WzImageHeaderByte_WithOffset); writer.WriteCompressedInt(X.Value); writer.WriteCompressedInt(Y.Value); }
public override void WriteValue(WzBinaryWriter pWriter) { pWriter.WriteStringValue("UOL", 0x73, 0x1B); pWriter.Write((byte)0); pWriter.WriteStringValue(Value, 0, 1); }
public override void WriteValue(WzBinaryWriter writer) { writer.WriteStringValue("Shape2D#Vector2D", 0x73, 0x1B); writer.WriteCompressedInt(X.Value); writer.WriteCompressedInt(Y.Value); }
public override void WriteValue(WzBinaryWriter pWriter) { pWriter.WriteStringValue("Property", 0x73, 0x1B); WritePropertyList(pWriter, mProperties); }
public override void WriteValue(WzBinaryWriter pWriter) { pWriter.Write((byte)8); pWriter.WriteStringValue(Value, 0, 1); }