summaryrefslogtreecommitdiff
path: root/src/resources/resourcemanager.cpp
diff options
context:
space:
mode:
authorBjørn Lindeijer <bjorn@lindeijer.nl>2005-09-29 11:03:48 +0000
committerBjørn Lindeijer <bjorn@lindeijer.nl>2005-09-29 11:03:48 +0000
commitc00d3acf930359740ae6125533b5233ae06b765e (patch)
treea1ba92c7142c455e95758b37daf35a959903bf8a /src/resources/resourcemanager.cpp
parent4d117b39c555966d7648a03e0127560278e47170 (diff)
downloadmana-client-c00d3acf930359740ae6125533b5233ae06b765e.tar.gz
mana-client-c00d3acf930359740ae6125533b5233ae06b765e.tar.bz2
mana-client-c00d3acf930359740ae6125533b5233ae06b765e.tar.xz
mana-client-c00d3acf930359740ae6125533b5233ae06b765e.zip
Moved tileset management into the map class and made sure the tilesets are
cleaned up properly on switching maps.
Diffstat (limited to 'src/resources/resourcemanager.cpp')
-rw-r--r--src/resources/resourcemanager.cpp21
1 files changed, 14 insertions, 7 deletions
diff --git a/src/resources/resourcemanager.cpp b/src/resources/resourcemanager.cpp
index 39b8dfff..c941e16e 100644
--- a/src/resources/resourcemanager.cpp
+++ b/src/resources/resourcemanager.cpp
@@ -62,18 +62,22 @@ ResourceManager::~ResourceManager()
"to %d resources", danglingReferences, danglingResources);
}
-bool ResourceManager::setWriteDir(const std::string &path)
+bool
+ResourceManager::setWriteDir(const std::string &path)
{
return (bool)PHYSFS_setWriteDir(path.c_str());
}
-void ResourceManager::addToSearchPath(const std::string &path, bool append)
+void
+ResourceManager::addToSearchPath(const std::string &path, bool append)
{
PHYSFS_addToSearchPath(path.c_str(), append ? 1 : 0);
}
-void ResourceManager::searchAndAddArchives(
- const std::string &path, const std::string &ext, bool append)
+void
+ResourceManager::searchAndAddArchives(const std::string &path,
+ const std::string &ext,
+ bool append)
{
const char *dirSep = PHYSFS_getDirSeparator();
char **list = PHYSFS_enumerateFiles(path.c_str());
@@ -98,17 +102,20 @@ void ResourceManager::searchAndAddArchives(
PHYSFS_freeList(list);
}
-bool ResourceManager::mkdir(const std::string &path)
+bool
+ResourceManager::mkdir(const std::string &path)
{
return (bool)PHYSFS_mkdir(path.c_str());
}
-bool ResourceManager::exists(const std::string &path)
+bool
+ResourceManager::exists(const std::string &path)
{
return PHYSFS_exists(path.c_str());
}
-bool ResourceManager::isDirectory(const std::string &path)
+bool
+ResourceManager::isDirectory(const std::string &path)
{
return PHYSFS_isDirectory(path.c_str());
}