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++)
     {
         Materiel materiel = new Materiel();
         materiel.read(ref binaryReader);
         this.list_materiel.Add(materiel);
     }
     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++)
     {
         Object @object = new Object();
         @object.read(ref binaryReader);
         this.list_object.Add(@object);
         this.listBox.Items.Add("Entry [" + num2 + "] : ");
     }
     binaryReader.Close();
 }
Exemple #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++)
            {
                Materiel materiel = new Materiel();
                materiel.read(ref binaryReader);
                this.list_materiel.Add(materiel);
            }
            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++)
            {
                Object @object = new Object();
                @object.read(ref binaryReader);
                this.list_object.Add(@object);
                this.listBox.Items.Add("Entry [" + num2 + "] : ");
            }
            binaryReader.Close();
        }
Exemple #3
0
 public void load_zsc(string path)
 {
     this.treeView.Nodes.Clear();
     this.treeViewObject.Nodes.Clear();
     this.list_mesh.Clear();
     this.list_effect.Clear();
     this.list_materiel.Clear();
     this.list_object.Clear();
     BinaryReader binaryReader = new BinaryReader(File.Open(path, FileMode.Open));
     int num = (int)binaryReader.ReadInt16();
     this.treeView.Nodes.Add("Mesh-ZMS [" + 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("Materiel-DDS [" + num3 + "]");
     for (int num2 = 0; num2 != num3; num2++)
     {
         Materiel materiel = new Materiel();
         materiel.read(ref binaryReader);
         this.treeView.Nodes[1].Nodes.Add(string.Concat(new object[]
         {
             "[",
             num2,
             "]",
             materiel.path
         }));
         this.list_materiel.Add(materiel);
     }
     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++)
     {
         Object @object = new Object();
         @object.read(ref binaryReader);
         this.list_object.Add(@object);
         this.treeViewObject.Nodes.Add("Entry [" + num2 + "] : ");
         this.treeViewObject.Nodes[num2].Nodes.Add("Meshs [" + @object.list_mesh.Count + "]");
         for (int num6 = 0; num6 != @object.list_mesh.Count; num6++)
         {
             this.treeViewObject.Nodes[num2].Nodes[0].Nodes.Add(string.Concat(new object[]
             {
                 "Model [",
                 @object.list_mesh[num6].mesh_id,
                 "] with Texture [",
                 @object.list_mesh[num6].material_id,
                 "]"
             }));
         }
         this.treeViewObject.Nodes[num2].Nodes.Add("Effects [" + @object.list_effect.Count + "]");
         for (int num6 = 0; num6 != @object.list_effect.Count; num6++)
         {
             this.treeViewObject.Nodes[num2].Nodes[1].Nodes.Add("Effect[" + @object.list_effect[num6].effect_id + "]");
         }
     }
     binaryReader.Close();
 }
Exemple #4
0
        public void load_zsc(string path)
        {
            this.treeView.Nodes.Clear();
            this.treeViewObject.Nodes.Clear();
            this.list_mesh.Clear();
            this.list_effect.Clear();
            this.list_materiel.Clear();
            this.list_object.Clear();
            BinaryReader binaryReader = new BinaryReader(File.Open(path, FileMode.Open));
            int          num          = (int)binaryReader.ReadInt16();

            this.treeView.Nodes.Add("Mesh-ZMS [" + 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("Materiel-DDS [" + num3 + "]");
            for (int num2 = 0; num2 != num3; num2++)
            {
                Materiel materiel = new Materiel();
                materiel.read(ref binaryReader);
                this.treeView.Nodes[1].Nodes.Add(string.Concat(new object[]
                {
                    "[",
                    num2,
                    "]",
                    materiel.path
                }));
                this.list_materiel.Add(materiel);
            }
            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++)
            {
                Object @object = new Object();
                @object.read(ref binaryReader);
                this.list_object.Add(@object);
                this.treeViewObject.Nodes.Add("Entry [" + num2 + "] : ");
                this.treeViewObject.Nodes[num2].Nodes.Add("Meshs [" + @object.list_mesh.Count + "]");
                for (int num6 = 0; num6 != @object.list_mesh.Count; num6++)
                {
                    this.treeViewObject.Nodes[num2].Nodes[0].Nodes.Add(string.Concat(new object[]
                    {
                        "Model [",
                        @object.list_mesh[num6].mesh_id,
                        "] with Texture [",
                        @object.list_mesh[num6].material_id,
                        "]"
                    }));
                }
                this.treeViewObject.Nodes[num2].Nodes.Add("Effects [" + @object.list_effect.Count + "]");
                for (int num6 = 0; num6 != @object.list_effect.Count; num6++)
                {
                    this.treeViewObject.Nodes[num2].Nodes[1].Nodes.Add("Effect[" + @object.list_effect[num6].effect_id + "]");
                }
            }
            binaryReader.Close();
        }