Editor playback now obeys NoteSkin setting

This commit is contained in:
Chris Danford
2003-02-19 06:27:20 +00:00
parent cdf8214ff7
commit 6529c5ca70
2 changed files with 15 additions and 26 deletions
+9 -5
View File
@@ -110,7 +110,7 @@ void NoteField::DrawBeatBar( const float fBeat )
{
m_rectMeasureBar.StretchTo( RectI(i,0,i+iSegWidth,0) );
m_rectMeasureBar.SetY( fYPos );
m_rectMeasureBar.SetZoomY( bIsMeasure ? 6.f : 2.f );
m_rectMeasureBar.SetZoomY( bIsMeasure ? 6.f : 3.f );
m_rectMeasureBar.SetDiffuse( RageColor(1,1,1,0.5f*fBrightness) );
m_rectMeasureBar.Draw();
@@ -297,6 +297,9 @@ void NoteField::DrawPrimitives()
// draw in big batches.
//
float fSelectedRangeGlow = SCALE( cosf(RageTimer::GetTimeSinceStart()*2), -1, 1, 0.1f, 0.3f );
for( int c=0; c<GetNumTracks(); c++ ) // for each arrow column
{
/////////////////////////////////
@@ -325,8 +328,11 @@ void NoteField::DrawPrimitives()
continue; // skip
}
bool bIsInSelectionRange = false;
if( m_fBeginMarker!=-1 && m_fEndMarker!=-1 )
bIsInSelectionRange = m_fBeginMarker<=hn.fStartBeat && hn.fStartBeat<=m_fEndMarker && m_fBeginMarker<=hn.fEndBeat && hn.fEndBeat<=m_fEndMarker;
m_NoteDisplay[c].DrawHold( hn, bIsHoldingNote, fLife, m_fPercentFadeToFail );
m_NoteDisplay[c].DrawHold( hn, bIsHoldingNote, fLife, bIsInSelectionRange ? fSelectedRangeGlow : m_fPercentFadeToFail );
}
@@ -353,15 +359,13 @@ void NoteField::DrawPrimitives()
}
bool bIsInSelectionRange = false;
float fGlow = 0;
if( m_fBeginMarker!=-1 && m_fEndMarker!=-1 )
{
float fBeat = NoteRowToBeat(i);
bIsInSelectionRange = m_fBeginMarker<=fBeat && fBeat<=m_fEndMarker;
fGlow = SCALE( cosf(RageTimer::GetTimeSinceStart()*2), -1, 1, 0.1f, 0.3f );
}
m_NoteDisplay[c].DrawTap( c, NoteRowToBeat(i), bHoldNoteBeginsOnThisBeat, bIsInSelectionRange ? fGlow : m_fPercentFadeToFail );
m_NoteDisplay[c].DrawTap( c, NoteRowToBeat(i), bHoldNoteBeginsOnThisBeat, bIsInSelectionRange ? fSelectedRangeGlow : m_fPercentFadeToFail );
}
}
+6 -21
View File
@@ -26,6 +26,7 @@
#include "ThemeManager.h"
#include "SDL_keysym.h" // for SDLKeys
#include "ScreenMiniMenu.h"
#include "NoteSkinManager.h"
#include <utility>
@@ -200,25 +201,6 @@ ScreenEdit::ScreenEdit()
m_pSong = GAMESTATE->m_pCurSong;
m_pNotes = GAMESTATE->m_pCurNotes[PLAYER_1];
/* Make EditMenu responsible for creating new Notes */
//if( m_pNotes == NULL )
//{
// m_pNotes = new Notes;
// m_pNotes->SetDifficulty(DIFFICULTY_MEDIUM);
// m_pNotes->m_NotesType = GAMESTATE->GetCurrentStyleDef()->m_NotesType;
// m_pNotes->SetDescription("Untitled");
// // In ScreenEditMenu, the screen preceding this one,
// // GAMEMAN->m_CurStyle is set to the target game style
// // of the current edit. Naturally, this is where we'll
// // want to extract the NotesType for a (NEW) sequence.
// m_pSong->m_apNotes.push_back( m_pNotes );
// GAMESTATE->m_pCurNotes[PLAYER_1] = m_pNotes;
//}
NoteData noteData;
@@ -232,9 +214,9 @@ ScreenEdit::ScreenEdit()
GAMESTATE->m_fSongBeat = 0;
m_fTrailingBeat = GAMESTATE->m_fSongBeat;
GAMESTATE->m_SongOptions.m_fMusicRate = 1;
GAMESTATE->m_PlayerOptions[PLAYER_1].m_fScrollSpeed = 1;
GAMESTATE->m_SongOptions.m_fMusicRate = 1;
NOTESKIN->SwitchNoteSkin( PLAYER_1, "note" ); // change noteskin before loading all of the edit Actors
m_BGAnimation.LoadFromAniDir( THEME->GetPathTo("BGAnimations","edit") );
@@ -264,6 +246,9 @@ ScreenEdit::ScreenEdit()
m_Clipboard.SetNumTracks( m_NoteFieldEdit.GetNumTracks() );
NOTESKIN->SwitchNoteSkin( PLAYER_1, "default" ); // change noteskin back to default before loading player
m_Player.Load( PLAYER_1, &noteData, NULL, NULL );
m_Player.SetXY( PLAYER_X, PLAYER_Y );