mirror of
https://github.com/AxioDL/metaforce.git
synced 2025-08-05 15:35:34 +00:00
This member function alters instance state in a few implementations, so it shouldn't be made const. The state manager parameter also shouldn't be const. Retrieved data from the post constructed instance is further modified in some implementations. This removes the constness on this parameter in order to fix more const_cast usages in a follow-up change.
36 lines
1.6 KiB
C++
36 lines
1.6 KiB
C++
#pragma once
|
|
|
|
#include <optional>
|
|
#include <vector>
|
|
|
|
#include "Runtime/RetroTypes.hpp"
|
|
#include "Runtime/World/CActor.hpp"
|
|
|
|
#include <zeus/CAABox.hpp>
|
|
|
|
namespace urde {
|
|
class CScriptSpiderBallWaypoint : public CActor {
|
|
enum class ECheckActiveWaypoint { Check, SkipCheck };
|
|
u32 xe8_;
|
|
std::vector<TUniqueId> xec_waypoints;
|
|
std::optional<zeus::CAABox> xfc_aabox;
|
|
|
|
public:
|
|
CScriptSpiderBallWaypoint(TUniqueId, std::string_view, const CEntityInfo&, const zeus::CTransform&, bool, u32);
|
|
void Accept(IVisitor&) override;
|
|
void AcceptScriptMsg(EScriptObjectMessage, TUniqueId, CStateManager&) override;
|
|
void Render(const CStateManager& mgr) const override { CActor::Render(mgr); }
|
|
void AddToRenderer(const zeus::CFrustum&, CStateManager&) override {}
|
|
std::optional<zeus::CAABox> GetTouchBounds() const override { return xfc_aabox; }
|
|
void AccumulateBounds(const zeus::CVector3f& v);
|
|
void BuildWaypointListAndBounds(CStateManager& mgr);
|
|
void AddPreviousWaypoint(TUniqueId uid);
|
|
TUniqueId PreviousWaypoint(const CStateManager& mgr, ECheckActiveWaypoint checkActive) const;
|
|
TUniqueId NextWaypoint(const CStateManager& mgr, ECheckActiveWaypoint checkActive) const;
|
|
void GetClosestPointAlongWaypoints(CStateManager& mgr, const zeus::CVector3f& ballPos, float maxPointToBallDist,
|
|
const CScriptSpiderBallWaypoint*& closestWaypoint, zeus::CVector3f& closestPoint,
|
|
zeus::CVector3f& deltaBetweenPoints, float deltaBetweenInterpDist,
|
|
zeus::CVector3f& interpDeltaBetweenPoints) const;
|
|
};
|
|
} // namespace urde
|