From b2892caa4e0950e21e8bc0319955fc745d695d11 Mon Sep 17 00:00:00 2001 From: Chris Danford Date: Sun, 16 Mar 2003 01:47:08 +0000 Subject: [PATCH] improved Wide - prevents some nearly-impossible patterns --- stepmania/src/Background.cpp | 2 +- stepmania/src/NoteData.cpp | 14 +++++++++++++- stepmania/src/ScreenEdit.cpp | 2 -- stepmania/stepmania.nsi | 2 +- 4 files changed, 15 insertions(+), 5 deletions(-) diff --git a/stepmania/src/Background.cpp b/stepmania/src/Background.cpp index 205ba8a6b3..29a4dc5ef7 100644 --- a/stepmania/src/Background.cpp +++ b/stepmania/src/Background.cpp @@ -280,7 +280,7 @@ void Background::LoadFromSong( Song* pSong ) { const BPMSegment& bpmseg = pSong->m_BPMSegments[i]; - if( fmodf(bpmseg.m_fStartBeat, BEATS_PER_MEASURE) != 0 ) + if( fmodf(bpmseg.m_fStartBeat, (float)BEATS_PER_MEASURE) != 0 ) continue; // skip if( bpmseg.m_fStartBeat < fFirstBeat || bpmseg.m_fStartBeat > fLastBeat ) diff --git a/stepmania/src/NoteData.cpp b/stepmania/src/NoteData.cpp index 65652f35e0..92c574228c 100644 --- a/stepmania/src/NoteData.cpp +++ b/stepmania/src/NoteData.cpp @@ -1017,10 +1017,22 @@ void NoteDataUtil::Wide( NoteData &in ) for( int i=0; i<=max_row; i+=ROWS_PER_BEAT ) { if( in.GetNumTapNonEmptyTracks(i) != 1 ) - continue; // skip + continue; // skip. Don't place during holds + if( in.GetNumTracksWithTap(i) != 1 ) continue; // skip + bool bSpaceAroundIsEmpty = true; // no other notes with a 1/8th of this row + for( int j=i-ROWS_PER_BEAT/2+1; j 0 ) + { + bSpaceAroundIsEmpty = false; + break; + } + + if( !bSpaceAroundIsEmpty ) + continue; // skip + // add a note determinitsitcally int iBeat = (int)roundf( NoteRowToBeat(i) ); int iTrackOfNote = in.GetFirstTrackWithTap(i); diff --git a/stepmania/src/ScreenEdit.cpp b/stepmania/src/ScreenEdit.cpp index 92784d72a0..4fe9e9bca2 100644 --- a/stepmania/src/ScreenEdit.cpp +++ b/stepmania/src/ScreenEdit.cpp @@ -1521,8 +1521,6 @@ void ScreenEdit::HandleEditSongInfoChoice( EditSongInfoChoice c, int* iAnswers ) void ScreenEdit::HandleBGChangeChoice( BGChangeChoice c, int* iAnswers ) { - Song* pSong = GAMESTATE->m_pCurSong; - CString sBGName; switch( c ) diff --git a/stepmania/stepmania.nsi b/stepmania/stepmania.nsi index eaef7312cf..6e43285d04 100644 --- a/stepmania/stepmania.nsi +++ b/stepmania/stepmania.nsi @@ -19,7 +19,7 @@ !define PRODUCT_NAME_VER "${PRODUCT_NAME} ${VERSION}" Name "${PRODUCT_NAME}" -OutFile "StepMania-CVS-20030306.exe" +OutFile "StepMania-CVS-20030315.exe" ;OutFile "StepMania301.exe" ; Some default compiler settings (uncomment and change at will):