Whoops: merge comment too soon.

Let's try this again.
This commit is contained in:
Jason Felds
2011-01-16 13:24:49 -05:00
2 changed files with 51 additions and 4 deletions
+41 -1
View File
@@ -381,7 +381,7 @@ void Song::TidyUpData()
if( !m_sInstrumentTrackFile[i].empty() )
FixupPath( m_sInstrumentTrackFile[i], m_sSongDir );
FixupPath( m_sBannerFile, m_sSongDir );
//FixupPath( m_sAlbumArtFile, m_sSongDir );
//FixupPath( m_sJacketFile, m_sSongDir );
//FixupPath( m_sDiscFile, m_sSongDir );
FixupPath( m_sLyricsFile, m_sSongDir );
FixupPath( m_sBackgroundFile, m_sSongDir );
@@ -534,6 +534,39 @@ void Song::TidyUpData()
m_sBackgroundFile = arrayPossibleBGs[0];
}
/*
if( !HasJacket() )
{
// find an image with "jacket" or "albumart" in the filename.
vector<RString> arrayPossibleJackets;
GetImageDirListing( m_sSongDir + "jk_*", arrayPossibleJackets );
//GetImageDirListing( m_sSongDir + "*_jk", arrayPossibleJackets );
GetImageDirListing( m_sSongDir + "*jacket*", arrayPossibleJackets );
GetImageDirListing( m_sSongDir + "*albumart*", arrayPossibleJackets );
if( !arrayPossibleJackets.empty() )
m_sBackgroundFile = arrayPossibleJackets[0];
}
*/
/*
if( !HasDisc() )
{
// disc means the rectangular-style graphic.
}
*/
/*
if( !HasCDImage() )
{
// CD image, a la ddr 1st-3rd
// find an image with "cd" at the end of the filename.
vector<RString> arrayPossibleCDImages;
GetImageDirListing( m_sSongDir + "* CD", arrayPossibleCDImages );
if( !arrayPossibleCDImages.empty() )
m_sCDTFile = arrayPossibleCDImages[0];
}
*/
if( !HasCDTitle() )
{
// find an image with "cdtitle" in the file name
@@ -578,6 +611,8 @@ void Song::TidyUpData()
if( HasCDTitle() && stricmp(m_sCDTitleFile, arrayImages[i])==0 )
continue; // skip
// todo: add checks for Jacket, Disc, and CDImage -aj
RString sPath = m_sSongDir + arrayImages[i];
// We only care about the dimensions.
@@ -639,6 +674,8 @@ void Song::TidyUpData()
m_sCDTitleFile = arrayImages[i];
continue;
}
// todo: add checks for Jacket, Disc, and CDImage -aj
}
// These will be written to cache, for Song::LoadFromSongDir to use later.
@@ -1101,6 +1138,7 @@ bool Song::HasBGChanges() const
return false;
}
bool Song::HasAttacks() const {return !m_Attacks.empty(); }
// todo: add checks for Jacket, Disc, and CDImage -aj
const vector<BackgroundChange> &Song::GetBackgroundChanges( BackgroundLayer bl ) const
{
@@ -1180,6 +1218,8 @@ RString Song::GetBackgroundPath() const
return GetSongAssetPath( m_sBackgroundFile, m_sSongDir );
}
// todo: add checks for Jacket, Disc, and CDImage -aj
RString Song::GetDisplayMainTitle() const
{
if(!PREFSMAN->m_bShowNativeLanguage) return GetTranslitMainTitle();
+10 -3
View File
@@ -141,9 +141,10 @@ public:
float m_fSpecifiedBPMMin;
float m_fSpecifiedBPMMax; // if a range, then Min != Max
RString m_sBannerFile; // typically a 16:5 ratio graphic (e.g. 256x80)
//RString m_sAlbumArtFile; // typically square (e.g. 256x256)
//RString m_sDiscFile; // typically rectangular (e.g. 256x192)
RString m_sBannerFile; // typically a 16:5 ratio graphic (e.g. 256x80)
//RString m_sJacketFile; // typically square (e.g. 192x192, 256x256)
//RString m_sDiscFile; // rectangular (e.g. 256x192 [Pump], 200x150 [MGD3])
//RString m_sCDFile; // square (e.g. 128x128 [DDR 3rd])
RString m_sLyricsFile;
RString m_sBackgroundFile;
RString m_sCDTitleFile;
@@ -154,6 +155,9 @@ public:
RString GetMusicPath() const;
RString GetInstrumentTrackPath( InstrumentTrack it ) const;
RString GetBannerPath() const;
//RString GetJacketPath() const;
//RString GetDiscPath() const;
//RString GetCDImagePath() const;
RString GetLyricsPath() const;
RString GetBackgroundPath() const;
RString GetCDTitlePath() const;
@@ -165,6 +169,9 @@ public:
bool HasInstrumentTrack( InstrumentTrack it ) const;
bool HasBanner() const;
bool HasBackground() const;
//bool HasJacket() const;
//bool HasDisc() const;
//bool HasCDImage() const;
bool HasCDTitle() const;
bool HasMovieBackground() const;
bool HasBGChanges() const;