当前位置: 首页>>代码示例>>C++>>正文


C++ Sys_FPrintf函数代码示例

本文整理汇总了C++中Sys_FPrintf函数的典型用法代码示例。如果您正苦于以下问题:C++ Sys_FPrintf函数的具体用法?C++ Sys_FPrintf怎么用?C++ Sys_FPrintf使用的例子?那么, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了Sys_FPrintf函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: Map_ImportEntities


//.........这里部分代码省略.........

#ifdef TERRAIN_HACK
		if ( ( strcmp( ValueForKey( e, "terrain" ),"1" ) == 0 && strcmp( e->eclass->name,"func_group" ) == 0 ) ) {

			// two aux pointers to the shaders used in the terrain entity
			// we don't keep refcount on them since they are only temporary
			// this avoids doing expensive lookups by name for all faces
			IShader *pTerrainShader, *pCaulk;

			pTerrainShader = NULL;
			pCaulk = QERApp_Shader_ForName( SHADER_CAULK );

			for ( b = e->brushes.onext; b != &e->brushes; b = b->onext )
			{
				if ( pTerrainShader == NULL ) {
					for ( f = b->brush_faces; f != NULL; f = f->next )
						if ( strcmp( f->texdef.GetName(), SHADER_CAULK ) != 0 ) {
							pTerrainShader = f->pShader;
						}
				}

				if ( pTerrainShader ) {
					for ( f = b->brush_faces; f != NULL; f = f->next )
					{
						if ( strcmp( f->texdef.GetName(), SHADER_CAULK ) != 0 ) { // not caulk
							Face_SetShader( f, pTerrainShader->getName() );
						}
						else{
							Face_SetShader( f, pCaulk->getName() );
						}
					}
				}
				else{
					Sys_FPrintf( SYS_WRN, "WARNING: no terrain shader found for brush\n" );
				}
			}
		}
#endif

#define PATCH_HACK
#ifdef PATCH_HACK
		for ( b = e->brushes.onext; b != &e->brushes; b = b->onext )
		{
			// patch hack, to be removed when dependency on brush_faces is removed
			if ( b->patchBrush ) {
				Patch_CalcBounds( b->pPatch, mins, maxs );
				for ( int i = 0; i < 3; i++ )
				{
					if ( (int)mins[i] == (int)maxs[i] ) {
						mins[i] -= 4;
						maxs[i] += 4;
					}
				}
				Brush_Resize( b, mins, maxs );
				Brush_Build( b );
			}
		}
