• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

C++ Log_Write函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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

示例1: AAS_CheckAreaSharedFaces

//===========================================================================
// checks the number of shared faces between the given two areas
// since areas are convex they should only have ONE shared face
// however due to crappy face merging there are sometimes several
// shared faces
//
// Parameter:				-
// Returns:					-
// Changes Globals:		-
//===========================================================================
void AAS_CheckAreaSharedFaces(tmp_area_t *tmparea1, tmp_area_t *tmparea2)
{
	int numsharedfaces, side;
	tmp_face_t *face1, *sharedface;

	if (tmparea1->invalid || tmparea2->invalid) return;

	sharedface = NULL;
	numsharedfaces = 0;
	for (face1 = tmparea1->tmpfaces; face1; face1 = face1->next[side])
	{
		side = face1->frontarea != tmparea1;
		if (face1->backarea == tmparea2 || face1->frontarea == tmparea2)
		{
			sharedface = face1;
			numsharedfaces++;
		} //end if
	} //end if
	if (!sharedface) return;
	//the areas should only have one shared face
	if (numsharedfaces > 1)
	{
		Log_Write("---- tmp area %d and %d have %d shared faces\r\n",
									tmparea1->areanum, tmparea2->areanum, numsharedfaces);
		for (face1 = tmparea1->tmpfaces; face1; face1 = face1->next[side])
		{
			side = face1->frontarea != tmparea1;
			if (face1->backarea == tmparea2 || face1->frontarea == tmparea2)
			{
				Log_Write("face %d, planenum = %d, face->frontarea = %d face->backarea = %d\r\n",
								face1->num, face1->planenum, face1->frontarea->areanum, face1->backarea->areanum);
			} //end if
		} //end if
	} //end if
} //end of the function AAS_CheckAreaSharedFaces
开发者ID:ArtanAhmeti,项目名称:lab,代码行数:45,代码来源:aas_create.c


示例2: AAS_CreateAreas

//===========================================================================
//
// 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
开发者ID:chegestar,项目名称:omni-bot,代码行数:13,代码来源:aas_create.c


示例3: AAS_RemoveTinyFaces

//===========================================================================
//
// Parameter:				-
// Returns:					-
// Changes Globals:		-
//===========================================================================
void AAS_RemoveTinyFaces(void)
{
	int side, num;
	tmp_face_t *face, *nextface;
	tmp_area_t *tmparea;

	//FIXME: loop over the faces instead of area->faces
	Log_Write("AAS_RemoveTinyFaces\r\n");
	num = 0;
	for (tmparea = tmpaasworld.areas; tmparea; tmparea = tmparea->l_next)
	{
		for (face = tmparea->tmpfaces; face; face = nextface)
		{
			side = face->frontarea != tmparea;
			nextface = face->next[side];
			//
			if (WindingArea(face->winding) < 1)
			{
				if (face->frontarea) AAS_RemoveFaceFromArea(face, face->frontarea);
				if (face->backarea) AAS_RemoveFaceFromArea(face, face->backarea);
				AAS_FreeTmpFace(face);
				//Log_Write("area %d face %d is tiny\r\n", tmparea->areanum, face->num);
				num++;
			} //end if
		} //end for
	} //end for
	Log_Write("%d tiny faces removed\r\n", num);
} //end of the function AAS_RemoveTinyFaces
开发者ID:ArtanAhmeti,项目名称:lab,代码行数:34,代码来源:aas_create.c


示例4: AAS_MergeAreaPlaneFaces

