The nonbelievers have been purged.

This commit is contained in:
Jason Felds
2011-03-14 04:11:04 -04:00
parent 3fc85f6a58
commit d739e9a422
+21 -17
View File
@@ -209,23 +209,23 @@ void NoteField::Load(
memset( m_pDisplays, 0, sizeof(m_pDisplays) );
FOREACH_EnabledPlayer( pn )
{
RString sNoteSkinLC = GAMESTATE->m_pPlayerState[pn]->m_PlayerOptions.GetCurrent().m_sNoteSkin;
sNoteSkinLower = GAMESTATE->m_pPlayerState[pn]->m_PlayerOptions.GetCurrent().m_sNoteSkin;
// XXX: Re-setup sNoteSkinLower. Unsure if inserting the skin again is needed.
if (sNoteSkinLC.empty())
if (sNoteSkinLower.empty())
{
sNoteSkinLC = GAMESTATE->m_pPlayerState[pn]->m_PlayerOptions.GetPreferred().m_sNoteSkin;
sNoteSkinLower = GAMESTATE->m_pPlayerState[pn]->m_PlayerOptions.GetPreferred().m_sNoteSkin;
if (sNoteSkinLC.empty())
if (sNoteSkinLower.empty())
{
sNoteSkinLC = "default";
sNoteSkinLower = "default";
}
m_NoteDisplays.insert(pair<RString, NoteDisplayCols *> (sNoteSkinLC, badIdea));
m_NoteDisplays.insert(pair<RString, NoteDisplayCols *> (sNoteSkinLower, badIdea));
}
sNoteSkinLC.MakeLower();
it = m_NoteDisplays.find( sNoteSkinLC );
ASSERT_M( it != m_NoteDisplays.end(), sNoteSkinLC );
sNoteSkinLower.MakeLower();
it = m_NoteDisplays.find( sNoteSkinLower );
ASSERT_M( it != m_NoteDisplays.end(), sNoteSkinLower );
m_pDisplays[pn] = it->second;
}
}
@@ -1005,8 +1005,8 @@ void NoteField::DrawPrimitives()
m_pNoteData->GetTapNoteRange( c, iFirstRowToDraw, iLastRowToDraw+1, begin, end );
for( ; begin != end; ++begin )
{
int j = begin->first;
const TapNote &tn = begin->second; //m_pNoteData->GetTapNote(c, j);
int q = begin->first;
const TapNote &tn = begin->second; //m_pNoteData->GetTapNote(c, q);
// Switch modified by Wolfman2000, tested by Saturn2888
// Fixes hold head overlapping issue, but not the rolls.
@@ -1031,10 +1031,11 @@ 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.
if( !IsOnScreen( NoteRowToBeat(j), c, iDrawDistanceAfterTargetsPixels, iDrawDistanceBeforeTargetsPixels ) )
if( !IsOnScreen( NoteRowToBeat(q), c, iDrawDistanceAfterTargetsPixels, iDrawDistanceBeforeTargetsPixels ) )
continue; // skip
ASSERT_M( NoteRowToBeat(j) > -2000, ssprintf("%i %i %i, %f %f", j, iLastRowToDraw, iFirstRowToDraw, GAMESTATE->m_fSongBeat, GAMESTATE->m_fMusicSeconds) );
ASSERT_M( NoteRowToBeat(q) > -2000, ssprintf("%i %i %i, %f %f", q, iLastRowToDraw,
iFirstRowToDraw, GAMESTATE->m_fSongBeat, GAMESTATE->m_fMusicSeconds) );
// See if there is a hold step that begins on this index.
// Only do this if the noteskin cares.
@@ -1043,7 +1044,7 @@ void NoteField::DrawPrimitives()
{
for( int c2=0; c2<m_pNoteData->GetNumTracks(); c2++ )
{
if( m_pNoteData->GetTapNote(c2, j).type == TapNote::hold_head)
if( m_pNoteData->GetTapNote(c2, q).type == TapNote::hold_head)
{
bHoldNoteBeginsOnThisBeat = true;
break;
@@ -1053,15 +1054,18 @@ void NoteField::DrawPrimitives()
bool bIsInSelectionRange = false;
if( m_iBeginMarker!=-1 && m_iEndMarker!=-1 )
bIsInSelectionRange = m_iBeginMarker<=i && i<m_iEndMarker;
bIsInSelectionRange = m_iBeginMarker<=q && q<m_iEndMarker;
bool bIsAddition = (tn.source == TapNote::addition);
bool bIsHopoPossible = (tn.bHopoPossible);
bool bUseAdditionColoring = bIsAddition || bIsHopoPossible;
NoteDisplayCols *displayCols = tn.pn == PLAYER_INVALID ? m_pCurDisplay : m_pDisplays[tn.pn];
displayCols->display[c].DrawTap( tn, c, NoteRowToBeat(i), bHoldNoteBeginsOnThisBeat, bUseAdditionColoring, bIsInSelectionRange ? fSelectedRangeGlow : m_fPercentFadeToFail, m_fYReverseOffsetPixels, iDrawDistanceAfterTargetsPixels, iDrawDistanceBeforeTargetsPixels, FADE_BEFORE_TARGETS_PERCENT );
displayCols->display[c].DrawTap( tn, c, NoteRowToBeat(q), bHoldNoteBeginsOnThisBeat,
bUseAdditionColoring, bIsInSelectionRange ? fSelectedRangeGlow : m_fPercentFadeToFail,
m_fYReverseOffsetPixels, iDrawDistanceAfterTargetsPixels, iDrawDistanceBeforeTargetsPixels,
FADE_BEFORE_TARGETS_PERCENT );
bool bNoteIsUpcoming = NoteRowToBeat(j) > GAMESTATE->m_fSongBeat;
bool bNoteIsUpcoming = NoteRowToBeat(q) > GAMESTATE->m_fSongBeat;
bAnyUpcomingInThisCol |= bNoteIsUpcoming;
}