public override void WriteValue(MapleLib.WzLib.Util.WzBinaryWriter writer) { writer.WriteStringValue("Canvas", 0x73, 0x1B); 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("Sound_DX8", 0x73, 0x1B); writer.Write((byte)0); writer.WriteCompressedInt(SoundData.Length); writer.WriteCompressedInt(0); writer.Write(SoundData); }
public override void WriteValue(MapleLib.WzLib.Util.WzBinaryWriter writer) { writer.WriteStringValue("Shape2D#Convex2D", 0x73, 0x1B); writer.WriteCompressedInt(ExtendedProperties.Length); for (int i = 0; i < ExtendedProperties.Length; i++) { ExtendedProperties[i].ExtendedProperty.WriteValue(writer); } }
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) { this.header = CreateHeader(this.frequency); 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(MapleLib.WzLib.Util.WzBinaryWriter writer) { bool bIsLuaProperty = false; if (properties.Count == 1 && properties[0] is WzLuaProperty) { bIsLuaProperty = true; } if (!bIsLuaProperty) { writer.WriteStringValue("Property", 0x73, 0x1B); } WzImageProperty.WritePropertyList(writer, properties); }
public override void WriteValue(MapleLib.WzLib.Util.WzBinaryWriter writer) { List <IExtended> extendedProps = new List <IExtended>(properties.Count); foreach (IWzImageProperty prop in properties) { if (prop is IExtended) { extendedProps.Add((IExtended)prop); } } writer.WriteStringValue("Shape2D#Convex2D", 0x73, 0x1B); writer.WriteCompressedInt(extendedProps.Count); for (int i = 0; i < extendedProps.Count; i++) { properties[i].WriteValue(writer); } }
public override void WriteValue(MapleLib.WzLib.Util.WzBinaryWriter writer) { writer.WriteStringValue("Canvas", 0x73, 0x1B); writer.Write((byte)0); if (properties.Count > 0) { writer.Write((byte)1); IWzImageProperty.WritePropertyList(writer, properties.ToArray()); } else { writer.Write((byte)0); } writer.WriteCompressedInt(PngProperty.Width); writer.WriteCompressedInt(PngProperty.Height); writer.WriteCompressedInt(PngProperty.format); writer.Write((byte)PngProperty.format2); writer.Write(0); writer.Write(PngProperty.CompressedBytes.Length + 1); writer.Write((byte)0); writer.Write(PngProperty.CompressedBytes); }
public override void WriteValue(MapleLib.WzLib.Util.WzBinaryWriter writer) { writer.WriteStringValue("Canvas", 0x73, 0x1B); writer.Write((byte)0); if (properties.Count > 0) { writer.Write((byte)1); WzImageProperty.WritePropertyList(writer, properties); } else { writer.Write((byte)0); } writer.WriteCompressedInt(PngProperty.Width); writer.WriteCompressedInt(PngProperty.Height); writer.WriteCompressedInt(PngProperty.nPixFormat); writer.Write((byte)PngProperty.nMagLevel); writer.Write((Int32)0); byte[] bytes = PngProperty.GetCompressedBytes(false); writer.Write(bytes.Length + 1); writer.Write((byte)0); writer.Write(bytes); }
public override void WriteValue(MapleLib.WzLib.Util.WzBinaryWriter writer) { writer.Write((byte)8); writer.WriteStringValue(Value, 0, 1); }
public override void WriteValue(MapleLib.WzLib.Util.WzBinaryWriter writer) { writer.WriteStringValue("Shape2D#Vector2D", 0x73, 0x1B); writer.WriteCompressedInt(X.Value); writer.WriteCompressedInt(Y.Value); }
public override void WriteValue(MapleLib.WzLib.Util.WzBinaryWriter writer) { writer.WriteStringValue("Property", 0x73, 0x1B); IWzImageProperty.WritePropertyList(writer, properties.ToArray()); }
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); } }