Fixed GetMusicPath in case where DWIPath is ""

This commit is contained in:
Chris Danford
2002-09-10 16:31:35 +00:00
parent 3022600bf3
commit 65ac3e43e8
2 changed files with 8 additions and 5 deletions
+4 -4
View File
@@ -109,7 +109,6 @@ void Background::LoadFromSong( Song* pSong )
const float fXZoom = RECTWIDTH(RECT_BACKGROUND) / (float)SCREEN_WIDTH;
const float fYZoom = RECTHEIGHT(RECT_BACKGROUND) / (float)SCREEN_HEIGHT;
const float fZoom = max(fXZoom,fYZoom);
//
@@ -354,12 +353,13 @@ void Background::LoadFromSong( Song* pSong )
for( int i=0; i<m_BackgroundAnimations.GetSize(); i++ )
{
m_BackgroundAnimations[i]->SetXY( (float)LEFT_EDGE, (float)TOP_EDGE );
m_BackgroundAnimations[i]->SetZoom( fZoom );
m_BackgroundAnimations[i]->SetZoomX( fXZoom );
m_BackgroundAnimations[i]->SetZoomY( fYZoom );
}
m_BGADanger.SetXY( (float)LEFT_EDGE, (float)TOP_EDGE );
m_BGADanger.SetZoom( fZoom );
m_BGADanger.SetZoomX( fXZoom );
m_BGADanger.SetZoomY( fYZoom );
}
+4 -1
View File
@@ -993,7 +993,10 @@ int Song::GetNumTimesPlayed() const
CString Song::GetMusicPath() const
{
if(m_sSongDir != "" && m_sSongDir.Left(PREFSMAN->m_DWIPath.GetLength()) == PREFSMAN->m_DWIPath)
// Glenn, did you mean this? m_DWIPath is empty in my ini, so
// the old if statement thinks every song is being loaded from DWIPath.
if( PREFSMAN->m_DWIPath!="" && m_sSongDir.Left(PREFSMAN->m_DWIPath.GetLength()) == PREFSMAN->m_DWIPath )
// if(m_sSongDir != "" && m_sSongDir.Left(PREFSMAN->m_DWIPath.GetLength()) == PREFSMAN->m_DWIPath)
return PREFSMAN->m_DWIPath+"\\"+m_sMusicFile;
return m_sMusicFile.Left(2) == ".\\"? m_sMusicFile : m_sSongDir+m_sMusicFile;