Example #1
0
 public void read(ref BinaryReader br)
 {
     this.is_active = br.ReadByte();
     if (this.is_active == 1)
     {
         this.bone_id = br.ReadInt16();
         this.name    = "";
         while (true)
         {
             byte b = br.ReadByte();
             if (b == 0)
             {
                 break;
             }
             this.name += (char)b;
         }
         int num = (int)br.ReadInt16();
         for (int num2 = 0; num2 != num; num2++)
         {
             Character.Mesh mesh = new Character.Mesh();
             mesh.read(ref br);
             this.List_Mesh.Add(mesh);
         }
         int num3 = (int)br.ReadInt16();
         for (int num2 = 0; num2 != num3; num2++)
         {
             Character.Motion motion = new Character.Motion();
             motion.read(ref br);
             this.List_Motion.Add(motion);
         }
         int num4 = (int)br.ReadInt16();
         for (int num2 = 0; num2 != num4; num2++)
         {
             Character.Effect effect = new Character.Effect();
             effect.read(ref br);
             this.List_Effect.Add(effect);
         }
     }
 }
Example #2
0
 private void addToolStripMenuItem_Click(object sender, EventArgs e)
 {
     if (this.treeViewCharacter.SelectedNode.Level == 1)
     {
         TreeNode parent = this.treeViewCharacter.SelectedNode.Parent;
         if (this.treeViewCharacter.SelectedNode.Index == 0)
         {
             Character.Mesh mesh = new Character.Mesh();
             mesh.zscobjid = 0;
             this.list_character[parent.Index].List_Mesh.Add(mesh);
             this.treeViewCharacter.SelectedNode.Text = "Parts [" + this.list_character[parent.Index].List_Mesh.Count + "]";
             this.treeViewCharacter.SelectedNode.Nodes.Add("0");
         }
         else if (this.treeViewCharacter.SelectedNode.Index == 1)
         {
             Character.Motion motion = new Character.Motion();
             motion.id = 0;
             motion.zscmotionid = 0;
             this.list_character[parent.Index].List_Motion.Add(motion);
             this.treeViewCharacter.SelectedNode.Text = "Animations [" + this.list_character[parent.Index].List_Motion.Count + "]";
             this.treeViewCharacter.SelectedNode.Nodes.Add("Warning");
         }
         else if (this.treeViewCharacter.SelectedNode.Index == 2)
         {
             Character.Effect effect = new Character.Effect();
             effect.id = 0;
             effect.zsceffectid = 0;
             this.list_character[parent.Index].List_Effect.Add(effect);
             this.treeViewCharacter.SelectedNode.Text = "Effects [" + this.list_character[parent.Index].List_Effect.Count + "]";
             this.treeViewCharacter.SelectedNode.Nodes.Add("Warning");
         }
     }
     if (this.treeViewCharacter.SelectedNode.Level == 2)
     {
         TreeNode parent2 = this.treeViewCharacter.SelectedNode.Parent;
         TreeNode parent = parent2.Parent;
         if (parent2.Index == 0)
         {
             Character.Mesh mesh = new Character.Mesh();
             mesh.zscobjid = 0;
             this.list_character[parent.Index].List_Mesh.Add(mesh);
             parent2.Text = "Parts [" + this.list_character[parent.Index].List_Mesh.Count + "]";
             parent2.Nodes.Add("0");
         }
         else if (parent2.Index == 1)
         {
             Character.Motion motion = new Character.Motion();
             motion.id = 0;
             motion.zscmotionid = 0;
             this.list_character[parent.Index].List_Motion.Add(motion);
             parent2.Text = "Animations [" + this.list_character[parent.Index].List_Motion.Count + "]";
             parent2.Nodes.Add("Warning");
         }
         else if (parent2.Index == 2)
         {
             Character.Effect effect = new Character.Effect();
             effect.id = 0;
             effect.zsceffectid = 0;
             this.list_character[parent.Index].List_Effect.Add(effect);
             parent2.Text = "Effects [" + this.list_character[parent.Index].List_Effect.Count + "]";
             parent2.Nodes.Add("Warning");
         }
     }
 }
