cleanup: move code out of header, remove RageUtil.h from Actor.h
This commit is contained in:
@@ -1145,6 +1145,24 @@ void Actor::TweenState::Init()
|
|||||||
aux = 0;
|
aux = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool Actor::TweenState::operator==( const TweenState &other ) const
|
||||||
|
{
|
||||||
|
#define COMPARE( x ) if( x != other.x ) return false;
|
||||||
|
COMPARE( pos );
|
||||||
|
COMPARE( rotation );
|
||||||
|
COMPARE( quat );
|
||||||
|
COMPARE( scale );
|
||||||
|
COMPARE( fSkewX );
|
||||||
|
COMPARE( crop );
|
||||||
|
COMPARE( fade );
|
||||||
|
for( unsigned i=0; i<ARRAYSIZE(diffuse); i++ )
|
||||||
|
COMPARE( diffuse[i] );
|
||||||
|
COMPARE( glow );
|
||||||
|
COMPARE( aux );
|
||||||
|
#undef COMPARE
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
void Actor::TweenState::MakeWeightedAverage( TweenState& average_out, const TweenState& ts1, const TweenState& ts2, float fPercentBetween )
|
void Actor::TweenState::MakeWeightedAverage( TweenState& average_out, const TweenState& ts1, const TweenState& ts2, float fPercentBetween )
|
||||||
{
|
{
|
||||||
average_out.pos = ts1.pos + (ts2.pos - ts1.pos )*fPercentBetween;
|
average_out.pos = ts1.pos + (ts2.pos - ts1.pos )*fPercentBetween;
|
||||||
|
|||||||
+3
-21
@@ -12,7 +12,6 @@ struct lua_State;
|
|||||||
class LuaReference;
|
class LuaReference;
|
||||||
class LuaClass;
|
class LuaClass;
|
||||||
#include "MessageManager.h"
|
#include "MessageManager.h"
|
||||||
#include "RageUtil.h" // for ARRAYSIZE
|
|
||||||
|
|
||||||
|
|
||||||
#define DRAW_ORDER_BEFORE_EVERYTHING -200
|
#define DRAW_ORDER_BEFORE_EVERYTHING -200
|
||||||
@@ -56,23 +55,9 @@ public:
|
|||||||
|
|
||||||
struct TweenState
|
struct TweenState
|
||||||
{
|
{
|
||||||
bool operator==( const TweenState &other ) const
|
void Init();
|
||||||
{
|
static void MakeWeightedAverage( TweenState& average_out, const TweenState& ts1, const TweenState& ts2, float fPercentBetween );
|
||||||
#define COMPARE( x ) if( x != other.x ) return false;
|
bool operator==( const TweenState &other ) const;
|
||||||
COMPARE( pos );
|
|
||||||
COMPARE( rotation );
|
|
||||||
COMPARE( quat );
|
|
||||||
COMPARE( scale );
|
|
||||||
COMPARE( fSkewX );
|
|
||||||
COMPARE( crop );
|
|
||||||
COMPARE( fade );
|
|
||||||
for( unsigned i=0; i<ARRAYSIZE(diffuse); i++ )
|
|
||||||
COMPARE( diffuse[i] );
|
|
||||||
COMPARE( glow );
|
|
||||||
COMPARE( aux );
|
|
||||||
#undef COMPARE
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
bool operator!=( const TweenState &other ) const { return !operator==(other); }
|
bool operator!=( const TweenState &other ) const { return !operator==(other); }
|
||||||
|
|
||||||
// start and end position for tweening
|
// start and end position for tweening
|
||||||
@@ -87,9 +72,6 @@ public:
|
|||||||
RageColor glow;
|
RageColor glow;
|
||||||
float aux;
|
float aux;
|
||||||
CString sCommandName; // command to execute when this TweenState goes into effect
|
CString sCommandName; // command to execute when this TweenState goes into effect
|
||||||
|
|
||||||
void Init();
|
|
||||||
static void MakeWeightedAverage( TweenState& average_out, const TweenState& ts1, const TweenState& ts2, float fPercentBetween );
|
|
||||||
};
|
};
|
||||||
|
|
||||||
enum EffectClock
|
enum EffectClock
|
||||||
|
|||||||
Reference in New Issue
Block a user