add experimental lead track music file
This should be generalized to allow named music tracks
This commit is contained in:
+12
-5
@@ -33,7 +33,7 @@
|
|||||||
#include <set>
|
#include <set>
|
||||||
#include <float.h>
|
#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;
|
const float DEFAULT_MUSIC_SAMPLE_LENGTH = 12.f;
|
||||||
|
|
||||||
@@ -360,6 +360,7 @@ void Song::TidyUpData()
|
|||||||
ASSERT_M( m_sSongDir.Left(3) != "../", m_sSongDir ); /* meaningless */
|
ASSERT_M( m_sSongDir.Left(3) != "../", m_sSongDir ); /* meaningless */
|
||||||
FixupPath( m_sSongDir, "" );
|
FixupPath( m_sSongDir, "" );
|
||||||
FixupPath( m_sMusicFile, m_sSongDir );
|
FixupPath( m_sMusicFile, m_sSongDir );
|
||||||
|
FixupPath( m_sLeadTrackFile, m_sSongDir );
|
||||||
FixupPath( m_sBannerFile, m_sSongDir );
|
FixupPath( m_sBannerFile, m_sSongDir );
|
||||||
FixupPath( m_sLyricsFile, m_sSongDir );
|
FixupPath( m_sLyricsFile, m_sSongDir );
|
||||||
FixupPath( m_sBackgroundFile, m_sSongDir );
|
FixupPath( m_sBackgroundFile, m_sSongDir );
|
||||||
@@ -1039,10 +1040,11 @@ bool Song::HasMusic() const
|
|||||||
|
|
||||||
return m_sMusicFile != "" && IsAFile(GetMusicPath());
|
return m_sMusicFile != "" && IsAFile(GetMusicPath());
|
||||||
}
|
}
|
||||||
bool Song::HasBanner() const {return m_sBannerFile != "" && IsAFile(GetBannerPath()); }
|
bool Song::HasBanner() const {return m_sBannerFile != "" && IsAFile(GetBannerPath()); }
|
||||||
bool Song::HasLyrics() const {return m_sLyricsFile != "" && IsAFile(GetLyricsPath()); }
|
bool Song::HasLeadTrack() const {return m_sLeadTrackFile != "" && IsAFile(GetLeadTrackPath()); }
|
||||||
bool Song::HasBackground() const {return m_sBackgroundFile != "" && IsAFile(GetBackgroundPath()); }
|
bool Song::HasLyrics() const {return m_sLyricsFile != "" && IsAFile(GetLyricsPath()); }
|
||||||
bool Song::HasCDTitle() const {return m_sCDTitleFile != "" && IsAFile(GetCDTitlePath()); }
|
bool Song::HasBackground() const {return m_sBackgroundFile != "" && IsAFile(GetBackgroundPath()); }
|
||||||
|
bool Song::HasCDTitle() const {return m_sCDTitleFile != "" && IsAFile(GetCDTitlePath()); }
|
||||||
bool Song::HasBGChanges() const
|
bool Song::HasBGChanges() const
|
||||||
{
|
{
|
||||||
FOREACH_BackgroundLayer( i )
|
FOREACH_BackgroundLayer( i )
|
||||||
@@ -1107,6 +1109,11 @@ RString Song::GetMusicPath() const
|
|||||||
return GetSongAssetPath( m_sMusicFile, m_sSongDir );
|
return GetSongAssetPath( m_sMusicFile, m_sSongDir );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
RString Song::GetLeadTrackPath() const
|
||||||
|
{
|
||||||
|
return GetSongAssetPath( m_sLeadTrackFile, m_sSongDir );
|
||||||
|
}
|
||||||
|
|
||||||
RString Song::GetBannerPath() const
|
RString Song::GetBannerPath() const
|
||||||
{
|
{
|
||||||
return GetSongAssetPath( m_sBannerFile, m_sSongDir );
|
return GetSongAssetPath( m_sBannerFile, m_sSongDir );
|
||||||
|
|||||||
@@ -113,6 +113,7 @@ public:
|
|||||||
RString m_sCredit;
|
RString m_sCredit;
|
||||||
|
|
||||||
RString m_sMusicFile;
|
RString m_sMusicFile;
|
||||||
|
RString m_sLeadTrackFile;
|
||||||
float m_fMusicLengthSeconds;
|
float m_fMusicLengthSeconds;
|
||||||
float m_fFirstBeat; // beat of first note
|
float m_fFirstBeat; // beat of first note
|
||||||
float m_fLastBeat; // beat of last note
|
float m_fLastBeat; // beat of last note
|
||||||
@@ -129,6 +130,7 @@ public:
|
|||||||
RString m_sCDTitleFile;
|
RString m_sCDTitleFile;
|
||||||
|
|
||||||
RString GetMusicPath() const;
|
RString GetMusicPath() const;
|
||||||
|
RString GetLeadTrackPath() const;
|
||||||
RString GetBannerPath() const;
|
RString GetBannerPath() const;
|
||||||
RString GetLyricsPath() const;
|
RString GetLyricsPath() const;
|
||||||
RString GetBackgroundPath() const;
|
RString GetBackgroundPath() const;
|
||||||
@@ -138,6 +140,7 @@ public:
|
|||||||
bool m_bHasMusic, m_bHasBanner;
|
bool m_bHasMusic, m_bHasBanner;
|
||||||
|
|
||||||
bool HasMusic() const;
|
bool HasMusic() const;
|
||||||
|
bool HasLeadTrack() const;
|
||||||
bool HasBanner() const;
|
bool HasBanner() const;
|
||||||
bool HasBackground() const;
|
bool HasBackground() const;
|
||||||
bool HasCDTitle() const;
|
bool HasCDTitle() const;
|
||||||
|
|||||||
Reference in New Issue
Block a user