fix songs with stops and manually set BPM not disqualifying with C*

This commit is contained in:
Chris Danford
2005-06-10 20:29:42 +00:00
parent 11b47255ee
commit d1fdc21864
4 changed files with 27 additions and 11 deletions
+12 -2
View File
@@ -1444,12 +1444,22 @@ bool Song::IsEditAlreadyLoaded( Steps* pSteps ) const
bool Song::HasSignificantBpmChangesOrStops() const bool Song::HasSignificantBpmChangesOrStops() const
{ {
if( m_Timing.HasStops() )
return true;
// Don't consider BPM changes that only are only for maintaining sync as // Don't consider BPM changes that only are only for maintaining sync as
// a real BpmChange. // a real BpmChange.
if( m_DisplayBPMType == DISPLAY_SPECIFIED ) if( m_DisplayBPMType == DISPLAY_SPECIFIED )
return false; {
if( m_fSpecifiedBPMMin != m_fSpecifiedBPMMax )
return true;
}
else if( m_Timing.HasBpmChanges() )
{
return true;
}
return m_Timing.HasBpmChangesOrStops(); return false;
} }
float Song::GetStepsSeconds() const float Song::GetStepsSeconds() const
+4 -4
View File
@@ -1,5 +1,5 @@
# Microsoft Developer Studio Project File - Name="StepMania" - Package Owner=<4> # Microsoft Developer Studio Project File - Name="StepMania" - Package Owner=<4>
# Microsoft Developer Studio Generated Build File, Format Version 6.00 # Microsoft Developer Studio Generated Build File, Format Version 60000
# ** DO NOT EDIT ** # ** DO NOT EDIT **
# TARGTYPE "Win32 (x86) Application" 0x0101 # TARGTYPE "Win32 (x86) Application" 0x0101
@@ -55,11 +55,11 @@ BSC32=bscmake.exe
LINK32=link.exe LINK32=link.exe
# ADD BASE LINK32 $(intdir)\verstub.obj kernel32.lib shell32.lib user32.lib gdi32.lib advapi32.lib winmm.lib /nologo /subsystem:windows /pdb:"../debug6/StepMania-debug.pdb" /map /debug /machine:I386 /nodefaultlib:"libcmtd.lib" /out:"../StepMania-debug.exe" # ADD BASE LINK32 $(intdir)\verstub.obj kernel32.lib shell32.lib user32.lib gdi32.lib advapi32.lib winmm.lib /nologo /subsystem:windows /pdb:"../debug6/StepMania-debug.pdb" /map /debug /machine:I386 /nodefaultlib:"libcmtd.lib" /out:"../StepMania-debug.exe"
# SUBTRACT BASE LINK32 /verbose /profile /pdb:none /incremental:no /nodefaultlib # SUBTRACT BASE LINK32 /verbose /profile /pdb:none /incremental:no /nodefaultlib
# ADD LINK32 $(intdir)\verstub.obj kernel32.lib gdi32.lib shell32.lib user32.lib advapi32.lib winmm.lib /nologo /subsystem:windows /map /debug /machine:I386 /nodefaultlib:"msvcrt.lib" /out:"../Program/StepMania-debug.exe" # ADD LINK32 $(intdir)\verstub.obj kernel32.lib gdi32.lib shell32.lib user32.lib advapi32.lib winmm.lib /nologo /subsystem:windows /map /debug /machine:I386 /nodefaultlib:"msvcrt.lib" /out:"../../itg/Program/StepMania-debug.exe"
# SUBTRACT LINK32 /verbose /profile /pdb:none /incremental:no /nodefaultlib # SUBTRACT LINK32 /verbose /profile /pdb:none /incremental:no /nodefaultlib
# Begin Special Build Tool # Begin Special Build Tool
IntDir=.\../Debug6 IntDir=.\../Debug6
TargetDir=\stepmania\Program TargetDir=\stepmania\itg\Program
TargetName=StepMania-debug TargetName=StepMania-debug
SOURCE="$(InputPath)" SOURCE="$(InputPath)"
PreLink_Cmds=archutils\Win32\verinc cl /Zl /nologo /c verstub.cpp /Fo$(IntDir)\ PreLink_Cmds=archutils\Win32\verinc cl /Zl /nologo /c verstub.cpp /Fo$(IntDir)\
@@ -96,7 +96,7 @@ LINK32=link.exe
# SUBTRACT LINK32 /pdb:none # SUBTRACT LINK32 /pdb:none
# Begin Special Build Tool # Begin Special Build Tool
IntDir=.\../Release6 IntDir=.\../Release6
TargetDir=\stepmania\Program TargetDir=\stepmania\stepmania\Program
TargetName=StepMania TargetName=StepMania
SOURCE="$(InputPath)" SOURCE="$(InputPath)"
PreLink_Cmds=archutils\Win32\verinc cl /Zl /nologo /c verstub.cpp /Fo$(IntDir)\ PreLink_Cmds=archutils\Win32\verinc cl /Zl /nologo /c verstub.cpp /Fo$(IntDir)\
+7 -2
View File
@@ -347,9 +347,14 @@ void TimingData::ShiftRows( int iStartRow, int iRowsToShift )
} }
} }
bool TimingData::HasBpmChangesOrStops() const bool TimingData::HasBpmChanges() const
{ {
return m_BPMSegments.size()>1 || m_StopSegments.size()>0; return m_BPMSegments.size()>1;
}
bool TimingData::HasStops() const
{
return m_StopSegments.size()>0;
} }
/* /*
+2 -1
View File
@@ -66,7 +66,8 @@ public:
return fBeat; return fBeat;
} }
float GetElapsedTimeFromBeat( float fBeat ) const; float GetElapsedTimeFromBeat( float fBeat ) const;
bool HasBpmChangesOrStops() const; bool HasBpmChanges() const;
bool HasStops() const;
bool operator==( const TimingData &other ) bool operator==( const TimingData &other )
{ {