cleanup, comment
This commit is contained in:
+24
-19
@@ -183,14 +183,13 @@ void NoteField::Load(
|
||||
//int i2 = GAMESTATE->GetCurrentStyle()->m_iColsPerPlayer;
|
||||
|
||||
ASSERT_M( m_pNoteData->GetNumTracks() == GAMESTATE->GetCurrentStyle()->m_iColsPerPlayer,
|
||||
ssprintf("%d = %d",m_pNoteData->GetNumTracks(), GAMESTATE->GetCurrentStyle()->m_iColsPerPlayer) );
|
||||
ssprintf("NumTracks %d = ColsPerPlayer %d",m_pNoteData->GetNumTracks(), GAMESTATE->GetCurrentStyle()->m_iColsPerPlayer) );
|
||||
|
||||
// The note skin may have changed at the beginning of a new course song.
|
||||
// The NoteSkin may have changed at the beginning of a new course song.
|
||||
RString sNoteSkinLower = m_pPlayerState->m_PlayerOptions.GetCurrent().m_sNoteSkin;
|
||||
|
||||
/* XXX: Combination of good idea and bad idea to ensure
|
||||
* courses load regardless of noteskin content.
|
||||
* This may take awhile to fix. */
|
||||
/* XXX: Combination of good idea and bad idea to ensure courses load
|
||||
* regardless of noteskin content. This may take a while to fix. */
|
||||
NoteDisplayCols *badIdea = m_pCurDisplay;
|
||||
|
||||
if (sNoteSkinLower.empty())
|
||||
@@ -315,10 +314,19 @@ void NoteField::DrawBeatBar( const float fBeat, BeatBarType type, int iMeasureIn
|
||||
switch( type )
|
||||
{
|
||||
DEFAULT_FAIL( type );
|
||||
case measure:
|
||||
case beat: fAlpha = BAR_4TH_ALPHA; iState = 1; break;
|
||||
case half_beat: fAlpha = SCALE(fScrollSpeed,1.0f,2.0f,0.0f,BAR_8TH_ALPHA); iState = 2; break;
|
||||
case quarter_beat: fAlpha = SCALE(fScrollSpeed,2.0f,4.0f,0.0f,BAR_16TH_ALPHA); iState = 3; break;
|
||||
case measure: // handled above
|
||||
case beat: // fall through
|
||||
fAlpha = BAR_4TH_ALPHA;
|
||||
iState = 1;
|
||||
break;
|
||||
case half_beat:
|
||||
fAlpha = SCALE(fScrollSpeed,1.0f,2.0f,0.0f,BAR_8TH_ALPHA);
|
||||
iState = 2;
|
||||
break;
|
||||
case quarter_beat:
|
||||
fAlpha = SCALE(fScrollSpeed,2.0f,4.0f,0.0f,BAR_16TH_ALPHA);
|
||||
iState = 3;
|
||||
break;
|
||||
}
|
||||
CLAMP( fAlpha, 0, 1 );
|
||||
}
|
||||
@@ -386,7 +394,6 @@ void NoteField::DrawMarkerBar( int iBeat )
|
||||
const float fYOffset = ArrowEffects::GetYOffset( m_pPlayerState, 0, fBeat );
|
||||
const float fYPos = ArrowEffects::GetYPos( m_pPlayerState, 0, fYOffset, m_fYReverseOffsetPixels );
|
||||
|
||||
|
||||
m_rectMarkerBar.StretchTo( RectF(-GetWidth()/2, fYPos-ARROW_SIZE/2, GetWidth()/2, fYPos+ARROW_SIZE/2) );
|
||||
m_rectMarkerBar.Draw();
|
||||
}
|
||||
@@ -570,9 +577,8 @@ float FindFirstDisplayedBeat( const PlayerState* pPlayerState, int iDrawDistance
|
||||
|
||||
float FindLastDisplayedBeat( const PlayerState* pPlayerState, int iDrawDistanceBeforeTargetsPixels )
|
||||
{
|
||||
// Probe for last note to draw.
|
||||
// worst case is 0.25x + boost. Adjust search distance to
|
||||
// so that notes don't pop onto the screen.
|
||||
// Probe for last note to draw. Worst case is 0.25x + boost.
|
||||
// Adjust search distance so that notes don't pop onto the screen.
|
||||
float fSearchDistance = 10;
|
||||
float fLastBeatToDraw = GAMESTATE->m_fSongBeat+fSearchDistance;
|
||||
|
||||
@@ -632,8 +638,8 @@ void NoteField::DrawPrimitives()
|
||||
|
||||
// Adjust draw range depending on some effects
|
||||
int iDrawDistanceAfterTargetsPixels = m_iDrawDistanceAfterTargetsPixels;
|
||||
// HACK: if boomerang and centered are on, then we want to draw much
|
||||
// earlier to that the notes don't pop on screen.
|
||||
// HACK: If boomerang and centered are on, then we want to draw much
|
||||
// earlier so that the notes don't pop on screen.
|
||||
float fCenteredTimesBoomerang =
|
||||
current_po.m_fScrolls[PlayerOptions::SCROLL_CENTERED] *
|
||||
current_po.m_fAccels[PlayerOptions::ACCEL_BOOMERANG];
|
||||
@@ -885,8 +891,8 @@ void NoteField::DrawPrimitives()
|
||||
|
||||
|
||||
// Optimization is very important here because there are so many arrows to draw.
|
||||
// Draw the arrows in order of column. This minimize texture switches and let us
|
||||
// draw in big batches.
|
||||
// Draw the arrows in order of column. This minimizes texture switches and
|
||||
// lets us draw in big batches.
|
||||
|
||||
float fSelectedRangeGlow = SCALE( RageFastCos(RageTimer::GetTimeSinceStartFast()*2), -1, 1, 0.1f, 0.3f );
|
||||
|
||||
@@ -962,7 +968,6 @@ void NoteField::DrawPrimitives()
|
||||
// Draw all TapNotes in this column
|
||||
|
||||
// draw notes from furthest to closest
|
||||
|
||||
NoteData::TrackMap::const_iterator begin, end;
|
||||
m_pNoteData->GetTapNoteRange( c, iFirstRowToDraw, iLastRowToDraw+1, begin, end );
|
||||
for( ; begin != end; ++begin )
|
||||
@@ -992,7 +997,7 @@ void NoteField::DrawPrimitives()
|
||||
|
||||
// TRICKY: If boomerang is on, then all notes in the range
|
||||
// [iFirstRowToDraw,iLastRowToDraw] aren't necessarily visible.
|
||||
// Test every note to make sure it's on screen before drawing
|
||||
// Test every note to make sure it's on screen before drawing.
|
||||
if( !IsOnScreen( NoteRowToBeat(i), c, iDrawDistanceAfterTargetsPixels, iDrawDistanceBeforeTargetsPixels ) )
|
||||
continue; // skip
|
||||
|
||||
|
||||
Reference in New Issue
Block a user