Prepare for Steps to have Attacks.

At this time, this tag is whitespace.
Thus, the cache is not invalidated for now.
This commit is contained in:
Jason Felds
2011-03-01 15:55:02 -05:00
parent fcc42c0e4d
commit f3fbb07c80
4 changed files with 56 additions and 2 deletions
+3
View File
@@ -9,6 +9,9 @@ change to JSON, but it is unsure if this will be done.
Implement .ssc at your own risk.
________________________________________________________________________________
[v0.54] - Wolfman2000
* Add #ATTACKS tag to the Notedata sections. Right now it does nothing.
[v0.53] - Wolfman2000
* Added Fakes to the RadarCategories. Start parsing between versions.
* Always write out the latest version to cache and hard drive.
+47
View File
@@ -910,6 +910,53 @@ bool SSCLoader::LoadFromSSCFile( const RString &sPath, Song &out, bool bFromCach
}
*/
}
else if( sValueName=="ATTACKS" )
{
// TODO: Look into Step attacks vs Song Attacks. -Wolfman2000
/*
// Build the RString vector here so we can write it to file again later
for( unsigned s=1; s < sParams.params.size(); ++s )
out.m_sAttackString.push_back( sParams[s] );
Attack attack;
float end = -9999;
for( unsigned j=1; j < sParams.params.size(); ++j )
{
vector<RString> sBits;
split( sParams[j], "=", sBits, false );
// Need an identifer and a value for this to work
if( sBits.size() < 2 )
continue;
TrimLeft( sBits[0] );
TrimRight( sBits[0] );
if( !sBits[0].CompareNoCase("TIME") )
attack.fStartSecond = strtof( sBits[1], NULL );
else if( !sBits[0].CompareNoCase("LEN") )
attack.fSecsRemaining = strtof( sBits[1], NULL );
else if( !sBits[0].CompareNoCase("END") )
end = strtof( sBits[1], NULL );
else if( !sBits[0].CompareNoCase("MODS") )
{
attack.sModifiers = sBits[1];
if( end != -9999 )
{
attack.fSecsRemaining = end - attack.fStartSecond;
end = -9999;
}
if( attack.fSecsRemaining < 0.0f )
attack.fSecsRemaining = 0.0f;
out.m_Attacks.push_back( attack );
}
}
*/
}
else if( sValueName=="OFFSET" )
{/*
pNewNotes->m_Timing.m_fBeat0OffsetInSeconds = StringToFloat( sParams[1] );
+5 -1
View File
@@ -180,7 +180,7 @@ static void WriteGlobalTags( RageFile &f, const Song &out )
f.Write( "," );
}
f.PutLine( ";" );
/*
ASSERT( !out.m_Timing.m_ComboSegments.empty() );
f.Write( "#COMBOS:" );
@@ -301,6 +301,7 @@ static RString GetSSCNoteData( const Song &song, const Steps &in, bool bSavingCa
lines.push_back( "#DELAYS:;" );
lines.push_back( "#TIMESIGNATURES:;" );
lines.push_back( "#TICKCOUNTS:;" );
lines.push_back( "#ATTACKS:;" );
// lines.push_back( "#COMBOS:;" );
/*
@@ -364,6 +365,9 @@ static RString GetSSCNoteData( const Song &song, const Steps &in, bool bSavingCa
asComboValues.push_back( ssprintf( "%.6f=%d", NoteRowToBeat(cs.m_iStartRow), cs.m_iComboFactor ) );
}
lines.push_back( "#ATTACKS:;" );
lines.push_back( ssprintf( "#COMBOS:%s;", join("\n,", asComboValues).c_str() ) );
lines.push_back( ssprintf( "#OFFSET:%.6f;", in.m_Timing.m_fBeat0OffsetInSeconds ) );
+1 -1
View File
@@ -17,7 +17,7 @@ struct lua_State;
struct BackgroundChange;
/** @brief The version of the .ssc file format. */
const static float STEPFILE_VERSION_NUMBER = 0.53f;
const static float STEPFILE_VERSION_NUMBER = 0.54f;
/** @brief How many edits for this song can each profile have? */
const int MAX_EDITS_PER_SONG_PER_PROFILE = 5;