Example #3
0
 private void addToolStripMenuItem_Click(object sender, EventArgs e)
 {
     if (this.treeViewCharacter.SelectedNode.Level == 1)
     {
         TreeNode parent = this.treeViewCharacter.SelectedNode.Parent;
         if (this.treeViewCharacter.SelectedNode.Index == 0)
         {
             Character.Mesh mesh = new Character.Mesh();
             mesh.zscobjid = 0;
             this.list_character[parent.Index].List_Mesh.Add(mesh);
             this.treeViewCharacter.SelectedNode.Text = "Parts [" + this.list_character[parent.Index].List_Mesh.Count + "]";
             this.treeViewCharacter.SelectedNode.Nodes.Add("0");
         }
         else if (this.treeViewCharacter.SelectedNode.Index == 1)
         {
             Character.Motion motion = new Character.Motion();
             motion.id          = 0;
             motion.zscmotionid = 0;
             this.list_character[parent.Index].List_Motion.Add(motion);
             this.treeViewCharacter.SelectedNode.Text = "Animations [" + this.list_character[parent.Index].List_Motion.Count + "]";
             this.treeViewCharacter.SelectedNode.Nodes.Add("Warning");
         }
         else if (this.treeViewCharacter.SelectedNode.Index == 2)
         {
             Character.Effect effect = new Character.Effect();
             effect.id          = 0;
             effect.zsceffectid = 0;
             this.list_character[parent.Index].List_Effect.Add(effect);
             this.treeViewCharacter.SelectedNode.Text = "Effects [" + this.list_character[parent.Index].List_Effect.Count + "]";
             this.treeViewCharacter.SelectedNode.Nodes.Add("Warning");
         }
     }
     if (this.treeViewCharacter.SelectedNode.Level == 2)
     {
         TreeNode parent2 = this.treeViewCharacter.SelectedNode.Parent;
         TreeNode parent  = parent2.Parent;
         if (parent2.Index == 0)
         {
             Character.Mesh mesh = new Character.Mesh();
             mesh.zscobjid = 0;
             this.list_character[parent.Index].List_Mesh.Add(mesh);
             parent2.Text = "Parts [" + this.list_character[parent.Index].List_Mesh.Count + "]";
             parent2.Nodes.Add("0");
         }
         else if (parent2.Index == 1)
         {
             Character.Motion motion = new Character.Motion();
             motion.id          = 0;
             motion.zscmotionid = 0;
             this.list_character[parent.Index].List_Motion.Add(motion);
             parent2.Text = "Animations [" + this.list_character[parent.Index].List_Motion.Count + "]";
             parent2.Nodes.Add("Warning");
         }
         else if (parent2.Index == 2)
         {
             Character.Effect effect = new Character.Effect();
             effect.id          = 0;
             effect.zsceffectid = 0;
             this.list_character[parent.Index].List_Effect.Add(effect);
             parent2.Text = "Effects [" + this.list_character[parent.Index].List_Effect.Count + "]";
             parent2.Nodes.Add("Warning");
         }
     }
 }
