add experimental lead track music file

This should be generalized to allow named music tracks
This commit is contained in:
Chris Danford
2007-04-24 03:15:00 +00:00
parent 7154266972
commit af6491320a
2 changed files with 15 additions and 5 deletions
+12 -5
View File
@@ -33,7 +33,7 @@
#include <set>
#include <float.h>
const int FILE_CACHE_VERSION = 151; // increment this to invalidate cache
const int FILE_CACHE_VERSION = 154; // increment this to invalidate cache
const float DEFAULT_MUSIC_SAMPLE_LENGTH = 12.f;
@@ -360,6 +360,7 @@ void Song::TidyUpData()
ASSERT_M( m_sSongDir.Left(3) != "../", m_sSongDir ); /* meaningless */
FixupPath( m_sSongDir, "" );
FixupPath( m_sMusicFile, m_sSongDir );
FixupPath( m_sLeadTrackFile, m_sSongDir );
FixupPath( m_sBannerFile, m_sSongDir );
FixupPath( m_sLyricsFile, m_sSongDir );
FixupPath( m_sBackgroundFile, m_sSongDir );
@@ -1039,10 +1040,11 @@ bool Song::HasMusic() const
return m_sMusicFile != "" && IsAFile(GetMusicPath());
}
bool Song::HasBanner() const {return m_sBannerFile != "" && IsAFile(GetBannerPath()); }
bool Song::HasLyrics() const {return m_sLyricsFile != "" && IsAFile(GetLyricsPath()); }
bool Song::HasBackground() const {return m_sBackgroundFile != "" && IsAFile(GetBackgroundPath()); }
bool Song::HasCDTitle() const {return m_sCDTitleFile != "" && IsAFile(GetCDTitlePath()); }
bool Song::HasBanner() const {return m_sBannerFile != "" && IsAFile(GetBannerPath()); }
bool Song::HasLeadTrack() const {return m_sLeadTrackFile != "" && IsAFile(GetLeadTrackPath()); }
bool Song::HasLyrics() const {return m_sLyricsFile != "" && IsAFile(GetLyricsPath()); }
bool Song::HasBackground() const {return m_sBackgroundFile != "" && IsAFile(GetBackgroundPath()); }
bool Song::HasCDTitle() const {return m_sCDTitleFile != "" && IsAFile(GetCDTitlePath()); }
bool Song::HasBGChanges() const
{
FOREACH_BackgroundLayer( i )
@@ -1107,6 +1109,11 @@ RString Song::GetMusicPath() const
return GetSongAssetPath( m_sMusicFile, m_sSongDir );
}
RString Song::GetLeadTrackPath() const
{
return GetSongAssetPath( m_sLeadTrackFile, m_sSongDir );
}
RString Song::GetBannerPath() const
{
return GetSongAssetPath( m_sBannerFile, m_sSongDir );
+3
View File
@@ -113,6 +113,7 @@ public:
RString m_sCredit;
RString m_sMusicFile;
RString m_sLeadTrackFile;
float m_fMusicLengthSeconds;
float m_fFirstBeat; // beat of first note
float m_fLastBeat; // beat of last note
@@ -129,6 +130,7 @@ public:
RString m_sCDTitleFile;
RString GetMusicPath() const;
RString GetLeadTrackPath() const;
RString GetBannerPath() const;
RString GetLyricsPath() const;
RString GetBackgroundPath() const;
@@ -138,6 +140,7 @@ public:
bool m_bHasMusic, m_bHasBanner;
bool HasMusic() const;
bool HasLeadTrack() const;
bool HasBanner() const;
bool HasBackground() const;
bool HasCDTitle() const;