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

C++ COM_ParseString函数代码示例

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

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



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

示例1: WPN_AltMuzzleEffect

//--------------------------------------------
void WPN_AltMuzzleEffect(const char **holdBuf)
{
	const char	*tokenStr;

	if ( COM_ParseString(holdBuf,&tokenStr)) 
	{
		return;
	}
	// ONLY DO THIS ON THE GAME SIDE
#ifndef _USRDLL

	int len = strlen(tokenStr);

	len++;
	if (len > 64)
	{
		len = 64;
		gi.Printf(S_COLOR_YELLOW"WARNING: AltMuzzleEffect '%s' too long in external WEAPONS.DAT\n", tokenStr);
	}

	G_EffectIndex( tokenStr );
	Q_strncpyz(weaponData[wpnParms.weaponNum].mAltMuzzleEffect,tokenStr,len);

#endif
}
开发者ID:3ddy,项目名称:Jedi-Academy,代码行数:26,代码来源:g_weaponLoad.cpp


示例2: WPN_Ammo

//--------------------------------------------
void WPN_Ammo(const char **holdBuf)
{
	const char	*tokenStr;

	if ( COM_ParseString(holdBuf,&tokenStr)) 
	{
		return;
	}

	if (!Q_stricmp(tokenStr,"AMMO_NONE"))	
		wpnParms.ammoNum = AMMO_NONE;
	else if (!Q_stricmp(tokenStr,"AMMO_FORCE"))	
		wpnParms.ammoNum = AMMO_FORCE;
	else if (!Q_stricmp(tokenStr,"AMMO_BLASTER"))	
		wpnParms.ammoNum = AMMO_BLASTER;
	else if (!Q_stricmp(tokenStr,"AMMO_POWERCELL"))	
		wpnParms.ammoNum = AMMO_POWERCELL;
	else if (!Q_stricmp(tokenStr,"AMMO_METAL_BOLTS"))	
		wpnParms.ammoNum = AMMO_METAL_BOLTS;
	else if (!Q_stricmp(tokenStr,"AMMO_ROCKETS"))	
		wpnParms.ammoNum = AMMO_ROCKETS;
	else if (!Q_stricmp(tokenStr,"AMMO_EMPLACED"))	
		wpnParms.ammoNum = AMMO_EMPLACED;
	else if (!Q_stricmp(tokenStr,"AMMO_THERMAL"))	
		wpnParms.ammoNum = AMMO_THERMAL;
	else if (!Q_stricmp(tokenStr,"AMMO_TRIPMINE"))	
		wpnParms.ammoNum = AMMO_TRIPMINE;
	else if (!Q_stricmp(tokenStr,"AMMO_DETPACK"))	
		wpnParms.ammoNum = AMMO_DETPACK;
	else
	{
		gi.Printf(S_COLOR_YELLOW"WARNING: bad ammotype in external weapon data '%s'\n", tokenStr);
		wpnParms.ammoNum = 0;
	}
}
开发者ID:3ddy,项目名称:Jedi-Academy,代码行数:36,代码来源:g_weaponLoad.cpp


示例3: WPN_FuncName

//--------------------------------------------
void WPN_FuncName(const char **holdBuf)
{
	const char	*tokenStr;

	if ( COM_ParseString(holdBuf,&tokenStr))
	{
		return;
	}

	size_t len = strlen(tokenStr);

	len++;
	if (len > 64)
	{
		len = 64;
		gi.Printf(S_COLOR_YELLOW"WARNING: FuncName '%s' too long in external WEAPONS.DAT\n", tokenStr);
	}

	for ( func_t* s=funcs ; s->name ; s++ ) {
		if ( !Q_stricmp(s->name, tokenStr) ) {
			// found it
			weaponData[wpnParms.weaponNum].func = (void*)s->func;
			return;
		}
	}
	gi.Printf(S_COLOR_YELLOW"WARNING: FuncName '%s' in external WEAPONS.DAT does not exist\n", tokenStr);
}
开发者ID:Techokami,项目名称:OpenJK,代码行数:28,代码来源:g_weaponLoad.cpp


示例4: WPN_AltFuncName

