summaryrefslogtreecommitdiff
path: root/src/resources/resourcemanager.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2014-05-28 17:44:08 +0300
committerAndrei Karas <akaras@inbox.ru>2014-05-28 17:44:08 +0300
commit4415cb66734e67dfcdf8924d354107d27fb70fee (patch)
tree55cbb5de9eaa013ac3b88efad1bba8cfef34c791 /src/resources/resourcemanager.cpp
parent9a6810756795ee7a7ed4854ed76f5dc49ec88cc8 (diff)
downloadmanaverse-4415cb66734e67dfcdf8924d354107d27fb70fee.tar.gz
manaverse-4415cb66734e67dfcdf8924d354107d27fb70fee.tar.bz2
manaverse-4415cb66734e67dfcdf8924d354107d27fb70fee.tar.xz
manaverse-4415cb66734e67dfcdf8924d354107d27fb70fee.zip
Move delay load code from resourcemanager into separate file.
Diffstat (limited to 'src/resources/resourcemanager.cpp')
-rw-r--r--src/resources/resourcemanager.cpp42
1 files changed, 0 insertions, 42 deletions
diff --git a/src/resources/resourcemanager.cpp b/src/resources/resourcemanager.cpp
index 67e9b557e..476149eb3 100644
--- a/src/resources/resourcemanager.cpp
+++ b/src/resources/resourcemanager.cpp
@@ -56,7 +56,6 @@
#include "debug.h"
ResourceManager *ResourceManager::instance = nullptr;
-DelayedAnim ResourceManager::mDelayedAnimations;
ResourceManager::ResourceManager() :
deletedSurfaces(),
@@ -1134,47 +1133,6 @@ Image *ResourceManager::getRescaled(const Image *const image,
return img;
}
-void ResourceManager::delayedLoad()
-{
- BLOCK_START("ResourceManager::delayedLoad")
- static int loadTime = 0;
- if (loadTime < cur_time)
- {
- loadTime = tick_time;
-
- int k = 0;
- DelayedAnimIter it = mDelayedAnimations.begin();
- const DelayedAnimIter it_end = mDelayedAnimations.end();
- while (it != it_end && k < 1)
- {
- (*it)->load();
- AnimationDelayLoad *tmp = *it;
- it = mDelayedAnimations.erase(it);
- delete tmp;
- k ++;
- }
- const int time2 = tick_time;
- if (time2 > loadTime)
- loadTime = time2 + (time2 - loadTime) * 2 + 10;
- else
- loadTime = time2 + 3;
- }
- BLOCK_END("ResourceManager::delayedLoad")
-}
-
-void ResourceManager::removeDelayLoad(const AnimationDelayLoad
- *const delayedLoad)
-{
- FOR_EACH (DelayedAnimIter, it, mDelayedAnimations)
- {
- if (*it == delayedLoad)
- {
- mDelayedAnimations.erase(it);
- return;
- }
- }
-}
-
void ResourceManager::deleteFilesInDirectory(std::string path)
{
path += "/";