From ebe0fd55ce2c5b1209a8eebe816f235c1d13c971 Mon Sep 17 00:00:00 2001 From: Glenn Maynard Date: Fri, 25 Oct 2002 04:45:16 +0000 Subject: [PATCH] use Get/SetTapNote. Fix double/float warning. >> 1 instead of / 2 isn't really an optimization. --- stepmania/src/Player.cpp | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/stepmania/src/Player.cpp b/stepmania/src/Player.cpp index 80895297a0..092307b8cc 100644 --- a/stepmania/src/Player.cpp +++ b/stepmania/src/Player.cpp @@ -126,7 +126,7 @@ void Player::Load( PlayerNumber pn, NoteData* pNoteData, LifeMeter* pLM, ScoreDi m_iTapNotesHit = 0; m_lScore = 0; m_iMeter = GAMESTATE->m_pCurNotes[m_PlayerNumber] ? GAMESTATE->m_pCurNotes[m_PlayerNumber]->m_iMeter : 5; - m_fScoreMultiplier = (double)(m_iMeter * 1000000) / (double)((m_iNumTapNotes * (m_iNumTapNotes + 1)) >> 1); + m_fScoreMultiplier = float(m_iMeter * 1000000) / float ((m_iNumTapNotes * (m_iNumTapNotes + 1)) / 2); ASSERT(m_fScoreMultiplier >= 0.0); @@ -365,7 +365,7 @@ void Player::Step( int col ) //////////////////////////// //LOG->Trace( "Checking Notes[%d]", iCurrentIndexEarlier ); if( iCurrentIndexEarlier >= 0 && - m_TapNotes[col][iCurrentIndexEarlier] != '0' && // there is a note here + GetTapNote(col, iCurrentIndexEarlier) != TAP_EMPTY && // there is a note here m_TapNoteScores[col][iCurrentIndexEarlier] == TNS_NONE ) // this note doesn't have a score { iIndexOverlappingNote = iCurrentIndexEarlier; @@ -378,7 +378,7 @@ void Player::Step( int col ) //////////////////////////// //LOG->Trace( "Checking Notes[%d]", iCurrentIndexLater ); if( iCurrentIndexLater >= 0 && - m_TapNotes[col][iCurrentIndexLater] != '0' && // there is a note here + GetTapNote(col, iCurrentIndexLater) != TAP_EMPTY && // there is a note here m_TapNoteScores[col][iCurrentIndexLater] == TNS_NONE ) // this note doesn't have a score { iIndexOverlappingNote = iCurrentIndexLater; @@ -436,7 +436,7 @@ void Player::Step( int col ) bool bRowDestroyed = true; for( int t=0; tStep( t ); } }