void CollisionList::clearCollisionList()
{
    ListIterator<collision> cleaner = *ListIterator<collision>(collList).SetFirst();

    while(!cleaner.IsEmpty())
    {
        delete cleaner.GetCurrent()->collisionSpot;
        cleaner.Remove();
    }
}
Exemple #2
0
bool ObjectTypeCache::unloadObjectType(const char *objtypename)
{
    ObjectType *objTypeToDelete = NULL;

    ListIterator<ObjectType> i = ListIterator<ObjectType>(cachedObjectTypes);
    i.SetFirst();

    while(!(i.IsLast()))
    {
        objTypeToDelete = i.GetCurrent();

        if(!strncmp(objTypeToDelete->objectTypeName, objtypename, MAX_STRING_LENGTH))
        {
            i.Remove();
            return true;
        }

        i.Next();
    }

    return false;
}