improve Skippy
select last chosen NotesType and Difficulty in EditMenu
This commit is contained in:
@@ -16,6 +16,7 @@
|
||||
#include "GameState.h"
|
||||
#include "ThemeManager.h"
|
||||
#include "GameManager.h"
|
||||
#include "Notes.h"
|
||||
|
||||
//
|
||||
// Defines specific to EditMenu
|
||||
@@ -123,6 +124,21 @@ EditMenu::EditMenu()
|
||||
if( GAMESTATE->m_pCurSong == m_pSongs[i] )
|
||||
m_iSelection[ROW_SONG] = i;
|
||||
OnRowValueChanged( ROW_SONG );
|
||||
|
||||
// Select the current NotesType and difficulty if any
|
||||
if( GAMESTATE->m_pCurNotes )
|
||||
{
|
||||
for( i=0; i<m_NotesTypes.size(); i++ )
|
||||
if( m_NotesTypes[i] == GAMESTATE->m_pCurNotes[PLAYER_1]->m_NotesType )
|
||||
{
|
||||
m_iSelection[ROW_NOTES_TYPE] = i;
|
||||
OnRowValueChanged( ROW_NOTES_TYPE );
|
||||
}
|
||||
|
||||
m_iSelection[ROW_DIFFICULTY] = GAMESTATE->m_pCurNotes[PLAYER_1]->GetDifficulty();
|
||||
OnRowValueChanged( ROW_DIFFICULTY );
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+25
-14
@@ -1046,20 +1046,20 @@ void NoteDataUtil::Wide( NoteData &in )
|
||||
|
||||
void NoteDataUtil::Big( NoteData &in )
|
||||
{
|
||||
InsertIntelligentTaps(in,1.0f,0.5f); // add 8ths between 4ths
|
||||
InsertIntelligentTaps(in,1.0f,0.5f,false); // add 8ths between 4ths
|
||||
}
|
||||
|
||||
void NoteDataUtil::Quick( NoteData &in )
|
||||
{
|
||||
InsertIntelligentTaps(in,0.5f,0.25f); // add 16ths between 8ths
|
||||
InsertIntelligentTaps(in,0.5f,0.25f,false); // add 16ths between 8ths
|
||||
}
|
||||
|
||||
void NoteDataUtil::Skippy( NoteData &in )
|
||||
{
|
||||
InsertIntelligentTaps(in,1.0f,0.75f); // add 16ths between 4ths
|
||||
InsertIntelligentTaps(in,1.0f,0.75f,true); // add 16ths between 4ths
|
||||
}
|
||||
|
||||
void NoteDataUtil::InsertIntelligentTaps( NoteData &in, float fBeatInterval, float fInsertBeatOffset )
|
||||
void NoteDataUtil::InsertIntelligentTaps( NoteData &in, float fBeatInterval, float fInsertBeatOffset, bool bNewTapSameAsBeginning )
|
||||
{
|
||||
ASSERT( fInsertBeatOffset <= fBeatInterval );
|
||||
|
||||
@@ -1094,19 +1094,30 @@ void NoteDataUtil::InsertIntelligentTaps( NoteData &in, float fBeatInterval, flo
|
||||
// add a note determinitsitcally somewhere on a track different from the two surrounding notes
|
||||
int iTrackOfNoteEarlier = in.GetFirstNonEmptyTrack(iRowEarlier);
|
||||
int iTrackOfNoteLater = in.GetFirstNonEmptyTrack(iRowLater);
|
||||
int iTrackOfNoteMiddle = 0;
|
||||
if( abs(iTrackOfNoteEarlier-iTrackOfNoteLater) == 2 )
|
||||
iTrackOfNoteMiddle = (iTrackOfNoteEarlier+iTrackOfNoteLater)/2;
|
||||
else
|
||||
for( int t=min(iTrackOfNoteEarlier,iTrackOfNoteLater)-1; t<=max(iTrackOfNoteEarlier,iTrackOfNoteLater)+1; t++ )
|
||||
int iTrackOfNoteToAdd = 0;
|
||||
if( bNewTapSameAsBeginning &&
|
||||
iTrackOfNoteEarlier != iTrackOfNoteLater ) // Don't make skips on the same note
|
||||
{
|
||||
iTrackOfNoteToAdd = iTrackOfNoteEarlier;
|
||||
}
|
||||
else // bNewTapSameAsBeginning
|
||||
{
|
||||
// choose a randomish track
|
||||
if( abs(iTrackOfNoteEarlier-iTrackOfNoteLater) == 2 )
|
||||
iTrackOfNoteToAdd = (iTrackOfNoteEarlier+iTrackOfNoteLater)/2;
|
||||
else
|
||||
{
|
||||
iTrackOfNoteMiddle = t;
|
||||
CLAMP( iTrackOfNoteMiddle, 0, in.GetNumTracks()-1 );
|
||||
if( iTrackOfNoteMiddle!=iTrackOfNoteEarlier && iTrackOfNoteMiddle!=iTrackOfNoteLater )
|
||||
break;
|
||||
for( int t=min(iTrackOfNoteEarlier,iTrackOfNoteLater)-1; t<=max(iTrackOfNoteEarlier,iTrackOfNoteLater)+1; t++ )
|
||||
{
|
||||
iTrackOfNoteToAdd = t;
|
||||
CLAMP( iTrackOfNoteToAdd, 0, in.GetNumTracks()-1 );
|
||||
if( iTrackOfNoteToAdd!=iTrackOfNoteEarlier && iTrackOfNoteToAdd!=iTrackOfNoteLater )
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
in.SetTapNote(iTrackOfNoteMiddle, iRowToAdd, TAP_TAP);
|
||||
in.SetTapNote(iTrackOfNoteToAdd, iRowToAdd, TAP_TAP);
|
||||
}
|
||||
|
||||
in.Convert4sToHoldNotes();
|
||||
|
||||
@@ -163,7 +163,7 @@ namespace NoteDataUtil
|
||||
void Big( NoteData &in );
|
||||
void Quick( NoteData &in );
|
||||
void Skippy( NoteData &in );
|
||||
void InsertIntelligentTaps( NoteData &in, float fBeatInterval, float fInsertBeatOffset );
|
||||
void InsertIntelligentTaps( NoteData &in, float fBeatInterval, float fInsertBeatOffset, bool bNewTapSameAsBeginning );
|
||||
void SuperShuffleTaps( NoteData &in );
|
||||
void Backwards( NoteData &in );
|
||||
void SwapSides( NoteData &in );
|
||||
|
||||
@@ -245,17 +245,20 @@ void ScreenPlayerOptions::HandleScreenMessage( const ScreenMessage SM )
|
||||
{
|
||||
m_bAcceptedChoices = true;
|
||||
|
||||
float fShowSeconds = m_Menu.m_Out.GetLengthSeconds();
|
||||
if( !GAMESTATE->m_bEditing )
|
||||
{
|
||||
float fShowSeconds = m_Menu.m_Out.GetLengthSeconds();
|
||||
|
||||
// show "hold START for options"
|
||||
m_sprOptionsMessage.SetDiffuse( RageColor(1,1,1,0) );
|
||||
m_sprOptionsMessage.BeginTweening( 0.15f ); // fade in
|
||||
m_sprOptionsMessage.SetTweenZoomY( 1 );
|
||||
m_sprOptionsMessage.SetTweenDiffuse( RageColor(1,1,1,1) );
|
||||
m_sprOptionsMessage.BeginTweening( fShowSeconds-0.3f ); // sleep
|
||||
m_sprOptionsMessage.BeginTweening( 0.15f ); // fade out
|
||||
m_sprOptionsMessage.SetTweenDiffuse( RageColor(1,1,1,0) );
|
||||
m_sprOptionsMessage.SetTweenZoomY( 0 );
|
||||
// show "hold START for options"
|
||||
m_sprOptionsMessage.SetDiffuse( RageColor(1,1,1,0) );
|
||||
m_sprOptionsMessage.BeginTweening( 0.15f ); // fade in
|
||||
m_sprOptionsMessage.SetTweenZoomY( 1 );
|
||||
m_sprOptionsMessage.SetTweenDiffuse( RageColor(1,1,1,1) );
|
||||
m_sprOptionsMessage.BeginTweening( fShowSeconds-0.3f ); // sleep
|
||||
m_sprOptionsMessage.BeginTweening( 0.15f ); // fade out
|
||||
m_sprOptionsMessage.SetTweenDiffuse( RageColor(1,1,1,0) );
|
||||
m_sprOptionsMessage.SetTweenZoomY( 0 );
|
||||
}
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user