本文整理汇总了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 );
}
}
示例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);
}
}
示例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 );
}
}
示例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;
}
}
示例5: WPN_AltSplashRadius
void WPN_AltSplashRadius(const char **holdBuf)
{
float tokenFlt;
if( COM_ParseFloat(holdBuf,&tokenFlt))
{
SkipRestOfLine(holdBuf);
return;
}
weaponData[wpnParms.weaponNum].altSplashRadius = tokenFlt;
}
示例6: WPN_AltSplashDamage
void WPN_AltSplashDamage(const char **holdBuf)
{
int tokenInt;
if( COM_ParseInt(holdBuf,&tokenInt))
{
SkipRestOfLine(holdBuf);
return;
}
weaponData[wpnParms.weaponNum].altSplashDamage = tokenInt;
}
示例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;
}
示例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;
}
示例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;
}
}
示例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;
}
示例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;
}
示例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;
}
示例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;
}
示例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;
}
示例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);
}
}