summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2016-08-28 20:37:17 +0300
committerAndrei Karas <akaras@inbox.ru>2016-08-28 20:37:17 +0300
commit1747bd6f63710cf728c8cdd2bffd217520ea6a83 (patch)
tree8210fcc52092bf5cf52642e9b8e7cfadfb0fd512
parentd98cdd55a5917e851ea6e6c76a53b152d74b0042 (diff)
downloadmanaplus-1747bd6f63710cf728c8cdd2bffd217520ea6a83.tar.gz
manaplus-1747bd6f63710cf728c8cdd2bffd217520ea6a83.tar.bz2
manaplus-1747bd6f63710cf728c8cdd2bffd217520ea6a83.tar.xz
manaplus-1747bd6f63710cf728c8cdd2bffd217520ea6a83.zip
Remove some unused functions from loadSDLSurface.
-rw-r--r--src/resources/resourcemanager/resourcemanager.cpp16
-rw-r--r--src/resources/resourcemanager/resourcemanager.h7
2 files changed, 0 insertions, 23 deletions
diff --git a/src/resources/resourcemanager/resourcemanager.cpp b/src/resources/resourcemanager/resourcemanager.cpp
index 1e8b3cdb7..49a59b832 100644
--- a/src/resources/resourcemanager/resourcemanager.cpp
+++ b/src/resources/resourcemanager/resourcemanager.cpp
@@ -650,22 +650,6 @@ void ResourceManager::deleteInstance()
delete2(instance);
}
-SDL_Surface *ResourceManager::loadSDLSurface(const std::string &filename) const
-{
- if (SDL_RWops *const rw = MPHYSFSRWOPS_openRead(filename.c_str()))
- {
- if (!IMG_isPNG(rw))
- {
- reportAlways("Error, image is not png: %s", filename.c_str());
- return nullptr;
- }
- SDL_Surface *const surface = MIMG_LoadPNG_RW(rw);
- SDL_RWclose(rw);
- return surface;
- }
- return nullptr;
-}
-
void ResourceManager::scheduleDelete(SDL_Surface *const surface)
{
deletedSurfaces.insert(surface);
diff --git a/src/resources/resourcemanager/resourcemanager.h b/src/resources/resourcemanager/resourcemanager.h
index ee70cb768..c1e55355b 100644
--- a/src/resources/resourcemanager/resourcemanager.h
+++ b/src/resources/resourcemanager/resourcemanager.h
@@ -138,13 +138,6 @@ class ResourceManager final : public MemoryCounter
*/
void moveToDeleted(Resource *const res);
- /**
- * Loads the given filename as an SDL surface. The returned surface is
- * expected to be freed by the caller using SDL_FreeSurface.
- */
- SDL_Surface *loadSDLSurface(const std::string &filename)
- const A_WARN_UNUSED;
-
void scheduleDelete(SDL_Surface *const surface);
void clearScheduled();