//--------------------------------------------
void WPN_AltFuncName(const char **holdBuf)
{
	const char	*tokenStr;

	if ( COM_ParseString(holdBuf,&tokenStr)) 
	{
		return;
	}

	// ONLY DO THIS ON THE GAME SIDE
#ifndef _USRDLL
	int len = strlen(tokenStr);
	len++;
	if (len > 64)
	{
		len = 64;
		gi.Printf(S_COLOR_YELLOW"WARNING: AltFuncName '%s' too long in external WEAPONS.DAT\n", tokenStr);
	}

	for ( func_t* s=funcs ; s->name ; s++ ) {
		if ( !Q_stricmp(s->name, tokenStr) ) {
			// found it
			weaponData[wpnParms.weaponNum].altfunc = (void*)s->func;
			return;
		}
	}
	gi.Printf(S_COLOR_YELLOW"WARNING: AltFuncName %s in external WEAPONS.DAT does not exist\n", tokenStr);

#endif
}
开发者ID:3ddy,项目名称:Jedi-Academy,代码行数:31,代码来源:g_weaponLoad.cpp


示例5: IT_Type

static void IT_Type(const char **holdBuf)
{
	int type;
	const char	*tokenStr;

	if (COM_ParseString(holdBuf,&tokenStr)) 
	{
		return;
	}

	if (!Q_stricmp(tokenStr,"IT_BAD"))	
		type = IT_BAD;
	else if (!Q_stricmp(tokenStr,"IT_WEAPON"))	
		type = IT_WEAPON;
	else if (!Q_stricmp(tokenStr,"IT_AMMO"))	
		type = IT_AMMO;
	else if (!Q_stricmp(tokenStr,"IT_ARMOR"))
		type = IT_ARMOR;
	else if (!Q_stricmp(tokenStr,"IT_HEALTH"))
		type = IT_HEALTH;
	else if (!Q_stricmp(tokenStr,"IT_HOLDABLE"))	
		type = IT_HOLDABLE;
	else if (!Q_stricmp(tokenStr,"IT_BATTERY"))	
		type = IT_BATTERY;
	else if (!Q_stricmp(tokenStr,"IT_HOLOCRON"))	
		type = IT_HOLOCRON;
	else
	{
		type = IT_BAD;
		gi.Printf("WARNING: bad itemname in external item data '%s'\n", tokenStr);
	}

	bg_itemlist[itemParms.itemNum].giType = (itemType_t) type;

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


示例6: IT_ClassName

static void IT_ClassName( const char **holdBuf ) {
	int len;
	const char *tokenStr;

	if ( COM_ParseString( holdBuf, &tokenStr ) ) {
		return;
	}

	len = strlen( tokenStr ) + 1;
	if ( len > 32 ) {
		len = 32;
		gi.Printf( "WARNING: weaponclass too long in external ITEMS.DAT '%s'\n", tokenStr );
	}

	bg_itemlist[itemNum].classname = G_NewString( tokenStr );
}
开发者ID:BSzili,项目名称:OpenJK,代码行数:16,代码来源:g_itemLoad.cpp


示例7: IT_WorldModel

static void IT_WorldModel( const char **holdBuf ) {
	int len;
	const char *tokenStr;

	if ( COM_ParseString( holdBuf, &tokenStr ) ) {
		return;
	}

	len = strlen( tokenStr ) + 1;
	if ( len > 64 ) {
		len = 64;
		gi.Printf( "WARNING: world model too long in external ITEMS.DAT '%s'\n", tokenStr );
	}

	bg_itemlist[itemNum].world_model = G_NewString( tokenStr );
}
开发者ID:BSzili,项目名称:OpenJK,代码行数:16,代码来源:g_itemLoad.cpp


示例8: IT_PickupSound

static void IT_PickupSound( const char **holdBuf ) {
	int len;
	const char *tokenStr;

	if ( COM_ParseString( holdBuf, &tokenStr ) ) {
		return;
	}

	len = strlen( tokenStr ) + 1;
	if ( len > 32 ) {
		len = 32;
		gi.Printf("WARNING: Pickup Sound too long in external ITEMS.DAT '%s'\n", tokenStr);
	}

	bg_itemlist[itemNum].pickup_sound = G_NewString(tokenStr);
}
开发者ID:BSzili,项目名称:OpenJK,代码行数:16,代码来源:g_itemLoad.cpp


示例9: WPN_SelectFrc

//--------------------------------------------
void WPN_SelectFrc( const char **holdBuf )
{
	const char	*tokenStr;
	int		len;

	if ( COM_ParseString( holdBuf,&tokenStr )) 
	{
		return;
	}

	len = strlen( tokenStr );
	len++;

	if (len > 64)
	{
		len = 64;
		gi.Printf(S_COLOR_YELLOW"WARNING: selectFrc too long in external WEAPONS.DAT '%s'\n", tokenStr);
	}
}
开发者ID:kikili,项目名称:OpenJK,代码行数:20,代码来源:g_weaponLoad.cpp


示例10: WPN_WeaponClass

//--------------------------------------------
void WPN_WeaponClass(const char **holdBuf)
{
	int len;
	const char	*tokenStr;

	if (COM_ParseString(holdBuf,&tokenStr)) 
	{
		return;
	}

	len = strlen(tokenStr);
	len++;
	if (len > 32)
	{
		len = 32;
		gi.Printf(S_COLOR_YELLOW"WARNING: weaponclass too long in external WEAPONS.DAT '%s'\n", tokenStr);
	}

	Q_strncpyz(weaponData[wpnParms.weaponNum].classname,tokenStr,len);
}
开发者ID:3ddy,项目名称:Jedi-Academy,代码行数:21,代码来源:g_weaponLoad.cpp


示例11: IT_Icon

static void IT_Icon(const char **holdBuf)
{
	int len;
	const char	*tokenStr;

	if (COM_ParseString(holdBuf,&tokenStr)) 
	{
		return;
	}

	len = strlen(tokenStr);
	len++;
	if (len > 32)
	{
		len = 32;
		gi.Printf("WARNING: icon too long in external ITEMS.DAT '%s'\n", tokenStr);
	}

	bg_itemlist[itemParms.itemNum].icon = G_NewString(tokenStr);
}
开发者ID:5Quintessential,项目名称:jedioutcast,代码行数:20,代码来源:g_itemLoad.cpp


示例12: WPN_AltChargeSnd

//--------------------------------------------
void WPN_AltChargeSnd(const char **holdBuf)
{
	const char	*tokenStr;
	int		len;

	if ( COM_ParseString(holdBuf,&tokenStr)) 
	{
		return;
	}

	len = strlen(tokenStr);
	len++;
	if (len > 64)
	{
		len = 64;
		gi.Printf(S_COLOR_YELLOW"WARNING: altChargeSnd too long in external WEAPONS.DAT '%s'\n", tokenStr);
	}

	Q_strncpyz(weaponData[wpnParms.weaponNum].altChargeSnd,tokenStr,len);
}
开发者ID:3ddy,项目名称:Jedi-Academy,代码行数:21,代码来源:g_weaponLoad.cpp


示例13: WPN_MissileName

//--------------------------------------------
void WPN_MissileName(const char **holdBuf)
{
	int len;
	const char	*tokenStr;

	if ( COM_ParseString(holdBuf,&tokenStr)) 
	{
		return;
	}

	len = strlen(tokenStr);
	len++;
	if (len > 64)
	{
		len = 64;
		gi.Printf(S_COLOR_YELLOW"WARNING: MissileName too long in external WEAPONS.DAT '%s'\n", tokenStr);
	}

	Q_strncpyz(weaponData[wpnParms.weaponNum].missileMdl,tokenStr,len);

}
开发者ID:3ddy,项目名称:Jedi-Academy,代码行数:22,代码来源:g_weaponLoad.cpp


示例14: WPN_MuzzleEffect

//--------------------------------------------
void WPN_MuzzleEffect(const char **holdBuf)
{
	const char	*tokenStr;

	if ( COM_ParseString(holdBuf,&tokenStr))
	{
		return;
	}

	size_t len = strlen(tokenStr);

	len++;
	if (len > 64)
	{
		len = 64;
		gi.Printf(S_COLOR_YELLOW"WARNING: MuzzleEffect '%s' too long in external WEAPONS.DAT\n", tokenStr);
	}

	G_EffectIndex( tokenStr );
	Q_strncpyz(weaponData[wpnParms.weaponNum].mMuzzleEffect,tokenStr,len);
}
开发者ID:Techokami,项目名称:OpenJK,代码行数:22,代码来源:g_weaponLoad.cpp


示例15: WPN_AmmoIcon

//--------------------------------------------
void WPN_AmmoIcon(const char **holdBuf)
{
	const char	*tokenStr;
	int		len;

	if ( COM_ParseString(holdBuf,&tokenStr)) 
	{
		return;
	}

	len = strlen(tokenStr);
	len++;
	if (len > 32)
	{
		len = 32;
		gi.Printf(S_COLOR_YELLOW"WARNING: ammoicon too long in external WEAPONS.DAT '%s'\n", tokenStr);
	}

	Q_strncpyz(ammoData[wpnParms.ammoNum].icon,tokenStr,len);

}
开发者ID:3ddy,项目名称:Jedi-Academy,代码行数:22,代码来源:g_weaponLoad.cpp


示例16: WPN_SelectFrc

//--------------------------------------------
void WPN_SelectFrc( const char **holdBuf )
{
	const char	*tokenStr;
	int		len;

	if ( COM_ParseString( holdBuf,&tokenStr )) 
	{
		return;
	}

	len = strlen( tokenStr );
	len++;

	if (len > 64)
	{
		len = 64;
		gi.Printf(S_COLOR_YELLOW"WARNING: selectFrc too long in external WEAPONS.DAT '%s'\n", tokenStr);
	}

#ifdef _IMMERSION
	Q_strncpyz( weaponData[wpnParms.weaponNum].selectFrc,tokenStr,len);
#endif
}
开发者ID:3ddy,项目名称:Jedi-Academy,代码行数:24,代码来源:g_weaponLoad.cpp


示例17: IT_Name

static void IT_Name( const char **holdBuf ) {
	const char *tokenStr;

	if ( COM_ParseString( holdBuf, &tokenStr ) ) {
		return;
	}

	if ( !Q_stricmp( tokenStr, "ITM_NONE" ) ) {
		itemNum = ITM_NONE;
	}
	else if ( !Q_stricmp( tokenStr, "ITM_STUN_BATON_PICKUP" ) ) {
		itemNum = ITM_STUN_BATON_PICKUP;
	}
	else if ( !Q_stricmp( tokenStr, "ITM_SABER_PICKUP" ) ) {
		itemNum = ITM_SABER_PICKUP;
	}
	else if ( !Q_stricmp( tokenStr, "ITM_BRYAR_PISTOL_PICKUP" ) ) {
		itemNum = ITM_BRYAR_PISTOL_PICKUP;
	}
	else if ( !Q_stricmp( tokenStr, "ITM_BLASTER_PICKUP" ) ) {
		itemNum = ITM_BLASTER_PICKUP;
	}
	else if ( !Q_stricmp( tokenStr, "ITM_DISRUPTOR_PICKUP" ) ) {
		itemNum = ITM_DISRUPTOR_PICKUP;
	}
	else if ( !Q_stricmp( tokenStr, "ITM_BOWCASTER_PICKUP" ) ) {
		itemNum = ITM_BOWCASTER_PICKUP;
	}
	else if ( !Q_stricmp( tokenStr, "ITM_REPEATER_PICKUP" ) ) {
		itemNum = ITM_REPEATER_PICKUP;
	}
	else if ( !Q_stricmp( tokenStr, "ITM_DEMP2_PICKUP" ) ) {
		itemNum = ITM_DEMP2_PICKUP;
	}
	else if ( !Q_stricmp( tokenStr, "ITM_FLECHETTE_PICKUP" ) ) {
		itemNum = ITM_FLECHETTE_PICKUP;
	}
	else if ( !Q_stricmp( tokenStr, "ITM_ROCKET_LAUNCHER_PICKUP" ) ) {
		itemNum = ITM_ROCKET_LAUNCHER_PICKUP;
	}
	else if ( !Q_stricmp( tokenStr, "ITM_THERMAL_DET_PICKUP" ) ) {
		itemNum = ITM_THERMAL_DET_PICKUP;
	}
	else if ( !Q_stricmp( tokenStr, "ITM_TRIP_MINE_PICKUP" ) ) {
		itemNum = ITM_TRIP_MINE_PICKUP;
	}
	else if ( !Q_stricmp( tokenStr, "ITM_DET_PACK_PICKUP" ) ) {
		itemNum = ITM_DET_PACK_PICKUP;
	}
	else if ( !Q_stricmp( tokenStr, "ITM_BOT_LASER_PICKUP" ) ) {
		itemNum = ITM_BOT_LASER_PICKUP;
	}
	else if ( !Q_stricmp( tokenStr, "ITM_EMPLACED_GUN_PICKUP" ) ) {
		itemNum = ITM_EMPLACED_GUN_PICKUP;
	}
	else if ( !Q_stricmp( tokenStr, "ITM_TURRET_PICKUP" ) ) {
		itemNum = ITM_TURRET_PICKUP;
	}
	else if ( !Q_stricmp( tokenStr, "ITM_MELEE" ) ) {
		itemNum = ITM_MELEE;
	}
	else if ( !Q_stricmp( tokenStr, "ITM_ATST_MAIN_PICKUP" ) ) {
		itemNum = ITM_ATST_MAIN_PICKUP;
	}
	else if ( !Q_stricmp( tokenStr, "ITM_ATST_SIDE_PICKUP" ) ) {
		itemNum = ITM_ATST_SIDE_PICKUP;
	}
	else if ( !Q_stricmp( tokenStr, "ITM_TIE_FIGHTER_PICKUP" ) ) {
		itemNum = ITM_TIE_FIGHTER_PICKUP;
	}
	else if ( !Q_stricmp( tokenStr, "ITM_RAPID_FIRE_CONC_PICKUP" ) ) {
		itemNum = ITM_RAPID_FIRE_CONC_PICKUP;
	}
	else if ( !Q_stricmp( tokenStr, "ITM_AMMO_FORCE_PICKUP" ) ) {
		itemNum = ITM_AMMO_FORCE_PICKUP;
	}
	else if ( !Q_stricmp( tokenStr, "ITM_AMMO_BLASTER_PICKUP" ) ) {
		itemNum = ITM_AMMO_BLASTER_PICKUP;
	}
	else if ( !Q_stricmp( tokenStr, "ITM_AMMO_POWERCELL_PICKUP" ) ) {
		itemNum = ITM_AMMO_POWERCELL_PICKUP;
	}
	else if ( !Q_stricmp( tokenStr, "ITM_AMMO_METAL_BOLTS_PICKUP" ) ) {
		itemNum = ITM_AMMO_METAL_BOLTS_PICKUP;
	}
	else if ( !Q_stricmp( tokenStr, "ITM_AMMO_ROCKETS_PICKUP" ) ) {
		itemNum = ITM_AMMO_ROCKETS_PICKUP;
	}
	else if ( !Q_stricmp( tokenStr, "ITM_AMMO_EMPLACED_PICKUP" ) ) {
		itemNum = ITM_AMMO_EMPLACED_PICKUP;
	}
	else if ( !Q_stricmp( tokenStr, "ITM_AMMO_THERMAL_PICKUP" ) ) {
		itemNum = ITM_AMMO_THERMAL_PICKUP;
	}
	else if ( !Q_stricmp( tokenStr, "ITM_AMMO_TRIPMINE_PICKUP" ) ) {
		itemNum = ITM_AMMO_TRIPMINE_PICKUP;
	}
	else if ( !Q_stricmp( tokenStr, "ITM_AMMO_DETPACK_PICKUP" ) ) {
		itemNum = ITM_AMMO_DETPACK_PICKUP;
	}
//.........这里部分代码省略.........
开发者ID:BSzili,项目名称:OpenJK,代码行数:101,代码来源:g_itemLoad.cpp


示例18: NPC_ParseParms


//.........这里部分代码省略.........
				break;
			}

			SkipBracedSection( &p );
		}
		if ( !p ) 
		{
			return qfalse;
		}

		if ( G_ParseLiteral( &p, "{" ) ) 
		{
			return qfalse;
		}
			
		// parse the NPC info block
		while ( 1 ) 
		{
			token = COM_ParseExt( &p, qtrue );
			if ( !token[0] ) 
			{
				gi.Printf( S_COLOR_RED"ERROR: unexpected EOF while parsing '%s'\n", NPCName );
				return qfalse;
			}

			if ( !Q_stricmp( token, "}" ) ) 
			{
				break;
			}
	//===MODEL PROPERTIES===========================================================
			// headmodel
			if ( !Q_stricmp( token, "headmodel" ) ) 
			{
				if ( COM_ParseString( &p, &value ) ) 
				{
					continue;
				}

				if(!Q_stricmp("none", value))
				{
					ri->headModelName[0] = NULL;
					//Zero the head clamp range so the torso & legs don't lag behind
					ri->headYawRangeLeft = 
					ri->headYawRangeRight = 
					ri->headPitchRangeUp = 
					ri->headPitchRangeDown = 0;
				}
				else
				{
					Q_strncpyz( ri->headModelName, value, sizeof(ri->headModelName), qtrue);
				}
				continue;
			}
			
			// torsomodel
			if ( !Q_stricmp( token, "torsomodel" ) ) 
			{
				if ( COM_ParseString( &p, &value ) ) 
				{
					continue;
				}

				if(!Q_stricmp("none", value))
				{
					ri->torsoModelName[0] = NULL;
					//Zero the torso clamp range so the legs don't lag behind
开发者ID:CairnTrenor,项目名称:OpenJK,代码行数:67,代码来源:NPC_stats.cpp


示例19: IT_Tag

static void IT_Tag( const char **holdBuf ) {
	int tag;
	const char *tokenStr;

	if ( COM_ParseString( holdBuf, &tokenStr ) ) {
		return;
	}

	if ( !Q_stricmp( tokenStr, "WP_NONE" ) ) {
		tag = WP_NONE;
	}
	else if ( !Q_stricmp( tokenStr,"WP_STUN_BATON" ) ) {
		tag = WP_STUN_BATON;
	}
	else if ( !Q_stricmp( tokenStr,"WP_SABER" ) ) {
		tag = WP_SABER;
	}
	else if ( !Q_stricmp( tokenStr,"WP_BRYAR_PISTOL" ) ) {
		tag = WP_BRYAR_PISTOL;
	}
	else if ( !Q_stricmp( tokenStr,"WP_BLASTER" ) ) {
		tag = WP_BLASTER;
	}
	else if ( !Q_stricmp( tokenStr,"WP_DISRUPTOR" ) ) {
		tag = WP_DISRUPTOR;
	}
	else if ( !Q_stricmp( tokenStr,"WP_BOWCASTER" ) ) {
		tag = WP_BOWCASTER;
	}
	else if ( !Q_stricmp( tokenStr,"WP_REPEATER" ) ) {
		tag = WP_REPEATER;
	}
	else if ( !Q_stricmp( tokenStr,"WP_DEMP2" ) ) {
		tag = WP_DEMP2;
	}
	else if ( !Q_stricmp( tokenStr,"WP_FLECHETTE" ) ) {
		tag = WP_FLECHETTE;
	}
	else if ( !Q_stricmp( tokenStr,"WP_ROCKET_LAUNCHER" ) ) {
		tag = WP_ROCKET_LAUNCHER;
	}
	else if ( !Q_stricmp( tokenStr,"WP_THERMAL" ) ) {
		tag = WP_THERMAL;
	}
	else if ( !Q_stricmp( tokenStr,"WP_TRIP_MINE" ) ) {
		tag = WP_TRIP_MINE;
	}
	else if ( !Q_stricmp( tokenStr,"WP_DET_PACK" ) ) {
		tag = WP_DET_PACK;
	}
	else if ( !Q_stricmp( tokenStr,"WP_BOT_LASER" ) ) {
		tag = WP_BOT_LASER;
	}
	else if ( !Q_stricmp( tokenStr,"WP_EMPLACED_GUN" ) ) {
		tag = WP_EMPLACED_GUN;
	}
	else if ( !Q_stricmp( tokenStr,"WP_MELEE" ) ) {
		tag = WP_MELEE;
	}
	else if ( !Q_stricmp( tokenStr,"WP_TURRET" ) ) {
		tag = WP_TURRET;
	}
	else if ( !Q_stricmp( tokenStr,"WP_ATST_MAIN" ) ) {
		tag = WP_ATST_MAIN;
	}
	else if ( !Q_stricmp( tokenStr,"WP_ATST_SIDE" ) ) {
		tag = WP_ATST_SIDE;
	}
	else if ( !Q_stricmp( tokenStr,"WP_TIE_FIGHTER" ) ) {
		tag = WP_TIE_FIGHTER;
	}
	else if ( !Q_stricmp( tokenStr,"WP_RAPID_FIRE_CONC" ) ) {
		tag = WP_RAPID_FIRE_CONC;
	}
	else if ( !Q_stricmp( tokenStr,"WP_BLASTER_PISTOL" ) ) {
		tag = WP_BLASTER_PISTOL;
	}
	else if ( !Q_stricmp( tokenStr,"AMMO_FORCE" ) ) {
		tag = AMMO_FORCE;
	}
	else if ( !Q_stricmp( tokenStr,"AMMO_BLASTER" ) ) {
		tag = AMMO_BLASTER;
	}
	else if ( !Q_stricmp( tokenStr,"AMMO_POWERCELL" ) ) {
		tag = AMMO_POWERCELL;
	}
	else if ( !Q_stricmp( tokenStr,"AMMO_METAL_BOLTS" ) ) {
		tag = AMMO_METAL_BOLTS;
	}
	else if ( !Q_stricmp( tokenStr,"AMMO_ROCKETS" ) ) {
		tag = AMMO_ROCKETS;
	}
	else if ( !Q_stricmp( tokenStr,"AMMO_EMPLACED" ) ) {
		tag = AMMO_EMPLACED;
	}
	else if ( !Q_stricmp( tokenStr,"AMMO_THERMAL" ) ) {
		tag = AMMO_THERMAL;
	}
	else if ( !Q_stricmp( tokenStr,"AMMO_TRIPMINE" ) ) {
		tag = AMMO_TRIPMINE;
//.........这里部分代码省略.........
开发者ID:BSzili,项目名称:OpenJK,代码行数:101,代码来源:g_itemLoad.cpp


示例20: IT_Tag

static void IT_Tag(const char **holdBuf)
{
	int tag;
	const char	*tokenStr;

	if (COM_ParseString(holdBuf,&tokenStr)) 
	{
		return;
	}

	if (!Q_stricmp(tokenStr,"WP_NONE"))	
		tag = WP_NONE;
	else if (!Q_stricmp(tokenStr,"WP_STUN_BATON"))	
		tag = WP_STUN_BATON;
	else if (!Q_stricmp(tokenStr,"WP_SABER"))	
		tag = WP_SABER;
	else if (!Q_stricmp(tokenStr,"WP_BLASTER_PISTOL"))	
		tag = WP_BLASTER_PISTOL;
	else if (!Q_stricmp(tokenStr,"WP_BRYAR_PISTOL"))	
		tag = WP_BRYAR_PISTOL;
	else if (!Q_stricmp(tokenStr,"WP_BLASTER"))	
		tag = WP_BLASTER;
	else if (!Q_stricmp(tokenStr,"WP_DISRUPTOR"))	
		tag = WP_DISRUPTOR;
	else if (!Q_stricmp(tokenStr,"WP_BOWCASTER"))	
		tag = WP_BOWCASTER;
	else if (!Q_stricmp(tokenStr,"WP_REPEATER"))	
		tag = WP_REPEATER;
	else if (!Q_stricmp(tokenStr,"WP_DEMP2"))	
		tag = WP_DEMP2;
	else if (!Q_stricmp(tokenStr,"WP_FLECHETTE"))	
		tag = WP_FLECHETTE;
	else if (!Q_stricmp(tokenStr,"WP_ROCKET_LAUNCHER"))	
		tag = WP_ROCKET_LAUNCHER;
	else if (!Q_stricmp(tokenStr,"WP_CONCUSSION"))	
		tag = WP_CONCUSSION;
	else if (!Q_stricmp(tokenStr,"WP_THERMAL"))	
		tag = WP_THERMAL;
	else if (!Q_stricmp(tokenStr,"WP_TRIP_MINE"))	
		tag = WP_TRIP_MINE;
	else if (!Q_stricmp(tokenStr,"WP_DET_PACK"))	
		tag = WP_DET_PACK;
//	else if (!Q_stricmp(tokenStr,"WP_TRICORDER"))	
//		tag = WP_TRICORDER;
	else if (!Q_stricmp(tokenStr,"WP_BOT_LASER"))	
		tag = WP_BOT_LASER;
	else if (!Q_stricmp(tokenStr,"WP_EMPLACED_GUN"))	
		tag = WP_EMPLACED_GUN;
	else if (!Q_stricmp(tokenStr,"WP_MELEE"))	
		tag = WP_MELEE;
	else if (!Q_stricmp(tokenStr,"WP_TURRET"))
		tag = WP_TURRET;
	else if (!Q_stricmp(tokenStr,"WP_ATST_MAIN"))
		tag = WP_ATST_MAIN;
	else if (!Q_stricmp(tokenStr,"WP_ATST_SIDE"))
		tag = WP_ATST_SIDE;
	else if (!Q_stricmp(tokenStr,"WP_TIE_FIGHTER"))
		tag = WP_TIE_FIGHTER;
	else if (!Q_stricmp(tokenStr,"WP_RAPID_FIRE_CONC"))
		tag = WP_RAPID_FIRE_CONC;
	else if (!Q_stricmp(tokenStr,"WP_BLASTER_PISTOL"))
		tag = WP_BLASTER_PISTOL;
	else if (!Q_stricmp(tokenStr,"WP_JAWA"))
		tag = WP_JAWA;
	else if (!Q_stricmp(tokenStr,"WP_TUSKEN_RIFLE"))
		tag = WP_TUSKEN_RIFLE;
	else if (!Q_stricmp(tokenStr,"WP_TUSKEN_STAFF"))
		tag = WP_TUSKEN_STAFF;
	else if (!Q_stricmp(tokenStr,"WP_SCEPTER"))
		tag = WP_SCEPTER;
	else if (!Q_stricmp(tokenStr,"WP_NOGHRI_STICK"))
		tag = WP_NOGHRI_STICK;
	else if (!Q_stricmp(tokenStr,"AMMO_FORCE"))	
		tag = AMMO_FORCE;
	else if (!Q_stricmp(tokenStr,"AMMO_BLASTER"))	
		tag = AMMO_BLASTER;
	else if (!Q_stricmp(tokenStr,"AMMO_POWERCELL"))	
		tag = AMMO_POWERCELL;
	else if (!Q_stricmp(tokenStr,"AMMO_METAL_BOLTS"))	
		tag = AMMO_METAL_BOLTS;
	else if (!Q_stricmp(tokenStr,"AMMO_ROCKETS"))	
		tag = AMMO_ROCKETS;
	else if (!Q_stricmp(tokenStr,"AMMO_EMPLACED"))	
		tag = AMMO_EMPLACED;
	else if (!Q_stricmp(tokenStr,"AMMO_THERMAL"))	
		tag = AMMO_THERMAL;
	else if (!Q_stricmp(tokenStr,"AMMO_TRIPMINE"))	
		tag = AMMO_TRIPMINE;
	else if (!Q_stricmp(tokenStr,"AMMO_DETPACK"))	
		tag = AMMO_DETPACK;
	else if (!Q_stricmp(tokenStr,"FP_HEAL"))	
	{
		tag = FP_HEAL;
	}
	else if (!Q_stricmp(tokenStr,"FP_LEVITATION"))	
	{
		tag = FP_LEVITATION;
	}
	else if (!Q_stricmp(tokenStr,"FP_SPEED"))	
	{
//.........这里部分代码省略.........
开发者ID:JamesKhoury,项目名称:OpenJK,代码行数:101,代码来源:g_itemLoad.cpp



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

专题导读
上一篇:
C++ CONCAT函数代码示例发布时间:2022-05-30
下一篇:
C++ COM_ParseExt函数代码示例发布时间: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