mirror of https://github.com/PrimeDecomp/prime.git
Add unused statics, fix CColor constructor
Former-commit-id: e7117197da
This commit is contained in:
parent
fe1f119091
commit
6f8c6b28ba
|
@ -3,19 +3,23 @@
|
||||||
|
|
||||||
#include "types.h"
|
#include "types.h"
|
||||||
|
|
||||||
|
#pragma cpp_extensions on
|
||||||
|
|
||||||
class CColor {
|
class CColor {
|
||||||
public:
|
public:
|
||||||
CColor(u32 col) : mRgba(col) {}
|
CColor(u32 col) : mRgba(col) {}
|
||||||
//CColor(float r, float g, float b, float a = 1.f) : mR(r * 255.f), mG(g * 255.f), mB(b * 255.f), mA(a * 255.f) {}
|
CColor(f32 r, f32 g, f32 b, f32 a = 1.f) : mR(r * 255.f), mG(g * 255.f), mB(b * 255.f), mA(a * 255.f) {}
|
||||||
|
|
||||||
|
|
||||||
static const CColor& Black();
|
static const CColor& Black();
|
||||||
static const CColor& White();
|
static const CColor& White();
|
||||||
static const CColor& Grey();
|
static const CColor& Grey();
|
||||||
static const CColor& Red();
|
static const CColor& Red();
|
||||||
|
static const CColor& Green();
|
||||||
static const CColor& Blue();
|
static const CColor& Blue();
|
||||||
static const CColor& Yellow();
|
static const CColor& Yellow();
|
||||||
|
static const CColor& Purple();
|
||||||
static const CColor& Orange();
|
static const CColor& Orange();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
union {
|
union {
|
||||||
struct {
|
struct {
|
||||||
|
@ -26,16 +30,16 @@ private:
|
||||||
};
|
};
|
||||||
u32 mRgba;
|
u32 mRgba;
|
||||||
};
|
};
|
||||||
|
|
||||||
static const CColor sBlackColor;
|
static const CColor sBlackColor;
|
||||||
static const CColor sWhiteColor;
|
static const CColor sWhiteColor;
|
||||||
static const CColor sGreyColor;
|
static const CColor sGreyColor;
|
||||||
static const CColor sRedColor;
|
static const CColor sRedColor;
|
||||||
static const CColor sGreenColor;
|
static const CColor sGreenColor;
|
||||||
static const CColor sBlueColor;
|
static const CColor sBlueColor;
|
||||||
static const CColor sYellowColor;
|
static const CColor sYellowColor;
|
||||||
static const CColor sPurpleColor;
|
static const CColor sPurpleColor;
|
||||||
static const CColor sOrangeColor;
|
static const CColor sOrangeColor;
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // __CCOLOR_HPP__
|
#endif // __CCOLOR_HPP__
|
||||||
|
|
|
@ -14,6 +14,8 @@ const CColor& CColor::Black() { return sBlackColor; }
|
||||||
const CColor& CColor::White() { return sWhiteColor; }
|
const CColor& CColor::White() { return sWhiteColor; }
|
||||||
const CColor& CColor::Grey() { return sGreyColor; }
|
const CColor& CColor::Grey() { return sGreyColor; }
|
||||||
const CColor& CColor::Red() { return sRedColor; }
|
const CColor& CColor::Red() { return sRedColor; }
|
||||||
|
const CColor& CColor::Green() { return sGreenColor; }
|
||||||
const CColor& CColor::Blue() { return sBlueColor; }
|
const CColor& CColor::Blue() { return sBlueColor; }
|
||||||
const CColor& CColor::Yellow() { return sYellowColor; }
|
const CColor& CColor::Yellow() { return sYellowColor; }
|
||||||
|
const CColor& CColor::Purple() { return sPurpleColor; }
|
||||||
const CColor& CColor::Orange() { return sOrangeColor; }
|
const CColor& CColor::Orange() { return sOrangeColor; }
|
||||||
|
|
Loading…
Reference in New Issue