コード例 #1
0
ファイル: aas_create.c プロジェクト: chegestar/omni-bot
//===========================================================================
//
// Parameter:				-
// Returns:					-
// Changes Globals:		-
//===========================================================================
void AAS_CreateAreas( node_t *node ) {
	Log_Write( "AAS_CreateAreas\r\n" );
	qprintf( "%6d areas created", 0 );
	tmpaasworld.nodes = AAS_CreateAreas_r( node );
	qprintf( "\n" );
	Log_Write( "%6d areas created\r\n", tmpaasworld.numareas );
} //end of the function AAS_CreateAreas
コード例 #2
0
ファイル: aas_create.c プロジェクト: chegestar/omni-bot
//===========================================================================
//
// Parameter:				-
// Returns:					-
// Changes Globals:		-
//===========================================================================
tmp_node_t *AAS_CreateAreas_r( node_t *node ) {
	tmp_node_t *tmpnode;

	//recurse down to leafs
	if ( node->planenum != PLANENUM_LEAF ) {
		//the first tmp node is a dummy
		tmpnode = AAS_AllocTmpNode();
		tmpnode->planenum = node->planenum;
		tmpnode->children[0] = AAS_CreateAreas_r( node->children[0] );
		tmpnode->children[1] = AAS_CreateAreas_r( node->children[1] );
		return tmpnode;
	} //end if
	  //areas won't be created for solid leafs
	if ( node->contents & CONTENTS_SOLID ) {
		//just return zero for a solid leaf (in tmp AAS NULL is a solid leaf)
		return NULL;
	} //end if

	return AAS_CreateArea( node );
} //end of the function AAS_CreateAreas_r
コード例 #3
0
//===========================================================================
//
// Parameter:				-
// Returns:					-
// Changes Globals:		-
//===========================================================================
void AAS_CreateAreas( node_t *node ) {
	Log_Write( "AAS_CreateAreas\r\n" );
	qprintf( "%6d areas created", 0 );

	numGroundOnlyFreed = 0;
	numTinyFreed = 0;

	tmpaasworld.nodes = AAS_CreateAreas_r( node );
	qprintf( "\n" );

//	Log_Print("%6d non-grounded areas freed\n", numGroundOnlyFreed);
//	Log_Write("%6d non-grounded areas freed\n", numGroundOnlyFreed);
//	Log_Print("%6d tiny areas freed\n", numTinyFreed);
//	Log_Write("%6d tiny areas freed\n", numTinyFreed);

	Log_Write( "%6d areas created\r\n", tmpaasworld.numareas );
} //end of the function AAS_CreateAreas