Beispiel #1
0
        public void ToXml(XmlTextWriter writer)
        {
            writer.WriteStartElement("Sprite");
            writer.WriteAttributeString("Slot", _number.ToString());
            writer.WriteAttributeString("Width", _width.ToString());
            writer.WriteAttributeString("Height", _height.ToString());
            writer.WriteAttributeString("ColorDepth", _colorDepth.ToString());
            writer.WriteAttributeString("Resolution", _resolution.ToString());
            writer.WriteAttributeString("AlphaChannel", _alphaChannel.ToString());

            if (_coloursLockedToRoom.HasValue)
            {
                writer.WriteAttributeString("ColoursLockedToRoom", _coloursLockedToRoom.Value.ToString());
            }

            writer.WriteStartElement("Source"); // start source
            writer.WriteElementString("FileName", _sourceFile);
            writer.WriteElementString("OffsetX", _offsetX.ToString());
            writer.WriteElementString("OffsetY", _offsetY.ToString());
            writer.WriteElementString("ImportHeight", _importHeight.ToString());
            writer.WriteElementString("ImportWidth", _importWidth.ToString());
            writer.WriteElementString("ImportAsTile", _importAsTile.ToString());
            writer.WriteElementString("Frame", _frame.ToString());
            writer.WriteElementString("RemapToGamePalette", _remapToGamePalette.ToString());
            writer.WriteElementString("RemapToRoomPalette", _remapToRoomPalette.ToString());
            writer.WriteElementString("ImportMethod", _tranparentColour.ToString());
            writer.WriteElementString("ImportAlphaChannel", _importAlphaChannel.ToString());
            writer.WriteEndElement(); // end source

            writer.WriteEndElement();
        }
Beispiel #2
0
 public void ToXml(XmlTextWriter writer)
 {
     writer.WriteStartElement("Sprite");
     writer.WriteAttributeString("Slot", _number.ToString());
     writer.WriteAttributeString("Width", _width.ToString());
     writer.WriteAttributeString("Height", _height.ToString());
     writer.WriteAttributeString("ColorDepth", _colorDepth.ToString());
     writer.WriteAttributeString("Resolution", _resolution.ToString());
     writer.WriteAttributeString("AlphaChannel", _alphaChannel.ToString());
     if (_coloursLockedToRoom.HasValue)
     {
         writer.WriteAttributeString("ColoursLockedToRoom", _coloursLockedToRoom.Value.ToString());
     }
     if (!string.IsNullOrEmpty(_sourceFile))
     {
         writer.WriteStartElement("Source");
         writer.WriteElementString("FileName", _sourceFile);
         writer.WriteEndElement();
     }
     writer.WriteEndElement();
 }