本文整理汇总了C++中SListIterator::forth方法的典型用法代码示例。如果您正苦于以下问题:C++ SListIterator::forth方法的具体用法?C++ SListIterator::forth怎么用?C++ SListIterator::forth使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类SListIterator
的用法示例。
在下文中一共展示了SListIterator::forth方法的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;
}
示例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;
}
示例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;
}
示例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;
}
示例5:
MTexture::~MTexture()
{
/** Destructor */
SListIterator<TextureObj*> TextureITR = mTextureList.getIterator();
TextureITR.start();
while (TextureITR.valid())
{
mTextureList.remove(TextureITR);
TextureITR.forth();
}
}
示例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;
}
示例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;
}
示例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;
}