//===========================================================================
//
// Parameter:				-
// Returns:					-
// Changes Globals:		-
//===========================================================================
void AAS_MergeAreaPlaneFaces( void ) {
	int num_facemerges = 0;
	int side1;
	tmp_area_t *tmparea, *nexttmparea;
	tmp_face_t *face1;

	Log_Write( "AAS_MergePlaneFaces\r\n" );
	qprintf( "%6d plane face merges", num_facemerges );
	//NOTE: first convex area is a dummy
	for ( tmparea = tmpaasworld.areas; tmparea; tmparea = nexttmparea )
	{
		nexttmparea = tmparea->l_next;
		//
		if ( tmparea->invalid ) {
			continue;
		}
		//
		for ( face1 = tmparea->tmpfaces; face1; face1 = face1->next[side1] )
		{
			side1 = face1->frontarea != tmparea;
			//
			if ( AAS_CanMergePlaneFaces( tmparea, face1->planenum ) ) {
				AAS_MergePlaneFaces( tmparea, face1->planenum );
				nexttmparea = tmparea;
				num_facemerges++;
				qprintf( "\r%6d", num_facemerges );
				break;
			} //end if
		} //end for
	} //end for
	qprintf( "\n" );
	Log_Write( "%6d plane face merges\r\n", num_facemerges );
} //end of the function AAS_MergeAreaPlaneFaces
开发者ID:Sixthly,项目名称:Unvanquished,代码行数:39,代码来源:aas_facemerging.c


示例5: FindQuakeFile2

//===========================================================================
// find a Quake2 file
// returns full path in 'filename'
// sets offset and length of the file
//
// Parameter:				-
// Returns:					-
// Changes Globals:		-
//===========================================================================
qboolean FindQuakeFile2( char *basedir, char *gamedir, char *filename, foundfile_t *file ) {
	int dir, i;
	//NOTE: 3 is necessary (LCC bug???)
	char gamedirs[3][MAX_PATH] = {"","",""};
	char filedir[MAX_PATH] = "";

	//
	if ( gamedir ) {
		strncpy( gamedirs[0], gamedir, MAX_PATH );
	}
	strncpy( gamedirs[1], "baseq2", MAX_PATH );
	//
	//find the file in the two game directories
	for ( dir = 0; dir < 2; dir++ )
	{
		//check if the file is in a directory
		filedir[0] = 0;
		if ( basedir && strlen( basedir ) ) {
			strncpy( filedir, basedir, MAX_PATH );
			AppendPathSeperator( filedir, MAX_PATH );
		} //end if
		if ( strlen( gamedirs[dir] ) ) {
			strncat( filedir, gamedirs[dir], MAX_PATH - strlen( filedir ) );
			AppendPathSeperator( filedir, MAX_PATH );
		} //end if
		strncat( filedir, filename, MAX_PATH - strlen( filedir ) );
		ConvertPath( filedir );
		Log_Write( "accessing %s", filedir );
		if ( !access( filedir, 0x04 ) ) {
			strcpy( file->filename, filedir );
			file->length = 0;
			file->offset = 0;
			return true;
		} //end if
		  //check if the file is in a pak?.pak
		for ( i = 0; i < 10; i++ )
		{
			filedir[0] = 0;
			if ( basedir && strlen( basedir ) ) {
				strncpy( filedir, basedir, MAX_PATH );
				AppendPathSeperator( filedir, MAX_PATH );
			} //end if
			if ( strlen( gamedirs[dir] ) ) {
				strncat( filedir, gamedirs[dir], MAX_PATH - strlen( filedir ) );
				AppendPathSeperator( filedir, MAX_PATH );
			} //end if
			sprintf( &filedir[strlen( filedir )], "pak%d.pak", i );
			if ( !access( filedir, 0x04 ) ) {
				Log_Write( "searching %s in %s", filename, filedir );
				if ( FindFileInPak( filedir, filename, file ) ) {
					return true;
				}
			} //end if
		} //end for
	} //end for
	file->offset = 0;
	file->length = 0;
	return false;
} //end of the function FindQuakeFile2
开发者ID:D4edalus,项目名称:CoD4x_Server,代码行数:68,代码来源:l_utils.c


示例6: AAS_GravitationalSubdivision

