fix VC7 warnings
This commit is contained in:
@@ -705,7 +705,7 @@ void Player::HandleStep( int col, const RageTimer &tm )
|
||||
if( iLbs != 0 )
|
||||
{
|
||||
int iNumTracksHeld = 0;
|
||||
for( unsigned t=0; t<m_NoteData.GetNumTracks(); t++ )
|
||||
for( int t=0; t<m_NoteData.GetNumTracks(); t++ )
|
||||
{
|
||||
const StyleInput StyleI( pn, t );
|
||||
const GameInput GameI = GAMESTATE->GetCurrentStyle()->StyleInputToGameInput( StyleI );
|
||||
|
||||
@@ -26,9 +26,9 @@ void RollingNumbers::LoadFromNode( const CString& sDir, const XNode* pNode )
|
||||
pNode->GetAttrValue( "Format", m_sFormat );
|
||||
pNode->GetAttrValue( "ApproachSeconds", m_fApproachSeconds );
|
||||
|
||||
int iTargetNumber;
|
||||
if( pNode->GetAttrValue( "TargetNumber", iTargetNumber ) )
|
||||
SetTargetNumber( iTargetNumber );
|
||||
float fTargetNumber;
|
||||
if( pNode->GetAttrValue( "TargetNumber", fTargetNumber ) )
|
||||
SetTargetNumber( fTargetNumber );
|
||||
|
||||
UpdateText();
|
||||
}
|
||||
|
||||
@@ -36,6 +36,8 @@ void ScoreDisplayNormal::Init( const PlayerState* pPlayerState )
|
||||
|
||||
void ScoreDisplayNormal::SetScore( int iNewScore )
|
||||
{
|
||||
float fScore = (float)iNewScore;
|
||||
|
||||
// TODO: Remove use of PlayerNumber.
|
||||
PlayerNumber pn = m_pPlayerState->m_PlayerNumber;
|
||||
|
||||
@@ -53,21 +55,21 @@ void ScoreDisplayNormal::SetScore( int iNewScore )
|
||||
// nothing to do
|
||||
break;
|
||||
case PlayerOptions::SCORING_SUBTRACT:
|
||||
iNewScore = iMaxScore - ( iCurMaxScore - iNewScore );
|
||||
fScore = iMaxScore - ( iCurMaxScore - fScore );
|
||||
break;
|
||||
case PlayerOptions::SCORING_AVERAGE:
|
||||
if( iCurMaxScore == 0 ) // don't divide by zero fats
|
||||
{
|
||||
iNewScore = 0;
|
||||
fScore = 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
float fScoreRatio = iNewScore / (float)iCurMaxScore;
|
||||
iNewScore = fScoreRatio * iMaxScore;
|
||||
float fScoreRatio = fScore / (float)iCurMaxScore;
|
||||
fScore = fScoreRatio * iMaxScore;
|
||||
}
|
||||
}
|
||||
|
||||
m_text.SetTargetNumber( iNewScore );
|
||||
m_text.SetTargetNumber( fScore );
|
||||
}
|
||||
|
||||
/*
|
||||
|
||||
Reference in New Issue
Block a user