Example #1
0
        public void ProcessWideTextureNode(FileName fn, WidePart widePart)
        {
            try
            {
                XmlElement layerNode = (XmlElement)_layersNode.SelectSingleNode(fn.GetWideNodeName(widePart));

                if (layerNode == null)
                {
                    layerNode = _sceneXmlDoc.CreateElement(fn.GetWideNodeName(widePart));

                    layerNode.SetAttribute("texture_name", fn.GetWideTextureName(widePart));

                    layerNode.SetAttribute("texture_pack", _buildOptions.sceneName + "/" + _builderConfig.TexturePackName);

                    _layersNode.AppendChild(layerNode);
                }
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message, "Error on " + fn.FullFileName);

                throw ex;
            }
        }
Example #2
0
        private void AddWideScreenNode(FileName fn, WidePart widePart)
        {
            try
            {
                XmlElement textureNode = null;

                textureNode = texturePackDoc.CreateElement("texture");

                textureNode.SetAttribute("name", fn.GetWideTextureName(widePart));
                textureNode.SetAttribute(GetWidePartAttribute(widePart), _buildOptions.srcFolder + "\\" + fn.FileNameWithoutExtension);

                textureNode.SetAttribute("frame_count", "1");

                texturePackRoot.AppendChild(textureNode);
            }
            catch (Exception ex)
            {
                MessageBox.Show(fn.FullFileName + ": " + ex.Message, "Error");

                throw;
            }
        }