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


C++ SkipRestOfLine函数代码示例

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


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

示例1: IT_ParseWeaponParms

static void IT_ParseWeaponParms( const char **holdBuf ) {
	int i;

	while ( holdBuf ) {
		const char *token = COM_ParseExt( holdBuf, qtrue );

		if ( !Q_stricmp( token, "}" ) ) {
			// end of data for this weapon
			break;
		}

		// loop through possible parameters
		for ( i = 0; i < IT_PARM_MAX; i++ ) {
			if ( !Q_stricmp( token, ItemParms[i].parmName ) ) {
				ItemParms[i].func( holdBuf );
				break;
			}
		}

		if ( i < IT_PARM_MAX ) {
			// find parameter???
			continue;
		}

		Com_Printf( S_COLOR_YELLOW "WARNING: bad parameter in external item data '%s'\n", token );
		SkipRestOfLine( holdBuf );
	}
}
开发者ID:BSzili,项目名称:OpenJK,代码行数:28,代码来源:g_itemLoad.cpp

示例2: IT_ParseWeaponParms

static void IT_ParseWeaponParms(const char **holdBuf)
{
	static int	weaponNum,ammoNum;
	const char	*token;
	int		i;


	while (holdBuf)
	{
		token = COM_ParseExt( holdBuf, qtrue );

		if (!Q_stricmp( token, "}" ))	// End of data for this weapon
			break;

		// Loop through possible parameters
		for (i=0;i<IT_PARM_MAX;++i)
		{
			if (!Q_stricmp(token,ItemParms[i].parmName))	
			{
				ItemParms[i].func(holdBuf);
				break;
			}
		}

		if (i < IT_PARM_MAX)	// Find parameter???
		{
			continue;
		}

		gi.Printf("bad parameter in external weapon data '%s'\n", token);
		SkipRestOfLine(holdBuf);
		
	}
}
开发者ID:5Quintessential,项目名称:jedioutcast,代码行数:34,代码来源:g_itemLoad.cpp

示例3: getc

/**

  @author   Mikkel B. Stegmann
  @version  4-17-2000

  @return   Nothing.

*/
void AFReader::SkipComments() {
    int ch;
    ch = getc( fh );
    if ( ch==COMMENT_CHAR ) {
        SkipRestOfLine();
        SkipComments();
    } else {
        ungetc( ch, fh );
    }
}
开发者ID:bweldon,项目名称:CSCI-448-Group-Project,代码行数:18,代码来源:afreader.cpp

示例4: IT_Max

static void IT_Max( const char **holdBuf ) {
	int tokenInt;

	for ( int i = 0; i < 3; i++ ) {
		if ( COM_ParseInt( holdBuf, &tokenInt ) ) {
			SkipRestOfLine( holdBuf );
			return;
		}
		bg_itemlist[itemNum].maxs[i] = tokenInt;
	}
}
开发者ID:BSzili,项目名称:OpenJK,代码行数:11,代码来源:g_itemLoad.cpp

示例5: WPN_AltSplashRadius

void WPN_AltSplashRadius(const char **holdBuf)
{
	float	tokenFlt;

	if( COM_ParseFloat(holdBuf,&tokenFlt))
	{
		SkipRestOfLine(holdBuf);
		return;
	}

	weaponData[wpnParms.weaponNum].altSplashRadius = tokenFlt;
}
开发者ID:Techokami,项目名称:OpenJK,代码行数:12,代码来源:g_weaponLoad.cpp

示例6: WPN_AltSplashDamage

void WPN_AltSplashDamage(const char **holdBuf)
{
	int		tokenInt;

	if( COM_ParseInt(holdBuf,&tokenInt))
	{
		SkipRestOfLine(holdBuf);
		return;
	}

	weaponData[wpnParms.weaponNum].altSplashDamage = tokenInt;
}
开发者ID:Techokami,项目名称:OpenJK,代码行数:12,代码来源:g_weaponLoad.cpp

示例7: IT_Count

static void IT_Count( const char **holdBuf ) {
	int tokenInt;

	if ( COM_ParseInt( holdBuf, &tokenInt ) ) {
		SkipRestOfLine( holdBuf );
		return;
	}

	if ( tokenInt < 0 || tokenInt > 1000 ) {
		gi.Printf( "WARNING: bad Count in external item data '%d'\n", tokenInt );
		return;
	}
	bg_itemlist[itemNum].quantity = tokenInt;
}
开发者ID:BSzili,项目名称:OpenJK,代码行数:14,代码来源:g_itemLoad.cpp

示例8: WPN_AltMissileLight

//--------------------------------------------
void WPN_AltMissileLight(const char **holdBuf)
{
	float	tokenFlt;

	if ( COM_ParseFloat(holdBuf,&tokenFlt)) 
	{
		SkipRestOfLine(holdBuf);
	}

	if ((tokenFlt < 0) || (tokenFlt > 255 )) // FIXME :What are the right values?
	{
		gi.Printf(S_COLOR_YELLOW"WARNING: bad altmissilelight in external weapon data '%f'\n", tokenFlt);
	}
	weaponData[wpnParms.weaponNum].alt_missileDlight = tokenFlt;
}
开发者ID:3ddy,项目名称:Jedi-Academy,代码行数:16,代码来源:g_weaponLoad.cpp

示例9: IT_Min

