2018-10-07 03:42:33 +00:00
|
|
|
#pragma once
|
2016-04-16 21:49:47 +00:00
|
|
|
|
2019-09-28 02:53:03 +00:00
|
|
|
#include "Runtime/RetroTypes.hpp"
|
|
|
|
#include "Runtime/Camera/CGameCamera.hpp"
|
|
|
|
|
|
|
|
#include <zeus/CTransform.hpp>
|
|
|
|
#include <zeus/CVector3f.hpp>
|
2016-04-16 21:49:47 +00:00
|
|
|
|
2021-04-10 08:42:06 +00:00
|
|
|
namespace metaforce {
|
2016-04-16 21:49:47 +00:00
|
|
|
|
2018-12-08 05:30:43 +00:00
|
|
|
class CFirstPersonCamera : public CGameCamera {
|
|
|
|
float x188_orbitCameraSpeed;
|
|
|
|
bool x18c_lockCamera = false;
|
|
|
|
zeus::CTransform x190_gunFollowXf;
|
|
|
|
float x1c0_pitch = 0.f;
|
|
|
|
TUniqueId x1c4_pitchId = kInvalidUniqueId;
|
2020-04-21 07:22:41 +00:00
|
|
|
bool x1c6_24_deferBallTransitionProcessing : 1 = false;
|
2018-12-08 05:30:43 +00:00
|
|
|
zeus::CVector3f x1c8_closeInVec;
|
|
|
|
float x1d4_closeInTimer = 0.f;
|
2019-09-29 15:17:47 +00:00
|
|
|
void _fovListener(hecl::CVar* cv);
|
2016-04-16 21:49:47 +00:00
|
|
|
public:
|
2021-05-26 14:00:57 +00:00
|
|
|
DEFINE_ENTITY
|
2018-12-08 05:30:43 +00:00
|
|
|
CFirstPersonCamera(TUniqueId, const zeus::CTransform& xf, TUniqueId, float orbitCameraSpeed, float fov,
|
|
|
|
float nearplane, float farplane, float aspect);
|
2016-08-15 01:19:04 +00:00
|
|
|
|
2019-08-09 19:46:49 +00:00
|
|
|
void Accept(IVisitor& visitor) override;
|
|
|
|
void PreThink(float dt, CStateManager& mgr) override;
|
|
|
|
void Think(float dt, CStateManager& mgr) override;
|
|
|
|
void ProcessInput(const CFinalInput&, CStateManager& mgr) override;
|
|
|
|
void Reset(const zeus::CTransform&, CStateManager& mgr) override;
|
2016-09-15 07:26:35 +00:00
|
|
|
|
2018-12-08 05:30:43 +00:00
|
|
|
void SkipCinematic();
|
|
|
|
const zeus::CTransform& GetGunFollowTransform() const { return x190_gunFollowXf; }
|
|
|
|
void UpdateTransform(CStateManager& mgr, float dt);
|
|
|
|
void UpdateElevation(CStateManager& mgr);
|
2019-08-14 10:04:11 +00:00
|
|
|
void CalculateGunFollowOrientationAndTransform(zeus::CTransform&, zeus::CQuaternion&, float, zeus::CVector3f&) const;
|
2018-12-08 05:30:43 +00:00
|
|
|
void SetScriptPitchId(TUniqueId uid) { x1c4_pitchId = uid; }
|
|
|
|
void SetLockCamera(bool v) { x18c_lockCamera = v; }
|
|
|
|
void DeferBallTransitionProcessing() { x1c6_24_deferBallTransitionProcessing = true; }
|
2016-04-16 21:49:47 +00:00
|
|
|
};
|
2021-04-10 08:42:06 +00:00
|
|
|
} // namespace metaforce
|