Ejemplo n.º 1
0
        public void load_chr(string path)
        {
            this.listBox.Items.Clear();
            BinaryReader binaryReader = new BinaryReader(File.Open(path, FileMode.Open), Encoding.GetEncoding("EUC-KR"));
            int          num          = (int)binaryReader.ReadInt16();

            for (int num2 = 0; num2 != num; num2++)
            {
                Mesh mesh = new Mesh();
                mesh.read(ref binaryReader);
                this.list_mesh.Add(mesh);
            }
            int num3 = (int)binaryReader.ReadInt16();

            for (int num2 = 0; num2 != num3; num2++)
            {
                Motion motion = new Motion();
                motion.read(ref binaryReader);
                this.list_motion.Add(motion);
            }
            int num4 = (int)binaryReader.ReadInt16();

            for (int num2 = 0; num2 != num4; num2++)
            {
                Effect effect = new Effect();
                effect.read(ref binaryReader);
                this.list_effect.Add(effect);
            }
            int num5 = (int)binaryReader.ReadInt16();

            for (int num2 = 0; num2 != num5; num2++)
            {
                Character character = new Character();
                character.read(ref binaryReader);
                if (character.is_active == 1)
                {
                    this.listBox.Items.Add(string.Concat(new object[]
                    {
                        "[",
                        num2,
                        "]",
                        character.name
                    }));
                }
                else
                {
                    this.listBox.Items.Add("[" + num2 + "] Inactivate");
                }
                this.list_character.Add(character);
            }
            binaryReader.Close();
        }
Ejemplo n.º 2
0
 public void load_chr(string path)
 {
     this.listBox.Items.Clear();
     BinaryReader binaryReader = new BinaryReader(File.Open(path, FileMode.Open), Encoding.GetEncoding("EUC-KR"));
     int num = (int)binaryReader.ReadInt16();
     for (int num2 = 0; num2 != num; num2++)
     {
         Mesh mesh = new Mesh();
         mesh.read(ref binaryReader);
         this.list_mesh.Add(mesh);
     }
     int num3 = (int)binaryReader.ReadInt16();
     for (int num2 = 0; num2 != num3; num2++)
     {
         Motion motion = new Motion();
         motion.read(ref binaryReader);
         this.list_motion.Add(motion);
     }
     int num4 = (int)binaryReader.ReadInt16();
     for (int num2 = 0; num2 != num4; num2++)
     {
         Effect effect = new Effect();
         effect.read(ref binaryReader);
         this.list_effect.Add(effect);
     }
     int num5 = (int)binaryReader.ReadInt16();
     for (int num2 = 0; num2 != num5; num2++)
     {
         Character character = new Character();
         character.read(ref binaryReader);
         if (character.is_active == 1)
         {
             this.listBox.Items.Add(string.Concat(new object[]
             {
                 "[",
                 num2,
                 "]",
                 character.name
             }));
         }
         else
         {
             this.listBox.Items.Add("[" + num2 + "] Inactivate");
         }
         this.list_character.Add(character);
     }
     binaryReader.Close();
 }
Ejemplo n.º 3
0
 public void load_chr(string path)
 {
     this.treeView.Nodes.Clear();
     this.list_mesh.Clear();
     this.list_character.Clear();
     this.list_effect.Clear();
     this.list_motion.Clear();
     BinaryReader binaryReader = new BinaryReader(File.Open(path, FileMode.Open), Encoding.GetEncoding("EUC-KR"));
     int num = (int)binaryReader.ReadInt16();
     this.treeView.Nodes.Add("Skeleton-ZMD [" + num + "]");
     for (int num2 = 0; num2 != num; num2++)
     {
         Mesh mesh = new Mesh();
         mesh.read(ref binaryReader);
         this.treeView.Nodes[0].Nodes.Add(string.Concat(new object[]
         {
             "[",
             num2,
             "]",
             mesh.path
         }));
         this.list_mesh.Add(mesh);
     }
     int num3 = (int)binaryReader.ReadInt16();
     this.treeView.Nodes.Add("Motion-ZMO [" + num3 + "]");
     for (int num2 = 0; num2 != num3; num2++)
     {
         Motion motion = new Motion();
         motion.read(ref binaryReader);
         this.treeView.Nodes[1].Nodes.Add(string.Concat(new object[]
         {
             "[",
             num2,
             "]",
             motion.path
         }));
         this.list_motion.Add(motion);
     }
     int num4 = (int)binaryReader.ReadInt16();
     this.treeView.Nodes.Add("Effect-eft [" + num4 + "]");
     for (int num2 = 0; num2 != num4; num2++)
     {
         Effect effect = new Effect();
         effect.read(ref binaryReader);
         this.treeView.Nodes[2].Nodes.Add(string.Concat(new object[]
         {
             "[",
             num2,
             "]",
             effect.path
         }));
         this.list_effect.Add(effect);
     }
     int num5 = (int)binaryReader.ReadInt16();
     for (int num2 = 0; num2 != num5; num2++)
     {
         Character character = new Character();
         character.read(ref binaryReader);
         if (character.is_active == 1)
         {
             this.treeViewCharacter.Nodes.Add(string.Concat(new object[]
             {
                 "Mob [",
                 num2,
                 "] : \"",
                 character.name,
                 "\""
             }));
             this.treeViewCharacter.Nodes[num2].Nodes.Add("Parts [" + character.List_Mesh.Count + "]");
             for (int num6 = 0; num6 != character.List_Mesh.Count; num6++)
             {
                 this.treeViewCharacter.Nodes[num2].Nodes[0].Nodes.Add(Convert.ToString(character.List_Mesh[num6].zscobjid));
             }
             this.treeViewCharacter.Nodes[num2].Nodes.Add("Animations [" + character.List_Motion.Count + "]");
             for (int num6 = 0; num6 != character.List_Motion.Count; num6++)
             {
                 this.treeViewCharacter.Nodes[num2].Nodes[1].Nodes.Add(Convert.ToString((CHRForm.type_action)character.List_Motion[num6].id));
             }
             this.treeViewCharacter.Nodes[num2].Nodes.Add("Effects [" + character.List_Effect.Count + "]");
             for (int num6 = 0; num6 != character.List_Effect.Count; num6++)
             {
                 this.treeViewCharacter.Nodes[num2].Nodes[2].Nodes.Add(Convert.ToString((CHRForm.type_action)character.List_Effect[num6].id));
             }
         }
         else
         {
             this.treeViewCharacter.Nodes.Add("Mob [" + num2 + "] : inactivate");
         }
         this.list_character.Add(character);
     }
     binaryReader.Close();
 }
