Esempio n. 1
0
/*
 * @brief
 */
void EndBSPFile(void) {

	EmitBrushes();
	EmitPlanes();
	EmitAreaPortals();

	UnparseEntities();

	// now that the verts have been resolved, align the normals count
	d_bsp.num_normals = d_bsp.num_vertexes;

	// write the map
	Com_Verbose("Writing %s\n", bsp_name);
	WriteBSPFile(bsp_name);
}
Esempio n. 2
0
/*
   ============
   WriteBSP
   ============
 */
void WriteBSP( node_t *headnode ){
	int oldfaces;

	c_nofaces = 0;
	c_facenodes = 0;

	Sys_FPrintf( SYS_VRB, "--- WriteBSP ---\n" );

	oldfaces = numfaces;
	dmodels[nummodels].headnode = EmitDrawNode_r( headnode );
	EmitAreaPortals( headnode );

	Sys_FPrintf( SYS_VRB, "%5i nodes with faces\n", c_facenodes );
	Sys_FPrintf( SYS_VRB, "%5i nodes without faces\n", c_nofaces );
	Sys_FPrintf( SYS_VRB, "%5i faces\n", numfaces - oldfaces );
}
Esempio n. 3
0
/*
============
WriteBSP
============
*/
void WriteBSP (node_t *headnode)
{
	int		oldfaces;

	c_nofaces = 0;
	c_facenodes = 0;

	Con_Verbose("--- WriteBSP ---\n");

	oldfaces = numfaces;
	dmodels[nummodels].headnode = EmitDrawNode_r (headnode);
	EmitAreaPortals (headnode);

	Con_Verbose("%5i nodes with faces\n", c_facenodes);
	Con_Verbose("%5i nodes without faces\n", c_nofaces);
	Con_Verbose("%5i faces\n", numfaces-oldfaces);
}
Esempio n. 4
0
/*
============
WriteBSP
============
*/
void WriteBSP (node_t *headnode, face_t *pLeafFaceList )
{
    int		i;
    int		oldfaces;
    int     oldorigfaces;

    c_nofaces = 0;
    c_facenodes = 0;

    qprintf ("--- WriteBSP ---\n");

    oldfaces = numfaces;
    oldorigfaces = numorigfaces;

    GetEdge2_InitOptimizedList();
    EmitLeafFaces( pLeafFaceList );
    dmodels[nummodels].headnode = EmitDrawNode_r (headnode);

    // Only emit area portals for the main world.
    if( nummodels == 0 )
    {
        EmitAreaPortals (headnode);
    }

    //
    // add all displacement faces for the particular model
    //
    for( i = 0; i < nummapdispinfo; i++ )
    {
        int entityIndex = GetDispInfoEntityNum( &mapdispinfo[i] );
        if( entityIndex == entity_num )
        {
            EmitFaceVertexes( NULL, &mapdispinfo[i].face );
            EmitFace( &mapdispinfo[i].face, FALSE );
        }
    }

    EmitWaterVolumesForBSP( &dmodels[nummodels], headnode );
    qprintf ("%5i nodes with faces\n", c_facenodes);
    qprintf ("%5i nodes without faces\n", c_nofaces);
    qprintf ("%5i faces\n", numfaces-oldfaces);
    qprintf( "%5i original faces\n", numorigfaces-oldorigfaces );
}