Ejemplo n.º 1
0
        private void InitTables()
        {
            xxTable.Rows.Add(new object[] { 0, "Header", Utility.BytesToString(parser.Header) });
            xxTable.Rows.Add(new object[] { 1, "MaterialSection", Utility.BytesToString(parser.MaterialSectionUnknown) });
            if (parser.Format >= 2)
            {
                xxTable.Rows.Add(new object[] { 2, "Footer", Utility.BytesToString(parser.Footer) });                 // 3
            }

            for (int i = 0; i < editor.Frames.Count; i++)
            {
                xxFrame frame = editor.Frames[i];
                frameTable.Rows.Add(new object[] { i, frame.Name, Utility.BytesToString(frame.Unknown1), Utility.BytesToString(frame.Unknown2) });
            }

            for (int i = 0; i < editor.Meshes.Count; i++)
            {
                xxFrame frame = editor.Meshes[i];
                meshTable.Rows.Add(new object[] { i, frame.Name, frame.Mesh.NumVector2PerVertex.ToString("X2"), Utility.BytesToString(frame.Mesh.VertexListDuplicateUnknown) });

                for (int j = 0; j < frame.Mesh.SubmeshList.Count; j++)
                {
                    xxSubmesh submesh = frame.Mesh.SubmeshList[j];
                    submeshTable.Rows.Add(new object[] { new int[] { i, j }, frame.Name + "[" + j + "]",
                                                         Utility.BytesToString(submesh.Unknown1),
                                                         Utility.BytesToString(submesh.Unknown2),
                                                         Utility.BytesToString(submesh.Unknown3),
                                                         Utility.BytesToString(submesh.Unknown4),
                                                         Utility.BytesToString(submesh.Unknown5),
                                                         Utility.BytesToString(submesh.Unknown6) });
                }
            }

            for (int i = 0; i < parser.MaterialList.Count; i++)
            {
                xxMaterial mat = parser.MaterialList[i];
                materialTable.Rows.Add(new object[] { i, mat.Name,
                                                      Utility.BytesToString(mat.Unknown1),
                                                      Utility.BytesToString(mat.Textures[0].Unknown1),
                                                      Utility.BytesToString(mat.Textures[1].Unknown1),
                                                      Utility.BytesToString(mat.Textures[2].Unknown1),
                                                      Utility.BytesToString(mat.Textures[3].Unknown1) });
            }

            for (int i = 0; i < parser.TextureList.Count; i++)
            {
                xxTexture tex = parser.TextureList[i];
                textureTable.Rows.Add(new object[] { i, tex.Name,
                                                     Utility.BytesToString(tex.Unknown1) });
            }
        }