コード例 #1
0
ファイル: BSP.cs プロジェクト: RomanHargrave/bsp-decompiler
    // METHODS

    public virtual void printBSPReport()
    {
        // If there's a NullReferenceException here, the BSPReader class didn't initialize the object and therefore
        // this is either a BSP format which doesn't use that lump, or there's an error which will become apparent.
        DecompilerThread.OnMessage(this, "Internal version number: " + (int)version + " (" + version + ")");
        if (entities != null)
        {
            DecompilerThread.OnMessage(this, "Entities lump: " + entities.Length + " bytes, " + entities.Count + " items");
        }
        if (planes != null)
        {
            DecompilerThread.OnMessage(this, "Planes lump: " + planes.Length + " bytes, " + planes.Count + " items");
            if (planes.hasFunnySize())
            {
                DecompilerThread.OnMessage(this, "WARNING: Funny lump size in Planes");
            }
        }
        if (textures != null)
        {
            DecompilerThread.OnMessage(this, "Texture lump: " + textures.Length + " bytes, " + textures.Count + " items");
            if (textures.hasFunnySize())
            {
                DecompilerThread.OnMessage(this, "WARNING: Funny lump size in Texture");
            }
        }
        if (materials != null)
        {
            DecompilerThread.OnMessage(this, "Materials lump: " + materials.Length + " bytes, " + materials.Count + " items");
            if (materials.hasFunnySize())
            {
                DecompilerThread.OnMessage(this, "WARNING: Funny lump size in Materials");
            }
        }
        if (vertices != null)
        {
            DecompilerThread.OnMessage(this, "Vertices lump: " + vertices.Length + " bytes, " + vertices.Count + " items");
            if (vertices.hasFunnySize())
            {
                DecompilerThread.OnMessage(this, "WARNING: Funny lump size in Vertices");
            }
        }
        if (nodes != null)
        {
            DecompilerThread.OnMessage(this, "Nodes lump: " + nodes.Length + " bytes, " + nodes.Count + " items");
            if (nodes.hasFunnySize())
            {
                DecompilerThread.OnMessage(this, "WARNING: Funny lump size in Nodes");
            }
        }
        if (texInfo != null)
        {
            DecompilerThread.OnMessage(this, "Texture info lump: " + texInfo.Length + " bytes, " + texInfo.Count + " items");
            if (texInfo.hasFunnySize())
            {
                DecompilerThread.OnMessage(this, "WARNING: Funny lump size in Texture info");
            }
        }
        if (faces != null)
        {
            DecompilerThread.OnMessage(this, "Faces lump: " + faces.Length + " bytes, " + faces.Count + " items");
            if (faces.hasFunnySize())
            {
                DecompilerThread.OnMessage(this, "WARNING: Funny lump size in Faces");
            }
        }
        if (leaves != null)
        {
            DecompilerThread.OnMessage(this, "Leaves lump: " + leaves.Length + " bytes, " + leaves.Count + " items");
            if (leaves.hasFunnySize())
            {
                DecompilerThread.OnMessage(this, "WARNING: Funny lump size in Leaves");
            }
        }
        if (markSurfaces != null)
        {
            DecompilerThread.OnMessage(this, "Mark surfaces lump: " + markSurfaces.Length + " bytes, " + markSurfaces.Count + " items");
            if (markSurfaces.hasFunnySize())
            {
                DecompilerThread.OnMessage(this, "WARNING: Funny lump size in Mark surfaces");
            }
        }
        if (edges != null)
        {
            DecompilerThread.OnMessage(this, "Edges lump: " + edges.Length + " bytes, " + edges.Count + " items");
            if (edges.hasFunnySize())
            {
                DecompilerThread.OnMessage(this, "WARNING: Funny lump size in Edges");
            }
        }
        if (surfEdges != null)
        {
            DecompilerThread.OnMessage(this, "Surface Edges lump: " + surfEdges.Length + " bytes, " + surfEdges.Count + " items");
            if (surfEdges.hasFunnySize())
            {
                DecompilerThread.OnMessage(this, "WARNING: Funny lump size in Surface Edges");
            }
        }
        if (models != null)
        {
            DecompilerThread.OnMessage(this, "Models lump: " + models.Length + " bytes, " + models.Count + " items");
            if (models.hasFunnySize())
            {
                DecompilerThread.OnMessage(this, "WARNING: Funny lump size in Models");
            }
        }
        if (brushes != null)
        {
            DecompilerThread.OnMessage(this, "Brushes lump: " + brushes.Length + " bytes, " + brushes.Count + " items");
            if (brushes.hasFunnySize())
            {
                DecompilerThread.OnMessage(this, "WARNING: Funny lump size in Brushes");
            }
        }
        if (brushSides != null)
        {
            DecompilerThread.OnMessage(this, "Brush sides lump: " + brushSides.Length + " bytes, " + brushSides.Count + " items");
            if (brushSides.hasFunnySize())
            {
                DecompilerThread.OnMessage(this, "WARNING: Funny lump size in Brush sides");
            }
        }
        if (markBrushes != null)
        {
            DecompilerThread.OnMessage(this, "Mark brushes lump: " + markBrushes.Length + " bytes, " + markBrushes.Count + " items");
            if (markBrushes.hasFunnySize())
            {
                DecompilerThread.OnMessage(this, "WARNING: Funny lump size in Mark brushes");
            }
        }
        if (originalFaces != null)
        {
            DecompilerThread.OnMessage(this, "Original Faces lump: " + originalFaces.Length + " bytes, " + originalFaces.Count + " items");
            if (originalFaces.hasFunnySize())
            {
                DecompilerThread.OnMessage(this, "WARNING: Funny lump size in Original Faces");
            }
        }
        if (texTable != null)
        {
            DecompilerThread.OnMessage(this, "Texture index table lump: " + texTable.Length + " bytes, " + texTable.Count + " items");
            if (texTable.hasFunnySize())
            {
                DecompilerThread.OnMessage(this, "WARNING: Funny lump size in Texture index table");
            }
        }
        if (texDatas != null)
        {
            DecompilerThread.OnMessage(this, "Texture data lump: " + texDatas.Length + " bytes, " + texDatas.Count + " items");
            if (texDatas.hasFunnySize())
            {
                DecompilerThread.OnMessage(this, "WARNING: Funny lump size in Texture data");
            }
        }
        if (dispInfos != null)
        {
            DecompilerThread.OnMessage(this, "Displacement info lump: " + dispInfos.Length + " bytes, " + dispInfos.Count + " items");
            if (dispInfos.hasFunnySize())
            {
                DecompilerThread.OnMessage(this, "WARNING: Funny lump size in Displacement info");
            }
        }
        if (dispVerts != null)
        {
            DecompilerThread.OnMessage(this, "Displacement Vertices lump: " + dispVerts.Length + " bytes, " + dispVerts.Count + " items");
            if (dispVerts.hasFunnySize())
            {
                DecompilerThread.OnMessage(this, "WARNING: Funny lump size in Displacement Vertices");
            }
        }
        if (displacementTriangles != null)
        {
            DecompilerThread.OnMessage(this, "Displacement Triangle Tags lump: " + displacementTriangles.Length + " bytes, " + displacementTriangles.Count + " items");
            if (displacementTriangles.hasFunnySize())
            {
                DecompilerThread.OnMessage(this, "WARNING: Funny lump size in Displacement Triangle Tags");
            }
        }
        if (staticProps != null)
        {
            DecompilerThread.OnMessage(this, "Static Props lump: " + staticProps.Length + " bytes, " + staticProps.Count + " items, " + staticProps.Dictionary.Length + " unique models");
        }
        if (cubemaps != null)
        {
            DecompilerThread.OnMessage(this, "Cubemaps lump: " + cubemaps.Length + " bytes, " + cubemaps.Count + " items");
            if (cubemaps.hasFunnySize())
            {
                DecompilerThread.OnMessage(this, "WARNING: Funny lump size in Cubemaps");
            }
        }         /*
                   * if(overlays != null) {
                   * DecompilerThread.OnMessage(this, "Overlays lump: "+overlays.Length+" bytes, "+overlays.Count+" items",Settings.VERBOSITY_MAPSTATS);
                   *    if(overlays.hasFunnySize()) {
                   *            DecompilerThread.OnMessage(this, "WARNING: Funny lump size in Overlays",Settings.VERBOSITY_WARNINGS);
                   *    }
                   * } catch(System.NullReferenceException) {
                   * }*/
    }