//===========================================================================
// NOTE: merge faces and melt edges first
//
// Parameter:				-
// Returns:					-
// Changes Globals:		-
//===========================================================================
void AAS_GravitationalSubdivision( void ) {
	Log_Write( "AAS_GravitationalSubdivision\r\n" );
	numgravitationalsubdivisions = 0;
	qprintf( "%6i gravitational subdivisions", numgravitationalsubdivisions );
	//start with the head node
	AAS_GravitationalSubdivision_r( tmpaasworld.nodes );
	qprintf( "\n" );
	Log_Write( "%6i gravitational subdivisions\r\n", numgravitationalsubdivisions );
} //end of the function AAS_GravitationalSubdivision
开发者ID:AdrienJaguenet,项目名称:Enemy-Territory,代码行数:16,代码来源:aas_gsubdiv.c


示例7: AAS_GetFace

//===========================================================================
//
// Parameter:				-
// Returns:					-
// Changes Globals:		-
//===========================================================================
qboolean AAS_GetFace(winding_t *w, plane_t *p, int side, int *facenum)
{
    int        edgenum, i, j;
    aas_face_t *face;

    //face zero is a dummy, because of the face index with negative numbers
    if ((*aasworld).numfaces == 0)
    {
        (*aasworld).numfaces = 1;
    }

    if ((*aasworld).numfaces >= max_aas.max_faces)
    {
        Error("AAS_MAX_FACES = %d", max_aas.max_faces);
    } //end if
    face = &(*aasworld).faces[(*aasworld).numfaces];
    AAS_GetPlane(p->normal, p->dist, &face->planenum);
    face->faceflags = 0;
    face->firstedge = (*aasworld).edgeindexsize;
    face->frontarea = 0;
    face->backarea  = 0;
    face->numedges  = 0;
    for (i = 0; i < w->numpoints; i++)
    {
        if ((*aasworld).edgeindexsize >= max_aas.max_edgeindexsize)
        {
            Error("AAS_MAX_EDGEINDEXSIZE = %d", max_aas.max_edgeindexsize);
        } //end if
        j = (i + 1) % w->numpoints;
        AAS_GetEdge(w->p[i], w->p[j], &edgenum);
        //if the edge wasn't degenerate
        if (edgenum)
        {
            (*aasworld).edgeindex[(*aasworld).edgeindexsize++] = edgenum;
            face->numedges++;
        } //end if
        else if (verbose)
        {
            Log_Write("AAS_GetFace: face %d had degenerate edge %d-%d\r\n",
                      (*aasworld).numfaces, i, j);
        } //end else
    } //end for
    if (face->numedges < 1
#ifdef NOTHREEVERTEXFACES
            || face->numedges < 3
#endif //NOTHREEVERTEXFACES
       )
    {
        memset(&(*aasworld).faces[(*aasworld).numfaces], 0, sizeof(aas_face_t));
        Log_Write("AAS_GetFace: face %d was tiny\r\n", (*aasworld).numfaces);
        return false;
    } //end if
    *facenum = (*aasworld).numfaces;
    (*aasworld).numfaces++;
    return true;
} //end of the function AAS_GetFace
开发者ID:morsik,项目名称:war-territory,代码行数:62,代码来源:aas_store.c


示例8: AAS_LadderSubdivision

//===========================================================================
//
// Parameter:				-
// Returns:					-
// Changes Globals:		-
//===========================================================================
void AAS_LadderSubdivision( void ) {
	Log_Write( "AAS_LadderSubdivision\r\n" );
	numladdersubdivisions = 0;
	qprintf( "%6i ladder subdivisions", numladdersubdivisions );
	//start with the head node
	AAS_LadderSubdivision_r( tmpaasworld.nodes );
	//
	qprintf( "\n" );
	Log_Write( "%6i ladder subdivisions\r\n", numladdersubdivisions );
} //end of the function AAS_LadderSubdivision
开发者ID:AdrienJaguenet,项目名称:Enemy-Territory,代码行数:16,代码来源:aas_gsubdiv.c


示例9: AAS_CheckArea

