您当前的位置:首页 > IT编程 > C++
| C语言 | Java | VB | VC | python | Android | TensorFlow | C++ | oracle | 学术与代码 | cnn卷积神经网络 | gnn | 图像修复 | Keras | 数据集 | Neo4j | 自然语言处理 | 深度学习 | 医学CAD | 医学影像 | 超参数 | pointnet | pytorch | 异常检测 | Transformers | 情感分类 | 知识图谱 |

自学教程:C++ G_Printf函数代码示例

51自学网 2021-06-01 21:01:50
  C++
这篇教程C++ G_Printf函数代码示例写得很实用,希望能帮到您。

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

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

示例1: G_ParseMapRotationFile

/*===============G_ParseMapRotationFileLoad the map rotations from a map rotation file===============*/static bool G_ParseMapRotationFile( const char *fileName ){  char          *text_p;  int           i;  int           len;  char          *token;  char          text[ 20000 ];  char          mrName[ MAX_QPATH ];  bool      mrNameSet = false;  fileHandle_t  f;  // load the file  len = trap_FS_FOpenFile( fileName, &f, FS_READ );  if( len <= 0 )    return false;  if( len >= sizeof( text ) - 1 )  {    G_Printf( S_COLOR_RED "ERROR: map rotation file %s too long/n", fileName );    return false;  }  trap_FS_Read( text, len, f );  text[ len ] = 0;  trap_FS_FCloseFile( f );  // parse the text  text_p = text;  // read optional parameters  while( 1 )  {    token = COM_Parse( &text_p );    if( !token )      break;    if( !Q_stricmp( token, "" ) )      break;    if( !Q_stricmp( token, "{" ) )    {      if( mrNameSet )      {        //check for name space clashes        for( i = 0; i < mapRotations.numRotations; i++ )        {          if( !Q_stricmp( mapRotations.rotations[ i ].name, mrName ) )          {            G_Printf( S_COLOR_RED "ERROR: a map rotation is already named %s/n", mrName );            return false;          }        }        Q_strncpyz( mapRotations.rotations[ mapRotations.numRotations ].name, mrName, MAX_QPATH );        if( !G_ParseMapRotation( &mapRotations.rotations[ mapRotations.numRotations ], &text_p ) )        {          G_Printf( S_COLOR_RED "ERROR: %s: failed to parse map rotation %s/n", fileName, mrName );          return false;        }        //start parsing particle systems again        mrNameSet = false;        if( mapRotations.numRotations == MAX_MAP_ROTATIONS )        {          G_Printf( S_COLOR_RED "ERROR: maximum number of map rotations (%d) reached/n",                    MAX_MAP_ROTATIONS );          return false;        }        else          mapRotations.numRotations++;        continue;      }      else      {        G_Printf( S_COLOR_RED "ERROR: unamed map rotation/n" );        return false;      }    }    if( !mrNameSet )    {      Q_strncpyz( mrName, token, sizeof( mrName ) );      mrNameSet = true;    }    else    {      G_Printf( S_COLOR_RED "ERROR: map rotation already named/n" );      return false;    }//.........这里部分代码省略.........
开发者ID:TheDushan,项目名称:OpenWolf,代码行数:101,


示例2: Svcmd_EntityShow_f

/*===================Svcmd_EntityShow_f===================*/void Svcmd_EntityShow_f( void ){	int       entityNum;	int       lastTargetIndex, targetIndex;	gentity_t *selection;	gentity_t *possibleTarget = NULL;	char argument[ 6 ];	if (trap_Argc() != 2)	{		G_Printf("usage: entityShow <entityId>/n");		return;	}	trap_Argv( 1, argument, sizeof( argument ) );	entityNum = atoi( argument );	if (entityNum >= level.num_entities || entityNum < MAX_CLIENTS)	{		G_Printf("entityId %d is out of range/n", entityNum);		return;	}	selection = &g_entities[entityNum];	if (!selection->inuse)	{		G_Printf("entity slot %d is unused/free/n", entityNum);		return;	}	G_Printf( "
C++ G_RELATIVE函数代码示例
C++ G_PlayEffectID函数代码示例
万事OK自学网:51自学网_软件自学网_CAD自学网自学excel、自学PS、自学CAD、自学C语言、自学css3实例,是一个通过网络自主学习工作技能的自学平台,网友喜欢的软件自学网站。