mirror of
https://gitea.wildfiregames.com/0ad/0ad.git
synced 2026-07-27 22:33:06 +00:00
First draft of a GPG3-style profiler (including tracing into scripts, after a fashion)
This was SVN commit r2090.
This commit is contained in:
@@ -54,17 +54,7 @@ HEntity* CEntityManager::getByHandle( u16 index )
|
||||
return( new HEntity( index ) );
|
||||
}
|
||||
|
||||
std::vector<HEntity>* CEntityManager::matches( EntityPredicate predicate )
|
||||
{
|
||||
std::vector<HEntity>* matchlist = new std::vector<HEntity>;
|
||||
for( int i = 0; i < MAX_HANDLES; i++ )
|
||||
if( m_entities[i].m_refcount && !m_entities[i].m_entity->m_destroyed )
|
||||
if( predicate( m_entities[i].m_entity ) )
|
||||
matchlist->push_back( HEntity( i ) );
|
||||
return( matchlist );
|
||||
}
|
||||
|
||||
std::vector<HEntity>* CEntityManager::matches( EntityPredicateUD predicate, void* userdata )
|
||||
std::vector<HEntity>* CEntityManager::matches( EntityPredicate predicate, void* userdata )
|
||||
{
|
||||
std::vector<HEntity>* matchlist = new std::vector<HEntity>;
|
||||
for( int i = 0; i < MAX_HANDLES; i++ )
|
||||
@@ -74,26 +64,6 @@ std::vector<HEntity>* CEntityManager::matches( EntityPredicateUD predicate, void
|
||||
return( matchlist );
|
||||
}
|
||||
|
||||
std::vector<HEntity>* CEntityManager::matches( EntityPredicate predicate1, EntityPredicate predicate2 )
|
||||
{
|
||||
std::vector<HEntity>* matchlist = new std::vector<HEntity>;
|
||||
for( int i = 0; i < MAX_HANDLES; i++ )
|
||||
if( m_entities[i].m_refcount && !m_entities[i].m_entity->m_destroyed )
|
||||
if( predicate1( m_entities[i].m_entity ) && predicate2( m_entities[i].m_entity ) )
|
||||
matchlist->push_back( HEntity( i ) );
|
||||
return( matchlist );
|
||||
}
|
||||
|
||||
std::vector<HEntity>* CEntityManager::matches( EntityPredicateUD predicate1, EntityPredicateUD predicate2, void* userdata )
|
||||
{
|
||||
std::vector<HEntity>* matchlist = new std::vector<HEntity>;
|
||||
for( int i = 0; i < MAX_HANDLES; i++ )
|
||||
if( m_entities[i].m_refcount && !m_entities[i].m_entity->m_destroyed )
|
||||
if( predicate1( m_entities[i].m_entity, userdata ) && predicate2( m_entities[i].m_entity, userdata ) )
|
||||
matchlist->push_back( HEntity( i ) );
|
||||
return( matchlist );
|
||||
}
|
||||
|
||||
std::vector<HEntity>* CEntityManager::getExtant()
|
||||
{
|
||||
std::vector<HEntity>* activelist = new std::vector<HEntity>;
|
||||
|
||||
Reference in New Issue
Block a user