From a0068cb143ea1b7b65a2528f84045a0b833e23b5 Mon Sep 17 00:00:00 2001 From: Joe Date: Fri, 15 May 2015 09:59:44 +0100 Subject: [PATCH] BMS loader now supports #difficulty tag. --- src/NotesLoaderBMS.cpp | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/src/NotesLoaderBMS.cpp b/src/NotesLoaderBMS.cpp index d319746d26..0d1ecb8d73 100644 --- a/src/NotesLoaderBMS.cpp +++ b/src/NotesLoaderBMS.cpp @@ -891,6 +891,13 @@ void BMSChartReader::ReadHeaders() { out->SetMeter( StringToInt(it->second) ); } + else if( it->first == "#difficulty") + { + // only set the difficulty if the #difficulty tag is between 1 and 6 (beginner~edit) + int diff = StringToInt(it->second)-1; // BMS uses 1 to 6, SM uses 0 to 5 + if(diff>=0 && diffSetDifficulty( (Difficulty)diff ); + } else if (it->first == "#music") { info.overrideMusicFile = it->second; @@ -1472,7 +1479,7 @@ void BMSSongLoader::AddToSong() for( unsigned i = 0; i < loadedSteps.size(); i ++ ) { Steps *steps = loadedSteps[i].steps; - steps->SetDifficulty( Difficulty_Medium ); + //steps->SetDifficulty( Difficulty_Medium ); RString title = loadedSteps[i].info.title; @@ -1487,7 +1494,7 @@ void BMSSongLoader::AddToSong() for( unsigned i = 0; i < loadedSteps.size(); i ++ ) { Steps *steps = loadedSteps[i].steps; - steps->SetDifficulty( Difficulty_Medium ); + //steps->SetDifficulty( Difficulty_Medium ); RString title = loadedSteps[i].info.title;