level/csg4.c
/*	Saves all of the faces in the outside list to the bsp plane list
*/
Saves all of the faces in the outside list to the bsp plane list
Saves all of the faces in the outside list to the bsp plane list
static void SaveOutside( tree_t *tree, bool mirror )
{
	int		planenum;
	face_t	*f, *next, *newf;
	for( f = outside; f; f = next ) 
	{
		next = f->next;
		numcsgfaces++;
		planenum = f->planenum;
		if( mirror ) 
		{
			newf = NewFaceFromFace( f );
			newf->planeside = f->planeside ^ 1;	
			newf->contents[0] = f->contents[1];
			newf->contents[1] = f->contents[0];
			newf->winding = ReverseWinding( f->winding );
			tree->validfaces[planenum] = MergeFaceToList_r( newf, tree->validfaces[planenum] );
		}
		tree->validfaces[planenum] = MergeFaceToList_r( f, tree->validfaces[planenum]);
		tree->validfaces[planenum] = FreeMergeListScraps( tree->validfaces[planenum] );
	}
}
static void SaveOutside ( tree_t * tree , bool mirror ) { int planenum ; face_t * f , * next , * newf ; for ( f = outside ; f ; f = next ) { next = f -> next ; numcsgfaces ++ ; planenum = f -> planenum ; if ( mirror ) { newf = NewFaceFromFace ( f ) ; newf -> planeside = f -> planeside ^ 1 ; newf -> contents [ 0 ] = f -> contents [ 1 ] ; newf -> contents [ 1 ] = f -> contents [ 0 ] ; newf -> winding = ReverseWinding ( f -> winding ) ; tree -> validfaces [ planenum ] = MergeFaceToList_r ( newf , tree -> validfaces [ planenum ] ) ; } tree -> validfaces [ planenum ] = MergeFaceToList_r ( f , tree -> validfaces [ planenum ] ) ; tree -> validfaces [ planenum ] = FreeMergeListScraps ( tree -> validfaces [ planenum ] ) ; } }
Saves all of the faces in the outside list to the bsp plane list
Saves all of the faces in the outside list to the bsp plane list
// reverse side