mirror of
https://github.com/AxioDL/metaforce.git
synced 2025-12-08 13:44:56 +00:00
CActorContraption fixes, better CMake dependency handling
This commit is contained in:
@@ -1069,7 +1069,7 @@ void CBallCamera::UpdateUsingColliders(float dt, CStateManager& mgr) {
|
||||
}
|
||||
} else if (mgr.GetPlayer().GetMorphballTransitionState() != CPlayer::EPlayerMorphBallState::Unmorphed ||
|
||||
x18d_25_avoidGeometryFull) {
|
||||
zeus::CTransform oldXf = x34_transform;
|
||||
//zeus::CTransform oldXf = x34_transform;
|
||||
zeus::CVector3f oldPos = GetTranslation();
|
||||
x2c4_smallCollidersObsCount = CountObscuredColliders(x264_smallColliders);
|
||||
x2c8_mediumCollidersObsCount = CountObscuredColliders(x274_mediumColliders);
|
||||
@@ -1486,7 +1486,7 @@ bool CBallCamera::CheckFailsafeFromMorphBallState(CStateManager& mgr) const {
|
||||
}
|
||||
curT += 1.f;
|
||||
}
|
||||
for (int i = 0; i < resultsA.size(); ++i) {
|
||||
for (size_t i = 0; i < resultsA.size(); ++i) {
|
||||
const CRayCastResult& resA = resultsA[i];
|
||||
const CRayCastResult& resB = resultsB[i];
|
||||
if (resA.IsValid()) {
|
||||
@@ -1523,7 +1523,7 @@ bool CBallCamera::SplineIntersectTest(CMaterialList& intersectMat, CStateManager
|
||||
}
|
||||
curT += 1.f;
|
||||
}
|
||||
for (int i = 0; i < xacc.size(); ++i) {
|
||||
for (size_t i = 0; i < xacc.size(); ++i) {
|
||||
const CRayCastResult& resA = xacc[i];
|
||||
const CRayCastResult& resB = xd10[i];
|
||||
if (resA.IsValid()) {
|
||||
|
||||
@@ -29,7 +29,7 @@ void CCameraFilterPass<S>::Update(float dt) {
|
||||
}
|
||||
|
||||
if (x0_curType == EFilterType::Passthru)
|
||||
m_shader = rstl::nullopt;
|
||||
m_shader = std::nullopt;
|
||||
else if (x0_curType != origType)
|
||||
m_shader.emplace(x0_curType, x24_texObj);
|
||||
}
|
||||
@@ -44,7 +44,7 @@ void CCameraFilterPass<S>::SetFilter(EFilterType type, EFilterShape shape, float
|
||||
if (txtr.IsValid())
|
||||
x24_texObj = g_SimplePool->GetObj({FOURCC('TXTR'), txtr});
|
||||
if (type == EFilterType::Passthru)
|
||||
m_shader = rstl::nullopt;
|
||||
m_shader = std::nullopt;
|
||||
else if (x0_curType != type || (x20_nextTxtr != txtr && txtr.IsValid()))
|
||||
m_shader.emplace(type, x24_texObj);
|
||||
|
||||
@@ -88,7 +88,7 @@ void CCameraFilterPass<S>::SetFilter(EFilterType type, EFilterShape shape, float
|
||||
}
|
||||
|
||||
if (x0_curType == EFilterType::Passthru)
|
||||
m_shader = rstl::nullopt;
|
||||
m_shader = std::nullopt;
|
||||
else if (x0_curType != origType || (x20_nextTxtr != origTxtr && x20_nextTxtr.IsValid()))
|
||||
m_shader.emplace(x0_curType, x24_texObj);
|
||||
}
|
||||
|
||||
@@ -59,7 +59,7 @@ public:
|
||||
|
||||
template <class S>
|
||||
class CCameraFilterPass final : public CCameraFilterPassBase {
|
||||
rstl::optional<S> m_shader;
|
||||
std::optional<S> m_shader;
|
||||
|
||||
public:
|
||||
void Update(float dt);
|
||||
@@ -103,8 +103,8 @@ class CCameraBlurPass {
|
||||
// bool x2d_noPersistentCopy = false;
|
||||
// u32 x30_persistentBuf = 0;
|
||||
|
||||
mutable rstl::optional<CCameraBlurFilter> m_shader;
|
||||
mutable rstl::optional<CXRayBlurFilter> m_xrayShader;
|
||||
mutable std::optional<CCameraBlurFilter> m_shader;
|
||||
mutable std::optional<CXRayBlurFilter> m_xrayShader;
|
||||
|
||||
public:
|
||||
void Draw(bool clearDepth = false);
|
||||
|
||||
@@ -88,7 +88,7 @@ float CCameraSpline::CalculateSplineLength() {
|
||||
if (x4_positions.size() > 0) {
|
||||
zeus::CVector3f prevPoint = x4_positions[0];
|
||||
float tDiv = 1.f / float(x4_positions.size() - 1);
|
||||
for (int i = 0; i < x4_positions.size(); ++i) {
|
||||
for (size_t i = 0; i < x4_positions.size(); ++i) {
|
||||
float subT = 0.f;
|
||||
float baseT = i * tDiv;
|
||||
x24_t.push_back(ret);
|
||||
@@ -169,8 +169,8 @@ zeus::CTransform CCameraSpline::GetInterpolatedSplinePointByLength(float pos) co
|
||||
if (x4_positions.empty())
|
||||
return zeus::CTransform();
|
||||
|
||||
int baseIdx = 0;
|
||||
int i;
|
||||
size_t baseIdx = 0;
|
||||
size_t i;
|
||||
for (i = 1; i < x4_positions.size(); ++i) {
|
||||
if (x24_t[i] > pos) {
|
||||
baseIdx = i - 1;
|
||||
|
||||
@@ -191,9 +191,9 @@ void CCinematicCamera::Think(float dt, CStateManager& mgr) {
|
||||
|
||||
x1ec_t += dt;
|
||||
if (x1ec_t > x1e8_duration) {
|
||||
for (int i = x1f4_passedViewPoint + 1; i < x1a8_viewPointArrivals.size(); ++i)
|
||||
for (size_t i = x1f4_passedViewPoint + 1; i < x1a8_viewPointArrivals.size(); ++i)
|
||||
SendArrivedMsg(x1a8_viewPointArrivals[i], mgr);
|
||||
for (int i = x1f8_passedTarget + 1; i < x1c8_targetArrivals.size(); ++i)
|
||||
for (size_t i = x1f8_passedTarget + 1; i < x1c8_targetArrivals.size(); ++i)
|
||||
SendArrivedMsg(x1c8_targetArrivals[i], mgr);
|
||||
DeactivateSelf(mgr);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user