| 5472 | } |
| 5473 | |
| 5474 | bool physfsSearchSpritesToUpdate() //TODO: NX PORT: Any changes needed here? |
| 5475 | { |
| 5476 | if ( !PHYSFS_getRealDir("images/sprites.txt") ) |
| 5477 | { |
| 5478 | printlog("error: could not find file: %s", "images/sprites.txt"); |
| 5479 | return false; |
| 5480 | } |
| 5481 | std::string spritesDirectory = PHYSFS_getRealDir("images/sprites.txt"); |
| 5482 | spritesDirectory.append(PHYSFS_getDirSeparator()).append("images/sprites.txt"); |
| 5483 | File* fp = openDataFile(spritesDirectory.c_str(), "rb"); |
| 5484 | char name[PATH_MAX]; |
| 5485 | |
| 5486 | for ( int c = 0; !fp->eof(); ++c ) |
| 5487 | { |
| 5488 | fp->gets2(name, PATH_MAX); |
| 5489 | if ( PHYSFS_getRealDir(name) != nullptr ) |
| 5490 | { |
| 5491 | std::string spritesRealDir = PHYSFS_getRealDir(name); |
| 5492 | if ( spritesRealDir.compare("./") != 0 ) |
| 5493 | { |
| 5494 | FileIO::close(fp); |
| 5495 | printlog("[PhysFS]: Found modified sprite in sprites/ directory, reloading all sprites..."); |
| 5496 | return true; |
| 5497 | } |
| 5498 | } |
| 5499 | } |
| 5500 | FileIO::close(fp); |
| 5501 | return false; |
| 5502 | } |
| 5503 | |
| 5504 | void physfsReloadSprites(bool reloadAll) //TODO: NX PORT: Any changes needed here? |
| 5505 | { |