//===========================================================================
//
// Parameter:				-
// Returns:					-
// Changes Globals:		-
//===========================================================================
void AAS_CheckArea(tmp_area_t *tmparea)
{
	int side;
	tmp_face_t *face;
	plane_t *plane;
	vec3_t wcenter, acenter = {0, 0, 0};
	vec3_t normal;
	float n, dist;

	if (tmparea->invalid) Log_Print("AAS_CheckArea: invalid area\n");
	for (n = 0, face = tmparea->tmpfaces; face; face = face->next[side])
	{
		//side of the face the area is on
		side = face->frontarea != tmparea;
		WindingCenter(face->winding, wcenter);
		VectorAdd(acenter, wcenter, acenter);
		n++;
	} //end for
	n = 1 / n;
	VectorScale(acenter, n, acenter);
	for (face = tmparea->tmpfaces; face; face = face->next[side])
	{
		//side of the face the area is on
		side = face->frontarea != tmparea;

#ifdef L_DEBUG
		if (WindingError(face->winding))
		{
			Log_Write("AAS_CheckArea: area %d face %d: %s\r\n", tmparea->areanum,
						face->num, WindingErrorString());
		} //end if
#endif

		plane = &mapplanes[face->planenum ^ side];

		if (DotProduct(plane->normal, acenter) - plane->dist < 0)
		{
			Log_Print("AAS_CheckArea: area %d face %d is flipped\n", tmparea->areanum, face->num);
			Log_Print("AAS_CheckArea: area %d center is %f %f %f\n", tmparea->areanum, acenter[0], acenter[1], acenter[2]);
		} //end if
		//check if the winding plane is the same as the face plane
		WindingPlane(face->winding, normal, &dist);
		plane = &mapplanes[face->planenum];
#ifdef L_DEBUG
		if (fabs(dist - plane->dist) > 0.4 ||
				fabs(normal[0] - plane->normal[0]) > 0.0001 ||
				fabs(normal[1] - plane->normal[1]) > 0.0001 ||
				fabs(normal[2] - plane->normal[2]) > 0.0001)
		{
			Log_Write("AAS_CheckArea: area %d face %d winding plane unequal to face plane\r\n",
										tmparea->areanum, face->num);
		} //end if
#endif
	} //end for
} //end of the function AAS_CheckArea
开发者ID:ArtanAhmeti,项目名称:lab,代码行数:61,代码来源:aas_create.c


示例10: AAS_CheckFaceWindingPlane

//===========================================================================
//
// Parameter:               -
// Returns:                 -
// Changes Globals:     -
//===========================================================================
void AAS_CheckFaceWindingPlane(tmp_face_t *face)
{
	float dist, sign1, sign2;
	vec3_t normal;
	plane_t *plane;
	winding_t *w;

	//check if the winding plane is the same as the face plane
	WindingPlane(face->winding, normal, &dist);
	plane = &mapplanes[face->planenum];
	//
	sign1 = DotProduct(plane->normal, normal);

	//
	if(fabs(dist - plane->dist) > 0.4 ||
	        fabs(normal[0] - plane->normal[0]) > 0.0001 ||
	        fabs(normal[1] - plane->normal[1]) > 0.0001 ||
	        fabs(normal[2] - plane->normal[2]) > 0.0001)
	{
		VectorInverse(normal);
		dist = -dist;

		if(fabs(dist - plane->dist) > 0.4 ||
		        fabs(normal[0] - plane->normal[0]) > 0.0001 ||
		        fabs(normal[1] - plane->normal[1]) > 0.0001 ||
		        fabs(normal[2] - plane->normal[2]) > 0.0001)
		{
			Log_Write("AAS_CheckFaceWindingPlane: face %d winding plane unequal to face plane\r\n",
			          face->num);
			//
			sign2 = DotProduct(plane->normal, normal);

			if((sign1 < 0 && sign2 > 0) ||
			        (sign1 > 0 && sign2 < 0))
			{
				Log_Write("AAS_CheckFaceWindingPlane: face %d winding reversed\r\n",
				          face->num);
				w = face->winding;
				face->winding = ReverseWinding(w);
				FreeWinding(w);
			} //end if
		} //end if
		else
		{
			Log_Write("AAS_CheckFaceWindingPlane: face %d winding reversed\r\n",
			          face->num);
			w = face->winding;
			face->winding = ReverseWinding(w);
			FreeWinding(w);
		} //end else
	} //end if
} //end of the function AAS_CheckFaceWindingPlane
开发者ID:Diskutant,项目名称:RTCW-SP,代码行数:58,代码来源:aas_create.c


