diff --git a/stepmania/src/NoteData.cpp b/stepmania/src/NoteData.cpp index 05f4f55c58..02ea2674da 100644 --- a/stepmania/src/NoteData.cpp +++ b/stepmania/src/NoteData.cpp @@ -31,7 +31,6 @@ NoteData::NoteData() void NoteData::Init() { m_iNumTracks = 0; - TapRowDivisor = 1; } NoteData::~NoteData() @@ -87,7 +86,6 @@ void NoteData::CopyRange( NoteData* pFrom, int iFromIndexBegin, int iFromIndexEn void NoteData::Config( const NoteData &From ) { m_iNumTracks = From.m_iNumTracks; - TapRowDivisor = From.TapRowDivisor; } void NoteData::CopyAll( NoteData* pFrom ) @@ -214,7 +212,7 @@ float NoteData::GetLastBeat() const int i; - for( i = TapRowDivisor * int(m_TapNotes[0].size()); i>=0; i-- ) // iterate back to front + for( i = int(m_TapNotes[0].size()); i>=0; i-- ) // iterate back to front { if( !IsRowEmpty(i) ) { @@ -532,47 +530,10 @@ void NoteData::SetTapNote(int track, int row, TapNote t) { if(row < 0) return; - /* Decompress if needed. */ - if((row % TapRowDivisor) != 0) - SetDivisor(1); - PadTapNotes(row); - row /= TapRowDivisor; m_TapNotes[track][row]=t; } -void NoteData::SetDivisor(int div) -{ - if(div == TapRowDivisor) - return; - - int src_step = div, - dst_step = TapRowDivisor; - - /* I think this should work to go from one divisor to another, but - * I havn't tested it and don't see a need. */ - ASSERT(src_step == 1 || dst_step == 1); - - for(int t=0; t < m_iNumTracks; t++) - { - vector TapNotes = m_TapNotes[t]; - /* Try to make sure the memory is actually released. */ - int dst_size = m_TapNotes[0].size() * dst_step / src_step; - m_TapNotes[t].clear(); - m_TapNotes[t] = vector(dst_size, TAP_EMPTY); - - unsigned src_row = 0, dst_row = 0; - while(src_row < TapNotes.size() && dst_row < m_TapNotes[t].size()) - { - m_TapNotes[t][dst_row] = TapNotes[src_row]; - dst_row += dst_step; - src_row += src_step; - } - } - - TapRowDivisor = div; -} - NoteType NoteDataUtil::GetSmallestNoteTypeForMeasure( const NoteData &n, int iMeasureIndex ) { const int iMeasureStartIndex = iMeasureIndex * ROWS_PER_MEASURE; diff --git a/stepmania/src/NoteData.h b/stepmania/src/NoteData.h index 856333559e..b4e47e2064 100644 --- a/stepmania/src/NoteData.h +++ b/stepmania/src/NoteData.h @@ -27,9 +27,6 @@ class NoteData { /* Keep this aligned, so that they all have the same size. */ vector m_TapNotes[MAX_NOTE_TRACKS]; - int TapRowDivisor; - void SetDivisor(int div); - vector m_HoldNotes; /* Pad m_TapNotes so it includes the row "rows". */ @@ -50,12 +47,9 @@ public: * range; pretend the song goes on with TAP_EMPTYs indefinitely. */ inline TapNote GetTapNote(unsigned track, unsigned row) const { - if((row % TapRowDivisor) != 0) return TapNote(TAP_EMPTY); - row /= TapRowDivisor; if(row < 0 || row >= m_TapNotes[track].size()) return TapNote(TAP_EMPTY); return m_TapNotes[track][row]; } - int GetTapNoteIncrement() const { return TapRowDivisor; } void MoveTapNoteTrack(int dest, int src); void SetTapNote(int track, int row, TapNote t);