src/externalized/ModPackContentManager.cc
/* Open a game resource file for reading.
 *
 * First trying to open resource in the mod's directory.
 * If not found, use the previous method. */
Open a game resource file for reading.
First trying to open resource in the mod's directory.
If not found, use the previous method.
Open a game resource file for reading . First trying to open resource in the mod ' s directory . If not found use the previous method .
SGPFile* ModPackContentManager::openGameResForReading(const char* filename) const
{
	int mode;
	const char* fmode = GetFileOpenModeForReading(&mode);
	for (const auto& folder : m_modResFolders)
	{
		int d = FileMan::openFileCaseInsensitive(folder, filename, mode);
		if (d >= 0) {
			SLOGI("opening mod's resource: %s", filename);
			return FileMan::getSGPFileFromFD(d, filename, fmode);
		}
	}
	return DefaultContentManager::openGameResForReading(filename);
}
SGPFile * ModPackContentManager :: openGameResForReading ( const char * filename ) const { int mode ; const char * fmode = GetFileOpenModeForReading ( & mode ) ; for ( const auto & folder : m_modResFolders ) { int d = FileMan :: openFileCaseInsensitive ( folder , filename , mode ) ; if ( d >= 0 ) { SLOGI ( " " , filename ) ; return FileMan :: getSGPFileFromFD ( d , filename , fmode ) ; } } return DefaultContentManager :: openGameResForReading ( filename ) ; }
Open a game resource file for reading.
Open a game resource file for reading .