get rid of TIMER
This commit is contained in:
@@ -49,7 +49,7 @@ float ArrowGetXPos( PlayerNumber pn, int iColNum, float fYPos )
|
||||
float fPixelOffsetFromCenter = GAMESTATE->GetCurrentStyleDef()->m_ColumnInfo[pn][iColNum].fXOffset;
|
||||
|
||||
if( GAMESTATE->m_PlayerOptions[pn].m_bEffects[PlayerOptions::EFFECT_DRUNK] )
|
||||
fPixelOffsetFromCenter += cosf( TIMER->GetTimeSinceStart() + iColNum*0.2f + fYPos*6/SCREEN_HEIGHT) * ARROW_SIZE*0.5f;
|
||||
fPixelOffsetFromCenter += cosf( RageTimer::GetTimeSinceStart() + iColNum*0.2f + fYPos*6/SCREEN_HEIGHT) * ARROW_SIZE*0.5f;
|
||||
if( GAMESTATE->m_PlayerOptions[pn].m_bEffects[PlayerOptions::EFFECT_FLIP] )
|
||||
fPixelOffsetFromCenter = -fPixelOffsetFromCenter;
|
||||
if( GAMESTATE->m_PlayerOptions[pn].m_bEffects[PlayerOptions::EFFECT_TORNADO] )
|
||||
@@ -114,7 +114,7 @@ float ArrowGetPercentVisible( PlayerNumber pn, float fYPos )
|
||||
fAlpha = 0;
|
||||
break;
|
||||
case PlayerOptions::APPEARANCE_BLINK: // this is an Ez2dancer Appearance Mode
|
||||
fAlpha = sinf( TIMER->GetTimeSinceStart()*12 );
|
||||
fAlpha = sinf( RageTimer::GetTimeSinceStart()*12 );
|
||||
fAlpha = froundf( fAlpha, 0.3333f );
|
||||
break;
|
||||
default:
|
||||
|
||||
@@ -453,7 +453,7 @@ void Background::DrawPrimitives()
|
||||
|
||||
bool Background::DangerVisible()
|
||||
{
|
||||
return m_bInDanger && PREFSMAN->m_bShowDanger && (TIMER->GetTimeSinceStart() - (int)TIMER->GetTimeSinceStart()) < 0.5f;
|
||||
return m_bInDanger && PREFSMAN->m_bShowDanger && (RageTimer::GetTimeSinceStart() - (int)RageTimer::GetTimeSinceStart()) < 0.5f;
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -326,7 +326,7 @@ void BitmapText::DrawPrimitives()
|
||||
//////////////////////
|
||||
if( m_bRainbow )
|
||||
{
|
||||
int color_index = int(TIMER->GetTimeSinceStart() / 0.200) % NUM_RAINBOW_COLORS;
|
||||
int color_index = int(RageTimer::GetTimeSinceStart() / 0.200) % NUM_RAINBOW_COLORS;
|
||||
for( int i=0; i<iNumV; i+=4 )
|
||||
{
|
||||
const RageColor color = RAINBOW_COLORS[color_index];
|
||||
|
||||
@@ -48,7 +48,7 @@ void HoldGhostArrow::Update( float fDeltaTime )
|
||||
|
||||
if( m_fHeatLevel == 1 )
|
||||
{
|
||||
bool bZooomALittle = fmodf( TIMER->GetTimeSinceStart(), 1/20.0f ) > 1/40.0f;
|
||||
bool bZooomALittle = fmodf( RageTimer::GetTimeSinceStart(), 1/20.0f ) > 1/40.0f;
|
||||
SetZoom( bZooomALittle ? 1.04f : 1.0f );
|
||||
}
|
||||
else
|
||||
|
||||
@@ -33,7 +33,7 @@ void InputQueue::RememberInput( const GameInput GameI )
|
||||
/* XXX: this should be a deque, and just pop_back */
|
||||
if( m_aQueue[c].size() >= MAX_INPUT_QUEUE_LENGTH ) // full
|
||||
m_aQueue[c].erase( m_aQueue[c].begin(), m_aQueue[c].begin() + (m_aQueue[c].size()-MAX_INPUT_QUEUE_LENGTH+1) );
|
||||
m_aQueue[c].push_back( GameButtonAndTime(GameI.button,TIMER->GetTimeSinceStart()) );
|
||||
m_aQueue[c].push_back( GameButtonAndTime(GameI.button,RageTimer::GetTimeSinceStart()) );
|
||||
}
|
||||
|
||||
bool InputQueue::MatchesPattern( const GameController c, const MenuButton* button_sequence, const int iNumButtons, float fMaxSecondsBack )
|
||||
@@ -41,7 +41,7 @@ bool InputQueue::MatchesPattern( const GameController c, const MenuButton* butto
|
||||
if( fMaxSecondsBack == -1 )
|
||||
fMaxSecondsBack = 0.4f + iNumButtons*0.15f;
|
||||
|
||||
float fOldestTimeAllowed = TIMER->GetTimeSinceStart() - fMaxSecondsBack;
|
||||
float fOldestTimeAllowed = RageTimer::GetTimeSinceStart() - fMaxSecondsBack;
|
||||
|
||||
int sequence_index = iNumButtons-1; // count down
|
||||
for( int queue_index=m_aQueue[c].size()-1; queue_index>=0; queue_index-- ) // iterate newest to oldest
|
||||
@@ -70,7 +70,7 @@ bool InputQueue::MatchesPattern( const GameController c, const GameButton* butto
|
||||
if( fMaxSecondsBack == -1 )
|
||||
fMaxSecondsBack = 0.4f + iNumButtons*0.15f;
|
||||
|
||||
float fOldestTimeAllowed = TIMER->GetTimeSinceStart() - fMaxSecondsBack;
|
||||
float fOldestTimeAllowed = RageTimer::GetTimeSinceStart() - fMaxSecondsBack;
|
||||
|
||||
int sequence_index = iNumButtons-1; // count down
|
||||
for( int queue_index=m_aQueue[c].size()-1; queue_index>=0; queue_index-- ) // iterate newest to oldest
|
||||
|
||||
@@ -394,7 +394,7 @@ void LifeMeterBar::DrawPrimitives()
|
||||
rectSize.right = -m_iMeterWidth/2 + int(roundf(m_iMeterWidth*m_fTrailingLifePercentage));
|
||||
rectSize.bottom = +m_iMeterHeight/2;
|
||||
|
||||
float fPrecentOffset = TIMER->GetTimeSinceStart();
|
||||
float fPrecentOffset = RageTimer::GetTimeSinceStart();
|
||||
fPrecentOffset -= (int)fPrecentOffset;
|
||||
|
||||
RectF frectCustomTexCoords(
|
||||
@@ -415,7 +415,7 @@ void LifeMeterBar::DrawPrimitives()
|
||||
m_pStream->m_fPercent = m_fTrailingLifePercentage;
|
||||
m_pStream->m_fHotAlpha = m_fHotAlpha;
|
||||
|
||||
float fPercentRed = (m_fTrailingLifePercentage<g_fDangerThreshold) ? sinf( TIMER->GetTimeSinceStart()*PI*4 )/2+0.5f : 0;
|
||||
float fPercentRed = (m_fTrailingLifePercentage<g_fDangerThreshold) ? sinf( RageTimer::GetTimeSinceStart()*PI*4 )/2+0.5f : 0;
|
||||
m_quadBlackBackground.SetDiffuse( RageColor(fPercentRed*0.8f,0,0,1) );
|
||||
|
||||
ActorFrame::DrawPrimitives();
|
||||
@@ -473,7 +473,7 @@ void LifeStream::DrawPrimitives()
|
||||
|
||||
int iNumV = 0;
|
||||
|
||||
float fPercentIntoSection = (TIMER->GetTimeSinceStart()/0.3f* (m_bIsHot ? 2 : 1) )*LIFE_STREAM_SECTION_WIDTH;
|
||||
float fPercentIntoSection = (RageTimer::GetTimeSinceStart()/0.3f* (m_bIsHot ? 2 : 1) )*LIFE_STREAM_SECTION_WIDTH;
|
||||
fPercentIntoSection -= (int)fPercentIntoSection;
|
||||
fPercentIntoSection = 1-fPercentIntoSection;
|
||||
fPercentIntoSection -= (int)fPercentIntoSection;
|
||||
|
||||
@@ -73,7 +73,7 @@ void MusicStatusDisplay::DrawPrimitives()
|
||||
case crown1:
|
||||
case crown2:
|
||||
case crown3:
|
||||
if( fmodf(TIMER->GetTimeSinceStart(), 1) > 0.5f )
|
||||
if( fmodf(RageTimer::GetTimeSinceStart(), 1) > 0.5f )
|
||||
return; // blink
|
||||
break;
|
||||
default:
|
||||
|
||||
@@ -114,7 +114,7 @@ void NoteField::DrawBPMText( const float fBeat, const float fBPM )
|
||||
const float fYPos = ArrowGetYPos( m_PlayerNumber, fYOffset );
|
||||
|
||||
m_textMeasureNumber.SetDiffuse( RageColor(1,0,0,1) );
|
||||
m_textMeasureNumber.SetGlow( RageColor(1,1,1,cosf(TIMER->GetTimeSinceStart()*2)/2+0.5f) );
|
||||
m_textMeasureNumber.SetGlow( RageColor(1,1,1,cosf(RageTimer::GetTimeSinceStart()*2)/2+0.5f) );
|
||||
m_textMeasureNumber.SetText( ssprintf("%.2f", fBPM) );
|
||||
m_textMeasureNumber.SetXY( -m_rectMeasureBar.GetZoomedWidth()/2 - 60, fYPos );
|
||||
m_textMeasureNumber.Draw();
|
||||
@@ -126,7 +126,7 @@ void NoteField::DrawFreezeText( const float fBeat, const float fSecs )
|
||||
const float fYPos = ArrowGetYPos( m_PlayerNumber, fYOffset );
|
||||
|
||||
m_textMeasureNumber.SetDiffuse( RageColor(0.8f,0.8f,0,1) );
|
||||
m_textMeasureNumber.SetGlow( RageColor(1,1,1,cosf(TIMER->GetTimeSinceStart()*2)/2+0.5f) );
|
||||
m_textMeasureNumber.SetGlow( RageColor(1,1,1,cosf(RageTimer::GetTimeSinceStart()*2)/2+0.5f) );
|
||||
m_textMeasureNumber.SetText( ssprintf("%.2f", fSecs) );
|
||||
m_textMeasureNumber.SetXY( -m_rectMeasureBar.GetZoomedWidth()/2 - 10, fYPos );
|
||||
m_textMeasureNumber.Draw();
|
||||
@@ -138,7 +138,7 @@ void NoteField::DrawBGChangeText( const float fBeat, const CString sNewBGName )
|
||||
const float fYPos = ArrowGetYPos( m_PlayerNumber, fYOffset );
|
||||
|
||||
m_textMeasureNumber.SetDiffuse( RageColor(0,1,0,1) );
|
||||
m_textMeasureNumber.SetGlow( RageColor(1,1,1,cosf(TIMER->GetTimeSinceStart()*2)/2+0.5f) );
|
||||
m_textMeasureNumber.SetGlow( RageColor(1,1,1,cosf(RageTimer::GetTimeSinceStart()*2)/2+0.5f) );
|
||||
m_textMeasureNumber.SetText( sNewBGName );
|
||||
m_textMeasureNumber.SetXY( +m_rectMeasureBar.GetZoomedWidth()/2 + 10, fYPos );
|
||||
m_textMeasureNumber.Draw();
|
||||
|
||||
@@ -242,9 +242,9 @@ try_metric_again:
|
||||
|
||||
// Is our metric cache out of date?
|
||||
// XXX: GTSS wraps every ~40 days. Need a better way to handler timers like this.
|
||||
if (TIMER->GetTimeSinceStart() >= m_fNextReloadTicks)
|
||||
if (RageTimer::GetTimeSinceStart() >= m_fNextReloadTicks)
|
||||
{
|
||||
m_fNextReloadTicks = TIMER->GetTimeSinceStart()+1.0f;
|
||||
m_fNextReloadTicks = RageTimer::GetTimeSinceStart()+1.0f;
|
||||
if( m_uHashForCurThemeMetrics != GetHashForFile(sCurMetricPath) ||
|
||||
m_uHashForBaseThemeMetrics != GetHashForFile(sDefaultMetricPath) )
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user