[splittiming] a function to create steps for the song (259 build errors)

This commit is contained in:
Thai Pangsakulyanont
2011-05-09 22:37:15 +07:00
parent 40651800f0
commit 9384f82ccd
3 changed files with 18 additions and 2 deletions
+1 -1
View File
@@ -458,7 +458,7 @@ bool SMLoader::LoadFromSMFile( const RString &sPath, Song &out, bool bFromCache
} }
out.m_Timing.m_sFile = sPath; out.m_Timing.m_sFile = sPath;
LoadTimingFromSMFile( msd, out.m_Timing ); LoadTimingFromSMFile( msd, out.m_SongTiming );
for( unsigned i=0; i<msd.GetNumValues(); i++ ) for( unsigned i=0; i<msd.GetNumValues(); i++ )
{ {
+12
View File
@@ -145,6 +145,18 @@ void Song::AddLyricSegment( LyricSegment seg )
m_LyricSegments.push_back( seg ); m_LyricSegments.push_back( seg );
} }
Steps *Song::CreateSteps()
{
Steps *pSteps = new Steps;
InitSteps( pSteps );
return pSteps;
}
void Song::InitSteps(Steps *pSteps)
{
pSteps->m_Timing = m_SongTiming;
}
void Song::GetDisplayBpms( DisplayBpms &AddTo ) const void Song::GetDisplayBpms( DisplayBpms &AddTo ) const
{ {
if( m_DisplayBPMType == DISPLAY_BPM_SPECIFIED ) if( m_DisplayBPMType == DISPLAY_BPM_SPECIFIED )
+5 -1
View File
@@ -337,10 +337,14 @@ public:
BPMSegment& GetBPMSegmentAtBeat( float fBeat ) { return m_Timing.GetBPMSegmentAtBeat( fBeat ); } BPMSegment& GetBPMSegmentAtBeat( float fBeat ) { return m_Timing.GetBPMSegmentAtBeat( fBeat ); }
*/ */
Steps *CreateSteps();
void InitSteps(Steps *pSteps);
/** /**
* @brief Retrieve the beat based on the specified time. * @brief Retrieve the beat based on the specified time.
* @param fElapsedTime the amount of time since the Song started. * @param fElapsedTime the amount of time since the Song started.
* @return the appropriate beat. */ * @return the appropriate beat. */
/* [splittiming]
float SongGetBeatFromElapsedTime( float fElapsedTime ) const float SongGetBeatFromElapsedTime( float fElapsedTime ) const
{ {
return m_SongTiming.GetBeatFromElapsedTime( fElapsedTime ); return m_SongTiming.GetBeatFromElapsedTime( fElapsedTime );
@@ -358,7 +362,7 @@ public:
{ {
return steps.m_Timing.GetElapsedTimeFromBeat( fBeat ); return steps.m_Timing.GetElapsedTimeFromBeat( fBeat );
} }
*/
/* [splittiming] /* [splittiming]
float GetBeatFromElapsedTime( float fElapsedTime ) const float GetBeatFromElapsedTime( float fElapsedTime ) const