diff options
Diffstat (limited to 'src/resources/resourcemanager.cpp')
-rw-r--r-- | src/resources/resourcemanager.cpp | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/resources/resourcemanager.cpp b/src/resources/resourcemanager.cpp index f193d55d..3f58076e 100644 --- a/src/resources/resourcemanager.cpp +++ b/src/resources/resourcemanager.cpp @@ -207,13 +207,13 @@ std::string ResourceManager::getPath(const std::string &file) else { // if not found in search path return the default path - path = std::string(AETHYRA_DATADIR) + std::string("data") + "/" + file; + path = std::string(TMW_DATADIR) + std::string("data") + "/" + file; } return path; } -Resource *ResourceManager::get(std::string const &idPath, generator fun, +Resource *ResourceManager::get(const std::string &idPath, generator fun, void *data) { // Check if the id exists, and return the value if it does. @@ -265,7 +265,7 @@ struct ResourceLoader } }; -Resource *ResourceManager::load(std::string const &path, loader fun) +Resource *ResourceManager::load(const std::string &path, loader fun) { ResourceLoader l = { this, path, fun }; return get(path, ResourceLoader::load, &l); @@ -307,7 +307,7 @@ struct DyedImageLoader } }; -Image *ResourceManager::getImage(std::string const &idPath) +Image *ResourceManager::getImage(const std::string &idPath) { DyedImageLoader l = { this, idPath }; return static_cast<Image*>(get(idPath, DyedImageLoader::load, &l)); @@ -349,8 +349,7 @@ struct SpriteDefLoader } }; -SpriteDef *ResourceManager::getSprite - (std::string const &path, int variant) +SpriteDef *ResourceManager::getSprite(const std::string &path, int variant) { SpriteDefLoader l = { path, variant }; std::stringstream ss; @@ -379,7 +378,8 @@ void ResourceManager::release(Resource *res) ResourceManager *ResourceManager::getInstance() { // Create a new instance if necessary. - if (instance == NULL) instance = new ResourceManager(); + if (!instance) + instance = new ResourceManager(); return instance; } |