Use SM_ALIGN. Cleanup spacing.
This commit is contained in:
+11
-10
@@ -93,12 +93,12 @@ public:
|
||||
friend RageVector4 operator * ( float f, const RageVector4& other ) { return other*f; }
|
||||
|
||||
float x, y, z, w;
|
||||
} ALIGN(16);
|
||||
} SM_ALIGN(16);
|
||||
|
||||
struct RageColor
|
||||
{
|
||||
public:
|
||||
RageColor() {}
|
||||
RageColor() : r(0), g(0), b(0), a(0) {}
|
||||
RageColor( const float * f ) { r=f[0]; g=f[1]; b=f[2]; a=f[3]; }
|
||||
RageColor( float r1, float g1, float b1, float a1 ) { r=r1; g=g1; b=b1; a=a1; }
|
||||
|
||||
@@ -113,7 +113,7 @@ public:
|
||||
RageColor& operator *= ( float f ) { r*=f; g*=f; b*=f; a*=f; return *this; }
|
||||
/* Divide is rarely useful: you can always use multiplication, and you don't have to
|
||||
* worry about div/0. */
|
||||
// RageColor& operator /= ( float f ) { r/=f; g/=f; b/=f; a/=f; return *this; }
|
||||
// RageColor& operator /= ( float f ) { r/=f; g/=f; b/=f; a/=f; return *this; }
|
||||
|
||||
// binary operators
|
||||
RageColor operator + ( const RageColor& other ) const { return RageColor( r+other.r, g+other.g, b+other.b, a+other.a ); }
|
||||
@@ -155,7 +155,7 @@ public:
|
||||
return false;
|
||||
}
|
||||
float r, g, b, a;
|
||||
} ALIGN(16);
|
||||
} SM_ALIGN(16);
|
||||
|
||||
/* Convert floating-point 0..1 value to integer 0..255 value. *
|
||||
*
|
||||
@@ -196,13 +196,14 @@ public:
|
||||
|
||||
RageVColor() { }
|
||||
RageVColor(const RageColor &rc) { *this = rc; }
|
||||
RageVColor &operator= (const RageColor &rc) {
|
||||
RageVColor &operator= (const RageColor &rc)
|
||||
{
|
||||
r = FTOC(rc.r); g = FTOC(rc.g); b = FTOC(rc.b); a = FTOC(rc.a);
|
||||
return *this;
|
||||
}
|
||||
};
|
||||
|
||||
namespace SM
|
||||
namespace StepMania
|
||||
{
|
||||
template <class T>
|
||||
class Rect
|
||||
@@ -218,7 +219,7 @@ public:
|
||||
|
||||
bool operator==( const Rect &other ) const
|
||||
{
|
||||
#define COMPARE( x ) if( x != other.x ) return false;
|
||||
#define COMPARE( x ) if( x != other.x ) return false
|
||||
COMPARE( left );
|
||||
COMPARE( top );
|
||||
COMPARE( right );
|
||||
@@ -231,8 +232,8 @@ public:
|
||||
T left, top, right, bottom;
|
||||
};
|
||||
}
|
||||
typedef SM::Rect<int> RectI;
|
||||
typedef SM::Rect<float> RectF;
|
||||
typedef StepMania::Rect<int> RectI;
|
||||
typedef StepMania::Rect<float> RectF;
|
||||
|
||||
/* Structure for our custom vertex type. Note that these data structes
|
||||
* have the same layout that D3D expects. */
|
||||
@@ -290,7 +291,7 @@ public:
|
||||
RageMatrix GetTranspose() const;
|
||||
|
||||
float m[4][4];
|
||||
} ALIGN(16);
|
||||
} SM_ALIGN(16);
|
||||
|
||||
RageColor scale( float x, float l1, float h1, const RageColor &a, const RageColor &b );
|
||||
|
||||
|
||||
Reference in New Issue
Block a user