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


C++ SListIterator::start方法代码示例

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


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

示例1:

bool SDLEntity2D::LoadFrame ( std::string Name, std::string TexName, std::string MaskName, int FrameDelay, int x, int y, SGZ::RGBCOLOUR ColourKey )
{
	/// Load up a Texture into an Animation
	SListIterator<SGZAnimGroup2D*> AnimListITR = AnimList.getIterator();

	for( AnimListITR.start(); AnimListITR.valid(); AnimListITR.forth() )
		if((AnimListITR.item()->AnimName.compare(Name))==0)
		{
			SGZAnimFrame2D *Frame = new SGZAnimFrame2D;
			Frame->TextureName = TexName;
			Frame->MaskName = MaskName;
			Frame->delay = FrameDelay;
			Frame->u = x;
			Frame->v = y;
			Frame->colkey = ColourKey;
			AnimListITR.item()->FrameList.append(Frame);
			AnimListITR.item()->AnimNum++;
			AnimListITR.item()->FrameITR = AnimListITR.item()->FrameList.getIterator();

			if(!manTextures->checkExist(TexName))
				SGZ::Logger.log( SGZLOG::Warning, "Texture " + TexName + " has not been loaded yet.. make sure it is before calling this frame!");
			return true;
		}

	SGZ::Logger.log( SGZLOG::Warning, "Animation \"" + Name + "\" does not exist!\n");
	return false;
}
开发者ID:stuckie,项目名称:sgzengine,代码行数:27,代码来源:SDLEntity2D.cpp

示例2: checkExist

bool MTexture::checkExist ( const std::string &Name )
{
	SListIterator<TextureObj*> TextureITR = mTextureList.getIterator();
	for( TextureITR.start(); TextureITR.valid(); TextureITR.forth() )
		if(TextureITR.item()->mName.compare(Name)==0)
			return true;

	return false;
}
开发者ID:stuckie,项目名称:ludumdare,代码行数:9,代码来源:MTexture.cpp

示例3: setColourKey

bool MTexture::setColourKey ( const std::string &Name, const SGZ::RGBCOLOUR &key )
{
	SListIterator<TextureObj*> TextureITR = mTextureList.getIterator();
	for( TextureITR.start(); TextureITR.valid(); TextureITR.forth() )
		if(TextureITR.item()->mName.compare(Name)==0)
			TextureITR.item()->mData->setColourKey(key);


	SGZ::Logger.log( SGZLOG::Warning, "Texture " + Name + " does not exist!\n");
	return false;
}
开发者ID:stuckie,项目名称:ludumdare,代码行数:11,代码来源:MTexture.cpp

示例4: getTexture

void* MTexture::getTexture( const std::string &Name )
{
	SListIterator<TextureObj*> TextureITR = mTextureList.getIterator();
	for( TextureITR.start(); TextureITR.valid(); TextureITR.forth() )
		if(TextureITR.item()->mName.compare(Name)==0)
		{
			return TextureITR.item()->mData->getTexture();
		}

	SGZ::Logger.log( SGZLOG::Warning, "Texture " + Name + " does not exist!\n");
	return NULL;
}
开发者ID:stuckie,项目名称:ludumdare,代码行数:12,代码来源:MTexture.cpp

示例5:

MTexture::~MTexture()
{
	/** Destructor */
	SListIterator<TextureObj*> TextureITR = mTextureList.getIterator();

	TextureITR.start();
	while (TextureITR.valid())
	{
		mTextureList.remove(TextureITR);
		TextureITR.forth();
	}
}
开发者ID:stuckie,项目名称:ludumdare,代码行数:12,代码来源:MTexture.cpp

示例6: blitTexture

bool MTexture::blitTexture ( const std::string &Name, const SGZ::VECTOR3 &vector, const SGZ::SCALER u, const SGZ::SCALER v, const SGZ::SCALER w, const SGZ::SCALER h )
{
	SListIterator<TextureObj*> TextureITR = mTextureList.getIterator();
	for( TextureITR.start(); TextureITR.valid(); TextureITR.forth() )
		if(TextureITR.item()->mName.compare(Name)==0)
		{
			TextureITR.item()->mData->blitTexture(vector,u,v,w,h);
			return true;
		}
	SGZ::Logger.log( SGZLOG::Warning, "Texture " + Name + " does not exist!\n");
	return false;
}
开发者ID:stuckie,项目名称:ludumdare,代码行数:12,代码来源:MTexture.cpp

示例7: delTexture

bool MTexture::delTexture( const std::string &Name )
{
	SListIterator<TextureObj*> TextureITR = mTextureList.getIterator();
	for( TextureITR.start(); TextureITR.valid(); TextureITR.forth() )
		if(TextureITR.item()->mName.compare(Name)==0)
		{
			mTextureList.remove(TextureITR);
			return true;
		}

	SGZ::Logger.log( SGZLOG::Warning, "Texture " + Name + " does not exist!\n");
	return false;
}
开发者ID:stuckie,项目名称:ludumdare,代码行数:13,代码来源:MTexture.cpp

示例8: addTexMask

bool MTexture::addTexMask( const std::string &Name, const std::string &Maskname )
{
	SListIterator<TextureObj*> TextureITR = mTextureList.getIterator();
	for( TextureITR.start(); TextureITR.valid(); TextureITR.forth() )
		if(TextureITR.item()->mName.compare(Name)==0)
		{
			TextureITR.item()->mData->loadTextureMask(Maskname);
			return true;
		}

	SGZ::Logger.log( SGZLOG::Warning, "Texture " + Name + " does not exist!\n");
	return false;
}
开发者ID:stuckie,项目名称:ludumdare,代码行数:13,代码来源:MTexture.cpp


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