Get Loader and Writer set up for these segments.

This commit is contained in:
Jason Felds
2011-03-03 01:37:42 -05:00
parent 2f6b0614e9
commit 25ce852eed
5 changed files with 19 additions and 8 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.55] - Wolfman2000
* Add #COMBOS tag to the Song and Steps (does nothing here).
[v0.54] - Wolfman2000
* Add #ATTACKS tag to the Notedata sections. Right now it does nothing.
+1 -2
View File
@@ -565,7 +565,7 @@ bool SSCLoader::LoadFromSSCFile( const RString &sPath, Song &out, bool bFromCach
}
else if( sValueName=="COMBOS" )
{/*
{
vector<RString> arrayComboExpressions;
split( sParams[1], ",", arrayComboExpressions );
@@ -584,7 +584,6 @@ bool SSCLoader::LoadFromSSCFile( const RString &sPath, Song &out, bool bFromCach
ComboSegment new_seg( BeatToNoteRow( fComboBeat ), iCombos );
out.m_Timing.AddComboSegment( new_seg );
}
*/
}
/* The following are cache tags. Never fill their values
+4 -4
View File
@@ -181,19 +181,19 @@ static void WriteGlobalTags( RageFile &f, const Song &out )
}
f.PutLine( ";" );
/*
ASSERT( !out.m_Timing.m_ComboSegments.empty() );
f.Write( "#COMBOS:" );
for( unsigned i=0; i<out.m_Timing.m_ComboSegments.size(); i++ )
{
const ComboSegment &cs = out.m_Timing.m_ComboSegments[i];
f.PutLine( ssprintf( "%.6f=%d", NoteRowToBeat(cs.m_iStartRow), cs.m_iComboFactor ) );
f.PutLine( ssprintf( "%.6f=%d", NoteRowToBeat(cs.m_iStartRow), cs.m_iCombo ) );
if( i != out.m_Timing.m_ComboSegments.size()-1 )
f.Write( "," );
}
f.PutLine( ";" );
*/
FOREACH_BackgroundLayer( b )
{
if( b==0 )
@@ -302,7 +302,7 @@ static RString GetSSCNoteData( const Song &song, const Steps &in, bool bSavingCa
lines.push_back( "#TIMESIGNATURES:;" );
lines.push_back( "#TICKCOUNTS:;" );
lines.push_back( "#ATTACKS:;" );
// lines.push_back( "#COMBOS:;" );
lines.push_back( "#COMBOS:;" );
/*
vector<RString> asBPMValues;
+10 -1
View File
@@ -41,7 +41,7 @@
* @brief The internal version of the cache for StepMania.
*
* Increment this value to invalidate the current cache. */
const int FILE_CACHE_VERSION = 165;
const int FILE_CACHE_VERSION = 166;
/** @brief How long does a song sample last by default? */
const float DEFAULT_MUSIC_SAMPLE_LENGTH = 12.f;
@@ -782,6 +782,15 @@ void Song::TidyUpData()
seg.m_iTicks = 2;
m_Timing.m_TickcountSegments.push_back( seg );
}
// Have a default combo segment of one just in case.
if( m_Timing.m_ComboSegments.empty() )
{
ComboSegment seg;
seg.m_iStartRow = 0;
seg.m_iCombo = 1;
m_Timing.m_ComboSegments.push_back( seg );
}
}
void Song::TranslateTitles()
+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.54f;
const static float STEPFILE_VERSION_NUMBER = 0.55f;
/** @brief How many edits for this song can each profile have? */
const int MAX_EDITS_PER_SONG_PER_PROFILE = 5;