示例11: AAS_StoreFile

//===========================================================================
//
// Parameter:				-
// Returns:					-
// Changes Globals:		-
//===========================================================================
void AAS_StoreFile( char *filename ) {
	AAS_AllocMaxAAS();

	Log_Write( "AAS_StoreFile\r\n" );
	//
	AAS_StoreBoundingBoxes();
	//
	qprintf( "%6d areas stored", 0 );
	//start with node 1 because node zero is a dummy
	AAS_StoreTree_r( tmpaasworld.nodes );
	qprintf( "\n" );
	Log_Write( "%6d areas stored\r\n", ( *aasworld ).numareas );
	( *aasworld ).loaded = true;
} //end of the function AAS_StoreFile
开发者ID:D4edalus,项目名称:CoD4x_Server,代码行数:20,代码来源:aas_store.c


示例12: Mem_DumpLeaks

void Mem_DumpLeaks()
{
	struct memrec_s *next;
	unsigned int totalleak = 0;
	struct fileleak_s *files = NULL;
	int i;

	for (i=0; i<64; i++)
	{
		next = allocs[i];
		while (next->next != allocs[i])
		{
			struct fileleak_s *find = files;

			while (find && strcmp(find->name, next->next->file) != 0)
			{
				find = find->next;
			}

			if (find)
			{
				find->size += next->next->size;
			}
			else
			{
				find = malloc(sizeof(*find));
				find->name = strdup(next->next->file);
				find->size = next->next->size;
				find->next = files;
				files = find;
			}
				
			Log_Write(0, "Leaked allocation, type %s\nat %s:%d\npointer %d size %d\n", next->next->objecttype, next->next->file, next->next->line, next->next->pointer, next->next->size);

			totalleak += next->next->size;

			next = next->next;
		}
	}

	while(files)
	{
		Log_Write(0, "Total leaked in %s: %d\n", files->name, files->size);
		free(files->name);
		files = files->next;
	}

	Log_Write(0, "Total leaked: %d\n", totalleak);
}
开发者ID:twonds,项目名称:chesspark,代码行数:49,代码来源:mem.c


示例13: AAS_SplitFace

//===========================================================================
// NOTE: the original face is invalid after splitting
//
// Parameter:				-
// Returns:					-
// Changes Globals:		-
//===========================================================================
void AAS_SplitFace(tmp_face_t *face, vec3_t normal, float dist,
							tmp_face_t **frontface, tmp_face_t **backface)
{
	winding_t *frontw, *backw;

	//
	*frontface = *backface = NULL;

	ClipWindingEpsilon(face->winding, normal, dist, FACECLIP_EPSILON, &frontw, &backw);

#ifdef DEBUG
	//
	if (frontw)
	{
		if (WindingIsTiny(frontw))
		{
			Log_Write("AAS_SplitFace: tiny back face\r\n");
			FreeWinding(frontw);
			frontw = NULL;
		} //end if
	} //end if
	if (backw)
	{
		if (WindingIsTiny(backw))
		{
			Log_Write("AAS_SplitFace: tiny back face\r\n");
			FreeWinding(backw);
			backw = NULL;
		} //end if
	} //end if
#endif //DEBUG
	//if the winding was split
	if (frontw)
	{
		//check bounds
		(*frontface) = AAS_AllocTmpFace();
		(*frontface)->planenum = face->planenum;
		(*frontface)->winding = frontw;
		(*frontface)->faceflags = face->faceflags;
	} //end if
	if (backw)
	{
		//check bounds
		(*backface) = AAS_AllocTmpFace();
		(*backface)->planenum = face->planenum;
		(*backface)->winding = backw;
		(*backface)->faceflags = face->faceflags;
	} //end if
} //end of the function AAS_SplitFace
开发者ID:AHPlankton,项目名称:Quake-III-Arena,代码行数:56,代码来源:aas_gsubdiv.c


