diff --git a/NoteSkins/pump/rhythm/metrics.ini b/NoteSkins/pump/rhythm/metrics.ini index 1097f5d084..faaa880191 100644 --- a/NoteSkins/pump/rhythm/metrics.ini +++ b/NoteSkins/pump/rhythm/metrics.ini @@ -1,13 +1,5 @@ [NoteDisplay] - -AnimationIsBeatBased=1 - -TapNoteNoteColorTextureCoordSpacingX=0 - -TapNoteNoteColorTextureCoordSpacingY=0.125 - -HoldHeadNoteColorTextureCoordSpacingX=0 - -HoldHeadNoteColorTextureCoordSpacingY=0.125 - -TapNoteAnimationLengthInBeats=0.5 \ No newline at end of file +TapNoteNoteColorTextureCoordSpacingX=0 +TapNoteNoteColorTextureCoordSpacingY=0.125 +HoldHeadNoteColorTextureCoordSpacingX=0 +HoldHeadNoteColorTextureCoordSpacingY=0.125 \ No newline at end of file diff --git a/Themes/_fallback/metrics.ini b/Themes/_fallback/metrics.ini index 517b6e27e0..0ff241f213 100644 --- a/Themes/_fallback/metrics.ini +++ b/Themes/_fallback/metrics.ini @@ -952,7 +952,8 @@ PenalizeTapScoreNone=false JudgeHoldNotesOnSameRowTogether=(GAMESTATE:GetCurrentGame():GetName() == "pump") HoldCheckpoints=(GAMESTATE:GetCurrentGame():GetName() == "pump") CheckpointsUseTickcounts=(GAMESTATE:GetCurrentGame():GetName() == "pump") -CheckpointsUseTimeSignatures=(GAMESTATE:GetCurrentGame():GetName() == "pump") +; deprecated? +CheckpointsUseTimeSignatures=false CheckpointsTapsSeparateJudgment=CheckpointsTapsSeparateJudgment() CheckpointsFlashOnHold=false ImmediateHoldLetGo=ImmediateHoldLetGo() diff --git a/src/NotesLoaderKSF.cpp b/src/NotesLoaderKSF.cpp index 8ac3ee78b2..697791857f 100644 --- a/src/NotesLoaderKSF.cpp +++ b/src/NotesLoaderKSF.cpp @@ -9,55 +9,6 @@ #include "Song.h" #include "Steps.h" -#if 0 -static void RemoveHoles( NoteData &out, const Song &song ) -{ - // Start at the second BPM segment; the first one is already aligned. - for( unsigned seg = 1; seg < song.m_Timing.m_BPMSegments.size(); ++seg ) - { -// const float FromBeat = song.m_Timing.m_BPMSegments[seg].m_fStartBeat; - const float FromBeat = song.m_Timing.m_BPMSegments[seg].m_fStartBeat * song.m_BPMSegments[seg].m_fBPM / song.m_BPMSegments[0].m_fBPM; - const int FromRow = (int) BeatToNoteRow(FromBeat); - const int ToRow = (int) BeatToNoteRow(song.m_Timing.m_BPMSegments[seg].m_fStartBeat); - - LOG->Trace("from %f (%i) to (%i)", FromBeat, FromRow, ToRow); -// const int ToRow = lrintf(FromRow * song.m_Timing.m_BPMSegments[0].m_fBPM / song.m_BPMSegments[seg].m_fBPM); -// const int Rows = out.GetLastRow() - FromRow + 1; -// int LastRow; -// if(seg+1 < song.m_Timing.m_BPMSegments().size()) -// LastRow = (int) NoteRowToBeat( song.m_Timing.m_BPMSegments[seg+1].m_fStartBeat ) - 1; -// else -// LastRow = out.GetLastRow(); - NoteData tmp; - tmp.SetNumTracks( out.GetNumTracks() ); - tmp.CopyRange( &out, FromRow, MAX_NOTE_ROW ); - out.ClearRange( FromRow, MAX_NOTE_ROW ); - out.CopyRange( &tmp, 0, MAX_NOTE_ROW, ToRow ); - } - -/* - for( t = 0; t < notedata.GetNumTracks(); ++t ) - { - const float CurBPM = song.GetBPMAtBeat( NoteRowToBeat(row) ); - song.m_Timing.m_BPMSegments.size() - for( int row = 0; row <= notedata.GetLastRow(); ++row ) - { - TapNote tn = notedata.GetTapNote(t, row); - if( tn == TAP_EMPTY ) - continue; - - const int RealRow = lrintf(row * OrigBPM / CurBPM); - if( RealRow == row ) - continue; - LOG->Trace("from %i to %i", row, RealRow); - notedata.SetTapNote( t, RealRow, tn ); - notedata.SetTapNote( t, row, TAP_EMPTY ); - } - } -*/ -} -#endif - static bool LoadFromKSFFile( const RString &sPath, Steps &out, const Song &song, bool bKIUCompliant ) { LOG->Trace( "Steps::LoadFromKSFFile( '%s' )", sPath.c_str() ); @@ -317,10 +268,6 @@ static bool LoadFromKSFFile( const RString &sPath, Steps &out, const Song &song, fCurBeat = prevBeat + 1.0f / iTickCount; } - // We need to remove holes where the BPM increases. -// if( song.m_Timing.m_BPMSegments.size() > 1 ) -// RemoveHoles( notedata, song ); - out.SetNoteData( notedata ); out.TidyUpData(); @@ -454,13 +401,13 @@ static bool LoadGlobalData( const RString &sPath, Song &out, bool &bKIUCompliant * actual steps. */ iTickCount = atoi( sParams[1] ); iTickCount = iTickCount > 0 ? iTickCount : 2; // again, Direct Move uses 4 as a default. - // add a time signature for those using the [Player] + // add a tickcount for those using the [Player] // CheckpointsUseTimeSignatures metric. -aj - TimeSignatureSegment seg; - seg.m_iStartRow = BeatToNoteRow(0.0f); - seg.m_iNumerator = iTickCount > ROWS_PER_BEAT ? ROWS_PER_BEAT : iTickCount; - seg.m_iDenominator = 4; - out.m_Timing.AddTimeSignatureSegment( seg ); + // It's not with timesigs now -DaisuMaster + TickcountSegment tcs; + tcs.m_iStartRow = BeatToNoteRow(0.0f); + tcs.m_iTicks = iTickCount > ROWS_PER_BEAT ? ROWS_PER_BEAT : iTickCount; + out.m_Timing.AddTickcountSegment( tcs ); } else if ( 0==stricmp(sValueName,"STEP") ) { @@ -505,7 +452,7 @@ static bool LoadGlobalData( const RString &sPath, Song &out, bool &bKIUCompliant } } - //intro length in piu mixes is normally 7 seconds + //intro length in piu mixes is generally 7 seconds out.m_fMusicSampleLengthSeconds = 7.0f; /* BPM Change checks are done here. If bKIUCompliant, it's short and sweet. @@ -563,12 +510,11 @@ static bool LoadGlobalData( const RString &sPath, Song &out, bool &bKIUCompliant if (BeginsWith(NoteRowString, "|T")) { iTickCount = (int)numTemp; - TimeSignatureSegment seg; - seg.m_iStartRow = BeatToNoteRow(fCurBeat); - seg.m_iNumerator = iTickCount > ROWS_PER_BEAT ? ROWS_PER_BEAT : iTickCount; - seg.m_iDenominator = 4; - out.m_Timing.AddTimeSignatureSegment( seg ); - + TickcountSegment tcs; + tcs.m_iStartRow = BeatToNoteRow(fCurBeat); + tcs.m_iTicks = iTickCount > ROWS_PER_BEAT ? ROWS_PER_BEAT : iTickCount; + out.m_Timing.AddTickcountSegment( tcs ); + continue; } else if (BeginsWith(NoteRowString, "|B")) diff --git a/src/NotesLoaderSM.cpp b/src/NotesLoaderSM.cpp index 359dd5ddc5..5a978bdae0 100644 --- a/src/NotesLoaderSM.cpp +++ b/src/NotesLoaderSM.cpp @@ -328,16 +328,23 @@ void SMLoader::LoadTimingFromSMFile( const MsdFile &msd, TimingData &out ) const float fTickcountBeat = StringToFloat( arrayTickcountValues[0] ); const int iTicks = atoi( arrayTickcountValues[1] ); + // you're lazy, let SM do the work for you... -DaisuMaster + if( iTicks < 1) iTicks = 1; + if( iTicks > ROWS_PER_BEAT ) iTicks = ROWS_PER_BEAT; + TickcountSegment new_seg( BeatToNoteRow(fTickcountBeat), iTicks ); - + out.AddTickcountSegment( new_seg ); + if(iTicks >= 1 && iTicks <= ROWS_PER_BEAT ) // Constants { // LOG->Trace( "Adding a tickcount segment: beat: %f, ticks = %d", fTickcountBeat, iTicks ); - out.AddTickcountSegment( new_seg ); + //out.AddTickcountSegment( new_seg ); } else { - LOG->UserLog( "Song file", "(UNKNOWN)", "has an invalid tickcount at beat %f, ticks %d.", fTickcountBeat, iTicks ); + //LOG->UserLog( "Song file", "(UNKNOWN)", "has an invalid tickcount at beat %f, ticks %d.", fTickcountBeat, iTicks ); + //LOG->UserLog( "Song file", "(UNKNOWN)", "Clamping tickcount value to %d at beat %f.", iTicks, fTickcountBeat); + //etc } } }