diff options
author | Andrei Karas <akaras@inbox.ru> | 2016-05-26 19:35:24 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2016-05-26 19:35:24 +0300 |
commit | 6ed4f7f09a297e9afb829634399c94ccc542729e (patch) | |
tree | b80aec2b7164f46445d154c9a3e29e05ab7d0f99 /src/resources/resourcemanager/resourcemanager.cpp | |
parent | 5663e39eba8979228e252d76fba676586c4f862f (diff) | |
download | mv-6ed4f7f09a297e9afb829634399c94ccc542729e.tar.gz mv-6ed4f7f09a297e9afb829634399c94ccc542729e.tar.bz2 mv-6ed4f7f09a297e9afb829634399c94ccc542729e.tar.xz mv-6ed4f7f09a297e9afb829634399c94ccc542729e.zip |
Move walk layer load function from resourcemanager into separate file.
Diffstat (limited to 'src/resources/resourcemanager/resourcemanager.cpp')
-rw-r--r-- | src/resources/resourcemanager/resourcemanager.cpp | 37 |
1 files changed, 0 insertions, 37 deletions
diff --git a/src/resources/resourcemanager/resourcemanager.cpp b/src/resources/resourcemanager/resourcemanager.cpp index e4a540fc3..dd652c22b 100644 --- a/src/resources/resourcemanager/resourcemanager.cpp +++ b/src/resources/resourcemanager/resourcemanager.cpp @@ -527,43 +527,6 @@ Resource *ResourceManager::get(const std::string &idPath, return resource; } -#ifndef DYECMD -struct WalkLayerLoader final -{ - const std::string name; - Map *map; - - static Resource *load(const void *const v) - { - if (!v) - return nullptr; - - const WalkLayerLoader *const rl = static_cast<const - WalkLayerLoader *const>(v); - Resource *const resource = NavigationManager::loadWalkLayer(rl->map); - if (!resource) - reportAlways("WalkLayer creation error"); - return resource; - } -}; -#endif - -#ifndef DYECMD -WalkLayer *ResourceManager::getWalkLayer(const std::string &name, - Map *const map) -{ - WalkLayerLoader rl = {name, map}; - return static_cast<WalkLayer*>(get("map_" + name, - WalkLayerLoader::load, &rl)); -} -#else -WalkLayer *ResourceManager::getWalkLayer(const std::string &name A_UNUSED, - Map *const map A_UNUSED) -{ - return nullptr; -} -#endif - struct SpriteDefLoader final { std::string path; |