Cleanup, const fix.

This commit is contained in:
Glenn Maynard
2003-10-30 20:34:38 +00:00
parent fc97fba3b3
commit c5b78f146b
+8 -8
View File
@@ -149,19 +149,19 @@ void BGAnimationLayer::LoadFromVisualization( CString sMoviePath )
void BGAnimationLayer::LoadFromAniLayerFile( CString sPath ) void BGAnimationLayer::LoadFromAniLayerFile( CString sPath )
{ {
Song* pSong = GAMESTATE->m_pCurSong;
CString sSongBGPath;
if( pSong && pSong->HasBackground() )
sSongBGPath = pSong->GetBackgroundPath();
else
sSongBGPath = THEME->GetPathToG("Common fallback background");
Init(); Init();
CString lcPath = sPath; CString lcPath = sPath;
lcPath.MakeLower(); lcPath.MakeLower();
if( lcPath.Find("usesongbg") != -1 ) if( lcPath.Find("usesongbg") != -1 )
{ {
const Song* pSong = GAMESTATE->m_pCurSong;
CString sSongBGPath;
if( pSong && pSong->HasBackground() )
sSongBGPath = pSong->GetBackgroundPath();
else
sSongBGPath = THEME->GetPathToG("Common fallback background");
LoadFromStaticGraphic( sSongBGPath ); LoadFromStaticGraphic( sSongBGPath );
return; // this will ignore other effects in the file name return; // this will ignore other effects in the file name
} }
@@ -490,7 +490,7 @@ void BGAnimationLayer::LoadFromIni( CString sAniDir, CString sLayer )
} }
else if( sFile.CompareNoCase("songbanner")==0 ) else if( sFile.CompareNoCase("songbanner")==0 )
{ {
Song *pSong = GAMESTATE->m_pCurSong; const Song *pSong = GAMESTATE->m_pCurSong;
if( pSong && pSong->HasBanner() ) if( pSong && pSong->HasBanner() )
sPath = pSong->GetBannerPath(); sPath = pSong->GetBannerPath();
else else