コード例 #2
0
ファイル: BSP.cs プロジェクト: QuakeTools/jbn-bsp-lump-tools
    // METHODS

    public virtual void printBSPReport()
    {
        // If there's a NullReferenceException here, the BSPReader class didn't initialize the object and therefore
        // there's an error which will become apparent.
        if (entities != null)
        {
            Console.WriteLine("Entities lump: " + entities.Length + " bytes, " + entities.Count + " items");
        }
        if (planes != null)
        {
            Console.WriteLine("Planes lump: " + planes.Length + " bytes, " + planes.Count + " items");
            if (planes.hasFunnySize())
            {
                Console.WriteLine("WARNING: Funny lump size in Planes");
            }
        }
        if (textures != null)
        {
            Console.WriteLine("Texture lump: " + textures.Length + " bytes, " + textures.Count + " items");
            if (textures.hasFunnySize())
            {
                Console.WriteLine("WARNING: Funny lump size in Texture");
            }
        }
        if (materials != null)
        {
            Console.WriteLine("Materials lump: " + materials.Length + " bytes, " + materials.Count + " items");
            if (materials.hasFunnySize())
            {
                Console.WriteLine("WARNING: Funny lump size in Materials");
            }
        }
        if (vertices != null)
        {
            Console.WriteLine("Vertices lump: " + vertices.Length + " bytes, " + vertices.Count + " items");
            if (vertices.hasFunnySize())
            {
                Console.WriteLine("WARNING: Funny lump size in Vertices");
            }
        }
        if (normals != null)
        {
            Console.WriteLine("Normals lump: " + normals.Length + " bytes");
        }
        if (indices != null)
        {
            Console.WriteLine("Indices lump: " + indices.Length + " bytes, " + indices.Count + " items");
            if (indices.hasFunnySize())
            {
                Console.WriteLine("WARNING: Funny lump size in Indices");
            }
        }
        if (vis != null)
        {
            Console.WriteLine("Visibility lump: " + vis.Length + " bytes, " + vis.Count + " items");
            if (vis.hasFunnySize())
            {
                Console.WriteLine("WARNING: Funny lump size in Visibility");
            }
        }
        if (nodes != null)
        {
            Console.WriteLine("Nodes lump: " + nodes.Length + " bytes, " + nodes.Count + " items");
            if (nodes.hasFunnySize())
            {
                Console.WriteLine("WARNING: Funny lump size in Nodes");
            }
        }
        if (faces != null)
        {
            Console.WriteLine("Faces lump: " + faces.Length + " bytes, " + faces.Count + " items");
            if (faces.hasFunnySize())
            {
                Console.WriteLine("WARNING: Funny lump size in Faces");
            }
        }
        if (lightmaps != null)
        {
            Console.WriteLine("Lightmaps lump: " + lightmaps.Length + " bytes, " + lightmaps.Count + " items");
            if (lightmaps.hasFunnySize())
            {
                Console.WriteLine("WARNING: Funny lump size in Lightmaps");
            }
        }
        if (leaves != null)
        {
            Console.WriteLine("Leaves lump: " + leaves.Length + " bytes, " + leaves.Count + " items");
            if (leaves.hasFunnySize())
            {
                Console.WriteLine("WARNING: Funny lump size in Leaves");
            }
        }
        if (markSurfaces != null)
        {
            Console.WriteLine("Mark surfaces lump: " + markSurfaces.Length + " bytes, " + markSurfaces.Count + " items");
            if (markSurfaces.hasFunnySize())
            {
                Console.WriteLine("WARNING: Funny lump size in Mark surfaces");
            }
        }
        if (markBrushes != null)
        {
            Console.WriteLine("Mark brushes lump: " + markBrushes.Length + " bytes, " + markBrushes.Count + " items");
            if (markBrushes.hasFunnySize())
            {
                Console.WriteLine("WARNING: Funny lump size in Mark brushes");
            }
        }
        if (models != null)
        {
            Console.WriteLine("Models lump: " + models.Length + " bytes, " + models.Count + " items");
            if (models.hasFunnySize())
            {
                Console.WriteLine("WARNING: Funny lump size in Models");
            }
        }
        if (brushes != null)
        {
            Console.WriteLine("Brushes lump: " + brushes.Length + " bytes, " + brushes.Count + " items");
            if (brushes.hasFunnySize())
            {
                Console.WriteLine("WARNING: Funny lump size in Brushes");
            }
        }
        if (brushSides != null)
        {
            Console.WriteLine("Brush sides lump: " + brushSides.Length + " bytes, " + brushSides.Count + " items");
            if (brushSides.hasFunnySize())
            {
                Console.WriteLine("WARNING: Funny lump size in Brush sides");
            }
        }
        if (texInfo != null)
        {
            Console.WriteLine("Texture info lump: " + texInfo.Length + " bytes, " + texInfo.Count + " items");
            if (texInfo.hasFunnySize())
            {
                Console.WriteLine("WARNING: Funny lump size in Texture info");
            }
        }
    }