コード例 #1
0
bool SMLoader::LoadFromDir( const RString &sPath, Song &out )
{
	vector<RString> aFileNames;
	GetApplicableFiles( sPath, aFileNames );
	
	if( aFileNames.size() > 1 )
	{
		// Need to break this up first.
		RString tmp = "Song " + sPath + " has more than one";
		LOG->UserLog(tmp, this->GetFileExtension(), "file. There can only be one!");
		return false;
	}
	
	ASSERT( aFileNames.size() == 1 );
	return LoadFromSimfile( sPath + aFileNames[0], out );
}
コード例 #2
0
ファイル: NotesLoaderSM.cpp プロジェクト: AratnitY/stepmania
bool SMLoader::LoadFromDir( const RString &sPath, Song &out, bool load_autosave )
{
	vector<RString> aFileNames;
	GetApplicableFiles( sPath, aFileNames, load_autosave );
	return LoadFromSimfile( sPath + aFileNames[0], out );
}