| 17 | } |
| 18 | |
| 19 | std::shared_ptr<const sf::Image> FileResourceLoader::LoadImage( const std::string& path ) const { |
| 20 | auto image = std::make_shared<sf::Image>(); |
| 21 | |
| 22 | if( !image->loadFromFile( path ) ) { |
| 23 | return std::shared_ptr<const sf::Image>(); |
| 24 | } |
| 25 | |
| 26 | return image; |
| 27 | } |
| 28 | |
| 29 | const std::string& FileResourceLoader::GetIdentifier() const { |
| 30 | static const std::string id( "file" ); |