#endif
		// add brush for fixedsize entity
		if ( e->eclass->fixedsize ) {
			vec3_t mins, maxs;
			VectorAdd( e->eclass->mins, e->origin, mins );
			VectorAdd( e->eclass->maxs, e->origin, maxs );
			b = Brush_Create( mins, maxs, &e->eclass->texdef );
			Entity_LinkBrush( e, b );
			Brush_Build( b );
开发者ID:haapanen,项目名称:GtkRadiant,代码行数:67,代码来源:map.cpp

示例2: BeginModel

void BeginModel( void )
{
	bspModel_t	*mod;
	brush_t		*b;
	entity_t	*e;
	vec3_t		mins, maxs;
	vec3_t		lgMins, lgMaxs;		/* ydnar: lightgrid mins/maxs */
	parseMesh_t	*p;
	int			i;
	
	
	/* test limits */
	if( numBSPModels == MAX_MAP_MODELS )
		Error( "MAX_MAP_MODELS" );
	
	/* get model and entity */
	mod = &bspModels[ numBSPModels ];
	e = &entities[ mapEntityNum ];
	
	/* ydnar: lightgrid mins/maxs */
	ClearBounds( lgMins, lgMaxs );
	
	/* bound the brushes */
	ClearBounds( mins, maxs );
	for ( b = e->brushes; b; b = b->next )
	{
		/* ignore non-real brushes (origin, etc) */
		if( b->numsides == 0 )
			continue;
		AddPointToBounds( b->mins, mins, maxs );
		AddPointToBounds( b->maxs, mins, maxs );
		
		/* ydnar: lightgrid bounds */
		if( b->compileFlags & C_LIGHTGRID )
		{
			AddPointToBounds( b->mins, lgMins, lgMaxs );
			AddPointToBounds( b->maxs, lgMins, lgMaxs );
		}
	}
	
	/* bound patches */
	for( p = e->patches; p; p = p->next )
	{
		for( i = 0; i < (p->mesh.width * p->mesh.height); i++ )
			AddPointToBounds( p->mesh.verts[i].xyz, mins, maxs );
	}
	
	/* ydnar: lightgrid mins/maxs */
	if( lgMins[ 0 ] < 99999 )
	{
		/* use lightgrid bounds */
		VectorCopy( lgMins, mod->mins );
		VectorCopy( lgMaxs, mod->maxs );
	}
	else
	{
		/* use brush/patch bounds */
		VectorCopy( mins, mod->mins );
		VectorCopy( maxs, mod->maxs );
	}
	
	/* note size */
	Sys_FPrintf( SYS_VRB, "BSP bounds: { %f %f %f } { %f %f %f }\n", mins[ 0 ], mins[ 1 ], mins[ 2 ], maxs[ 0 ], maxs[ 1 ], maxs[ 2 ] );
	Sys_FPrintf( SYS_VRB, "Lightgrid bounds: { %f %f %f } { %f %f %f }\n", lgMins[ 0 ], lgMins[ 1 ], lgMins[ 2 ], lgMaxs[ 0 ], lgMaxs[ 1 ], lgMaxs[ 2 ] );
	
	/* set firsts */
	mod->firstBSPSurface = numBSPDrawSurfaces;
	mod->firstBSPBrush = numBSPBrushes;
}
开发者ID:ChunHungLiu,项目名称:GtkRadiant,代码行数:69,代码来源:writebsp.c

示例3: SplitBrush

void SplitBrush( brush_t *brush, int planenum, brush_t **front, brush_t **back ){
	brush_t     *b[2];
	int i, j;
	winding_t   *w, *cw[2], *midwinding;
	plane_t     *plane, *plane2;
	side_t      *s, *cs;
	float d, d_front, d_back;


	*front = NULL;
	*back = NULL;
	plane = &mapplanes[planenum];

	// check all points
	d_front = d_back = 0;
	for ( i = 0 ; i < brush->numsides ; i++ )
	{
		w = brush->sides[i].winding;
		if ( !w ) {
			continue;
		}
		for ( j = 0 ; j < w->numpoints ; j++ )
		{
			d = DotProduct( w->p[j], plane->normal ) - plane->dist;
			if ( d > 0 && d > d_front ) {
				d_front = d;
			}
			if ( d < 0 && d < d_back ) {
				d_back = d;
			}
		}
	}

	if ( d_front < 0.1 ) { // PLANESIDE_EPSILON)
		// only on back
		*back = CopyBrush( brush );
		return;
	}

	if ( d_back > -0.1 ) { // PLANESIDE_EPSILON)
		// only on front
		*front = CopyBrush( brush );
		return;
	}

	// create a new winding from the split plane
	w = BaseWindingForPlane( plane->normal, plane->dist );
	for ( i = 0 ; i < brush->numsides && w ; i++ )
	{
		plane2 = &mapplanes[brush->sides[i].planenum ^ 1];
		ChopWindingInPlace( &w, plane2->normal, plane2->dist, 0 ); // PLANESIDE_EPSILON);
	}

	if ( !w || WindingIsTiny( w ) ) { // the brush isn't really split
		int side;

		side = BrushMostlyOnSide( brush, plane );
		if ( side == PSIDE_FRONT ) {
			*front = CopyBrush( brush );
		}
		if ( side == PSIDE_BACK ) {
			*back = CopyBrush( brush );
		}
		return;
	}

	if ( WindingIsHuge( w ) ) {
		Sys_FPrintf( SYS_VRB,"WARNING: huge winding\n" );
	}

	midwinding = w;

	// split it for real

	for ( i = 0 ; i < 2 ; i++ )
	{
		b[i] = AllocBrush( brush->numsides + 1 );
		memcpy( b[i], brush, sizeof( brush_t ) - sizeof( brush->sides ) );
		b[i]->numsides = 0;
		b[i]->next = NULL;
		b[i]->original = brush->original;
	}

	// split all the current windings

	for ( i = 0 ; i < brush->numsides ; i++ )
	{
		s = &brush->sides[i];
		w = s->winding;
		if ( !w ) {
			continue;
		}
		/* strict, in parallel case we get the face back because it also is the midwinding */
		ClipWindingEpsilonStrict( w, plane->normal, plane->dist,
							0 /*PLANESIDE_EPSILON*/, &cw[0], &cw[1] );
		for ( j = 0 ; j < 2 ; j++ )
		{
			if ( !cw[j] ) {
				continue;
			}
//.........这里部分代码省略.........
开发者ID:xonotic,项目名称:netradient,代码行数:101,代码来源:brush.c

示例4: PatchMapDrawSurfs

void PatchMapDrawSurfs( entity_t *e )
{
	int						i, j, k, l, c1, c2;
	parseMesh_t				*pm;
	parseMesh_t				*check, *scan;
	mapDrawSurface_t		*ds;
	int						patchCount, groupCount;
	bspDrawVert_t			*v1, *v2;
	vec3_t					bounds[ 2 ];
	byte					*bordering;
	
	/* ydnar: mac os x fails with these if not static */
	MAC_STATIC parseMesh_t	*meshes[ MAX_MAP_DRAW_SURFS ];
	MAC_STATIC qboolean		grouped[ MAX_MAP_DRAW_SURFS ];
	MAC_STATIC byte			group[ MAX_MAP_DRAW_SURFS ];
	
	
	/* note it */
	Sys_FPrintf( SYS_VRB, "--- PatchMapDrawSurfs ---\n" );

	/* fetch patches from the entity */
	patchCount = 0;
	for ( pm = e->patches ; pm ; pm = pm->next  ) 
	{
		meshes[patchCount] = pm;
		patchCount++;
	}

	if ( !patchCount ) 
		return;

	bordering = (byte *)safe_malloc( patchCount * patchCount );
	memset( bordering, 0, patchCount * patchCount );

	// build the bordering matrix
	for ( k = 0 ; k < patchCount ; k++ ) 
	{
		bordering[k*patchCount+k] = 1;

		for ( l = k+1 ; l < patchCount ; l++ ) 
		{
			check = meshes[k];
			scan = meshes[l];
			c1 = scan->mesh.width * scan->mesh.height;
			v1 = scan->mesh.verts;

			for ( i = 0 ; i < c1 ; i++, v1++ ) 
			{
				c2 = check->mesh.width * check->mesh.height;
				v2 = check->mesh.verts;
				for ( j = 0 ; j < c2 ; j++, v2++ ) 
				{
					if ( fabs( v1->xyz[0] - v2->xyz[0] ) < 1.0
						&& fabs( v1->xyz[1] - v2->xyz[1] ) < 1.0
						&& fabs( v1->xyz[2] - v2->xyz[2] ) < 1.0 ) {
						break;
					}
				}
				if ( j != c2 ) {
					break;
				}
			}
			if ( i != c1 ) 
			{
				// we have a connection
				bordering[k*patchCount+l] =
				bordering[l*patchCount+k] = 1;
			} else 
			{
				// no connection
				bordering[k*patchCount+l] =
				bordering[l*patchCount+k] = 0;
			}

		}
	}

	/* build groups */
	memset( grouped, 0, patchCount );
	groupCount = 0;
	for ( i = 0; i < patchCount; i++ )
	{
		/* get patch */
		scan = meshes[ i ];
		
		/* start a new group */
		if( !grouped[ i ] )
			groupCount++;
		
		/* recursively find all patches that belong in the same group */
		memset( group, 0, patchCount );
		GrowGroup_r( scan, i, patchCount, meshes, bordering, group );
		
		/* bound them */
		ClearBounds( bounds[ 0 ], bounds[ 1 ] );
		for( j = 0; j < patchCount; j++ )
		{
			if ( group[ j ] )
			{
				grouped[ j ] = qtrue;
//.........这里部分代码省略.........
开发者ID:paulvortex,项目名称:BloodMap,代码行数:101,代码来源:patch.c

示例5: LoadPNGBuffer

void LoadPNGBuffer(byte * data, byte ** pic, int *width, int *height)
{
	int             bit_depth;
	int             color_type;
	png_uint_32     w;
	png_uint_32     h;
	unsigned int    row;
	size_t          rowbytes;
	png_infop       info;
	png_structp     png;
	png_bytep      *row_pointers;
	byte           *out;
	int             size;
	byte            alphaByte = 255;

	// load png
//  size = ri.FS_ReadFile(name, (void **)&data);

	if(!data)
		return;

	//png = png_create_read_struct(PNG_LIBPNG_VER_STRING, NULL, NULL, NULL);
	png = png_create_read_struct(PNG_LIBPNG_VER_STRING, (png_voidp) NULL, png_user_error_fn, png_user_warning_fn);

	if(!png)
	{
		Sys_FPrintf(SYS_WRN, "LoadPNGBuffer: png_create_write_struct() failed\n");
		//free(data);
		return;
	}

	// allocate/initialize the memory for image information.  REQUIRED
	info = png_create_info_struct(png);
	if(!info)
	{
		Sys_FPrintf(SYS_WRN, "LoadPNGBuffer: png_create_info_struct() failed\n");
		//free(data);
		png_destroy_read_struct(&png, (png_infopp) NULL, (png_infopp) NULL);
		return;
	}

	//
	// Set error handling if you are using the setjmp/longjmp method (this is
	// the normal method of doing things with libpng).  REQUIRED unless you
	// set up your own error handlers in the png_create_read_struct() earlier.
	//
	if(setjmp(png_jmpbuf(png)))
	{
		// if we get here, we had a problem reading the file
		Sys_FPrintf(SYS_WRN, "LoadPNGBuffer: first exception handler called\n");
		//free(data);
		png_destroy_read_struct(&png, (png_infopp) & info, (png_infopp) NULL);
		return;
	}

	//png_set_write_fn(png, buffer, png_write_data, png_flush_data);
	png_set_read_fn(png, data, png_read_data);

	png_set_sig_bytes(png, 0);

	// The call to png_read_info() gives us all of the information from the
	// PNG file before the first IDAT (image data chunk).  REQUIRED
	png_read_info(png, info);

	// get picture info
	png_get_IHDR(png, info, (png_uint_32 *) & w, (png_uint_32 *) & h, &bit_depth, &color_type, NULL, NULL, NULL);

	// tell libpng to strip 16 bit/color files down to 8 bits/color
	png_set_strip_16(png);

	// expand paletted images to RGB triplets
	if(color_type & PNG_COLOR_MASK_PALETTE)
		png_set_expand(png);

	// expand gray-scaled images to RGB triplets
	if(!(color_type & PNG_COLOR_MASK_COLOR))
		png_set_gray_to_rgb(png);

	// expand grayscale images to the full 8 bits from 1, 2, or 4 bits/pixel
	//if(color_type == PNG_COLOR_TYPE_GRAY && bit_depth < 8)
	//  png_set_gray_1_2_4_to_8(png);

	// expand paletted or RGB images with transparency to full alpha channels
	// so the data will be available as RGBA quartets
	if(png_get_valid(png, info, PNG_INFO_tRNS))
		png_set_tRNS_to_alpha(png);

	// if there is no alpha information, fill with alphaByte
	if(!(color_type & PNG_COLOR_MASK_ALPHA))
		png_set_filler(png, alphaByte, PNG_FILLER_AFTER);

	// expand pictures with less than 8bpp to 8bpp
	if(bit_depth < 8)
		png_set_packing(png);

	// update structure with the above settings
	png_read_update_info(png, info);

	// allocate the memory to hold the image
	*width = w;
//.........这里部分代码省略.........
开发者ID:ethr,项目名称:ETXrealPro,代码行数:101,代码来源:imagelib.c

示例6: ProcessWorldModel

void ProcessWorldModel( void )
{
    int            i, s;
    entity_t    *e;
    tree_t        *tree;
    face_t        *faces;
    qboolean    ignoreLeaks, leaked;
    xmlNodePtr    polyline, leaknode;
    char        level[ 2 ], shader[ 1024 ];
    const char    *value;
    
    
    /* sets integer blockSize from worldspawn "_blocksize" key if it exists */
    value = ValueForKey( &entities[ 0 ], "_blocksize" );
    if( value[ 0 ] == '\0' )
        value = ValueForKey( &entities[ 0 ], "blocksize" );
    if( value[ 0 ] == '\0' )
        value = ValueForKey( &entities[ 0 ], "chopsize" );    /* sof2 */
    if( value[ 0 ] != '\0' )
    {
        /* scan 3 numbers */
        s = sscanf( value, "%d %d %d", &blockSize[ 0 ], &blockSize[ 1 ], &blockSize[ 2 ] );
        
        /* handle legacy case */
        if( s == 1 )
        {
            blockSize[ 1 ] = blockSize[ 0 ];
            blockSize[ 2 ] = blockSize[ 0 ];
        }
    }
    Sys_Printf( "block size = { %d %d %d }\n", blockSize[ 0 ], blockSize[ 1 ], blockSize[ 2 ] );
    
    /* sof2: ignore leaks? */
    value = ValueForKey( &entities[ 0 ], "_ignoreleaks" );    /* ydnar */
    if( value[ 0 ] == '\0' )
        value = ValueForKey( &entities[ 0 ], "ignoreleaks" );
    if( value[ 0 ] == '1' )
        ignoreLeaks = qtrue;
    else
        ignoreLeaks = qfalse;
    
    /* begin worldspawn model */
    BeginModel();
    e = &entities[ 0 ];
    e->firstDrawSurf = 0;
    
    /* ydnar: gs mods */
    ClearMetaTriangles();

    /* check for patches with adjacent edges that need to lod together */
    PatchMapDrawSurfs( e );

    /* build an initial bsp tree using all of the sides of all of the structural brushes */
    faces = MakeStructuralBSPFaceList( entities[ 0 ].brushes );
    tree = FaceBSP( faces );
    MakeTreePortals( tree );
    FilterStructuralBrushesIntoTree( e, tree );
    
    /* see if the bsp is completely enclosed */
    if( FloodEntities( tree ) || ignoreLeaks )
    {
        /* rebuild a better bsp tree using only the sides that are visible from the inside */
        FillOutside( tree->headnode );

        /* chop the sides to the convex hull of their visible fragments, giving us the smallest polygons */
        ClipSidesIntoTree( e, tree );
        
        /* build a visible face tree */
        faces = MakeVisibleBSPFaceList( entities[ 0 ].brushes );
        FreeTree( tree );
        tree = FaceBSP( faces );
        MakeTreePortals( tree );
        FilterStructuralBrushesIntoTree( e, tree );
        leaked = qfalse;
        
        /* ydnar: flood again for skybox */
        if( skyboxPresent )
            FloodEntities( tree );
    }
    else
    {
        Sys_FPrintf( SYS_NOXML, "**********************\n" );
        Sys_FPrintf( SYS_NOXML, "******* leaked *******\n" );
        Sys_FPrintf( SYS_NOXML, "**********************\n" );
        polyline = LeakFile( tree );
        leaknode = xmlNewNode( NULL, "message" );
        xmlNodeSetContent( leaknode, "MAP LEAKED\n" );
        xmlAddChild( leaknode, polyline );
        level[0] = (int) '0' + SYS_ERR;
        level[1] = 0;
        xmlSetProp( leaknode, "level", (char*) &level );
        xml_SendNode( leaknode );
        if( leaktest )
        {
            Sys_Printf ("--- MAP LEAKED, ABORTING LEAKTEST ---\n");
            exit( 0 );
        }
        leaked = qtrue;
        
        /* chop the sides to the convex hull of their visible fragments, giving us the smallest polygons */
//.........这里部分代码省略.........
开发者ID:Teivaz,项目名称:nebula2,代码行数:101,代码来源:bsp.c

示例7: InitPaths

void InitPaths( int *argc, char **argv )
{
	int		i, j, k, len, len2;
	char	temp[ MAX_OS_PATH ];
	
	
	/* note it */
	Sys_FPrintf( SYS_VRB, "--- InitPaths ---\n" );
	
	/* get the install path for backup */
	LokiInitPaths( argv[ 0 ] );
	
	/* set game to default (q3a) */
	game = &games[ 0 ];
	numBasePaths = 0;
	numGamePaths = 0;
	
	/* parse through the arguments and extract those relevant to paths */
	for( i = 0; i < *argc; i++ )
	{
		/* check for null */
		if( argv[ i ] == NULL )
			continue;
		
		/* -game */
		if( strcmp( argv[ i ], "-game" ) == 0 )
		{
			if( ++i >= *argc )
				Error( "Out of arguments: No game specified after %s", argv[ i - 1 ] );
			argv[ i - 1 ] = NULL;
			game = GetGame( argv[ i ] );
			if( game == NULL )
				game = &games[ 0 ];
			argv[ i ] = NULL;
		}

		/* -fs_forbiddenpath */
		else if( strcmp( argv[ i ], "-fs_forbiddenpath" ) == 0 )
		{
			if( ++i >= *argc )
				Error( "Out of arguments: No path specified after %s.", argv[ i - 1 ] );
			argv[ i - 1 ] = NULL;
			if(g_numForbiddenDirs < VFS_MAXDIRS)
			{
				strncpy(g_strForbiddenDirs[g_numForbiddenDirs], argv[i], PATH_MAX);
				g_strForbiddenDirs[g_numForbiddenDirs][PATH_MAX] = 0;
				++g_numForbiddenDirs;
			}
			argv[ i ] = NULL;
		}

		/* -fs_basepath */
		else if( strcmp( argv[ i ], "-fs_basepath" ) == 0 )
		{
			if( ++i >= *argc )
				Error( "Out of arguments: No path specified after %s.", argv[ i - 1 ] );
			argv[ i - 1 ] = NULL;
			AddBasePath( argv[ i ] );
			argv[ i ] = NULL;
		}
		
		/* -fs_game */
		else if( strcmp( argv[ i ], "-fs_game" ) == 0 )
		{
			if( ++i >= *argc )
				Error( "Out of arguments: No path specified after %s.", argv[ i - 1 ] );
			argv[ i - 1 ] = NULL;
			AddGamePath( argv[ i ] );
			argv[ i ] = NULL;
		}
		
		/* -fs_home */
		else if( strcmp( argv[ i ], "-fs_home" ) == 0 )
		{
			if( ++i >= *argc )
				Error( "Out of arguments: No path specified after %s.", argv[ i - 1 ] );
			argv[ i - 1 ] = NULL;
			homePath = argv[i];
			argv[ i ] = NULL;
		}
		
		/* -fs_homebase */
		else if( strcmp( argv[ i ], "-fs_homebase" ) == 0 )
		{
			if( ++i >= *argc )
				Error( "Out of arguments: No path specified after %s.", argv[ i - 1 ] );
			argv[ i - 1 ] = NULL;
			homeBasePath = argv[i];
			argv[ i ] = NULL;
		}

		/* -fs_homepath - sets both of them */
		else if( strcmp( argv[ i ], "-fs_homepath" ) == 0 )
		{
			if( ++i >= *argc )
				Error( "Out of arguments: No path specified after %s.", argv[ i - 1 ] );
			argv[ i - 1 ] = NULL;
			homePath = argv[i];
			homeBasePath = ".";
			argv[ i ] = NULL;
//.........这里部分代码省略.........
开发者ID:clbr,项目名称:netradiant,代码行数:101,代码来源:path_init.c

示例8: FloodEntities

qboolean FloodEntities( tree_t *tree )
{
    int			i, s;
    vec3_t		origin, offset, scale, angles;
    qboolean	r, inside, tripped, skybox;
    node_t		*headnode;
    entity_t	*e;
    const char	*value;


    headnode = tree->headnode;
    Sys_FPrintf( SYS_VRB,"--- FloodEntities ---\n" );
    inside = qfalse;
    tree->outside_node.occupied = 0;

    tripped = qfalse;
    c_floodedleafs = 0;
    for( i = 1; i < numEntities; i++ )
    {
        /* get entity */
        e = &entities[ i ];

        /* get origin */
        GetVectorForKey( e, "origin", origin );
        if( VectorCompare( origin, vec3_origin ) )
            continue;

        /* handle skybox entities */
        value = ValueForKey( e, "classname" );
        if( !Q_stricmp( value, "_skybox" ) )
        {
            skybox = qtrue;
            skyboxPresent = qtrue;

            /* invert origin */
            VectorScale( origin, -1.0f, offset );

            /* get scale */
            VectorSet( scale, 64.0f, 64.0f, 64.0f );
            value = ValueForKey( e, "_scale" );
            if( value[ 0 ] != '\0' )
            {
                s = sscanf( value, "%f %f %f", &scale[ 0 ], &scale[ 1 ], &scale[ 2 ] );
                if( s == 1 )
                {
                    scale[ 1 ] = scale[ 0 ];
                    scale[ 2 ] = scale[ 0 ];
                }
            }

            /* get "angle" (yaw) or "angles" (pitch yaw roll) */
            VectorClear( angles );
            angles[ 2 ] = FloatForKey( e, "angle" );
            value = ValueForKey( e, "angles" );
            if( value[ 0 ] != '\0' )
                sscanf( value, "%f %f %f", &angles[ 1 ], &angles[ 2 ], &angles[ 0 ] );

            /* set transform matrix (thanks spog) */
            m4x4_identity( skyboxTransform );
            m4x4_pivoted_transform_by_vec3( skyboxTransform, offset, angles, eXYZ, scale, origin );
        }
        else
            skybox = qfalse;

        /* nudge off floor */
        origin[ 2 ] += 1;

        /* debugging code */
        //%	if( i == 1 )
        //%		origin[ 2 ] += 4096;

        /* find leaf */
        r = PlaceOccupant( headnode, origin, e, skybox );
        if( r )
            inside = qtrue;
        if( (!r || tree->outside_node.occupied) && !tripped )
        {
            xml_Select( "Entity leaked", e->mapEntityNum, 0, qfalse );
            tripped = qtrue;
        }
    }

    Sys_FPrintf( SYS_VRB, "%9d flooded leafs\n", c_floodedleafs );

    if( !inside )
        Sys_FPrintf( SYS_VRB, "no entities in open -- no filling\n" );
    else if( tree->outside_node.occupied )
        Sys_FPrintf( SYS_VRB, "entity reached from outside -- no filling\n" );

    return (qboolean) (inside && !tree->outside_node.occupied);
}
开发者ID:AEonZR,项目名称:GtkRadiant,代码行数:91,代码来源:portals.c

示例9: ChopWindingInPlaceAccu

/*
=============
ChopWindingInPlaceAccu
=============
*/
void ChopWindingInPlaceAccu(winding_accu_t **inout, vec3_t normal, vec_t dist, vec_t crudeEpsilon)
{
	vec_accu_t	fineEpsilon;
	winding_accu_t	*in;
	int		counts[3];
	int		i, j;
	vec_accu_t	dists[MAX_POINTS_ON_WINDING + 1];
	int		sides[MAX_POINTS_ON_WINDING + 1];
	int		maxpts;
	winding_accu_t	*f;
	vec_accu_t	*p1, *p2;
	vec_accu_t	w;
	vec3_accu_t	mid, normalAccu;

	// We require at least a very small epsilon.  It's a good idea for several reasons.
	// First, we will be dividing by a potentially very small distance below.  We don't
	// want that distance to be too small; otherwise, things "blow up" with little accuracy
	// due to the division.  (After a second look, the value w below is in range (0,1), but
	// graininess problem remains.)  Second, Having minimum epsilon also prevents the following
	// situation.  Say for example we have a perfect octagon defined by the input winding.
	// Say our chopping plane (defined by normal and dist) is essentially the same plane
	// that the octagon is sitting on.  Well, due to rounding errors, it may be that point
	// 1 of the octagon might be in front, point 2 might be in back, point 3 might be in
	// front, point 4 might be in back, and so on.  So we could end up with a very ugly-
	// looking chopped winding, and this might be undesirable, and would at least lead to
	// a possible exhaustion of MAX_POINTS_ON_WINDING.  It's better to assume that points
	// very very close to the plane are on the plane, using an infinitesimal epsilon amount.

	// Now, the original ChopWindingInPlace() function used a vec_t-based winding_t.
	// So this minimum epsilon is quite similar to casting the higher resolution numbers to
	// the lower resolution and comparing them in the lower resolution mode.  We explicitly
	// choose the minimum epsilon as something around the vec_t epsilon of one because we
	// want the resolution of vec_accu_t to have a large resolution around the epsilon.
	// Some of that leftover resolution even goes away after we scale to points far away.

	// Here is a further discussion regarding the choice of smallestEpsilonAllowed.
	// In the 32 float world (we can assume vec_t is that), the "epsilon around 1.0" is
	// 0.00000011921.  In the 64 bit float world (we can assume vec_accu_t is that), the
	// "epsilon around 1.0" is 0.00000000000000022204.  (By the way these two epsilons
	// are defined as VEC_SMALLEST_EPSILON_AROUND_ONE VEC_ACCU_SMALLEST_EPSILON_AROUND_ONE
	// respectively.)  If you divide the first by the second, you get approximately
	// 536,885,246.  Dividing that number by 200,000 (a typical base winding coordinate)
	// gives 2684.  So in other words, if our smallestEpsilonAllowed was chosen as exactly
	// VEC_SMALLEST_EPSILON_AROUND_ONE, you would be guaranteed at least 2000 "ticks" in
	// 64-bit land inside of the epsilon for all numbers we're dealing with.

	static const vec_accu_t smallestEpsilonAllowed = ((vec_accu_t) VEC_SMALLEST_EPSILON_AROUND_ONE) * 0.5;
	if (crudeEpsilon < smallestEpsilonAllowed)	fineEpsilon = smallestEpsilonAllowed;
	else						fineEpsilon = (vec_accu_t) crudeEpsilon;

	in = *inout;
	counts[0] = counts[1] = counts[2] = 0;
	VectorCopyRegularToAccu(normal, normalAccu);

	for (i = 0; i < in->numpoints; i++)
	{
		dists[i] = DotProductAccu(in->p[i], normalAccu) - dist;
		if (dists[i] > fineEpsilon)		sides[i] = SIDE_FRONT;
		else if (dists[i] < -fineEpsilon)	sides[i] = SIDE_BACK;
		else					sides[i] = SIDE_ON;
		counts[sides[i]]++;
	}
	sides[i] = sides[0];
	dists[i] = dists[0];
	
	// I'm wondering if whatever code that handles duplicate planes is robust enough
	// that we never get a case where two nearly equal planes result in 2 NULL windings
	// due to the 'if' statement below.  TODO: Investigate this.
	if (!counts[SIDE_FRONT]) {
		FreeWindingAccu(in);
		*inout = NULL;
		return;
	}
	if (!counts[SIDE_BACK]) {
		return; // Winding is unmodified.
	}

	// NOTE: The least number of points that a winding can have at this point is 2.
	// In that case, one point is SIDE_FRONT and the other is SIDE_BACK.

	maxpts = counts[SIDE_FRONT] + 2; // We dynamically expand if this is too small.
	f = AllocWindingAccu(maxpts);

	for (i = 0; i < in->numpoints; i++)
	{
		p1 = in->p[i];

		if (sides[i] == SIDE_ON || sides[i] == SIDE_FRONT)
		{
			if (f->numpoints >= MAX_POINTS_ON_WINDING)
				Error("ChopWindingInPlaceAccu: MAX_POINTS_ON_WINDING");
			if (f->numpoints >= maxpts) // This will probably never happen.
			{
				Sys_FPrintf(SYS_VRB, "WARNING: estimate on chopped winding size incorrect (no problem)\n");
				f = CopyWindingAccuIncreaseSizeAndFreeOld(f);
//.........这里部分代码省略.........
开发者ID:clbr,项目名称:netradiant,代码行数:101,代码来源:polylib.c

示例10: RadCreateDiffuseLights

void RadCreateDiffuseLights( void )
{
    /* startup */
    Sys_FPrintf( SYS_VRB, "--- RadCreateDiffuseLights ---\n" );
    numDiffuseSurfaces = 0;
    numDiffuseLights = 0;
    numBrushDiffuseLights = 0;
    numTriangleDiffuseLights = 0;
    numPatchDiffuseLights = 0;
    numAreaLights = 0;
    
    /* hit every surface (threaded) */
    RunThreadsOnIndividual( numBSPDrawSurfaces, qtrue, RadLight );
    
    /* dump the lights generated to a file */
    if( dump )
    {
        char    dumpName[ 1024 ], ext[ 64 ];
        FILE    *file;
        light_t    *light;
        
        strcpy( dumpName, source );
        StripExtension( dumpName );
        sprintf( ext, "_bounce_%03d.map", iterations );
        strcat( dumpName, ext );
        file = fopen( dumpName, "wb" );
        Sys_Printf( "Writing %s...\n", dumpName );
        if( file )
        {
            for( light = lights; light; light = light->next )
            {
                fprintf( file,
                    "{\n"
                    "\"classname\" \"light\"\n"
                    "\"light\" \"%d\"\n"
                    "\"origin\" \"%.0f %.0f %.0f\"\n"
                    "\"_color\" \"%.3f %.3f %.3f\"\n"
                    "}\n",
                    
                    (int) light->add,
                    
                    light->origin[ 0 ],
                    light->origin[ 1 ],
                    light->origin[ 2 ],
                    
                    light->color[ 0 ],
                    light->color[ 1 ],
                    light->color[ 2 ] );
            }
            fclose( file );
        }
    }
    
    /* increment */
    iterations++;
    
    /* print counts */
    Sys_Printf( "%8d diffuse surfaces\n", numDiffuseSurfaces );
    Sys_FPrintf( SYS_VRB, "%8d total diffuse lights\n", numDiffuseLights );
    Sys_FPrintf( SYS_VRB, "%8d brush diffuse lights\n", numBrushDiffuseLights );
    Sys_FPrintf( SYS_VRB, "%8d patch diffuse lights\n", numPatchDiffuseLights );
    Sys_FPrintf( SYS_VRB, "%8d triangle diffuse lights\n", numTriangleDiffuseLights );
}
开发者ID:kimsama,项目名称:minimangalore,代码行数:63,代码来源:light_bounce.c

示例11: xml_SendNode

// send a node down the stream, add it to the document
void xml_SendNode (xmlNodePtr node)
{
  xmlBufferPtr xml_buf;
  char xmlbuf[MAX_NETMESSAGE]; // we have to copy content from the xmlBufferPtr into an aux buffer .. that sucks ..
  // this index loops through the node buffer
  int pos = 0;
  int size;

  xmlAddChild( doc->children, node );

  if (brdcst_socket)
  {
    xml_buf = xmlBufferCreate();
    xmlNodeDump( xml_buf, doc, node, 0, 0 );

    // the XML node might be too big to fit in a single network message
    // l_net library defines an upper limit of MAX_NETMESSAGE
    // there are some size check errors, so we use MAX_NETMESSAGE-10 to be safe
    // if the size of the buffer exceeds MAX_NETMESSAGE-10 we'll send in several network messages
    while (pos < (int)xml_buf->use)
    {
      // what size are we gonna send now?
      (xml_buf->use - pos < MAX_NETMESSAGE - 10) ? (size = xml_buf->use - pos) : (size = MAX_NETMESSAGE - 10);
      //++timo just a debug thing
      if (size == MAX_NETMESSAGE - 10)
        Sys_FPrintf (SYS_NOXML, "Got to split the buffer\n");
      memcpy( xmlbuf, xml_buf->content+pos, size);
      xmlbuf[size] = '\0';
      NMSG_Clear( &msg );
      NMSG_WriteString (&msg, xmlbuf );
      Net_Send(brdcst_socket, &msg );
      // now that the thing is sent prepare to loop again
      pos += size;
    }

#if 0
    // NOTE: the NMSG_WriteString is limited to MAX_NETMESSAGE
    // we will need to split into chunks
    // (we could also go lower level, in the end it's using send and receiv which are not size limited)
    //++timo FIXME: MAX_NETMESSAGE is not exactly the max size we can stick in the message
    //  there's some tweaking to do in l_net for that .. so let's give us a margin for now

    //++timo we need to handle the case of a buffer too big to fit in a single message
    // try without checks for now
    if (xml_buf->use > MAX_NETMESSAGE-10 )
    {
      // if we send that we are probably gonna break the stream at the other end..
      // and Error will call right there
      //Error( "MAX_NETMESSAGE exceeded for XML feedback stream in FPrintf (%d)\n", xml_buf->use);
      Sys_FPrintf (SYS_NOXML, "MAX_NETMESSAGE exceeded for XML feedback stream in FPrintf (%d)\n", xml_buf->use);
      xml_buf->content[xml_buf->use]='\0'; //++timo this corrupts the buffer but we don't care it's for printing
      Sys_FPrintf (SYS_NOXML, xml_buf->content);

    }

    size = xml_buf->use;
    memcpy( xmlbuf, xml_buf->content, size );
    xmlbuf[size] = '\0';
    NMSG_Clear( &msg );
    NMSG_WriteString (&msg, xmlbuf );
    Net_Send(brdcst_socket, &msg );
#endif

    xmlBufferFree( xml_buf );
  }  
}
开发者ID:clbr,项目名称:netradiant,代码行数:67,代码来源:inout.c

示例12: QE_LoadProject

/*
   ===========
   QE_LoadProject
   NOTE: rather than bumping "version", consider bumping "template_version" (see above)
   NOTE: when QE_LoadProject is called, the prefs are updated with path to the latest project and saved on disk
   ===========
 */
bool QE_LoadProject( const char *projectfile ){
	char buf[1024];
	xmlDocPtr doc;
	xmlNodePtr node, project;

	Sys_Printf( "Loading project file: \"%s\"\n", projectfile );
	doc = ParseXMLFile( projectfile, true );

	if ( doc == NULL ) {
		return false;
	}

	node = doc->children;
	while ( node != NULL && node->type != XML_DTD_NODE ) node = node->next;
	if ( node == NULL || strcmp( (char*)node->name, "project" ) != 0 ) {
		Sys_FPrintf( SYS_ERR, "ERROR: invalid file type\n" );
		return false;
	}

	while ( node->type != XML_ELEMENT_NODE ) node = node->next;
	// <project>
	project = node;

	if ( g_qeglobals.d_project_entity != NULL ) {
		Entity_Free( g_qeglobals.d_project_entity );
	}
	g_qeglobals.d_project_entity = Entity_Alloc();

	for ( node = project->children; node != NULL; node = node->next )
	{
		if ( node->type != XML_ELEMENT_NODE ) {
			continue;
		}

		// <key>
		ReplaceTemplates( buf, (char*)node->properties->next->children->content );

		SetKeyValue( g_qeglobals.d_project_entity, (char*)node->properties->children->content, buf );
	}

	xmlFreeDoc( doc );

	// project file version checking
	// add a version checking to avoid people loading later versions of the project file and bitching
	int ver = IntForKey( g_qeglobals.d_project_entity, "version" );
	if ( ver > PROJECT_VERSION ) {
		char strMsg[1024];
		sprintf( strMsg, "This is a version %d project file. This build only supports <=%d project files.\n"
						 "Please choose another project file or upgrade your version of Radiant.", ver, PROJECT_VERSION );
		gtk_MessageBox( g_pParentWnd->m_pWidget, strMsg, "Can't load project file", MB_ICONERROR | MB_OK );
		// set the project file to nothing so we are sure we'll ask next time?
		g_PrefsDlg.m_strLastProject = "";
		g_PrefsDlg.SavePrefs();
		return false;
	}

	// set here some default project settings you need
	if ( strlen( ValueForKey( g_qeglobals.d_project_entity, "brush_primit" ) ) == 0 ) {
		SetKeyValue( g_qeglobals.d_project_entity, "brush_primit", "0" );
	}

	g_qeglobals.m_bBrushPrimitMode = IntForKey( g_qeglobals.d_project_entity, "brush_primit" );

	g_qeglobals.m_strHomeMaps = g_qeglobals.m_strHomeGame;
	const char* str = ValueForKey( g_qeglobals.d_project_entity, "gamename" );
	if ( str[0] == '\0' ) {
		str = g_pGameDescription->mBaseGame.GetBuffer();
	}
	g_qeglobals.m_strHomeMaps += str;
	g_qeglobals.m_strHomeMaps += '/';

	// don't forget to create the dirs
	Q_mkdir( g_qeglobals.m_strHomeGame.GetBuffer(), 0775 );
	Q_mkdir( g_qeglobals.m_strHomeMaps.GetBuffer(), 0775 );

	// usefull for the log file and debuggin fucked up configurations from users:
	// output the basic information of the .qe4 project file
	// SPoG
	// all these paths should be unix format, with a trailing slash at the end
	// if not.. to debug, check that the project file paths are set up correctly
	Sys_Printf( "basepath    : %s\n", ValueForKey( g_qeglobals.d_project_entity, "basepath" ) );
	Sys_Printf( "entitypath  : %s\n", ValueForKey( g_qeglobals.d_project_entity, "entitypath" ) );


	// check whether user_project key exists..
	// if not, save the current project under a new name
	if ( ValueForKey( g_qeglobals.d_project_entity, "user_project" )[0] == '\0' ) {
		Sys_Printf( "Loaded a template project file\n" );

		// create the user_project key
		SetKeyValue( g_qeglobals.d_project_entity, "user_project", "1" );

		if ( IntForKey( g_qeglobals.d_project_entity, "version" ) != PROJECT_VERSION ) {
//.........这里部分代码省略.........
开发者ID:GSIO01,项目名称:GtkRadiant,代码行数:101,代码来源:qe3.cpp

示例13: AddRegionBrushes

/*
   ===========
   AddRegionBrushes
   a regioned map will have temp walls put up at the region boundary
   \todo TODO TTimo old implementation of region brushes
   we still add them straight in the worldspawn and take them out after the map is saved
   with the new implementation we should be able to append them in a temporary manner to the data we pass to the map module
   ===========
 */
void AddRegionBrushes( void ){
	vec3_t mins, maxs;
	int i;
	texdef_t td;

	if ( !region_active ) {
#ifdef _DEBUG
		Sys_FPrintf( SYS_WRN, "Unexpected AddRegionBrushes call.\n" );
#endif
		return;
	}

	memset( &td, 0, sizeof( td ) );
	td.SetName( SHADER_NOT_FOUND );

	// set mins
	VectorSet( mins, region_mins[0] - 32, region_mins[1] - 32, region_mins[2] - 32 );

	// vary maxs
	for ( i = 0; i < 3; i++ )
	{
		VectorSet( maxs, region_maxs[0] + 32, region_maxs[1] + 32, region_maxs[2] + 32 );
		maxs[i] = region_mins[i];
		region_sides[i] = Brush_Create( mins, maxs, &td );
	}

	// set maxs
	VectorSet( maxs, region_maxs[0] + 32, region_maxs[1] + 32, region_maxs[2] + 32 );

	// vary mins
	for ( i = 0; i < 3; i++ )
	{
		VectorSet( mins, region_mins[0] - 32, region_mins[1] - 32, region_mins[2] - 32 );
		mins[i] = region_maxs[i];
		region_sides[i + 3] = Brush_Create( mins, maxs, &td );
	}


	// this is a safe check, but it should not really happen anymore
	vec3_t vOrig;
	VectorSet( vOrig,
			   (int)g_pParentWnd->GetCamWnd()->Camera()->origin[0],
			   (int)g_pParentWnd->GetCamWnd()->Camera()->origin[1],
			   (int)g_pParentWnd->GetCamWnd()->Camera()->origin[2] );

	for ( i = 0 ; i < 3 ; i++ )
	{
		if ( vOrig[i] > region_maxs[i] || vOrig[i] < region_mins[i] ) {
			Sys_FPrintf( SYS_ERR, "Camera is NOT in the region, it's likely that the region won't compile correctly\n" );
		}
	}

	// write the info_playerstart
	region_startpoint = Entity_Alloc();
	SetKeyValue( region_startpoint, "classname", "info_player_start" );
	region_startpoint->eclass = Eclass_ForName( "info_player_start", false );
	char sTmp[1024];
	sprintf( sTmp, "%d %d %d", (int)vOrig[0], (int)vOrig[1], (int)vOrig[2] );
	SetKeyValue( region_startpoint, "origin", sTmp );
	sprintf( sTmp, "%d", (int)g_pParentWnd->GetCamWnd()->Camera()->angles[YAW] );
	SetKeyValue( region_startpoint, "angle", sTmp );
	// empty array of children
	region_startpoint->pData = new CPtrArray;
}
开发者ID:haapanen,项目名称:GtkRadiant,代码行数:73,代码来源:map.cpp

示例14: Map_LoadFile

/*
   ================
   Map_LoadFile
   ================
 */
void Map_LoadFile( const char *filename ){
	clock_t start, finish;
	double elapsed_time;
	start = clock();

	Sys_BeginWait();
	Select_Deselect();
	/*!
	   \todo FIXME TTimo why is this commented out?
	   stability issues maybe? or duplicate feature?
	   forcing to show the console during map load was a good thing IMO
	 */
	//SetInspectorMode(W_CONSOLE);
	Sys_Printf( "Loading map from %s\n", filename );

	Map_Free();
	//++timo FIXME: maybe even easier to have Group_Init called from Map_Free?
	Group_Init();
	g_qeglobals.d_num_entities = 0;
	g_qeglobals.d_parsed_brushes = 0;


	// cancel the map loading process
	// used when conversion between standard map format and BP format is required and the user cancels the process
	g_bCancel_Map_LoadFile = false;

	strcpy( currentmap, filename );

	g_bScreenUpdates = false; // leo: avoid redraws while loading the map (see fenris:1952)

	// prepare to let the map module do the parsing
	FileStream file;
	const char* type = strrchr( filename,'.' );
	if ( type != NULL ) {
		type++;
	}
	// NOTE TTimo opening has binary doesn't make a lot of sense
	// but opening as text confuses the scriptlib parser
	// this may be a problem if we "rb" and use the XML parser, might have an incompatibility
	if ( file.Open( filename, "rb" ) ) {
		Map_Import( &file, type );
	}
	else{
		Sys_FPrintf( SYS_ERR, "ERROR: failed to open %s for read\n", filename );
	}
	file.Close();

	g_bScreenUpdates = true;

	if ( g_bCancel_Map_LoadFile ) {
		Sys_Printf( "Map_LoadFile canceled\n" );
		Map_New();
		Sys_EndWait();
		return;
	}

	if ( !world_entity ) {
		Sys_Printf( "No worldspawn in map.\n" );
		Map_New();
		Sys_EndWait();
		return;
	}
	finish = clock();
	elapsed_time = (double)( finish - start ) / CLOCKS_PER_SEC;

	Sys_Printf( "--- LoadMapFile ---\n" );
	Sys_Printf( "%s\n", filename );

	Sys_Printf( "%5i brushes\n",  g_qeglobals.d_parsed_brushes );
	Sys_Printf( "%5i entities\n", g_qeglobals.d_num_entities );
	Sys_Printf( "%5.2f second(s) load time\n", elapsed_time );

	Sys_EndWait();

	Map_RestoreBetween();

	//
	// move the view to a start position
	//
	Map_StartPosition();

	Map_RegionOff();

	modified = false;
	Sys_SetTitle( filename );

	Texture_ShowInuse();
	QERApp_SortActiveShaders();

	Sys_UpdateWindows( W_ALL );
}
开发者ID:haapanen,项目名称:GtkRadiant,代码行数:96,代码来源:map.cpp

示例15: SplitMeshByPlane

/*
====================
SplitMeshByPlane
====================
*/
void SplitMeshByPlane(mesh_t * in, vec3_t normal, float dist, mesh_t ** front, mesh_t ** back)
{
	int             w, h, split;
	float           d[MAX_PATCH_SIZE][MAX_PATCH_SIZE];
	drawVert_t     *dv, *v1, *v2;
	int             c_front, c_back, c_on;
	mesh_t         *f, *b;
	int             i;
	float           frac;
	int             frontAprox, backAprox;

	for(i = 0; i < 2; i++)
	{
		dv = in->verts;
		c_front = 0;
		c_back = 0;
		c_on = 0;
		for(h = 0; h < in->height; h++)
		{
			for(w = 0; w < in->width; w++, dv++)
			{
				d[h][w] = DotProduct(dv->xyz, normal) - dist;
				if(d[h][w] > ON_EPSILON)
				{
					c_front++;
				}
				else if(d[h][w] < -ON_EPSILON)
				{
					c_back++;
				}
				else
				{
					c_on++;
				}
			}
		}

		*front = NULL;
		*back = NULL;

		if(!c_front)
		{
			*back = in;
			return;
		}
		if(!c_back)
		{
			*front = in;
			return;
		}

		// find a split point
		split = -1;
		for(w = 0; w < in->width - 1; w++)
		{
			if((d[0][w] < 0) != (d[0][w + 1] < 0))
			{
				if(split == -1)
				{
					split = w;
					break;
				}
			}
		}

		if(split == -1)
		{
			if(i == 1)
			{
				Sys_FPrintf(SYS_VRB, "No crossing points in patch\n");
				*front = in;
				return;
			}

			in = TransposeMesh(in);
			InvertMesh(in);
			continue;
		}

		// make sure the split point stays the same for all other rows
		for(h = 1; h < in->height; h++)
		{
			for(w = 0; w < in->width - 1; w++)
			{
				if((d[h][w] < 0) != (d[h][w + 1] < 0))
				{
					if(w != split)
					{
						Sys_Printf("multiple crossing points for patch -- can't clip\n");
						*front = in;
						return;
					}
				}
			}
			if((d[h][split] < 0) == (d[h][split + 1] < 0))
//.........这里部分代码省略.........
开发者ID:otty,项目名称:cake3,代码行数:101,代码来源:fog.c


注:本文中的Sys_FPrintf函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。