static void IT_Min(const char **holdBuf)
{
	int		tokenInt;
	int		i;

	for (i=0;i<3;++i)
	{
		if ( COM_ParseInt(holdBuf,&tokenInt)) 
		{
			SkipRestOfLine(holdBuf);
			return;
		}

		bg_itemlist[itemParms.itemNum].mins[i] = tokenInt;
	}

}
开发者ID:5Quintessential,项目名称:jedioutcast,代码行数:17,代码来源:g_itemLoad.cpp

示例10: WPN_AltEnergyPerShot

//--------------------------------------------
void WPN_AltEnergyPerShot(const char **holdBuf)
{
	int		tokenInt;

	if ( COM_ParseInt(holdBuf,&tokenInt)) 
	{
		SkipRestOfLine(holdBuf);
		return;
	}

	if ((tokenInt < 0) || (tokenInt > 1000 )) // FIXME :What are the right values?
	{
		gi.Printf(S_COLOR_YELLOW"WARNING: bad AltEnergyPerShot in external weapon data '%d'\n", tokenInt);
		return;
	}
	weaponData[wpnParms.weaponNum].altEnergyPerShot = tokenInt;
}
开发者ID:3ddy,项目名称:Jedi-Academy,代码行数:18,代码来源:g_weaponLoad.cpp

示例11: WPN_AmmoMax

//--------------------------------------------
void WPN_AmmoMax(const char **holdBuf)
{
	int		tokenInt;

	if ( COM_ParseInt(holdBuf,&tokenInt)) 
	{
		SkipRestOfLine(holdBuf);
		return;
	}

	if ((tokenInt < 0) || (tokenInt > 1000 )) 
	{
		gi.Printf(S_COLOR_YELLOW"WARNING: bad Ammo Max in external weapon data '%d'\n", tokenInt);
		return;
	}
	ammoData[wpnParms.ammoNum].max = tokenInt;
}
开发者ID:3ddy,项目名称:Jedi-Academy,代码行数:18,代码来源:g_weaponLoad.cpp

示例12: WPN_BarrelCount

//--------------------------------------------
void WPN_BarrelCount(const char **holdBuf)
{
	int		tokenInt;

	if ( COM_ParseInt(holdBuf,&tokenInt)) 
	{
		SkipRestOfLine(holdBuf);
		return;
	}

	if ((tokenInt < 0) || (tokenInt > 4 )) 
	{
		gi.Printf(S_COLOR_YELLOW"WARNING: bad Range in external weapon data '%d'\n", tokenInt);
		return;
	}

	weaponData[wpnParms.weaponNum].numBarrels = tokenInt;
}
开发者ID:3ddy,项目名称:Jedi-Academy,代码行数:19,代码来源:g_weaponLoad.cpp

示例13: WPN_AmmoType

//--------------------------------------------
void WPN_AmmoType(const char **holdBuf)
{
	int		tokenInt;

	if ( COM_ParseInt(holdBuf,&tokenInt)) 
	{
		SkipRestOfLine(holdBuf);
		return;
	}

	if ((tokenInt < AMMO_NONE ) || (tokenInt >= AMMO_MAX ))
	{
		gi.Printf(S_COLOR_YELLOW"WARNING: bad Ammotype in external weapon data '%d'\n", tokenInt);
		return;
	}

	weaponData[wpnParms.weaponNum].ammoIndex = tokenInt;
}
开发者ID:3ddy,项目名称:Jedi-Academy,代码行数:19,代码来源:g_weaponLoad.cpp

示例14: IT_Count

static void IT_Count(const char **holdBuf)
{
	int		tokenInt;

	if ( COM_ParseInt(holdBuf,&tokenInt)) 
	{
		SkipRestOfLine(holdBuf);
		return;
	}

	if ((tokenInt < 0) || (tokenInt > 1000 )) // FIXME :What are the right values?
	{
		gi.Printf("WARNING: bad Count in external item data '%d'\n", tokenInt);
		return;
	}
	bg_itemlist[itemParms.itemNum].quantity = tokenInt;

}
开发者ID:5Quintessential,项目名称:jedioutcast,代码行数:18,代码来源:g_itemLoad.cpp

示例15: WP_ParseWeaponParms

//--------------------------------------------
static void WP_ParseWeaponParms(const char **holdBuf)
{
	const char	*token;
	int		i;


	while (holdBuf)
	{
		token = COM_ParseExt( holdBuf, qtrue );

		if (!Q_stricmp( token, "}" ))	// End of data for this weapon
			break;

		// Loop through possible parameters
		for (i=0;i<WPN_PARM_MAX;++i)
		{
			if (!Q_stricmp(token,WpnParms[i].parmName))	
			{
				WpnParms[i].func(holdBuf);
				break;
			}
		}

		if (i < WPN_PARM_MAX)	// Find parameter???
		{
			continue;
		}

		if ( !Q_stricmp( token, "firingForce" ) ||
			!Q_stricmp( token, "altFiringForce") ||
			!Q_stricmp( token, "chargeForce" ) ||
			!Q_stricmp( token, "altChargeForce") ||
			!Q_stricmp( token, "stopForce" ) ||
			!Q_stricmp( token, "selectForce" ) )
		{
			SkipRestOfLine( holdBuf );
			continue;	// Deprecated. Originally part of Force Feedback stuff, which is illegal to redistribute. --eez
		}
		Com_Error(ERR_FATAL,"bad parameter in external weapon data '%s'\n", token);		
	}
}
开发者ID:ctoliver,项目名称:JediKnight2,代码行数:42,代码来源:g_weaponLoad.cpp


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