summaryrefslogtreecommitdiff
path: root/src/resources/resourcemanager
diff options
context:
space:
mode:
Diffstat (limited to 'src/resources/resourcemanager')
-rw-r--r--src/resources/resourcemanager/resourcemanager.cpp34
-rw-r--r--src/resources/resourcemanager/resourcemanager.h7
2 files changed, 0 insertions, 41 deletions
diff --git a/src/resources/resourcemanager/resourcemanager.cpp b/src/resources/resourcemanager/resourcemanager.cpp
index aca30726b..2f32b7c71 100644
--- a/src/resources/resourcemanager/resourcemanager.cpp
+++ b/src/resources/resourcemanager/resourcemanager.cpp
@@ -527,40 +527,6 @@ Resource *ResourceManager::get(const std::string &idPath,
return resource;
}
-struct ImageSetLoader final
-{
- std::string path;
- int w, h;
- static Resource *load(const void *const v)
- {
- if (!v)
- return nullptr;
-
- const ImageSetLoader *const
- rl = static_cast<const ImageSetLoader *const>(v);
-
- Image *const img = Loader::getImage(rl->path);
- if (!img)
- {
- reportAlways("Image loading error: %s", rl->path.c_str());
- return nullptr;
- }
- ImageSet *const res = new ImageSet(img, rl->w, rl->h);
- img->decRef();
- return res;
- }
-};
-
-ImageSet *ResourceManager::getImageSet(const std::string &imagePath,
- const int w, const int h)
-{
- ImageSetLoader rl = { imagePath, w, h };
- std::stringstream ss;
- ss << imagePath << "[" << w << "x" << h << "]";
- return static_cast<ImageSet*>(get(ss.str(), ImageSetLoader::load, &rl));
-}
-
-
struct SubImageSetLoader final
{
ResourceManager *manager;
diff --git a/src/resources/resourcemanager/resourcemanager.h b/src/resources/resourcemanager/resourcemanager.h
index 13c99df63..2c54aeb5a 100644
--- a/src/resources/resourcemanager/resourcemanager.h
+++ b/src/resources/resourcemanager/resourcemanager.h
@@ -133,13 +133,6 @@ class ResourceManager final : public MemoryCounter
*/
bool addResource(const std::string &idPath, Resource *const resource);
- /**
- * Creates a image set based on the image referenced by the given
- * path and the supplied sprite sizes
- */
- ImageSet *getImageSet(const std::string &imagePath,
- const int w, const int h) A_WARN_UNUSED;
-
ImageSet *getSubImageSet(Image *const parent,
const int width,
const int height) A_WARN_UNUSED;