(float) atof() -> strtof(), which computes in float instead of computing in

double and casting to float, which is silly
This commit is contained in:
Glenn Maynard
2004-08-10 20:57:59 +00:00
parent 9db234c181
commit aad73b53e9
16 changed files with 47 additions and 47 deletions
+2 -2
View File
@@ -1380,7 +1380,7 @@ void ScreenEdit::HandleScreenMessage( const ScreenMessage SM )
case SM_BackFromInsertAttack:
{
int iDurationChoice = ScreenMiniMenu::s_iLastAnswers[0];
g_fLastInsertAttackDurationSeconds = (float) atof( g_InsertAttackItems[0].choices[iDurationChoice] );
g_fLastInsertAttackDurationSeconds = strtof( g_InsertAttackItems[0].choices[iDurationChoice], NULL );
GAMESTATE->StoreSelectedOptions(); // save so that we don't lose the options chosen for edit and playback
SCREENMAN->AddNewScreenToTop( "ScreenPlayerOptions", SM_BackFromInsertAttackModifiers );
}
@@ -2142,7 +2142,7 @@ void ScreenEdit::HandleBGChangeChoice( BGChangeChoice c, int* iAnswers )
SCREENMAN->PlayInvalidSound();
};
change.m_fRate = (float)atof( g_BGChange.rows[rate].choices[iAnswers[rate]] )/100.f;
change.m_fRate = strtof( g_BGChange.rows[rate].choices[iAnswers[rate]], NULL )/100.f;
change.m_bFadeLast = !!iAnswers[fade_last];
change.m_bRewindMovie = !!iAnswers[rewind_movie];
change.m_bLoop = !!iAnswers[loop];