diff options
Diffstat (limited to 'src/resources/resourcemanager')
-rw-r--r-- | src/resources/resourcemanager/resourcemanager.cpp | 42 | ||||
-rw-r--r-- | src/resources/resourcemanager/resourcemanager.h | 3 |
2 files changed, 0 insertions, 45 deletions
diff --git a/src/resources/resourcemanager/resourcemanager.cpp b/src/resources/resourcemanager/resourcemanager.cpp index 0cff0fb2c..e9b8c687b 100644 --- a/src/resources/resourcemanager/resourcemanager.cpp +++ b/src/resources/resourcemanager/resourcemanager.cpp @@ -596,48 +596,6 @@ ImageSet *ResourceManager::getSubImageSet(Image *const parent, SubImageSetLoader::load, &rl)); } -struct SubImageLoader final -{ - ResourceManager *manager; - Image *parent; - int x, y; - int width, height; - static Resource *load(const void *const v) - { - if (!v) - return nullptr; - - const SubImageLoader *const - rl = static_cast<const SubImageLoader *const>(v); - if (!rl->manager || !rl->parent) - return nullptr; - - Image *const res = rl->parent->getSubImage(rl->x, rl->y, - rl->width, rl->height); - if (!res) - { - reportAlways("SubImage loading error: %s", - rl->parent->getSource().c_str()); - } - return res; - } -}; - -Image *ResourceManager::getSubImage(Image *const parent, - const int x, const int y, - const int width, const int height) -{ - if (!parent) - return nullptr; - - const SubImageLoader rl = { this, parent, x, y, width, height}; - - std::stringstream ss; - ss << parent->getIdPath() << ",[" << x << "," << y << "," - << width << "x" << height << "]"; - return static_cast<Image*>(get(ss.str(), SubImageLoader::load, &rl)); -} - #ifdef USE_OPENGL struct AtlasLoader final { diff --git a/src/resources/resourcemanager/resourcemanager.h b/src/resources/resourcemanager/resourcemanager.h index 1cc4fab68..13c99df63 100644 --- a/src/resources/resourcemanager/resourcemanager.h +++ b/src/resources/resourcemanager/resourcemanager.h @@ -144,9 +144,6 @@ class ResourceManager final : public MemoryCounter const int width, const int height) A_WARN_UNUSED; - Image *getSubImage(Image *const parent, const int x, const int y, - const int width, const int height) A_WARN_UNUSED; - #ifdef USE_OPENGL Resource *getAtlas(const std::string &name, const StringVect &files) A_WARN_UNUSED; |