no message
This commit is contained in:
@@ -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
|
// compute what the score should be for the note we stepped on
|
||||||
StepScore &stepscore = m_StepScore[iIndexThatWasSteppedOn];
|
StepScore &stepscore = m_StepScore[iIndexThatWasSteppedOn];
|
||||||
|
|
||||||
if( fPercentFromPerfect < 0.20f ) stepscore = perfect;
|
if( fPercentFromPerfect < 0.25f ) stepscore = perfect;
|
||||||
else if( fPercentFromPerfect < 0.45f ) stepscore = great;
|
else if( fPercentFromPerfect < 0.50f ) stepscore = great;
|
||||||
else if( fPercentFromPerfect < 0.75f ) stepscore = good;
|
else if( fPercentFromPerfect < 0.75f ) stepscore = good;
|
||||||
else stepscore = boo;
|
else stepscore = boo;
|
||||||
|
|
||||||
|
|||||||
+54
-13
@@ -324,7 +324,9 @@ bool Song::LoadSongInfoFromDWIFile( CString sPath )
|
|||||||
{
|
{
|
||||||
if( m_BPMSegments[b].m_fStartBeat == fFreezeBeat )
|
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;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -393,37 +395,76 @@ void Song::TidyUpData()
|
|||||||
{
|
{
|
||||||
CStringArray arrayPossibleMusic;
|
CStringArray arrayPossibleMusic;
|
||||||
GetDirListing( m_sSongDir + CString("*.mp3"), arrayPossibleMusic );
|
GetDirListing( m_sSongDir + CString("*.mp3"), arrayPossibleMusic );
|
||||||
|
GetDirListing( m_sSongDir + CString("*.ogg"), arrayPossibleMusic );
|
||||||
GetDirListing( m_sSongDir + CString("*.wav"), arrayPossibleMusic );
|
GetDirListing( m_sSongDir + CString("*.wav"), arrayPossibleMusic );
|
||||||
|
|
||||||
if( arrayPossibleMusic.GetSize() != 0 ) // we found a match
|
if( arrayPossibleMusic.GetSize() != 0 ) // we found a match
|
||||||
m_sMusic = arrayPossibleMusic.GetAt( 0 );
|
m_sMusic = arrayPossibleMusic.GetAt( 0 );
|
||||||
else
|
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()) )
|
if( m_sBanner == "" || !DoesFileExist(GetBannerPath()) )
|
||||||
{
|
{
|
||||||
|
// find the smallest image in the directory
|
||||||
|
|
||||||
CStringArray arrayPossibleBanners;
|
CStringArray arrayPossibleBanners;
|
||||||
GetDirListing( m_sSongDir + CString("*banner*.*"), arrayPossibleBanners );
|
|
||||||
GetDirListing( m_sSongDir + CString("*.png"), arrayPossibleBanners );
|
GetDirListing( m_sSongDir + CString("*.png"), arrayPossibleBanners );
|
||||||
|
GetDirListing( m_sSongDir + CString("*.jpg"), arrayPossibleBanners );
|
||||||
GetDirListing( m_sSongDir + CString("*.bmp"), arrayPossibleBanners );
|
GetDirListing( m_sSongDir + CString("*.bmp"), arrayPossibleBanners );
|
||||||
|
|
||||||
if( arrayPossibleBanners.GetSize() != 0 ) // we found a match
|
D3DXIMAGE_INFO d3dii;
|
||||||
m_sBanner = arrayPossibleBanners.GetAt( 0 );
|
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
|
else
|
||||||
RageError( ssprintf("Banner could not be found. Please check the Song file '%s' and verify the specified #BANNER exists.", GetSongFilePath()) );
|
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()) )
|
if( m_sBackground == "" || !DoesFileExist(GetBackgroundPath()) )
|
||||||
{
|
{
|
||||||
CStringArray arrayPossibleBanners;
|
// find the largest image in the directory
|
||||||
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 );
|
|
||||||
|
|
||||||
if( arrayPossibleBanners.GetSize() != 0 ) // we found a match
|
CStringArray arrayPossibleBackgrounds;
|
||||||
m_sBackground = arrayPossibleBanners.GetAt( 0 );
|
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
|
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()) );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -326,6 +326,8 @@ HRESULT CreateObjects( HWND hWnd )
|
|||||||
//WM->SetNewWindow( new WindowSandbox );
|
//WM->SetNewWindow( new WindowSandbox );
|
||||||
WM->SetNewWindow( new WindowTitleMenu );
|
WM->SetNewWindow( new WindowTitleMenu );
|
||||||
|
|
||||||
|
Sleep(1000); // let the disk operations catch up
|
||||||
|
|
||||||
DXUtil_Timer( TIMER_START ); // Start the accurate timer
|
DXUtil_Timer( TIMER_START ); // Start the accurate timer
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -192,6 +192,14 @@ SOURCE=.\WindowDancing.h
|
|||||||
# End Source File
|
# End Source File
|
||||||
# Begin 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
|
SOURCE=.\WindowIntroCovers.cpp
|
||||||
# End Source File
|
# End Source File
|
||||||
# Begin Source File
|
# Begin Source File
|
||||||
|
|||||||
@@ -54,6 +54,11 @@ public:
|
|||||||
CString GetBackgroundPath() {return m_sSongDir + m_sBackground; };
|
CString GetBackgroundPath() {return m_sSongDir + m_sBackground; };
|
||||||
// Steps& GetStepsAt( int iIndex ) {return arraySteps[iIndex]; };
|
// 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 GetTitle() {return m_sTitle; };
|
||||||
CString GetArtist() {return m_sArtist; };
|
CString GetArtist() {return m_sArtist; };
|
||||||
CString GetCreator() {return m_sCreator; };
|
CString GetCreator() {return m_sCreator; };
|
||||||
|
|||||||
Reference in New Issue
Block a user