OSDN Git Service

rename TSONode#name to path.
authornomeu <nomeu@nomeu.org>
Tue, 27 Jan 2015 03:45:34 +0000 (12:45 +0900)
committernomeu <nomeu@nomeu.org>
Tue, 27 Jan 2015 05:17:40 +0000 (14:17 +0900)
Form1.cs
MqoWriter.cs
TSOFile.cs
TSOGenerator.cs
TSOGeneratorOneBone.cs
TSOWriter.cs

index 7ca74ea..133f92d 100644 (file)
--- a/Form1.cs
+++ b/Form1.cs
@@ -249,7 +249,7 @@ namespace Tso2MqoGui
 
         private void BuildBoneTree(TreeNodeCollection nodes, TSONode node)
         {
-            TreeNode tn = nodes.Add(node.ShortName);
+            TreeNode tn = nodes.Add(node.Name);
             tn.Tag = node;
 
             if (node.children != null)
index 06bb5c1..82e11b8 100644 (file)
@@ -202,7 +202,7 @@ namespace Tso2MqoGui
             {
                 MqoBone bone = new MqoBone();
                 bone.id = node.id+1;
-                bone.name = node.ShortName;
+                bone.name = node.Name;
                 bone.tail = node.children.Count == 0;
 
                 if (node.parent == null)
index 6f0d696..0937ced 100644 (file)
@@ -59,21 +59,21 @@ namespace Tso2MqoGui
             {
                 nodes[i] = new TSONode();
                 nodes[i].id = i;
-                nodes[i].name = ReadString();
-                nodes[i].sname = nodes[i].name.Substring(nodes[i].name.LastIndexOf('|') + 1);
-                nodemap.Add(nodes[i].name, nodes[i]);
+                nodes[i].path = ReadString();
+                nodes[i].name = nodes[i].path.Substring(nodes[i].path.LastIndexOf('|') + 1);
+                nodemap.Add(nodes[i].path, nodes[i]);
 
-                WriteLine(i + ": " + nodes[i].name);
+                WriteLine(i + ": " + nodes[i].path);
             }
 
             for (int i = 0; i < count; ++i)
             {
-                int index = nodes[i].name.LastIndexOf('|');
+                int index = nodes[i].path.LastIndexOf('|');
 
                 if (index <= 0)
                     continue;
 
-                string pname = nodes[i].name.Substring(0, index);
+                string pname = nodes[i].path.Substring(0, index);
                 WriteLine(pname);
                 nodes[i].parent = nodemap[pname];
                 nodes[i].parent.children.Add(nodes[i]);
@@ -235,8 +235,8 @@ namespace Tso2MqoGui
     public class TSONode
     {
         internal int id;
+        internal string path;
         internal string name;
-        internal string sname;
         internal Matrix44 matrix;
         internal Matrix44 world;
         internal List<TSONode> children = new List<TSONode>();
@@ -245,9 +245,9 @@ namespace Tso2MqoGui
         [Category("General")]
         public int ID { get { return id; } }
         [Category("General")]
-        public string Name { get { return name; } }
+        public string Path { get { return path; } }
         [Category("General")]
-        public string ShortName { get { return sname; } }
+        public string Name { get { return name; } }
         [Category("Detail")]
         public Matrix44 Matrix { get { return matrix; } set { matrix = value; } }
         [Category("Detail")]
@@ -256,7 +256,7 @@ namespace Tso2MqoGui
         public override string ToString()
         {
             StringBuilder sb = new StringBuilder();
-            sb.Append("Name:           ").AppendLine(name);
+            sb.Append("Path:           ").AppendLine(path);
             sb.Append("Matrix:         ").AppendLine(matrix.ToString());
             sb.Append("Children.Count: ").AppendLine(children.Count.ToString());
             return sb.ToString();
index 38bb509..9b69a36 100644 (file)
@@ -122,7 +122,7 @@ namespace Tso2MqoGui
                 bw.Write(tsoref.nodes.Length);\r
 \r
                 foreach (TSONode i in tsoref.nodes)\r
-                    WriteString(bw, i.Name);\r
+                    WriteString(bw, i.Path);\r
             }\r
             else if (mqx != null)\r
             {\r
index 0c03044..6463cdd 100644 (file)
@@ -22,7 +22,7 @@ namespace Tso2MqoGui
 
             foreach (TSONode i in tsoref.nodes)
             {
-                node_idmap.Add(i.ShortName, i.ID);
+                node_idmap.Add(i.Name, i.ID);
             }
         }
 
index 1571c15..4db0ec1 100644 (file)
@@ -1,4 +1,4 @@
-using System;
+using System;
 using System.Collections.Generic;
 using System.IO;
 using System.Text;
@@ -45,7 +45,7 @@ namespace Tso2MqoGui
 
         public static void Write(BinaryWriter bw, TSONode item)
         {
-            Write(bw, item.Name);
+            Write(bw, item.Path);
         }
 
         public static void Write(BinaryWriter bw, Matrix44 item)
@@ -166,4 +166,4 @@ namespace Tso2MqoGui
             }
         }
     }
-}
\ No newline at end of file
+}