fix warnings
This commit is contained in:
@@ -380,13 +380,13 @@ void BitmapText::SetText( const CString& _sText, const CString& _sAlternateText,
|
||||
change.l = sEndText.length();
|
||||
m_vColors.push_back( change );
|
||||
last = i+9;
|
||||
if ( last < m_sText.length() )
|
||||
if ( last < (int)m_sText.length() )
|
||||
i = m_sText.Find( CString("|c0"), last );
|
||||
else
|
||||
i = -1;
|
||||
}
|
||||
|
||||
if ( last < m_sText.length() )
|
||||
if ( last < (int)m_sText.length() )
|
||||
sEndText += m_sText.substr( last, m_sText.length()-last );
|
||||
|
||||
m_sText = sEndText;
|
||||
@@ -653,7 +653,7 @@ void BitmapText::DrawPrimitives()
|
||||
for( unsigned i=0; i<verts.size(); i+=4 )
|
||||
{
|
||||
loc++;
|
||||
if ( cur < m_vColors.size() )
|
||||
if ( cur < (int)m_vColors.size() )
|
||||
if ( loc > m_vColors[cur].l )
|
||||
{
|
||||
c = m_vColors[cur].c;
|
||||
|
||||
+15
-18
@@ -71,39 +71,36 @@ void MenuTimer::Update( float fDeltaTime )
|
||||
|
||||
const float fOldSecondsLeft = m_fSecondsLeft;
|
||||
m_fSecondsLeft -= fDeltaTime;
|
||||
m_fSecondsLeft = max( 0, m_fSecondsLeft );
|
||||
const float fNewSecondsLeft = m_fSecondsLeft;
|
||||
|
||||
const int iOldDisplay = (int)(fOldSecondsLeft + 0.99f);
|
||||
int iNewDisplay = (int)(fNewSecondsLeft + 0.99f);
|
||||
iNewDisplay = max( iNewDisplay, 0 );
|
||||
if( fOldSecondsLeft == fNewSecondsLeft )
|
||||
return;
|
||||
|
||||
if( fOldSecondsLeft > 5.5 && fNewSecondsLeft < 5.5 ) // transition to below 5.5
|
||||
SOUND->PlayOnceFromDir( ANNOUNCER->GetPathTo("hurry up") );
|
||||
|
||||
if( iOldDisplay == iNewDisplay )
|
||||
return;
|
||||
SetText( fNewSecondsLeft );
|
||||
|
||||
SetText( iNewDisplay );
|
||||
|
||||
if( iNewDisplay <= WARNING_START )
|
||||
for( int s=0; s<WARNING_START; s++ )
|
||||
{
|
||||
for( int i=0; i<NUM_MENU_TIMER_TEXTS; i++ )
|
||||
m_text[i].RunCommands( WARNING_COMMAND.GetValue(iNewDisplay) );
|
||||
if( fOldSecondsLeft > s && fNewSecondsLeft < s ) // crossed
|
||||
{
|
||||
for( int i=0; i<NUM_MENU_TIMER_TEXTS; i++ )
|
||||
m_text[i].RunCommands( WARNING_COMMAND.GetValue(s) );
|
||||
|
||||
if( i <= WARNING_BEEP_START && m_soundBeep.IsLoaded() )
|
||||
m_soundBeep.Play();
|
||||
}
|
||||
}
|
||||
|
||||
if( iNewDisplay == 0 )
|
||||
if( fNewSecondsLeft == 0 )
|
||||
{
|
||||
Stop();
|
||||
SCREENMAN->PostMessageToTopScreen( SM_MenuTimer, 0 );
|
||||
for( int i=0; i<NUM_MENU_TIMER_TEXTS; i++ )
|
||||
m_text[i].SetEffectNone();
|
||||
}
|
||||
|
||||
if( iNewDisplay <= WARNING_BEEP_START )
|
||||
{
|
||||
if( m_soundBeep.IsLoaded() )
|
||||
m_soundBeep.Play();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -145,7 +142,7 @@ void MenuTimer::SetSeconds( float fSeconds )
|
||||
for( int i=0; i<NUM_MENU_TIMER_TEXTS; i++ )
|
||||
m_text[i].PlayCommand( "On" );
|
||||
|
||||
SetText( (int)fSeconds );
|
||||
SetText( fSeconds );
|
||||
}
|
||||
|
||||
void MenuTimer::Start()
|
||||
|
||||
Reference in New Issue
Block a user