示例14: AAS_MeltAreaFaceWindings

//===========================================================================
// melt the windings of the faces of all areas
//
// Parameter:				-
// Returns:					-
// Changes Globals:		-
//===========================================================================
void AAS_MeltAreaFaceWindings( void ) {
	tmp_area_t *tmparea;
	int num_windingsplits = 0;

	Log_Write( "AAS_MeltAreaFaceWindings\r\n" );
	qprintf( "%6d edges melted", num_windingsplits );
	//NOTE: first convex area (zero) is a dummy
	for ( tmparea = tmpaasworld.areas; tmparea; tmparea = tmparea->l_next )
	{
		num_windingsplits += AAS_MeltFaceWindingsOfArea( tmparea );
		qprintf( "\r%6d", num_windingsplits );
	} //end for
	qprintf( "\n" );
	Log_Write( "%6d edges melted\r\n", num_windingsplits );
} //end of the function AAS_MeltAreaFaceWindings
开发者ID:chegestar,项目名称:omni-bot,代码行数:22,代码来源:aas_edgemelting.c


示例15: AAS_MergeAreaFaces

//===========================================================================
//
// Parameter:				-
// Returns:					-
// Changes Globals:		-
//===========================================================================
void AAS_MergeAreaFaces(void)
{
    int        num_facemerges = 0;
    int        side1, side2, restart;
    tmp_area_t *tmparea, *lasttmparea;
    tmp_face_t *face1, *face2;

    Log_Write("AAS_MergeAreaFaces\r\n");
    qprintf("%6d face merges", num_facemerges);
    //NOTE: first convex area is a dummy
    lasttmparea = tmpaasworld.areas;
    for (tmparea = tmpaasworld.areas; tmparea; tmparea = tmparea->l_next)
    {
        restart = false;
        //
        if (tmparea->invalid)
        {
            continue;
        }
        //
        for (face1 = tmparea->tmpfaces; face1; face1 = face1->next[side1])
        {
            side1 = face1->frontarea != tmparea;
            for (face2 = face1->next[side1]; face2; face2 = face2->next[side2])
            {
                side2 = face2->frontarea != tmparea;
                //if succesfully merged
                if (AAS_TryMergeFaces(face1, face2))
                {
                    //start over again after merging two faces
                    restart = true;
                    num_facemerges++;
                    qprintf("\r%6d", num_facemerges);
                    AAS_CheckArea(tmparea);
                    break;
                } //end if
            } //end for
            if (restart)
            {
                tmparea = lasttmparea;
                break;
            } //end if
        } //end for
        lasttmparea = tmparea;
    } //end for
    qprintf("\n");
    Log_Write("%6d face merges\r\n", num_facemerges);
} //end of the function AAS_MergeAreaFaces
开发者ID:morsik,项目名称:war-territory,代码行数:54,代码来源:aas_facemerging.c


示例16: ss_handleUNC

/* UNC handling
 *
 * client can pass us a SSREQ_UNC: this contains both a password and a server
 * name (in the form \\server\share). We make a connection to it here and
 * remember the connection so that we can remove it (in ss_cleanconnections)
 * when the client session terminates.
 *
 * We are passed the head of a FNAMELIST in which we should store the connect
 * name for later cleanup. We return the new head of this list.
 *
 * the client will send this request if a unc-style named scan fails
 * with the SSRESP_BADPASS error.
 */
PFNAMELIST
ss_handleUNC( HANDLE hpipe, long lVersion
            , LPSTR password, LPSTR server, PFNAMELIST connects)
{
        NETRESOURCE resource;
        int errorcode;

        resource.lpRemoteName = server;
        resource.lpLocalName = NULL;
        resource.dwType = RESOURCETYPE_DISK;
        resource.lpProvider = NULL;

        errorcode = (int)WNetAddConnection2(&resource, password, NULL, 0);
        if (errorcode == NO_ERROR) {

                /* remember the connection name */
                connects = ss_addtolist(connects, server);

                /* report success */
                ss_sendnewresp( hpipe, lVersion, SSRESP_END
                              , 0, 0, 0, 0, NULL);
        } else {
    		Log_Write(hlogErrors, "Connect error %d for server %s", GetLastError(), server);
                dprintf1(("connect error %d for server %s\n", GetLastError(), server));
                /* report error */
                ss_sendnewresp( hpipe, lVersion, SSRESP_ERROR
                              , 0, 0, 0, 0, NULL);
        }
        return(connects);
} /* ss_handleUNC */
开发者ID:mingpen,项目名称:OpenNT,代码行数:43,代码来源:scan.c


