| 135 | } |
| 136 | |
| 137 | std::string ResourceManager::GetFilename( const std::string& path, const ResourceLoader& loader ) { |
| 138 | auto ident = loader.GetIdentifier() + ":"; |
| 139 | auto ident_pos = path.find( ident ); |
| 140 | |
| 141 | if( ident_pos == std::string::npos || ident_pos != 0 ) { |
| 142 | return path; |
| 143 | } |
| 144 | |
| 145 | return path.substr( ident.size() ); |
| 146 | } |
| 147 | |
| 148 | void ResourceManager::AddFont( const std::string& path, std::shared_ptr<const sf::Font> font ) { |
| 149 | m_fonts[path] = font; |