summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/gui/gui.cpp3
-rw-r--r--src/resources/resourcemanager.cpp22
-rw-r--r--src/resources/resourcemanager.h13
3 files changed, 0 insertions, 38 deletions
diff --git a/src/gui/gui.cpp b/src/gui/gui.cpp
index e0487d95..fd8f38ea 100644
--- a/src/gui/gui.cpp
+++ b/src/gui/gui.cpp
@@ -176,9 +176,6 @@ Gui::~Gui()
void Gui::logic()
{
- ResourceManager *resman = ResourceManager::getInstance();
- resman->clearScheduled();
-
// Fade out mouse cursor after extended inactivity
if (mMouseInactivityTimer < 100 * 15)
{
diff --git a/src/resources/resourcemanager.cpp b/src/resources/resourcemanager.cpp
index a810a11e..71d9ca1c 100644
--- a/src/resources/resourcemanager.cpp
+++ b/src/resources/resourcemanager.cpp
@@ -536,25 +536,3 @@ std::vector<std::string> ResourceManager::loadTextFile(
free(fileContents);
return lines;
}
-
-SDL_Surface *ResourceManager::loadSDLSurface(const std::string &filename)
-{
- SDL_Surface *surface = nullptr;
- if (SDL_RWops *rw = PHYSFSRWOPS_openRead(filename.c_str()))
- surface = IMG_Load_RW(rw, 1);
- return surface;
-}
-
-void ResourceManager::scheduleDelete(SDL_Surface* surface)
-{
- mDeletedSurfaces.insert(surface);
-}
-
-void ResourceManager::clearScheduled()
-{
- for (auto mDeletedSurface : mDeletedSurfaces)
- {
- SDL_FreeSurface(mDeletedSurface);
- }
- mDeletedSurfaces.clear();
-}
diff --git a/src/resources/resourcemanager.h b/src/resources/resourcemanager.h
index a087082d..9a427ba0 100644
--- a/src/resources/resourcemanager.h
+++ b/src/resources/resourcemanager.h
@@ -26,7 +26,6 @@
#include <map>
#include <string>
#include <vector>
-#include <set>
class Image;
class ImageSet;
@@ -35,7 +34,6 @@ class Resource;
class SoundEffect;
class SpriteDef;
-struct SDL_Surface;
struct SDL_RWops;
/**
@@ -208,16 +206,6 @@ class ResourceManager
std::vector<std::string> loadTextFile(const std::string &fileName);
/**
- * 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);
-
- void scheduleDelete(SDL_Surface* surface);
-
- void clearScheduled();
-
- /**
* Returns an instance of the class, creating one if it does not
* already exist.
*/
@@ -251,7 +239,6 @@ class ResourceManager
static ResourceManager *instance;
using Resources = std::map<std::string, Resource *>;
using ResourceIterator = Resources::iterator;
- std::set<SDL_Surface*> mDeletedSurfaces;
Resources mResources;
Resources mOrphanedResources;
time_t mOldestOrphan;