bring in changes unrelated to new score mode that were removed in the previous commit.

This commit is contained in:
Flameshadowxeroshin
2013-03-24 12:44:00 -05:00
parent d57aafa857
commit e3e04f349f
+10 -8
View File
@@ -27,7 +27,8 @@ void PercentScoreWeightInit( size_t /*ScoreEvent*/ i, RString &sNameOut, int &de
sNameOut = "PercentScoreWeight" + ScoreEventToString( (ScoreEvent)i ); sNameOut = "PercentScoreWeight" + ScoreEventToString( (ScoreEvent)i );
switch( i ) switch( i )
{ {
default: ASSERT(0); default:
FAIL_M(ssprintf("Invalid ScoreEvent: %i", i));
case SE_W1: defaultValueOut = 3; break; case SE_W1: defaultValueOut = 3; break;
case SE_W2: defaultValueOut = 2; break; case SE_W2: defaultValueOut = 2; break;
case SE_W3: defaultValueOut = 1; break; case SE_W3: defaultValueOut = 1; break;
@@ -47,7 +48,8 @@ void GradeWeightInit( size_t /*ScoreEvent*/ i, RString &sNameOut, int &defaultVa
sNameOut = "GradeWeight" + ScoreEventToString( (ScoreEvent)i ); sNameOut = "GradeWeight" + ScoreEventToString( (ScoreEvent)i );
switch( i ) switch( i )
{ {
default: ASSERT(0); default:
FAIL_M(ssprintf("Invalid ScoreEvent: %i", i));
case SE_W1: defaultValueOut = 2; break; case SE_W1: defaultValueOut = 2; break;
case SE_W2: defaultValueOut = 2; break; case SE_W2: defaultValueOut = 2; break;
case SE_W3: defaultValueOut = 1; break; case SE_W3: defaultValueOut = 1; break;
@@ -101,9 +103,9 @@ void ScoreKeeperNormal::Load(
for( unsigned i=0; i<apSteps.size(); i++ ) for( unsigned i=0; i<apSteps.size(); i++ )
{ {
Song* pSong = apSongs[i]; Song* pSong = apSongs[i];
ASSERT( pSong ); ASSERT( pSong != NULL );
Steps* pSteps = apSteps[i]; Steps* pSteps = apSteps[i];
ASSERT( pSteps ); ASSERT( pSteps != NULL );
const AttackArray &aa = asModifiers[i]; const AttackArray &aa = asModifiers[i];
NoteData ndTemp; NoteData ndTemp;
pSteps->GetNoteData( ndTemp ); pSteps->GetNoteData( ndTemp );
@@ -120,7 +122,7 @@ void ScoreKeeperNormal::Load(
* forced and not chosen by the user. */ * forced and not chosen by the user. */
NoteDataUtil::TransformNoteData( nd, aa, pSteps->m_StepsType, pSong ); NoteDataUtil::TransformNoteData( nd, aa, pSteps->m_StepsType, pSong );
RadarValues rvPre; RadarValues rvPre;
GAMESTATE->SetProcessedTimingData(&pSteps->m_Timing); GAMESTATE->SetProcessedTimingData(pSteps->GetTimingData());
NoteDataUtil::CalculateRadarValues( nd, pSong->m_fMusicLengthSeconds, rvPre ); NoteDataUtil::CalculateRadarValues( nd, pSong->m_fMusicLengthSeconds, rvPre );
/* Apply user transforms to find out how the notes will really look. /* Apply user transforms to find out how the notes will really look.
@@ -418,7 +420,7 @@ void ScoreKeeperNormal::HandleTapNoteScoreInternal( TapNoteScore tns, TapNoteSco
m_pPlayerStageStats->m_iActualDancePoints += TapNoteScoreToDancePoints( tns ); m_pPlayerStageStats->m_iActualDancePoints += TapNoteScoreToDancePoints( tns );
// update judged row totals. Respect Combo segments here. // update judged row totals. Respect Combo segments here.
TimingData &td = GAMESTATE->m_pCurSteps[m_pPlayerState->m_PlayerNumber]->m_Timing; TimingData &td = *GAMESTATE->m_pCurSteps[m_pPlayerState->m_PlayerNumber]->GetTimingData();
ComboSegment *cs = td.GetComboSegmentAtRow(row); ComboSegment *cs = td.GetComboSegmentAtRow(row);
if (tns == TNS_CheckpointHit || tns >= m_MinScoreToContinueCombo) if (tns == TNS_CheckpointHit || tns >= m_MinScoreToContinueCombo)
{ {
@@ -451,7 +453,7 @@ void ScoreKeeperNormal::HandleComboInternal( int iNumHitContinueCombo, int iNumH
{ {
m_pPlayerStageStats->m_iCurMissCombo = 0; m_pPlayerStageStats->m_iCurMissCombo = 0;
} }
TimingData &td = GAMESTATE->m_pCurSteps[m_pPlayerState->m_PlayerNumber]->m_Timing; TimingData &td = *GAMESTATE->m_pCurSteps[m_pPlayerState->m_PlayerNumber]->GetTimingData();
if( iNumBreakCombo == 0 ) if( iNumBreakCombo == 0 )
{ {
int multiplier = ( iRow == -1 ? 1 : td.GetComboSegmentAtRow( iRow )->GetCombo() ); int multiplier = ( iRow == -1 ? 1 : td.GetComboSegmentAtRow( iRow )->GetCombo() );
@@ -471,7 +473,7 @@ void ScoreKeeperNormal::HandleRowComboInternal( TapNoteScore tns, int iNumTapsIn
{ {
iNumTapsInRow = min( iNumTapsInRow, 1); iNumTapsInRow = min( iNumTapsInRow, 1);
} }
TimingData &td = GAMESTATE->m_pCurSteps[m_pPlayerState->m_PlayerNumber]->m_Timing; TimingData &td = *GAMESTATE->m_pCurSteps[m_pPlayerState->m_PlayerNumber]->GetTimingData();
if ( tns >= m_MinScoreToContinueCombo ) if ( tns >= m_MinScoreToContinueCombo )
{ {
m_pPlayerStageStats->m_iCurMissCombo = 0; m_pPlayerStageStats->m_iCurMissCombo = 0;