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


C++ gameinfo_import_t::Printf方法代码示例

本文整理汇总了C++中gameinfo_import_t::Printf方法的典型用法代码示例。如果您正苦于以下问题:C++ gameinfo_import_t::Printf方法的具体用法?C++ gameinfo_import_t::Printf怎么用?C++ gameinfo_import_t::Printf使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在gameinfo_import_t的用法示例。


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

示例1: 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:ctoliver,项目名称:JediKnight2,代码行数:21,代码来源:g_weaponLoad.cpp

示例2: 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:ctoliver,项目名称:JediKnight2,代码行数:21,代码来源:g_weaponLoad.cpp

示例3: 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

示例4: 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

示例5: WPN_AltMissileLightColor

//--------------------------------------------
void WPN_AltMissileLightColor(const char **holdBuf)
{
	int i;
	float	tokenFlt;

	for (i=0;i<3;++i)
	{
		if ( COM_ParseFloat(holdBuf,&tokenFlt)) 
		{
			SkipRestOfLine(holdBuf);
			continue;
		}

		if ((tokenFlt < 0) || (tokenFlt > 1 ))
		{
			gi.Printf(S_COLOR_YELLOW"WARNING: bad altmissilelightcolor in external weapon data '%f'\n", tokenFlt);
			continue;
		}
		weaponData[wpnParms.weaponNum].alt_missileDlightColor[i] = tokenFlt;
	}

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

示例6: 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

示例7: WPN_WeaponType

void WPN_WeaponType( const char **holdBuf)
{
	int weaponNum;
	const char	*tokenStr;

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

	// FIXME : put this in an array (maybe a weaponDataInternal array???)
	if (!Q_stricmp(tokenStr,"WP_NONE"))	
		weaponNum = WP_NONE;
	else if (!Q_stricmp(tokenStr,"WP_SABER"))	
		weaponNum = WP_SABER;
	else if (!Q_stricmp(tokenStr,"WP_BLASTER_PISTOL"))	
		weaponNum = WP_BLASTER_PISTOL;
	else if (!Q_stricmp(tokenStr,"WP_BRYAR_PISTOL"))	
		weaponNum = WP_BRYAR_PISTOL;
	else if (!Q_stricmp(tokenStr,"WP_BLASTER"))	
		weaponNum = WP_BLASTER;
	else if (!Q_stricmp(tokenStr,"WP_DISRUPTOR"))	
		weaponNum = WP_DISRUPTOR;
	else if (!Q_stricmp(tokenStr,"WP_BOWCASTER"))	
		weaponNum = WP_BOWCASTER;
	else if (!Q_stricmp(tokenStr,"WP_REPEATER"))	
		weaponNum = WP_REPEATER;
	else if (!Q_stricmp(tokenStr,"WP_DEMP2"))	
		weaponNum = WP_DEMP2;
	else if (!Q_stricmp(tokenStr,"WP_FLECHETTE"))	
		weaponNum = WP_FLECHETTE;
	else if (!Q_stricmp(tokenStr,"WP_ROCKET_LAUNCHER"))	
		weaponNum = WP_ROCKET_LAUNCHER;
	else if (!Q_stricmp(tokenStr,"WP_CONCUSSION"))	
		weaponNum = WP_CONCUSSION;
	else if (!Q_stricmp(tokenStr,"WP_THERMAL"))	
		weaponNum = WP_THERMAL;
	else if (!Q_stricmp(tokenStr,"WP_TRIP_MINE"))	
		weaponNum = WP_TRIP_MINE;
	else if (!Q_stricmp(tokenStr,"WP_DET_PACK"))	
		weaponNum = WP_DET_PACK;
	else if (!Q_stricmp(tokenStr,"WP_STUN_BATON"))	
		weaponNum = WP_STUN_BATON;
	else if (!Q_stricmp(tokenStr,"WP_BOT_LASER"))	
		weaponNum = WP_BOT_LASER;
	else if (!Q_stricmp(tokenStr,"WP_EMPLACED_GUN"))	
		weaponNum = WP_EMPLACED_GUN;
	else if (!Q_stricmp(tokenStr,"WP_MELEE"))	
		weaponNum = WP_MELEE;
	else if (!Q_stricmp(tokenStr,"WP_TURRET"))
		weaponNum = WP_TURRET;
	else if (!Q_stricmp(tokenStr,"WP_ATST_MAIN"))
		weaponNum = WP_ATST_MAIN;
	else if (!Q_stricmp(tokenStr,"WP_ATST_SIDE"))
		weaponNum = WP_ATST_SIDE;
	else if (!Q_stricmp(tokenStr,"WP_TIE_FIGHTER"))
		weaponNum = WP_TIE_FIGHTER;
	else if (!Q_stricmp(tokenStr,"WP_RAPID_FIRE_CONC"))
		weaponNum = WP_RAPID_FIRE_CONC;
	else if (!Q_stricmp(tokenStr,"WP_JAWA"))
		weaponNum = WP_JAWA;
	else if (!Q_stricmp(tokenStr,"WP_TUSKEN_RIFLE"))
		weaponNum = WP_TUSKEN_RIFLE;
	else if (!Q_stricmp(tokenStr,"WP_TUSKEN_STAFF"))
		weaponNum = WP_TUSKEN_STAFF;
	else if (!Q_stricmp(tokenStr,"WP_SCEPTER"))
		weaponNum = WP_SCEPTER;
	else if (!Q_stricmp(tokenStr,"WP_NOGHRI_STICK"))
		weaponNum = WP_NOGHRI_STICK;
	else
	{
		weaponNum = 0;
		gi.Printf(S_COLOR_YELLOW"WARNING: bad weapontype in external weapon data '%s'\n", tokenStr);
	}

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


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