diff --git a/Themes/_fallback/metrics.ini b/Themes/_fallback/metrics.ini index 2c131bf400..c8c6d2b8ea 100644 --- a/Themes/_fallback/metrics.ini +++ b/Themes/_fallback/metrics.ini @@ -2326,10 +2326,10 @@ Mines,4="mod,attackmines;name,AttackMines" # Mines,4="mod,attackmines;name,AttackMines" Attacks="3" -AttacksDefault="mod,no randomattacks,no songattacks" -Attacks,1="name,Off" +AttacksDefault="mod,songattacks" +Attacks,3="mod,no randomattacks,no songattacks;name,Off" Attacks,2="mod,randomattacks;name,RandomAttacks" -Attacks,3="mod,songattacks;name,SongAttacks" +Attacks,1="name,SongAttacks" PlayerAutoPlay="2" PlayerAutoPlayDefault="mod,no playerautoplay" @@ -3668,7 +3668,7 @@ CancelTransitionsOut=true PlayMusic=false TimerSeconds=-1 ShowStyleIcon=false -LineNames="1,2,3,4,5,6,R,7,8,9,10,11,12,13,14,15,16" +LineNames="1,2,3,4,5,6,R,7,8,9,10,Attacks,11,12,13,14,15,16" Line1="list,Speed" Line2="list,Accel" Line3="list,Effect" @@ -3680,6 +3680,7 @@ Line7="list,Scroll" Line8="list,NoteSkins" Line9="list,Holds" Line10="list,Mines" +LineAttacks="list,Attacks" Line11="list,Hide" Line12="list,Persp" Line13="list,Assist" diff --git a/src/NotesLoaderSM.cpp b/src/NotesLoaderSM.cpp index 7fa211df32..f1ab8ec5ad 100644 --- a/src/NotesLoaderSM.cpp +++ b/src/NotesLoaderSM.cpp @@ -10,6 +10,7 @@ #include "Song.h" #include "SongManager.h" #include "Steps.h" +#include "Attack.h" #include "PrefsManager.h" /** @brief The maximum file size for edits. */ @@ -468,7 +469,7 @@ bool SMLoader::LoadFromSMFile( const RString &sPath, Song &out, bool bFromCache // handle the data /* Don't use GetMainAndSubTitlesFromFullTitle; that's only for heuristically - * splitting other formats that *don't* natively support #SUBTITLE. */ + * splitting other formats that *don't* natively support #SUBTITLE. */ if( sValueName=="TITLE" ) out.m_sMainTitle = sParams[1]; @@ -540,7 +541,7 @@ bool SMLoader::LoadFromSMFile( const RString &sPath, Song &out, bool bFromCache ; /* ignore */ /* We calculate these. Some SMs in circulation have bogus values for - * these, so make sure we always calculate it ourself. */ + * these, so make sure we always calculate it ourself. */ else if( sValueName=="FIRSTBEAT" ) { if( bFromCache ) diff --git a/src/NotesLoaderSSC.cpp b/src/NotesLoaderSSC.cpp index 9cc5fa6ae2..a2308e9fd2 100644 --- a/src/NotesLoaderSSC.cpp +++ b/src/NotesLoaderSSC.cpp @@ -11,6 +11,7 @@ #include "Song.h" #include "SongManager.h" #include "Steps.h" +#include "Attack.h" #include "PrefsManager.h" /** diff --git a/src/NotesWriterSM.cpp b/src/NotesWriterSM.cpp index 23f9a646ce..95d14e75fb 100644 --- a/src/NotesWriterSM.cpp +++ b/src/NotesWriterSM.cpp @@ -134,6 +134,19 @@ static void WriteGlobalTags( RageFile &f, const Song &out ) } } f.PutLine( ";" ); + + f.Write( "#ATTACKS:" ); + for( unsigned j = 0; j < out.m_Attacks.size(); j++ ) + { + const Attack &a = out.m_Attacks[j]; + f.Write( ssprintf( "TIME=%.2f:LEN=%.2f:MODS=%s", + a.fStartSecond, a.fSecsRemaining, a.sModifiers.c_str() ) ); + + if( j+1 < out.m_Attacks.size() ) + f.Write( ":" ); + f.PutLine( "" ); + } + f.PutLine( ";" ); f.Write( "#DELAYS:" ); for( unsigned i=0; i