mirror of https://github.com/AxioDL/metaforce.git
Runtime: constexpr fixes for gcc
This commit is contained in:
parent
c4ccb1cfce
commit
d44eccc386
|
@ -122,7 +122,7 @@ CCameraShakeData CCameraShakeData::LoadCameraShakeData(CInputStream& in) {
|
||||||
return {duration, 100.f, 0, zeus::skZero3f, shakerX, shakerY, shakerZ};
|
return {duration, 100.f, 0, zeus::skZero3f, shakerX, shakerY, shakerZ};
|
||||||
}
|
}
|
||||||
|
|
||||||
constexpr CCameraShakeData CCameraShakeData::skChargedShotCameraShakeData{
|
const CCameraShakeData CCameraShakeData::skChargedShotCameraShakeData{
|
||||||
0.3f,
|
0.3f,
|
||||||
100.f,
|
100.f,
|
||||||
0,
|
0,
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
#include "Runtime/Collision/CMaterialFilter.hpp"
|
#include "Runtime/Collision/CMaterialFilter.hpp"
|
||||||
|
|
||||||
namespace urde {
|
namespace urde {
|
||||||
constexpr CMaterialFilter CMaterialFilter::skPassEverything({0x00000000FFFFFFFF}, {0}, EFilterType::Always);
|
const CMaterialFilter CMaterialFilter::skPassEverything({0x00000000FFFFFFFF}, {0}, EFilterType::Always);
|
||||||
} // namespace urde
|
} // namespace urde
|
||||||
|
|
|
@ -35,7 +35,7 @@ SViewport g_Viewport = {
|
||||||
};
|
};
|
||||||
u32 CGraphics::g_FrameCounter = 0;
|
u32 CGraphics::g_FrameCounter = 0;
|
||||||
|
|
||||||
constexpr std::array<zeus::CMatrix3f, 6> CGraphics::skCubeBasisMats{{
|
const std::array<zeus::CMatrix3f, 6> CGraphics::skCubeBasisMats{{
|
||||||
/* Right */
|
/* Right */
|
||||||
{0.f, 1.f, 0.f, 1.f, 0.f, 0.f, 0.f, 0.f, -1.f},
|
{0.f, 1.f, 0.f, 1.f, 0.f, 0.f, 0.f, 0.f, -1.f},
|
||||||
/* Left */
|
/* Left */
|
||||||
|
|
|
@ -113,6 +113,4 @@ void CWideScreenFilter::SetViewportToFull() {
|
||||||
CGraphics::g_BooMainCommandQueue->setViewport(rect);
|
CGraphics::g_BooMainCommandQueue->setViewport(rect);
|
||||||
}
|
}
|
||||||
|
|
||||||
constexpr zeus::CRectangle CColoredQuadFilter::DefaultRect{0.f, 0.f, 1.f, 1.f};
|
|
||||||
|
|
||||||
} // namespace urde
|
} // namespace urde
|
||||||
|
|
|
@ -27,7 +27,8 @@ class CColoredQuadFilter {
|
||||||
public:
|
public:
|
||||||
static void Initialize();
|
static void Initialize();
|
||||||
static void Shutdown();
|
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);
|
||||||
explicit CColoredQuadFilter(EFilterType type, const TLockedToken<CTexture>&) : CColoredQuadFilter(type) {}
|
explicit CColoredQuadFilter(EFilterType type, const TLockedToken<CTexture>&) : CColoredQuadFilter(type) {}
|
||||||
void draw(const zeus::CColor& color, const zeus::CRectangle& rect = DefaultRect);
|
void draw(const zeus::CColor& color, const zeus::CRectangle& rect = DefaultRect);
|
||||||
|
|
|
@ -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)
|
CTexturedQuadFilterAlpha::CTexturedQuadFilterAlpha(EFilterType type, const boo::ObjToken<boo::ITexture>& tex)
|
||||||
: CTexturedQuadFilter(tex) {
|
: CTexturedQuadFilter(tex) {
|
||||||
CGraphics::CommitResources([&](boo::IGraphicsDataFactory::Context& ctx) {
|
CGraphics::CommitResources([&](boo::IGraphicsDataFactory::Context& ctx) {
|
||||||
|
|
|
@ -44,7 +44,7 @@ public:
|
||||||
};
|
};
|
||||||
static void Initialize();
|
static void Initialize();
|
||||||
static void Shutdown();
|
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, TLockedToken<CTexture> tex, ZTest zTest = ZTest::None);
|
||||||
explicit CTexturedQuadFilter(EFilterType type, const boo::ObjToken<boo::ITexture>& tex, ZTest zTest = ZTest::None);
|
explicit CTexturedQuadFilter(EFilterType type, const boo::ObjToken<boo::ITexture>& tex, ZTest zTest = ZTest::None);
|
||||||
CTexturedQuadFilter(const CTexturedQuadFilter&) = delete;
|
CTexturedQuadFilter(const CTexturedQuadFilter&) = delete;
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
|
|
||||||
namespace urde {
|
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,
|
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, EVulnerability::Normal,
|
||||||
EVulnerability::Normal, EVulnerability::Normal, EVulnerability::Normal, EDeflectType::None);
|
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,
|
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, EVulnerability::Deflect,
|
||||||
EVulnerability::Deflect, EVulnerability::Deflect, EVulnerability::Deflect, EDeflectType::None);
|
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,
|
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, EVulnerability::Deflect,
|
||||||
EVulnerability::Deflect, EVulnerability::Deflect, EVulnerability::Deflect, EDeflectType::One);
|
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,
|
EVulnerability::PassThrough, EVulnerability::PassThrough, EVulnerability::PassThrough, EVulnerability::PassThrough,
|
||||||
EVulnerability::PassThrough, EVulnerability::PassThrough, EVulnerability::PassThrough, EVulnerability::PassThrough,
|
EVulnerability::PassThrough, EVulnerability::PassThrough, EVulnerability::PassThrough, EVulnerability::PassThrough,
|
||||||
|
|
Loading…
Reference in New Issue