summaryrefslogtreecommitdiff
path: root/src/resources/resourcemanager
diff options
context:
space:
mode:
Diffstat (limited to 'src/resources/resourcemanager')
-rw-r--r--src/resources/resourcemanager/resourcemanager.cpp36
-rw-r--r--src/resources/resourcemanager/resourcemanager.h12
2 files changed, 0 insertions, 48 deletions
diff --git a/src/resources/resourcemanager/resourcemanager.cpp b/src/resources/resourcemanager/resourcemanager.cpp
index c59b09618..abec23475 100644
--- a/src/resources/resourcemanager/resourcemanager.cpp
+++ b/src/resources/resourcemanager/resourcemanager.cpp
@@ -527,42 +527,6 @@ Resource *ResourceManager::get(const std::string &idPath,
return resource;
}
-struct ResourceLoader final
-{
- ResourceManager *manager;
- std::string path;
- ResourceManager::loader fun;
-
- static Resource *load(const void *const v)
- {
- if (!v)
- return nullptr;
- const ResourceLoader *const
- rl = static_cast<const ResourceLoader *const>(v);
- SDL_RWops *const rw = MPHYSFSRWOPS_openRead(rl->path.c_str());
- if (!rw)
- {
- reportAlways("Error loading resource: %s",
- rl->path.c_str());
- return nullptr;
- }
- Resource *const res = rl->fun(rw, rl->path);
- return res;
- }
-};
-
-SDLMusic *ResourceManager::getMusic(const std::string &idPath)
-{
- ResourceLoader rl = { this, idPath, &SDLMusic::load };
- return static_cast<SDLMusic*>(get(idPath, ResourceLoader::load, &rl));
-}
-
-SoundEffect *ResourceManager::getSoundEffect(const std::string &idPath)
-{
- ResourceLoader rl = { this, idPath, &SoundEffect::load };
- return static_cast<SoundEffect*>(get(idPath, ResourceLoader::load, &rl));
-}
-
struct DyedImageLoader final
{
ResourceManager *manager;
diff --git a/src/resources/resourcemanager/resourcemanager.h b/src/resources/resourcemanager/resourcemanager.h
index 2c2caabce..613934f91 100644
--- a/src/resources/resourcemanager/resourcemanager.h
+++ b/src/resources/resourcemanager/resourcemanager.h
@@ -140,18 +140,6 @@ class ResourceManager final : public MemoryCounter
Image *getImage(const std::string &idPath) A_WARN_UNUSED;
/**
- * Convenience wrapper around ResourceManager::get for loading
- * songs.
- */
- SDLMusic *getMusic(const std::string &idPath) A_WARN_UNUSED;
-
- /**
- * Convenience wrapper around ResourceManager::get for loading
- * samples.
- */
- SoundEffect *getSoundEffect(const std::string &idPath) A_WARN_UNUSED;
-
- /**
* Creates a image set based on the image referenced by the given
* path and the supplied sprite sizes
*/