mirror of https://github.com/PrimeDecomp/prime.git
parent
9cece32038
commit
caa46fc392
|
@ -61,7 +61,7 @@ public:
|
||||||
return CColor((mRgba & ~0xff) | CCast::ToUint8(a * static_cast< float >(mA)));
|
return CColor((mRgba & ~0xff) | CCast::ToUint8(a * static_cast< float >(mA)));
|
||||||
}
|
}
|
||||||
|
|
||||||
bool operator==(const CColor& other) { return mRgba == other.mRgba; }
|
bool operator==(const CColor& other) const { return mRgba == other.mRgba; }
|
||||||
|
|
||||||
// TODO check
|
// TODO check
|
||||||
static GXColor ToGX(uint c) { return *reinterpret_cast< const GXColor* >(&c); }
|
static GXColor ToGX(uint c) { return *reinterpret_cast< const GXColor* >(&c); }
|
||||||
|
|
|
@ -56,8 +56,11 @@ public:
|
||||||
, x2_flags(flags.x2_flags)
|
, x2_flags(flags.x2_flags)
|
||||||
, x4_color(color) {}
|
, x4_color(color) {}
|
||||||
|
|
||||||
// CModelFlags(const CModelFlags& other) : x0_blendMode(other.x0_blendMode),
|
// CModelFlags(const CModelFlags& other)
|
||||||
// x1_matSetIdx(other.x1_matSetIdx), x2_flags(other.x2_flags), x4_color(other.x4_color) {}
|
// : x0_blendMode(other.x0_blendMode)
|
||||||
|
// , x1_matSetIdx(other.x1_matSetIdx)
|
||||||
|
// , x2_flags(other.x2_flags)
|
||||||
|
// , x4_color(other.x4_color) {}
|
||||||
CModelFlags& operator=(const CModelFlags& other) {
|
CModelFlags& operator=(const CModelFlags& other) {
|
||||||
x0_blendMode = other.x0_blendMode;
|
x0_blendMode = other.x0_blendMode;
|
||||||
x1_matSetIdx = other.x1_matSetIdx;
|
x1_matSetIdx = other.x1_matSetIdx;
|
||||||
|
@ -89,6 +92,13 @@ public:
|
||||||
uint GetOtherFlags() const { return x2_flags; }
|
uint GetOtherFlags() const { return x2_flags; }
|
||||||
CColor GetColor() const { return x4_color; }
|
CColor GetColor() const { return x4_color; }
|
||||||
|
|
||||||
|
bool operator==(const CModelFlags& other) const {
|
||||||
|
// TODO: cast to char for extsb; see CScriptActor::PreRender
|
||||||
|
return static_cast< char >(x0_blendMode) == static_cast< char >(other.x0_blendMode) &&
|
||||||
|
static_cast< char >(x1_matSetIdx) == static_cast< char >(other.x1_matSetIdx) &&
|
||||||
|
x2_flags == other.x2_flags && x4_color == other.x4_color;
|
||||||
|
}
|
||||||
|
|
||||||
static CModelFlags Normal() { return CModelFlags(kT_Opaque, 1.f); }
|
static CModelFlags Normal() { return CModelFlags(kT_Opaque, 1.f); }
|
||||||
static CModelFlags AlphaBlended(float alpha) { return CModelFlags(kT_Blend, alpha); }
|
static CModelFlags AlphaBlended(float alpha) { return CModelFlags(kT_Blend, alpha); }
|
||||||
static CModelFlags AlphaBlended(const CColor& color) { return CModelFlags(kT_Blend, color); }
|
static CModelFlags AlphaBlended(const CColor& color) { return CModelFlags(kT_Blend, color); }
|
||||||
|
@ -105,9 +115,4 @@ private:
|
||||||
};
|
};
|
||||||
CHECK_SIZEOF(CModelFlags, 0x8)
|
CHECK_SIZEOF(CModelFlags, 0x8)
|
||||||
|
|
||||||
static inline bool operator==(const CModelFlags& lhs, const CModelFlags& rhs) {
|
|
||||||
return lhs.GetTrans() == rhs.GetTrans() && lhs.GetShaderSet() == rhs.GetShaderSet() &&
|
|
||||||
lhs.GetOtherFlags() == rhs.GetOtherFlags() && lhs.GetColor() == rhs.GetColor();
|
|
||||||
}
|
|
||||||
|
|
||||||
#endif // _CMODELFLAGS
|
#endif // _CMODELFLAGS
|
||||||
|
|
|
@ -22,8 +22,8 @@ class CStateManager;
|
||||||
|
|
||||||
class CCameraManager {
|
class CCameraManager {
|
||||||
public:
|
public:
|
||||||
CGameCamera* GetCurrentCamera(CStateManager& mgr) const /* map */;
|
CGameCamera& CurrentCamera(CStateManager& mgr) const;
|
||||||
const CGameCamera* GetCurrentCamera(const CStateManager& mgr) const;
|
const CGameCamera& GetCurrentCamera(const CStateManager& mgr) const;
|
||||||
CFirstPersonCamera* FirstPersonCamera() const /* map */ { return x7c_fpCamera; }
|
CFirstPersonCamera* FirstPersonCamera() const /* map */ { return x7c_fpCamera; }
|
||||||
const CFirstPersonCamera* GetFirstPersonCamera() const { return x7c_fpCamera; }
|
const CFirstPersonCamera* GetFirstPersonCamera() const { return x7c_fpCamera; }
|
||||||
void SetPlayerCamera(CStateManager& mgr, TUniqueId newCamId);
|
void SetPlayerCamera(CStateManager& mgr, TUniqueId newCamId);
|
||||||
|
|
Loading…
Reference in New Issue