Example #4
0
 private void propertyGrid_PropertyValueChanged(object s, PropertyValueChangedEventArgs e)
 {
     if (this.propertyGrid.SelectedObject.GetType() == typeof(Mesh))
     {
         Mesh mesh = (Mesh)this.propertyGrid.SelectedObject;
         this.treeView.SelectedNode.Text = string.Concat(new object[]
         {
             "[",
             this.treeView.SelectedNode.Index,
             "]",
             mesh.path
         });
     }
     else if (this.propertyGrid.SelectedObject.GetType() == typeof(Motion))
     {
         Motion motion = (Motion)this.propertyGrid.SelectedObject;
         this.treeView.SelectedNode.Text = string.Concat(new object[]
         {
             "[",
             this.treeView.SelectedNode.Index,
             "]",
             motion.path
         });
     }
     else if (this.propertyGrid.SelectedObject.GetType() == typeof(Effect))
     {
         Effect effect = (Effect)this.propertyGrid.SelectedObject;
         this.treeView.SelectedNode.Text = string.Concat(new object[]
         {
             "[",
             this.treeView.SelectedNode.Index,
             "]",
             effect.path
         });
     }
     else if (this.propertyGrid.SelectedObject.GetType() == typeof(Character))
     {
         Character character = (Character)this.propertyGrid.SelectedObject;
         if (character.is_active == 1)
         {
             this.treeViewCharacter.SelectedNode.Nodes.Clear();
             this.treeViewCharacter.SelectedNode.Text = string.Concat(new object[]
             {
                 "Mob [",
                 this.treeViewCharacter.SelectedNode.Index,
                 "] : \"",
                 character.name,
                 "\""
             });
             this.treeViewCharacter.SelectedNode.Nodes.Add("Parts [" + character.List_Mesh.Count + "]");
             for (int num = 0; num != character.List_Mesh.Count; num++)
             {
                 this.treeViewCharacter.SelectedNode.Nodes[0].Nodes.Add(Convert.ToString(character.List_Mesh[num].zscobjid));
             }
             this.treeViewCharacter.SelectedNode.Nodes.Add("Animations [" + character.List_Motion.Count + "]");
             for (int num = 0; num != character.List_Motion.Count; num++)
             {
                 this.treeViewCharacter.SelectedNode.Nodes[1].Nodes.Add(Convert.ToString((CHRForm.type_action)character.List_Motion[num].id));
             }
             this.treeViewCharacter.SelectedNode.Nodes.Add("Effects [" + character.List_Effect.Count + "]");
             for (int num = 0; num != character.List_Effect.Count; num++)
             {
                 this.treeViewCharacter.SelectedNode.Nodes[2].Nodes.Add(Convert.ToString((CHRForm.type_action)character.List_Effect[num].id));
             }
         }
         else
         {
             this.treeViewCharacter.SelectedNode.Text = "Mob [" + this.treeViewCharacter.SelectedNode.Index + "] : inactivate";
             this.treeViewCharacter.SelectedNode.Nodes.Clear();
         }
     }
     else if (this.propertyGrid.SelectedObject.GetType() == typeof(Character.Mesh))
     {
         Character.Mesh mesh2 = (Character.Mesh) this.propertyGrid.SelectedObject;
         this.treeViewCharacter.SelectedNode.Text = mesh2.zscobjid.ToString();
     }
     else if (this.propertyGrid.SelectedObject.GetType() == typeof(Character.Motion))
     {
         Character.Motion motion2 = (Character.Motion) this.propertyGrid.SelectedObject;
         this.treeViewCharacter.SelectedNode.Text = Convert.ToString((CHRForm.type_action)motion2.id);
     }
     else if (this.propertyGrid.SelectedObject.GetType() == typeof(Character.Effect))
     {
         Character.Effect effect2 = (Character.Effect) this.propertyGrid.SelectedObject;
         this.treeViewCharacter.SelectedNode.Text = Convert.ToString((CHRForm.type_action)effect2.id);
     }
 }
Example #5
0
 public void read(ref BinaryReader br)
 {
     this.is_active = br.ReadByte();
     if (this.is_active == 1)
     {
         this.bone_id = br.ReadInt16();
         this.name = "";
         while (true)
         {
             byte b = br.ReadByte();
             if (b == 0)
             {
                 break;
             }
             this.name += (char)b;
         }
         int num = (int)br.ReadInt16();
         for (int num2 = 0; num2 != num; num2++)
         {
             Character.Mesh mesh = new Character.Mesh();
             mesh.read(ref br);
             this.List_Mesh.Add(mesh);
         }
         int num3 = (int)br.ReadInt16();
         for (int num2 = 0; num2 != num3; num2++)
         {
             Character.Motion motion = new Character.Motion();
             motion.read(ref br);
             this.List_Motion.Add(motion);
         }
         int num4 = (int)br.ReadInt16();
         for (int num2 = 0; num2 != num4; num2++)
         {
             Character.Effect effect = new Character.Effect();
             effect.read(ref br);
             this.List_Effect.Add(effect);
         }
     }
 }