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


C++ P_ITEM::getColor方法代码示例

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


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

示例1: MakeMenu

void Skills::MakeMenu( P_CHAR pc, int m, int skill, P_ITEM first, P_ITEM second )
{

	Skills::MakeMenu( 
		pc, m, skill, ISVALIDPI(first)? first->getId() : 0, ISVALIDPI(first)? first->getColor() : 0,
		ISVALIDPI(second)? second->getId() : 0, ISVALIDPI(second)? second->getColor() : 0 
	);
	
}
开发者ID:BackupTheBerlios,项目名称:hypnos-svn,代码行数:9,代码来源:addmenu.cpp

示例2: containerSearchFor

	/*!
	\author Luxor
	\brief returns the *index element with the given id and color of the vector of a container(identified by serial)
	\param serial the serial of the container
	\param index the pointer to the integer which we're using for the search
	\param id the id which we're searching for
	\param color the color which we're searching for
	\return the item we're searching for
	\note *index should be 0 at the beginning of the search
	*/
	P_ITEM containerSearchFor(const int serial, int *index, short id, short color)
	{
		P_ITEM pi;
		int loopexit=0;
		while ( ((pi = containerSearch(serial,index)) != 0) && (++loopexit < MAXLOOPS) )
		{
			if (pi->getId()==id  &&
				(color==-1 || pi->getColor()==color) && ISVALIDPI(pi))
			return pi;
		}
		return 0;
	}
开发者ID:nox-wizard,项目名称:noxwizard,代码行数:22,代码来源:pointer.cpp

示例3: MakeMenu

void Skills::MakeMenu( P_CHAR pc, int m, int skill, P_ITEM first, P_ITEM second )
{

	Skills::MakeMenu( 
		pc, m, skill, ISVALIDPI(first)? (unsigned short)first->getId() : (unsigned short)0, ISVALIDPI(first)? (unsigned short)first->getColor() : (unsigned short)0,
		ISVALIDPI(second)? (unsigned short)second->getId() : (unsigned short)0, ISVALIDPI(second)? (unsigned short)second->getColor() : (unsigned short)0 
	);
	
}
开发者ID:nox-wizard,项目名称:noxwizard,代码行数:9,代码来源:addmenu.cpp


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