summaryrefslogtreecommitdiff
path: root/src/resources/resourcemanager.cpp
diff options
context:
space:
mode:
authorBjörn Steinbrink <B.Steinbrink@gmx.de>2005-08-04 21:19:25 +0000
committerBjörn Steinbrink <B.Steinbrink@gmx.de>2005-08-04 21:19:25 +0000
commit9eed8feb838c31368dba6cd9716f67d800bf6e3b (patch)
treebf7c9d1963a5d8ef031c6f04ef114722e299a7f0 /src/resources/resourcemanager.cpp
parent2da65e2e57b664cc45c164f08ddae3597e51fcba (diff)
downloadmana-9eed8feb838c31368dba6cd9716f67d800bf6e3b.tar.gz
mana-9eed8feb838c31368dba6cd9716f67d800bf6e3b.tar.bz2
mana-9eed8feb838c31368dba6cd9716f67d800bf6e3b.tar.xz
mana-9eed8feb838c31368dba6cd9716f67d800bf6e3b.zip
Added a method to the resource mananger to determine the real path of a file in the search path. Added a first user of that function. Minor cleanup.
Diffstat (limited to 'src/resources/resourcemanager.cpp')
-rw-r--r--src/resources/resourcemanager.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/resources/resourcemanager.cpp b/src/resources/resourcemanager.cpp
index 82029adf..d185b99a 100644
--- a/src/resources/resourcemanager.cpp
+++ b/src/resources/resourcemanager.cpp
@@ -118,6 +118,13 @@ bool ResourceManager::isDirectory(const std::string &path)
return PHYSFS_isDirectory(path.c_str());
}
+std::string ResourceManager::getRealPath(const std::string &path)
+{
+ const char *dirSep = PHYSFS_getDirSeparator();
+
+ return std::string(PHYSFS_getRealDir(path.c_str())) + dirSep + path;
+}
+
Resource*
ResourceManager::get(const E_RESOURCE_TYPE &type, const std::string &idPath)
{