remove stuff commented out
fix SPIRAL while I'm here
This commit is contained in:
@@ -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<m_iNumSprites; i++ )
|
||||
case EFFECT_PARTICLES_SPIRAL_OUT:
|
||||
for( unsigned i=0; i<m_SubActors.size(); i++ )
|
||||
{
|
||||
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]->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; i<m_iNumSprites; i++ )
|
||||
for( unsigned i=0; i<m_SubActors.size(); i++ )
|
||||
{
|
||||
m_SubActors[i].SetZoom( m_SubActors[i].GetZoom() - fDeltaTime );
|
||||
if( m_SubActors[i].GetZoom() < SPIRAL_MIN_ZOOM )
|
||||
m_SubActors[i].SetZoom( SPIRAL_MAX_ZOOM );
|
||||
m_SubActors[i]->SetZoom( 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; i<m_SubActors.size(); i++ )
|
||||
{
|
||||
@@ -772,21 +768,6 @@ void BGAnimationLayer::Update( float fDeltaTime )
|
||||
m_SubActors[i]->SetY( fY );
|
||||
}
|
||||
}
|
||||
/*
|
||||
for( i=0; i<m_iNumSprites; i++ )
|
||||
{
|
||||
m_SubActors[i].SetX( m_SubActors[i].GetX() + fDeltaTime* );
|
||||
m_SubActors[i].SetY( m_SubActors[i].GetY() + fDeltaTime*m_vParticleVelocity[i].y );
|
||||
m_SubActors[i].SetZ( m_SubActors[i].GetZ() + fDeltaTime*m_vParticleVelocity[i].z );
|
||||
if( IsOffScreenLeft(&m_SubActors[i]) )
|
||||
m_SubActors[i].SetX( m_SubActors[i].GetX()-GetOffScreenLeft(&m_SubActors[i]) + GetOffScreenRight(&m_SubActors[i]) );
|
||||
if( IsOffScreenRight(&m_SubActors[i]) )
|
||||
m_SubActors[i].SetX( m_SubActors[i].GetX()-GetOffScreenRight(&m_SubActors[i]) + GetOffScreenLeft(&m_SubActors[i]) );
|
||||
if( IsOffScreenTop(&m_SubActors[i]) )
|
||||
m_SubActors[i].SetY( m_SubActors[i].GetY()-GetOffScreenTop(&m_SubActors[i]) + GetOffScreenBottom(&m_SubActors[i]) );
|
||||
if( IsOffScreenBottom(&m_SubActors[i]) )
|
||||
m_SubActors[i].SetY( m_SubActors[i].GetY()-GetOffScreenBottom(&m_SubActors[i]) + GetOffScreenTop(&m_SubActors[i]) );
|
||||
*/
|
||||
}
|
||||
break;
|
||||
case EFFECT_TILE_PULSE:
|
||||
@@ -798,107 +779,6 @@ void BGAnimationLayer::Update( float fDeltaTime )
|
||||
ASSERT(0);
|
||||
}
|
||||
|
||||
/*
|
||||
if(m_TweenStartTime != 0 && !(m_TweenStartTime < 0))
|
||||
{
|
||||
m_TweenStartTime -= fDeltaTime;
|
||||
if(m_TweenStartTime <= 0) // if we've gone past the magic point... show the beast....
|
||||
{
|
||||
// m_SubActors[0].SetXY( m_TweenX, m_TweenY);
|
||||
|
||||
// WHAT WOULD BE NICE HERE:
|
||||
// Set the Sprite Tweening To m_TweenX and m_TweenY
|
||||
// Going as fast as m_TweenSpeed specifies.
|
||||
// however, TWEEN falls over on its face at this point.
|
||||
// Lovely.
|
||||
// Instead: Manual tweening. Blah.
|
||||
m_TweenState = 1;
|
||||
if(m_PosX == m_TweenX)
|
||||
{
|
||||
m_TweenPassedX = 1;
|
||||
}
|
||||
if(m_PosY == m_TweenY)
|
||||
{
|
||||
m_TweenPassedY = 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if(m_TweenState) // A FAR from perfect Tweening Mechanism.
|
||||
{
|
||||
if(m_TweenPassedY != 1) // Check to see if we still need to Tween Along the Y Axis
|
||||
{
|
||||
if(m_SubActors[0].GetY() < m_TweenY) // it needs to travel down
|
||||
{
|
||||
// Speed = Distance / Time....
|
||||
// Take away from the current position... the distance it has to travel divided by the time they want it done in...
|
||||
m_SubActors[0].SetY(m_SubActors[0].GetY() + ((m_TweenY - m_PosY)/(m_TweenSpeed*60)));
|
||||
|
||||
if(m_SubActors[0].GetY() > 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;
|
||||
|
||||
Reference in New Issue
Block a user