Ejemplo n.º 4
0
        public void load_chr(string path)
        {
            this.treeView.Nodes.Clear();
            this.list_mesh.Clear();
            this.list_character.Clear();
            this.list_effect.Clear();
            this.list_motion.Clear();
            BinaryReader binaryReader = new BinaryReader(File.Open(path, FileMode.Open), Encoding.GetEncoding("EUC-KR"));
            int          num          = (int)binaryReader.ReadInt16();

            this.treeView.Nodes.Add("Skeleton-ZMD [" + num + "]");
            for (int num2 = 0; num2 != num; num2++)
            {
                Mesh mesh = new Mesh();
                mesh.read(ref binaryReader);
                this.treeView.Nodes[0].Nodes.Add(string.Concat(new object[]
                {
                    "[",
                    num2,
                    "]",
                    mesh.path
                }));
                this.list_mesh.Add(mesh);
            }
            int num3 = (int)binaryReader.ReadInt16();

            this.treeView.Nodes.Add("Motion-ZMO [" + num3 + "]");
            for (int num2 = 0; num2 != num3; num2++)
            {
                Motion motion = new Motion();
                motion.read(ref binaryReader);
                this.treeView.Nodes[1].Nodes.Add(string.Concat(new object[]
                {
                    "[",
                    num2,
                    "]",
                    motion.path
                }));
                this.list_motion.Add(motion);
            }
            int num4 = (int)binaryReader.ReadInt16();

            this.treeView.Nodes.Add("Effect-eft [" + num4 + "]");
            for (int num2 = 0; num2 != num4; num2++)
            {
                Effect effect = new Effect();
                effect.read(ref binaryReader);
                this.treeView.Nodes[2].Nodes.Add(string.Concat(new object[]
                {
                    "[",
                    num2,
                    "]",
                    effect.path
                }));
                this.list_effect.Add(effect);
            }
            int num5 = (int)binaryReader.ReadInt16();

            for (int num2 = 0; num2 != num5; num2++)
            {
                Character character = new Character();
                character.read(ref binaryReader);
                if (character.is_active == 1)
                {
                    this.treeViewCharacter.Nodes.Add(string.Concat(new object[]
                    {
                        "Mob [",
                        num2,
                        "] : \"",
                        character.name,
                        "\""
                    }));
                    this.treeViewCharacter.Nodes[num2].Nodes.Add("Parts [" + character.List_Mesh.Count + "]");
                    for (int num6 = 0; num6 != character.List_Mesh.Count; num6++)
                    {
                        this.treeViewCharacter.Nodes[num2].Nodes[0].Nodes.Add(Convert.ToString(character.List_Mesh[num6].zscobjid));
                    }
                    this.treeViewCharacter.Nodes[num2].Nodes.Add("Animations [" + character.List_Motion.Count + "]");
                    for (int num6 = 0; num6 != character.List_Motion.Count; num6++)
                    {
                        this.treeViewCharacter.Nodes[num2].Nodes[1].Nodes.Add(Convert.ToString((CHRForm.type_action)character.List_Motion[num6].id));
                    }
                    this.treeViewCharacter.Nodes[num2].Nodes.Add("Effects [" + character.List_Effect.Count + "]");
                    for (int num6 = 0; num6 != character.List_Effect.Count; num6++)
                    {
                        this.treeViewCharacter.Nodes[num2].Nodes[2].Nodes.Add(Convert.ToString((CHRForm.type_action)character.List_Effect[num6].id));
                    }
                }
                else
                {
                    this.treeViewCharacter.Nodes.Add("Mob [" + num2 + "] : inactivate");
                }
                this.list_character.Add(character);
            }
            binaryReader.Close();
        }