diff --git a/stepmania/src/BGAnimationLayer.cpp b/stepmania/src/BGAnimationLayer.cpp index ee82fcd2ce..40903ed884 100644 --- a/stepmania/src/BGAnimationLayer.cpp +++ b/stepmania/src/BGAnimationLayer.cpp @@ -79,10 +79,6 @@ void BGAnimationLayer::Init() m_fFOV = -1; // no change m_bLighting = false; -// m_bCycleColor = false; -// m_bCycleAlpha = false; -// m_Effect = EFFECT_STRETCH_STILL; - m_vParticleVelocity.clear(); m_Type = TYPE_SPRITE; @@ -661,39 +657,39 @@ void BGAnimationLayer::Update( float fDeltaTime ) } } break; -/* case EFFECT_PARTICLES_SPIRAL_OUT: - for( i=0; i SPIRAL_MAX_ZOOM ) - m_SubActors[i].SetZoom( SPIRAL_MIN_ZOOM ); + m_SubActors[i]->SetZoom( m_SubActors[i]->GetZoom() + fDeltaTime ); + if( m_SubActors[i]->GetZoom() > SPIRAL_MAX_ZOOM ) + m_SubActors[i]->SetZoom( SPIRAL_MIN_ZOOM ); - m_SubActors[i].SetRotationZ( m_SubActors[i].GetRotationZ() + fDeltaTime ); + m_SubActors[i]->SetRotationZ( m_SubActors[i]->GetRotationZ() + fDeltaTime ); - float fRadius = (m_SubActors[i].GetZoom()-SPIRAL_MIN_ZOOM); + float fRadius = (m_SubActors[i]->GetZoom()-SPIRAL_MIN_ZOOM); fRadius *= fRadius; fRadius *= 200; - m_SubActors[i].SetX( SCREEN_CENTER_X + cosf(m_SubActors[i].GetRotationZ())*fRadius ); - m_SubActors[i].SetY( SCREEN_CENTER_Y + sinf(m_SubActors[i].GetRotationZ())*fRadius ); + m_SubActors[i]->SetX( SCREEN_CENTER_X + cosf(m_SubActors[i]->GetRotationZ())*fRadius ); + m_SubActors[i]->SetY( SCREEN_CENTER_Y + sinf(m_SubActors[i]->GetRotationZ())*fRadius ); } break; case EFFECT_PARTICLES_SPIRAL_IN: - for( i=0; iSetZoom( m_SubActors[i]->GetZoom() - fDeltaTime ); + if( m_SubActors[i]->GetZoom() < SPIRAL_MIN_ZOOM ) + m_SubActors[i]->SetZoom( SPIRAL_MAX_ZOOM ); - m_SubActors[i].SetRotationZ( m_SubActors[i].GetRotationZ() - fDeltaTime ); + m_SubActors[i]->SetRotationZ( m_SubActors[i]->GetRotationZ() - fDeltaTime ); - float fRadius = (m_SubActors[i].GetZoom()-SPIRAL_MIN_ZOOM); + float fRadius = (m_SubActors[i]->GetZoom()-SPIRAL_MIN_ZOOM); fRadius *= fRadius; fRadius *= 200; - m_SubActors[i].SetX( SCREEN_CENTER_X + cosf(m_SubActors[i].GetRotationZ())*fRadius ); - m_SubActors[i].SetY( SCREEN_CENTER_Y + sinf(m_SubActors[i].GetRotationZ())*fRadius ); + m_SubActors[i]->SetX( SCREEN_CENTER_X + cosf(m_SubActors[i]->GetRotationZ())*fRadius ); + m_SubActors[i]->SetY( SCREEN_CENTER_Y + sinf(m_SubActors[i]->GetRotationZ())*fRadius ); } break; -*/ + case TYPE_PARTICLES: for( unsigned i=0; iSetY( fY ); } } -/* - for( i=0; i m_TweenY) // passed the location we wanna go to? - { - m_SubActors[0].SetY(m_TweenY); // set it to the exact location we want - m_TweenPassedY = 1; // say we passed it. - } - } - else // travelling up - { - m_SubActors[0].SetY(m_SubActors[0].GetY() - ((m_TweenY + m_PosY)/(m_TweenSpeed*60))); - - if(m_SubActors[0].GetY() < m_TweenY) - { - m_SubActors[0].SetY(m_TweenY); - m_TweenPassedY = 1; - } - } - } - - if(m_TweenPassedX != 1) // Check to see if we still need to Tween Along the X Axis - { - if(m_SubActors[0].GetX() < m_TweenX) // it needs to travel right - { - m_SubActors[0].SetX(m_SubActors[0].GetX() + ((m_TweenX - m_PosX)/(m_TweenSpeed*60))); - if(m_SubActors[0].GetX() > m_TweenX) - { - m_SubActors[0].SetX(m_TweenX); - m_TweenPassedX = 1; - } - } - else // travelling left - { - m_SubActors[0].SetX(m_SubActors[0].GetX() - ((m_TweenX + m_PosX)/(m_TweenSpeed*60))); - if(m_SubActors[0].GetX() < m_TweenX) - { - m_SubActors[0].SetX(m_TweenX); - m_TweenPassedX = 1; - } - } - } - - if(m_TweenPassedY == 1 && m_TweenPassedX == 1) // totally passed both X and Y? Stop tweening. - { - m_TweenState = 0; - } - } - - if(m_ShowTime != 0 && !(m_ShowTime < 0)) - { - m_ShowTime -= fDeltaTime; - if(m_ShowTime <= 0) // if we've gone past the magic point... show the beast.... - { - m_SubActors[0].SetDiffuse( RageColor(1,1,1,1) ); - } - } - if(m_HideTime != 0 && !(m_HideTime < 0)) // make sure it's not 0 or less than 0... - { - m_HideTime -= fDeltaTime; - if(m_HideTime <= 0) // if we've gone past the magic point... hide the beast.... - { - m_SubActors[0].SetDiffuse( RageColor(0,0,0,0) ); - } - - } - */ - if( m_fRepeatCommandEverySeconds != -1 ) // if repeating { m_fSecondsUntilNextCommand -= fDeltaTime;