示例17: AAS_FlipSharedFaces

//===========================================================================
//
// Parameter:				-
// Returns:					-
// Changes Globals:		-
//===========================================================================
void AAS_FlipSharedFaces(void)
{
	int i, side1, side2;
	tmp_area_t *tmparea1;
	tmp_face_t *face1, *face2;

	i = 0;
	qprintf("%6d areas checked for shared face flipping", i);
	for (tmparea1 = tmpaasworld.areas; tmparea1; tmparea1 = tmparea1->l_next)
	{
		if (tmparea1->invalid) continue;
		for (face1 = tmparea1->tmpfaces; face1; face1 = face1->next[side1])
		{
			side1 = face1->frontarea != tmparea1;
			if (!face1->frontarea || !face1->backarea) continue;
			//
			for (face2 = face1->next[side1]; face2; face2 = face2->next[side2])
			{
				side2 = face2->frontarea != tmparea1;
				if (!face2->frontarea || !face2->backarea) continue;
				//
				if (face1->frontarea == face2->backarea &&
					face1->backarea == face2->frontarea)
				{
					AAS_FlipFace(face2);
				} //end if
				//recheck side
				side2 = face2->frontarea != tmparea1;
			} //end for
		} //end for
		qprintf("\r%6d", ++i);
	} //end for
	qprintf("\n");
	Log_Write("%6d areas checked for shared face flipping\r\n", i);
} //end of the function AAS_FlipSharedFaces
开发者ID:ArtanAhmeti,项目名称:lab,代码行数:41,代码来源:aas_create.c


示例18: AAS_FlipAreaFaces

//===========================================================================
//
// Parameter:				-
// Returns:					-
// Changes Globals:		-
//===========================================================================
void AAS_FlipAreaFaces(tmp_area_t *tmparea)
{
	int side;
	tmp_face_t *face;
	plane_t *plane;
	vec3_t wcenter, acenter = {0, 0, 0};
	//winding_t *w;
	float n;

	for (n = 0, face = tmparea->tmpfaces; face; face = face->next[side])
	{
		if (!face->frontarea) Error("face %d has no front area\n", face->num);
		//side of the face the area is on
		side = face->frontarea != tmparea;
		WindingCenter(face->winding, wcenter);
		VectorAdd(acenter, wcenter, acenter);
		n++;
	} //end for
	n = 1 / n;
	VectorScale(acenter, n, acenter);
	for (face = tmparea->tmpfaces; face; face = face->next[side])
	{
		//side of the face the area is on
		side = face->frontarea != tmparea;

		plane = &mapplanes[face->planenum ^ side];

		if (DotProduct(plane->normal, acenter) - plane->dist < 0)
		{
			Log_Print("area %d face %d flipped: front area %d, back area %d\n", tmparea->areanum, face->num,
					face->frontarea ? face->frontarea->areanum : 0,
					face->backarea ? face->backarea->areanum : 0);
			/*
			face->planenum = face->planenum ^ 1;
			w = face->winding;
			face->winding = ReverseWinding(w);
			FreeWinding(w);
			*/
		} //end if
#ifdef L_DEBUG
		{
			float dist;
			vec3_t normal;

			//check if the winding plane is the same as the face plane
			WindingPlane(face->winding, normal, &dist);
			plane = &mapplanes[face->planenum];
			if (fabs(dist - plane->dist) > 0.4 ||
					fabs(normal[0] - plane->normal[0]) > 0.0001 ||
					fabs(normal[1] - plane->normal[1]) > 0.0001 ||
					fabs(normal[2] - plane->normal[2]) > 0.0001)
			{
				Log_Write("area %d face %d winding plane unequal to face plane\r\n",
											tmparea->areanum, face->num);
			} //end if
		}
#endif
	} //end for
} //end of the function AAS_FlipAreaFaces
开发者ID:ArtanAhmeti,项目名称:lab,代码行数:65,代码来源:aas_create.c


