Example #1
0
bool cSoundResourceManagerBase::ReloadAll()
{    
    bool succed = true;
    for(unsigned int i = 0; i < m_Resources.size(); ++i)
    {
        succed &= ReloadResource(i);
    }

    return succed;
}
Example #2
0
void ResourceCache::HandleBeginFrame(StringHash eventType, VariantMap& eventData)
{
    for (unsigned i = 0; i < fileWatchers_.Size(); ++i)
    {
        String fileName;
        while (fileWatchers_[i]->GetNextChange(fileName))
        {
            // If the filename is a resource we keep track of, reload it
            for (HashMap<ShortStringHash, ResourceGroup>::Iterator j = resourceGroups_.Begin(); j != resourceGroups_.End(); ++j)
            {
                HashMap<StringHash, SharedPtr<Resource> >::Iterator k = j->second_.resources_.Find(StringHash(fileName));
                if (k != j->second_.resources_.End())
                {
                    LOGDEBUG("Reloading changed resource " + fileName);
                    ReloadResource(k->second_);
                }
            }
        }
    }
}
Example #3
0
bool cSoundResourceManagerBase::ReloadResource(const std::string &id)
{
    return ReloadResource(FindResource(id));
}