Runtime: constexpr fixes for gcc

This commit is contained in:
Luke Street 2020-05-27 13:02:20 -04:00
parent c4ccb1cfce
commit d44eccc386
8 changed files with 10 additions and 13 deletions

View File

@ -122,7 +122,7 @@ CCameraShakeData CCameraShakeData::LoadCameraShakeData(CInputStream& in) {
return {duration, 100.f, 0, zeus::skZero3f, shakerX, shakerY, shakerZ};
}
constexpr CCameraShakeData CCameraShakeData::skChargedShotCameraShakeData{
const CCameraShakeData CCameraShakeData::skChargedShotCameraShakeData{
0.3f,
100.f,
0,

View File

@ -1,5 +1,5 @@
#include "Runtime/Collision/CMaterialFilter.hpp"
namespace urde {
constexpr CMaterialFilter CMaterialFilter::skPassEverything({0x00000000FFFFFFFF}, {0}, EFilterType::Always);
const CMaterialFilter CMaterialFilter::skPassEverything({0x00000000FFFFFFFF}, {0}, EFilterType::Always);
} // namespace urde

View File

@ -35,7 +35,7 @@ SViewport g_Viewport = {
};
u32 CGraphics::g_FrameCounter = 0;
constexpr std::array<zeus::CMatrix3f, 6> CGraphics::skCubeBasisMats{{
const std::array<zeus::CMatrix3f, 6> CGraphics::skCubeBasisMats{{
/* Right */
{0.f, 1.f, 0.f, 1.f, 0.f, 0.f, 0.f, 0.f, -1.f},
/* Left */

View File

@ -113,6 +113,4 @@ void CWideScreenFilter::SetViewportToFull() {
CGraphics::g_BooMainCommandQueue->setViewport(rect);
}
constexpr zeus::CRectangle CColoredQuadFilter::DefaultRect{0.f, 0.f, 1.f, 1.f};
} // namespace urde

View File

@ -27,7 +27,8 @@ class CColoredQuadFilter {
public:
static void Initialize();
static void Shutdown();
static const zeus::CRectangle DefaultRect;
static constexpr zeus::CRectangle DefaultRect{0.f, 0.f, 1.f, 1.f};
explicit CColoredQuadFilter(EFilterType type);
explicit CColoredQuadFilter(EFilterType type, const TLockedToken<CTexture>&) : CColoredQuadFilter(type) {}
void draw(const zeus::CColor& color, const zeus::CRectangle& rect = DefaultRect);

View File

@ -322,8 +322,6 @@ void CTexturedQuadFilter::DrawFilter(EFilterShape shape, const zeus::CColor& col
}
}
constexpr zeus::CRectangle CTexturedQuadFilter::DefaultRect{0.f, 0.f, 1.f, 1.f};
CTexturedQuadFilterAlpha::CTexturedQuadFilterAlpha(EFilterType type, const boo::ObjToken<boo::ITexture>& tex)
: CTexturedQuadFilter(tex) {
CGraphics::CommitResources([&](boo::IGraphicsDataFactory::Context& ctx) {

View File

@ -44,7 +44,7 @@ public:
};
static void Initialize();
static void Shutdown();
static const zeus::CRectangle DefaultRect;
static constexpr zeus::CRectangle DefaultRect{0.f, 0.f, 1.f, 1.f};
explicit CTexturedQuadFilter(EFilterType type, TLockedToken<CTexture> tex, ZTest zTest = ZTest::None);
explicit CTexturedQuadFilter(EFilterType type, const boo::ObjToken<boo::ITexture>& tex, ZTest zTest = ZTest::None);
CTexturedQuadFilter(const CTexturedQuadFilter&) = delete;

View File

@ -2,7 +2,7 @@
namespace urde {
constexpr CDamageVulnerability CDamageVulnerability::sNormalVulnerability(
const CDamageVulnerability CDamageVulnerability::sNormalVulnerability(
EVulnerability::Normal, EVulnerability::Normal, EVulnerability::Normal, EVulnerability::Normal,
EVulnerability::Normal, EVulnerability::Normal, EVulnerability::Normal, EVulnerability::Normal,
EVulnerability::Normal, EVulnerability::Normal, EVulnerability::Normal, EVulnerability::Normal,
@ -10,7 +10,7 @@ constexpr CDamageVulnerability CDamageVulnerability::sNormalVulnerability(
EVulnerability::Normal, EVulnerability::Normal, EVulnerability::Normal, EVulnerability::Normal,
EVulnerability::Normal, EVulnerability::Normal, EVulnerability::Normal, EDeflectType::None);
constexpr CDamageVulnerability CDamageVulnerability::sImmuneVulnerability(
const CDamageVulnerability CDamageVulnerability::sImmuneVulnerability(
EVulnerability::Deflect, EVulnerability::Deflect, EVulnerability::Deflect, EVulnerability::Deflect,
EVulnerability::Deflect, EVulnerability::Deflect, EVulnerability::Deflect, EVulnerability::Deflect,
EVulnerability::Deflect, EVulnerability::Deflect, EVulnerability::Deflect, EVulnerability::Deflect,
@ -18,7 +18,7 @@ constexpr CDamageVulnerability CDamageVulnerability::sImmuneVulnerability(
EVulnerability::Deflect, EVulnerability::Deflect, EVulnerability::Deflect, EVulnerability::Deflect,
EVulnerability::Deflect, EVulnerability::Deflect, EVulnerability::Deflect, EDeflectType::None);
constexpr CDamageVulnerability CDamageVulnerability::sReflectVulnerability(
const CDamageVulnerability CDamageVulnerability::sReflectVulnerability(
EVulnerability::Deflect, EVulnerability::Deflect, EVulnerability::Deflect, EVulnerability::Deflect,
EVulnerability::Deflect, EVulnerability::Deflect, EVulnerability::Deflect, EVulnerability::Deflect,
EVulnerability::Deflect, EVulnerability::Deflect, EVulnerability::Deflect, EVulnerability::Deflect,
@ -26,7 +26,7 @@ constexpr CDamageVulnerability CDamageVulnerability::sReflectVulnerability(
EVulnerability::Deflect, EVulnerability::Deflect, EVulnerability::Deflect, EVulnerability::Deflect,
EVulnerability::Deflect, EVulnerability::Deflect, EVulnerability::Deflect, EDeflectType::One);
constexpr CDamageVulnerability CDamageVulnerability::sPassThroughVulnerability(
const CDamageVulnerability CDamageVulnerability::sPassThroughVulnerability(
EVulnerability::PassThrough, EVulnerability::PassThrough, EVulnerability::PassThrough, EVulnerability::PassThrough,
EVulnerability::PassThrough, EVulnerability::PassThrough, EVulnerability::PassThrough, EVulnerability::PassThrough,
EVulnerability::PassThrough, EVulnerability::PassThrough, EVulnerability::PassThrough, EVulnerability::PassThrough,