示例19: BotDumpCharacter

//===========================================================================
//
// Parameter:           -
// Returns:             -
// Changes Globals:     -
//===========================================================================
void BotDumpCharacter( bot_character_t *ch )
{
    int i;

    Log_Write( "%s", ch->filename );
    Log_Write( "skill %d\n", ch->skill );
    Log_Write( "{\n" );

    for ( i = 0; i < MAX_CHARACTERISTICS; i++ )
    {
        switch ( ch->c[ i ].type )
        {
        case CT_INTEGER:
            Log_Write( " %4d %d\n", i, ch->c[ i ].value.integer );
            break;

        case CT_FLOAT:
            Log_Write( " %4d %f\n", i, ch->c[ i ].value._float );
            break;

        case CT_STRING:
            Log_Write( " %4d %s\n", i, ch->c[ i ].value.string );
            break;
        } //end case
    } //end for

    Log_Write( "}\n" );
} //end of the function BotDumpCharacter
开发者ID:gfx0,项目名称:Unvanquished,代码行数:34,代码来源:be_ai_char.c


示例20: AAS_CreateAreaSettings

//===========================================================================
//
// Parameter:				-
// Returns:					-
// Changes Globals:		-
//===========================================================================
void AAS_CreateAreaSettings(void)
{
	int i, flags, side, numgrounded, numladderareas, numliquidareas;
	tmp_face_t *face;
	tmp_area_t *tmparea;

	numgrounded = 0;
	numladderareas = 0;
	numliquidareas = 0;
	Log_Write("AAS_CreateAreaSettings\r\n");
	i = 0;
	qprintf("%6d areas provided with settings", i);
	for (tmparea = tmpaasworld.areas; tmparea; tmparea = tmparea->l_next)
	{
		//if the area is invalid there no need to create settings for it
		if (tmparea->invalid) continue;

		tmparea->settings = (tmp_areasettings_t *) GetClearedMemory(sizeof(tmp_areasettings_t));
		tmparea->settings->contents = tmparea->contents;
		tmparea->settings->modelnum = tmparea->modelnum;
		flags = 0;
		for (face = tmparea->tmpfaces; face; face = face->next[side])
		{
			side = face->frontarea != tmparea;
			flags |= face->faceflags;
		} //end for
		tmparea->settings->areaflags = 0;
		if (flags & FACE_GROUND)
		{
			tmparea->settings->areaflags |= AREA_GROUNDED;
			numgrounded++;
		} //end if
		if (flags & FACE_LADDER)
		{
			tmparea->settings->areaflags |= AREA_LADDER;
			numladderareas++;
		} //end if
		if (tmparea->contents & (AREACONTENTS_WATER |
											AREACONTENTS_SLIME |
											AREACONTENTS_LAVA))
		{
			tmparea->settings->areaflags |= AREA_LIQUID;
			numliquidareas++;
		} //end if
		//presence type of the area
		tmparea->settings->presencetype = tmparea->presencetype;
		//
		qprintf("\r%6d", ++i);
	} //end for
	qprintf("\n");
#ifdef AASINFO
	Log_Print("%6d grounded areas\n", numgrounded);
	Log_Print("%6d ladder areas\n", numladderareas);
	Log_Print("%6d liquid areas\n", numliquidareas);
#endif //AASINFO
} //end of the function AAS_CreateAreaSettings
开发者ID:ArtanAhmeti,项目名称:lab,代码行数:62,代码来源:aas_create.c



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C++ Log_Write_Event函数代码示例发布时间:2022-05-30
下一篇:
C++ Log_Trace函数代码示例发布时间:2022-05-30
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap