本文整理汇总了C++中SListIterator::Item方法的典型用法代码示例。如果您正苦于以下问题:C++ SListIterator::Item方法的具体用法?C++ SListIterator::Item怎么用?C++ SListIterator::Item使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类SListIterator
的用法示例。
在下文中一共展示了SListIterator::Item方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1:
bool SDLEntity2D::LoadFrame ( std::string Name, std::string TexName, std::string MaskName, int FrameDelay, int x, int y, SGZCOLOUR 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 = "none";
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(!SGZInterpret.accessServer()->World()->accessTextureManager()->CheckExist(TexName))
SGZLogger.warn("Texture %s has not been loaded yet.. make sure it is before calling this frame!", TexName.c_str());
return true;
}
SGZLogger.warn("Animation \"%s\" does not exist!\n",Name.c_str());
return false;
}
示例2: DestroyInterface
bool SDLAudio::DestroyInterface(void)
{
/** Destroy a client interface */
SListIterator<SGZMusic*> MusicListITR = MusicList.GetIterator();
MusicListITR.Start();
while (MusicListITR.Valid())
{
Mix_FreeMusic(MusicListITR.Item()->Data);
MusicList.Remove(MusicListITR);
MusicListITR.Forth();
}
SListIterator<SGZSound*> SFXListITR = SFXList.GetIterator();
SFXListITR.Start();
while (SFXListITR.Valid())
{
Mix_FreeChunk(SFXListITR.Item()->Data);
SFXList.Remove(SFXListITR);
SFXListITR.Forth();
}
Mix_CloseAudio();
return true;
}
示例3: CheckVar
std::string MEntity::CheckVar ( std::string Name, std::string VarName )
{
SListIterator<IEntity*> EntityListITR = EntityList.GetIterator();
for( EntityListITR.Start(); EntityListITR.Valid(); EntityListITR.Forth() )
if(EntityListITR.Item()->GetName().compare(Name)==0)
return EntityListITR.Item()->CheckVar(VarName);
SGZLogger.warn("Entity %s does not exist!\n", Name.c_str());
return "none";
}
示例4: NextEvent
void CInterpret::NextEvent( void )
{
SListIterator<IEvent*> EventListITR = EventList.GetIterator();
for( EventListITR.Start(); EventListITR.Valid(); EventListITR.Forth() )
{
if(EventListITR.Item()->doEvent())
EventListITR.Item()->handled(true);
}
CleanEvents();
}
示例5: GetAnimation
std::string MEntity::GetAnimation( std::string Name )
{
/** Return the current X Position */
SListIterator<IEntity*> EntityListITR = EntityList.GetIterator();
for( EntityListITR.Start(); EntityListITR.Valid(); EntityListITR.Forth() )
if(EntityListITR.Item()->GetName().compare(Name)==0)
return EntityListITR.Item()->GetAnimation();
SGZLogger.warn("Entity %s does not exist!\n", Name.c_str());
return "none";
}
示例6: GetDepth
SGZSCALER MEntity::GetDepth ( std::string Name )
{
/** Return the current width */
SListIterator<IEntity*> EntityListITR = EntityList.GetIterator();
for( EntityListITR.Start(); EntityListITR.Valid(); EntityListITR.Forth() )
if(EntityListITR.Item()->GetName().compare(Name)==0)
return EntityListITR.Item()->GetDepth();
SGZLogger.warn("Entity %s does not exist!\n", Name.c_str());
return 0;
}
示例7: DeleteAnimation
bool MEntity::DeleteAnimation( std::string Name, std::string AnimName )
{
SListIterator<IEntity*> EntityListITR = EntityList.GetIterator();
for( EntityListITR.Start(); EntityListITR.Valid(); EntityListITR.Forth() )
if(EntityListITR.Item()->GetName().compare(Name)==0)
{
EntityListITR.Item()->DeleteAnimation( AnimName );
return true;
}
SGZLogger.warn("Entity %s does not exist!\n", Name.c_str());
return false;
}
示例8: MoveTo
bool MEntity::MoveTo ( std::string Name, SGZVECTOR vector )
{
/** Move to direct co-ordinates */
SListIterator<IEntity*> EntityListITR = EntityList.GetIterator();
for( EntityListITR.Start(); EntityListITR.Valid(); EntityListITR.Forth() )
if(EntityListITR.Item()->GetName().compare(Name)==0)
{
EntityListITR.Item()->MoveTo( vector );
return true;
}
SGZLogger.warn("Entity %s does not exist!\n", Name.c_str());
return false;
}
示例9: ChangeVar
bool MEntity::ChangeVar ( std::string Name, std::string VarName, std::string Value )
{
SListIterator<IEntity*> EntityListITR = EntityList.GetIterator();
for( EntityListITR.Start(); EntityListITR.Valid(); EntityListITR.Forth() )
if(EntityListITR.Item()->GetName().compare(Name)==0)
{
EntityListITR.Item()->ChangeVar(VarName, Value);
return true;
}
SGZLogger.warn("Entity %s does not exist!\n", Name.c_str());
return false;
}
示例10: SetDepth
bool MEntity::SetDepth ( std::string Name, SGZSCALER value )
{
SListIterator<IEntity*> EntityListITR = EntityList.GetIterator();
for( EntityListITR.Start(); EntityListITR.Valid(); EntityListITR.Forth() )
if(EntityListITR.Item()->GetName().compare(Name)==0)
{
EntityListITR.Item()->SetDepth( value );
return false;
}
SGZLogger.warn("Entity %s does not exist!\n", Name.c_str());
return false;
}
示例11: MoveDeltaZ
bool MEntity::MoveDeltaZ ( std::string Name, SGZVECTORVAL amount )
{
SListIterator<IEntity*> EntityListITR = EntityList.GetIterator();
for( EntityListITR.Start(); EntityListITR.Valid(); EntityListITR.Forth() )
if(EntityListITR.Item()->GetName().compare(Name)==0)
{
EntityListITR.Item()->MoveDeltaZ( amount );
return true;
}
SGZLogger.warn("Entity %s does not exist!\n", Name.c_str());
return false;
}
示例12: FadeInSFX
int SDLAudio::FadeInSFX( std::string SFXName, int time, int loops, int channel)
{
/** Play SFX */
SListIterator<SGZSound*> SFXListITR = SFXList.GetIterator();
for( SFXListITR.Start(); SFXListITR.Valid(); SFXListITR.Forth() )
if((SFXListITR.Item()->Name.compare(SFXName))==0)
{
return Mix_FadeInChannel(channel, SFXListITR.Item()->Data, loops, time);
}
SGZLogger.warn("AudioMAN: Can't find SFX \"%s\" to Fade In!\n", SFXName.c_str());
return -1;
}
示例13: LoadFrame
bool MEntity::LoadFrame ( std::string Name, std::string AnimName, std::string TexName, std::string MaskName, int FrameDelay, int u, int v, SGZCOLOUR ColourKey )
{
/** Load up a Texture into an Animation*/
SListIterator<IEntity*> EntityListITR = EntityList.GetIterator();
for( EntityListITR.Start(); EntityListITR.Valid(); EntityListITR.Forth() )
if(EntityListITR.Item()->GetName().compare(Name)==0)
{
EntityListITR.Item()->LoadFrame( AnimName, TexName, MaskName, FrameDelay, u, v, ColourKey );
return true;
}
SGZLogger.warn("Entity %s does not exist!\n", Name.c_str());
return false;
}
示例14: SetCollisionGeom
bool MEntity::SetCollisionGeom ( std::string Name, int type )
{
/** Set the collision type */
SListIterator<IEntity*> EntityListITR = EntityList.GetIterator();
for( EntityListITR.Start(); EntityListITR.Valid(); EntityListITR.Forth() )
if(EntityListITR.Item()->GetName().compare(Name)==0)
{
EntityListITR.Item()->SetCollisionGeom( type );
return true;
}
SGZLogger.warn("Entity %s does not exist!\n", Name.c_str());
return false;
}
示例15: Stop
bool MEntity::Stop ( std::string Name )
{
/** Stop moving/rotating/scaling immediately */
SListIterator<IEntity*> EntityListITR = EntityList.GetIterator();
for( EntityListITR.Start(); EntityListITR.Valid(); EntityListITR.Forth() )
if(EntityListITR.Item()->GetName().compare(Name)==0)
{
EntityListITR.Item()->Stop( );
return true;
}
SGZLogger.warn("Entity %s does not exist!\n", Name.c_str());
return false;
}