| 176 | } |
| 177 | |
| 178 | void TextureAtlasLoader::loadFromFile( const std::string& TextureAtlasPath ) { |
| 179 | if ( TextureAtlasPath.size() ) |
| 180 | mTextureAtlasPath = TextureAtlasPath; |
| 181 | |
| 182 | if ( FileSystem::fileExists( mTextureAtlasPath ) ) { |
| 183 | IOStreamFile IOS( mTextureAtlasPath ); |
| 184 | |
| 185 | loadFromStream( IOS ); |
| 186 | } else if ( PackManager::instance()->isFallbackToPacksActive() ) { |
| 187 | std::string tgPath( mTextureAtlasPath ); |
| 188 | |
| 189 | Pack* tPack = PackManager::instance()->exists( tgPath ); |
| 190 | |
| 191 | if ( NULL != tPack ) { |
| 192 | loadFromPack( tPack, tgPath ); |
| 193 | } |
| 194 | } |
| 195 | } |
| 196 | |
| 197 | void TextureAtlasLoader::loadFromPack( Pack* Pack, const std::string& FilePackPath ) { |
| 198 | if ( NULL != Pack && Pack->isOpen() && -1 != Pack->exists( FilePackPath ) ) { |
no test coverage detected