MCPcopy Create free account
hub / github.com/SpartanJ/eepp / loadFromFile

Method loadFromFile

src/eepp/graphics/textureatlasloader.cpp:178–195  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

176}
177
178void 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
197void TextureAtlasLoader::loadFromPack( Pack* Pack, const std::string& FilePackPath ) {
198 if ( NULL != Pack && Pack->isOpen() && -1 != Pack->exists( FilePackPath ) ) {

Callers 1

loadFromStreamMethod · 0.45

Calls 2

sizeMethod · 0.45
existsMethod · 0.45

Tested by

no test coverage detected