summaryrefslogtreecommitdiff
path: root/src/resources/resourcemanager
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2016-05-25 22:17:03 +0300
committerAndrei Karas <akaras@inbox.ru>2016-05-25 22:17:03 +0300
commitea0809826d530f82dc84f8e046b3d11a797dd716 (patch)
tree65b8141e1c9d3591ad95f771a7ca2c4667865e81 /src/resources/resourcemanager
parent5994a6198ac35ea149a7211213dc296ee7406f44 (diff)
downloadplus-ea0809826d530f82dc84f8e046b3d11a797dd716.tar.gz
plus-ea0809826d530f82dc84f8e046b3d11a797dd716.tar.bz2
plus-ea0809826d530f82dc84f8e046b3d11a797dd716.tar.xz
plus-ea0809826d530f82dc84f8e046b3d11a797dd716.zip
Move subimageset load function from resourcemanager into separate file.
Diffstat (limited to 'src/resources/resourcemanager')
-rw-r--r--src/resources/resourcemanager/resourcemanager.cpp35
-rw-r--r--src/resources/resourcemanager/resourcemanager.h4
2 files changed, 0 insertions, 39 deletions
diff --git a/src/resources/resourcemanager/resourcemanager.cpp b/src/resources/resourcemanager/resourcemanager.cpp
index 2f32b7c71..539e89d3a 100644
--- a/src/resources/resourcemanager/resourcemanager.cpp
+++ b/src/resources/resourcemanager/resourcemanager.cpp
@@ -527,41 +527,6 @@ Resource *ResourceManager::get(const std::string &idPath,
return resource;
}
-struct SubImageSetLoader final
-{
- ResourceManager *manager;
- Image *parent;
- int width, height;
- static Resource *load(const void *const v)
- {
- if (!v)
- return nullptr;
-
- const SubImageSetLoader *const
- rl = static_cast<const SubImageSetLoader *const>(v);
- if (!rl->manager)
- return nullptr;
-
- if (!rl->parent)
- return nullptr;
- ImageSet *const res = new ImageSet(rl->parent, rl->width, rl->height);
- return res;
- }
-};
-
-ImageSet *ResourceManager::getSubImageSet(Image *const parent,
- const int width, const int height)
-{
- if (!parent)
- return nullptr;
-
- const SubImageSetLoader rl = { this, parent, width, height };
- std::stringstream ss;
- ss << parent->getIdPath() << ", set[" << width << "x" << height << "]";
- return static_cast<ImageSet*>(get(ss.str(),
- SubImageSetLoader::load, &rl));
-}
-
#ifdef USE_OPENGL
struct AtlasLoader final
{
diff --git a/src/resources/resourcemanager/resourcemanager.h b/src/resources/resourcemanager/resourcemanager.h
index 2c54aeb5a..d8b080b68 100644
--- a/src/resources/resourcemanager/resourcemanager.h
+++ b/src/resources/resourcemanager/resourcemanager.h
@@ -133,10 +133,6 @@ class ResourceManager final : public MemoryCounter
*/
bool addResource(const std::string &idPath, Resource *const resource);
- ImageSet *getSubImageSet(Image *const parent,
- const int width,
- const int height) A_WARN_UNUSED;
-
#ifdef USE_OPENGL
Resource *getAtlas(const std::string &name,
const StringVect &files) A_WARN_UNUSED;