no message

This commit is contained in:
Chris Danford
2001-12-19 14:56:22 +00:00
parent 1abf916090
commit e3876a05bd
5 changed files with 71 additions and 15 deletions
+2 -2
View File
@@ -438,8 +438,8 @@ void Player::OnCompleteStep( float fSongBeat, Step player_step, float fMaxBeatDi
// compute what the score should be for the note we stepped on
StepScore &stepscore = m_StepScore[iIndexThatWasSteppedOn];
if( fPercentFromPerfect < 0.20f ) stepscore = perfect;
else if( fPercentFromPerfect < 0.45f ) stepscore = great;
if( fPercentFromPerfect < 0.25f ) stepscore = perfect;
else if( fPercentFromPerfect < 0.50f ) stepscore = great;
else if( fPercentFromPerfect < 0.75f ) stepscore = good;
else stepscore = boo;
+54 -13
View File
@@ -324,7 +324,9 @@ bool Song::LoadSongInfoFromDWIFile( CString sPath )
{
if( m_BPMSegments[b].m_fStartBeat == fFreezeBeat )
{
m_BPMSegments[b].m_fFreezeSeconds = fFreezeSeconds*0.8;
m_BPMSegments[b].m_fFreezeSeconds = fFreezeSeconds;
m_BPMSegments[b].m_fFreezeSeconds *= 0.8; // hack - Why is this needed?
break;
}
}
@@ -393,37 +395,76 @@ void Song::TidyUpData()
{
CStringArray arrayPossibleMusic;
GetDirListing( m_sSongDir + CString("*.mp3"), arrayPossibleMusic );
GetDirListing( m_sSongDir + CString("*.ogg"), arrayPossibleMusic );
GetDirListing( m_sSongDir + CString("*.wav"), arrayPossibleMusic );
if( arrayPossibleMusic.GetSize() != 0 ) // we found a match
m_sMusic = arrayPossibleMusic.GetAt( 0 );
else
RageError( ssprintf("Music could not be found. Please check the Song file '%s' and verify the specified #MUSIC exists.", GetSongFilePath()) );
m_sMusic = "";
// RageError( ssprintf("Music could not be found. Please check the Song file '%s' and verify the specified #MUSIC exists.", GetSongFilePath()) );
}
if( m_sBanner == "" || !DoesFileExist(GetBannerPath()) )
{
// find the smallest image in the directory
CStringArray arrayPossibleBanners;
GetDirListing( m_sSongDir + CString("*banner*.*"), arrayPossibleBanners );
GetDirListing( m_sSongDir + CString("*.png"), arrayPossibleBanners );
GetDirListing( m_sSongDir + CString("*.jpg"), arrayPossibleBanners );
GetDirListing( m_sSongDir + CString("*.bmp"), arrayPossibleBanners );
if( arrayPossibleBanners.GetSize() != 0 ) // we found a match
m_sBanner = arrayPossibleBanners.GetAt( 0 );
D3DXIMAGE_INFO d3dii;
int iSmallestNumPixelsSoFar = 1024*1024;
CString sSmallestFileNameSoFar = "";
for( int i=0; i<arrayPossibleBanners.GetSize(); i++ )
{
if( SUCCEEDED( D3DXGetImageInfoFromFile( m_sSongDir + arrayPossibleBanners[i], &d3dii ) ) )
{
int iNumPixels = d3dii.Width * d3dii.Height;
if( iNumPixels < iSmallestNumPixelsSoFar ) // we have a new leader!
{
iSmallestNumPixelsSoFar = iNumPixels;
sSmallestFileNameSoFar = arrayPossibleBanners[i];
}
}
}
if( sSmallestFileNameSoFar != "" ) // we found a match
m_sBanner = sSmallestFileNameSoFar;
else
RageError( ssprintf("Banner could not be found. Please check the Song file '%s' and verify the specified #BANNER exists.", GetSongFilePath()) );
}
if( m_sBackground == "" || !DoesFileExist(GetBackgroundPath()) )
{
CStringArray arrayPossibleBanners;
GetDirListing( m_sSongDir + CString("*b*g*.*"), arrayPossibleBanners );
GetDirListing( m_sSongDir + CString("*640*.*"), arrayPossibleBanners );
GetDirListing( m_sSongDir + CString("*.png"), arrayPossibleBanners );
GetDirListing( m_sSongDir + CString("*.bmp"), arrayPossibleBanners );
// find the largest image in the directory
if( arrayPossibleBanners.GetSize() != 0 ) // we found a match
m_sBackground = arrayPossibleBanners.GetAt( 0 );
CStringArray arrayPossibleBackgrounds;
GetDirListing( m_sSongDir + CString("*.png"), arrayPossibleBackgrounds );
GetDirListing( m_sSongDir + CString("*.jpg"), arrayPossibleBackgrounds );
GetDirListing( m_sSongDir + CString("*.bmp"), arrayPossibleBackgrounds );
D3DXIMAGE_INFO d3dii;
int iBiggestNumPixelsSoFar = 0;
CString sBiggestFileNameSoFar = "";
for( int i=0; i<arrayPossibleBackgrounds.GetSize(); i++ )
{
if( SUCCEEDED( D3DXGetImageInfoFromFile( m_sSongDir + arrayPossibleBackgrounds[i], &d3dii ) ) )
{
int iNumPixels = d3dii.Width * d3dii.Height;
if( iNumPixels > iBiggestNumPixelsSoFar ) // we have a new leader!
{
iBiggestNumPixelsSoFar = iNumPixels;
sBiggestFileNameSoFar = arrayPossibleBackgrounds[i];
}
}
}
if( sBiggestFileNameSoFar != "" ) // we found a match
m_sBackground = sBiggestFileNameSoFar;
else
RageError( ssprintf("Banner could not be found. Please check the Song file '%s' and verify the specified #BANNER exists.", GetSongFilePath()) );
RageError( ssprintf("Background could not be found. Please check the Song file '%s' and verify the specified #BANNER exists.", GetSongFilePath()) );
}
}
+2
View File
@@ -326,6 +326,8 @@ HRESULT CreateObjects( HWND hWnd )
//WM->SetNewWindow( new WindowSandbox );
WM->SetNewWindow( new WindowTitleMenu );
Sleep(1000); // let the disk operations catch up
DXUtil_Timer( TIMER_START ); // Start the accurate timer
+8
View File
@@ -192,6 +192,14 @@ SOURCE=.\WindowDancing.h
# End Source File
# Begin Source File
SOURCE=.\WindowGameOptions.cpp
# End Source File
# Begin Source File
SOURCE=.\WindowGameOptions.h
# End Source File
# Begin Source File
SOURCE=.\WindowIntroCovers.cpp
# End Source File
# Begin Source File
+5
View File
@@ -54,6 +54,11 @@ public:
CString GetBackgroundPath() {return m_sSongDir + m_sBackground; };
// Steps& GetStepsAt( int iIndex ) {return arraySteps[iIndex]; };
bool HasMusic() {return m_sMusic != "" && DoesFileExist(GetMusicPath()); };
bool HasBanner() {return m_sBanner != "" && DoesFileExist(GetBannerPath()); };
bool HasBackground() {return m_sBackground != "" && DoesFileExist(GetBackgroundPath()); };
CString GetTitle() {return m_sTitle; };
CString GetArtist() {return m_sArtist; };
CString GetCreator() {return m_sCreator; };