From c233e3c6d2f2e0a4e287a73470a5712a4d953d66 Mon Sep 17 00:00:00 2001 From: Glenn Maynard Date: Tue, 20 Aug 2002 22:03:09 +0000 Subject: [PATCH] Support for "artist - title - difficulty" titles in KSF. --- stepmania/src/Song.cpp | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/stepmania/src/Song.cpp b/stepmania/src/Song.cpp index 6a8d913528..297afdbbf8 100644 --- a/stepmania/src/Song.cpp +++ b/stepmania/src/Song.cpp @@ -978,6 +978,18 @@ bool Song::LoadFromKSFDir( CString sDir ) CStringArray asBits; split( sParams[1], " - ", asBits, false ); + /* It's often "artist - songtitle - difficulty". Ignore + * the difficulty, since we get that from the filename. */ + if( asBits.GetSize() == 3 && + (!stricmp(asBits[2], "double") || + !stricmp(asBits[2], "easy") || + !stricmp(asBits[2], "normal") || + !stricmp(asBits[2], "hard") || + !stricmp(asBits[2], "crazy")) ) + { + asBits.RemoveAt(2); + } + if( asBits.GetSize() == 2 ) { m_sArtist = asBits[0];