add GetDestTweenState and SetTweenState

This commit is contained in:
Glenn Maynard
2003-01-16 05:07:54 +00:00
parent 607a1b6320
commit ebe5b97b49
2 changed files with 21 additions and 6 deletions
+10
View File
@@ -336,6 +336,16 @@ void Actor::SetTweenDiffuseBottomEdge( RageColor c ) { LatestTween().diffuse[2]
void Actor::SetTweenDiffuseLeftEdge( RageColor c ) { LatestTween().diffuse[0] = LatestTween().diffuse[2] = c; };
void Actor::SetTweenGlow( RageColor c ) { LatestTween().glow = c; };
Actor::TweenState Actor::GetDestTweenState()
{
if(!m_iNumTweenStates) return m_current;
return LatestTween();
}
void Actor::SetTweenState( const Actor::TweenState &ts )
{
LatestTween() = ts;
}
void Actor::ScaleTo( const RectI &rect, StretchType st )
{
+11 -6
View File
@@ -131,8 +131,6 @@ public:
virtual void SetTweenDiffuseBottomEdge( RageColor colorDiffuse );
virtual void SetTweenDiffuseLeftEdge( RageColor colorDiffuse );
virtual void SetTweenGlow( RageColor c );
enum StretchType { fit_inside, cover };
@@ -188,10 +186,6 @@ public:
void FadeOff( float fSleepSeconds, CString sFadeString, float fFadeSeconds ) { Fade(fSleepSeconds,sFadeString,fFadeSeconds,true); };
protected:
bool m_bFirstUpdate;
//
// Stuff for tweening
//
@@ -215,6 +209,15 @@ protected:
};
};
/* Intended for a very limited use: you can query the destination
* state (that is, where the actor would end up if its tween finished),
* stop tweening (possibly leaving it partially tweened), do something,
* then tween to the original destination. */
virtual TweenState GetDestTweenState();
virtual void SetTweenState( const TweenState &ts );
protected:
struct TweenInfo
{
// counters for tweening
@@ -243,6 +246,8 @@ protected:
RageColor m_temp_colorGlow;
*/
bool m_bFirstUpdate;
//
// Stuff for alignment
//