2016-07-22 19:46:30 +00:00
|
|
|
#ifndef __URDE_CPLAYER_HPP__
|
|
|
|
#define __URDE_CPLAYER_HPP__
|
|
|
|
|
|
|
|
#include "CPhysicsActor.hpp"
|
|
|
|
#include "zeus/CAABox.hpp"
|
|
|
|
#include "zeus/CTransform.hpp"
|
2016-11-22 20:43:16 +00:00
|
|
|
#include "Weapon/CWeaponMgr.hpp"
|
2016-09-25 16:45:22 +00:00
|
|
|
#include "CPlayerEnergyDrain.hpp"
|
2017-02-12 03:17:18 +00:00
|
|
|
#include "Weapon/CPlayerGun.hpp"
|
|
|
|
#include "CMorphBall.hpp"
|
2016-07-22 19:46:30 +00:00
|
|
|
|
|
|
|
namespace urde
|
|
|
|
{
|
|
|
|
class CMaterialList;
|
|
|
|
class CMorphBall;
|
2016-08-14 21:11:44 +00:00
|
|
|
class CPlayerGun;
|
2016-08-15 01:19:04 +00:00
|
|
|
class CDamageInfo;
|
|
|
|
class CScriptWater;
|
|
|
|
class IVisitor;
|
|
|
|
class CFinalInput;
|
2016-09-15 07:26:35 +00:00
|
|
|
class CPlayerCameraBob;
|
2016-08-15 01:19:04 +00:00
|
|
|
class CFirstPersonCamera;
|
2016-07-22 19:46:30 +00:00
|
|
|
|
|
|
|
class CPlayer : public CPhysicsActor
|
|
|
|
{
|
2016-08-14 21:11:44 +00:00
|
|
|
friend class CStateManager;
|
2016-09-15 07:26:35 +00:00
|
|
|
friend class CFirstPersonCamera;
|
2016-09-16 00:56:46 +00:00
|
|
|
friend class CPlayerCameraBob;
|
2017-03-06 06:33:51 +00:00
|
|
|
friend class CMorphBall;
|
2017-06-19 07:00:50 +00:00
|
|
|
friend class CGroundMovement;
|
2016-12-19 18:27:58 +00:00
|
|
|
|
2016-08-15 01:19:04 +00:00
|
|
|
public:
|
|
|
|
enum class EPlayerScanState
|
|
|
|
{
|
2017-04-03 01:39:23 +00:00
|
|
|
NotScanning,
|
|
|
|
Scanning,
|
|
|
|
ScanComplete
|
2016-08-15 01:19:04 +00:00
|
|
|
};
|
2017-06-12 04:23:34 +00:00
|
|
|
|
2016-08-15 01:19:04 +00:00
|
|
|
enum class EPlayerOrbitType
|
|
|
|
{
|
2017-06-12 04:23:34 +00:00
|
|
|
Zero,
|
|
|
|
One
|
2016-08-15 01:19:04 +00:00
|
|
|
};
|
2017-06-12 04:23:34 +00:00
|
|
|
|
2016-08-15 01:19:04 +00:00
|
|
|
enum class EPlayerOrbitState
|
|
|
|
{
|
2017-04-03 01:39:23 +00:00
|
|
|
Zero,
|
|
|
|
One,
|
|
|
|
Two,
|
|
|
|
Three,
|
|
|
|
Four,
|
|
|
|
Five
|
2016-08-15 01:19:04 +00:00
|
|
|
};
|
2017-06-12 04:23:34 +00:00
|
|
|
|
|
|
|
enum class EPlayerOrbitRequest
|
|
|
|
{
|
|
|
|
Zero,
|
|
|
|
One,
|
|
|
|
Two,
|
|
|
|
Three,
|
|
|
|
Four,
|
|
|
|
Five,
|
|
|
|
Six,
|
|
|
|
Seven,
|
|
|
|
Eight,
|
|
|
|
Nine,
|
|
|
|
Ten
|
|
|
|
};
|
|
|
|
|
2016-08-15 01:19:04 +00:00
|
|
|
enum class EPlayerZoneInfo
|
|
|
|
{
|
2017-05-30 03:45:31 +00:00
|
|
|
Zero,
|
|
|
|
One
|
2016-08-15 01:19:04 +00:00
|
|
|
};
|
2017-06-12 04:23:34 +00:00
|
|
|
|
2016-08-15 01:19:04 +00:00
|
|
|
enum class EPlayerZoneType
|
|
|
|
{
|
2017-05-30 03:45:31 +00:00
|
|
|
Always = -1,
|
|
|
|
Box = 0,
|
|
|
|
Ellipse
|
2016-08-15 01:19:04 +00:00
|
|
|
};
|
2017-06-12 04:23:34 +00:00
|
|
|
|
2016-08-15 01:19:04 +00:00
|
|
|
enum class EPlayerMovementState
|
|
|
|
{
|
2017-06-12 04:23:34 +00:00
|
|
|
OnGround,
|
|
|
|
Jump,
|
|
|
|
StartingJump,
|
|
|
|
Falling,
|
|
|
|
FallingMorphed
|
2016-08-15 01:19:04 +00:00
|
|
|
};
|
|
|
|
|
2017-01-07 01:58:05 +00:00
|
|
|
enum class EPlayerMorphBallState
|
|
|
|
{
|
|
|
|
Unmorphed,
|
|
|
|
Morphed,
|
|
|
|
Morphing,
|
2017-01-15 03:59:37 +00:00
|
|
|
Unmorphing
|
2017-01-07 01:58:05 +00:00
|
|
|
};
|
|
|
|
|
2017-03-24 05:30:16 +00:00
|
|
|
enum class EPlayerCameraState
|
|
|
|
{
|
|
|
|
Zero,
|
|
|
|
One,
|
|
|
|
Two,
|
|
|
|
Three,
|
|
|
|
Four
|
|
|
|
};
|
|
|
|
|
2017-06-12 04:23:34 +00:00
|
|
|
enum class EPlayerMovementSurface
|
|
|
|
{
|
|
|
|
Normal,
|
|
|
|
One,
|
|
|
|
Ice,
|
|
|
|
MudSlow,
|
|
|
|
Four,
|
|
|
|
Fluid2Or5,
|
|
|
|
Fluid3,
|
|
|
|
SnakeWeed
|
|
|
|
};
|
|
|
|
|
2016-08-15 01:19:04 +00:00
|
|
|
private:
|
|
|
|
struct CVisorSteam
|
|
|
|
{
|
|
|
|
float x0_;
|
|
|
|
float x4_;
|
|
|
|
float x8_;
|
2017-02-12 03:17:18 +00:00
|
|
|
ResId xc_tex;
|
2016-08-15 01:19:04 +00:00
|
|
|
float x10_ = 0.f;
|
|
|
|
float x14_ = 0.f;
|
|
|
|
float x18_ = 0.f;
|
2016-09-25 16:45:22 +00:00
|
|
|
ResId x1c_ = -1;
|
2017-02-12 03:17:18 +00:00
|
|
|
float x20_alpha = 0.f;
|
2016-08-15 01:19:04 +00:00
|
|
|
float x24_ = 0.f;
|
|
|
|
bool x28_ = false;
|
2016-12-19 18:27:58 +00:00
|
|
|
|
2016-09-25 16:45:22 +00:00
|
|
|
public:
|
2017-02-12 03:17:18 +00:00
|
|
|
CVisorSteam(float a, float b, float c, ResId tex) : x0_(a), x4_(b), x8_(c), xc_tex(tex) {}
|
2016-09-25 16:45:22 +00:00
|
|
|
ResId GetTextureId() const;
|
|
|
|
void SetSteam(float a, float b, float c, ResId d, bool e);
|
2016-08-15 01:19:04 +00:00
|
|
|
void Update(float dt);
|
2017-02-12 03:17:18 +00:00
|
|
|
float GetAlpha() const { return x20_alpha; }
|
2016-08-15 01:19:04 +00:00
|
|
|
};
|
2017-06-12 04:23:34 +00:00
|
|
|
|
|
|
|
class CInputFilter
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
enum class EInputState
|
|
|
|
{
|
|
|
|
Jump,
|
|
|
|
StartingJump,
|
|
|
|
Moving
|
|
|
|
};
|
|
|
|
private:
|
|
|
|
rstl::reserved_vector<EInputState, 20> x0_stateSamples;
|
|
|
|
rstl::reserved_vector<zeus::CVector3f, 20> x54_posSamples;
|
|
|
|
rstl::reserved_vector<zeus::CVector3f, 20> x148_velSamples;
|
|
|
|
rstl::reserved_vector<zeus::CVector2f, 20> x23c_inputSamples;
|
|
|
|
public:
|
|
|
|
void Reset();
|
|
|
|
void AddSample(EInputState state, const zeus::CVector3f& pos,
|
|
|
|
const zeus::CVector3f& vel, const zeus::CVector2f& input);
|
|
|
|
bool Passes() const;
|
|
|
|
};
|
|
|
|
|
|
|
|
EPlayerMovementState x258_movementState = EPlayerMovementState::OnGround;
|
|
|
|
std::vector<u32> x25c_;
|
2016-09-25 16:45:22 +00:00
|
|
|
TUniqueId x26c_ = kInvalidUniqueId;
|
|
|
|
float x270_ = 0.f;
|
2017-05-21 16:01:04 +00:00
|
|
|
CPlayerEnergyDrain x274_energyDrain = CPlayerEnergyDrain(4);
|
2016-09-25 16:45:22 +00:00
|
|
|
float x288_ = 0.f;
|
2017-02-18 02:19:50 +00:00
|
|
|
float x28c_sjTimer = 0.f;
|
2016-09-25 16:45:22 +00:00
|
|
|
float x290_ = 0.f;
|
|
|
|
float x294_ = 0.f;
|
|
|
|
u32 x298_ = 0;
|
|
|
|
float x29c_ = 0.f;
|
|
|
|
float x2a0_ = 0.f;
|
|
|
|
u8 x2a4_ = 0;
|
|
|
|
float x2a8_ = 1000.f;
|
2017-06-12 04:23:34 +00:00
|
|
|
EPlayerMovementSurface x2ac_movementSurface = EPlayerMovementSurface::Normal;
|
2016-09-25 16:45:22 +00:00
|
|
|
u32 x2b0_ = 2;
|
2017-06-18 01:58:13 +00:00
|
|
|
rstl::reserved_vector<float, 6> x2b4_;
|
2016-09-25 16:45:22 +00:00
|
|
|
u32 x2d0_ = 3;
|
|
|
|
float x2d4_ = 0.f;
|
|
|
|
zeus::CAABox x2d8_;
|
2017-06-18 01:58:13 +00:00
|
|
|
float x2f0_ballTransHeight = 0.f;
|
2017-03-24 05:30:16 +00:00
|
|
|
EPlayerCameraState x2f4_cameraState = EPlayerCameraState::Zero;
|
2017-01-15 03:59:37 +00:00
|
|
|
EPlayerMorphBallState x2f8_morphTransState = EPlayerMorphBallState::Unmorphed;
|
2016-09-25 16:45:22 +00:00
|
|
|
u32 x2fc_ = 0;
|
2017-06-12 04:23:34 +00:00
|
|
|
float x300_fallingTime = 0.f;
|
2017-04-03 01:39:23 +00:00
|
|
|
EPlayerOrbitState x304_orbitState = EPlayerOrbitState::Zero;
|
2017-06-12 04:23:34 +00:00
|
|
|
EPlayerOrbitType x308_orbitType = EPlayerOrbitType::Zero;
|
|
|
|
EPlayerOrbitRequest x30c_orbitRequest = EPlayerOrbitRequest::Three;
|
|
|
|
TUniqueId x310_orbitTargetId = kInvalidUniqueId;
|
|
|
|
zeus::CVector3f x314_orbitPoint;
|
|
|
|
zeus::CVector3f x320_orbitVector;
|
2016-09-25 16:45:22 +00:00
|
|
|
float x32c_ = 0.f;
|
2017-05-30 03:45:31 +00:00
|
|
|
EPlayerZoneInfo x330_orbitZone = EPlayerZoneInfo::Zero;
|
|
|
|
EPlayerZoneType x334_orbitType = EPlayerZoneType::Ellipse;
|
2016-09-25 16:45:22 +00:00
|
|
|
u32 x338_ = 1;
|
|
|
|
TUniqueId x33c_ = kInvalidUniqueId;
|
|
|
|
float x340_ = 0.f;
|
2017-05-30 03:45:31 +00:00
|
|
|
std::vector<TUniqueId> x344_nearbyOrbitObjects;
|
|
|
|
std::vector<TUniqueId> x354_onScreenOrbitObjects;
|
|
|
|
std::vector<TUniqueId> x364_offScreenOrbitObjects;
|
2016-09-25 16:45:22 +00:00
|
|
|
bool x374_ = false;
|
|
|
|
float x378_ = 0.f;
|
|
|
|
u8 x37c_ = 0;
|
|
|
|
float x380_ = 0.f;
|
|
|
|
float x384_ = 0.f;
|
|
|
|
float x388_ = 0.f;
|
2017-02-12 03:17:18 +00:00
|
|
|
bool x38c_ = false;
|
2017-06-12 04:23:34 +00:00
|
|
|
u32 x390_orbitSource = 2;
|
2016-09-25 16:45:22 +00:00
|
|
|
u8 x394_ = 0;
|
|
|
|
float x398_ = 1.5f;
|
|
|
|
u8 x39c_ = 0;
|
|
|
|
float x3a0_ = 0.5f;
|
|
|
|
float x3a4_ = 0.449f;
|
2017-04-03 01:39:23 +00:00
|
|
|
EPlayerScanState x3a8_scanState = EPlayerScanState::NotScanning;
|
2017-04-02 03:03:37 +00:00
|
|
|
float x3ac_scanningTime = 0.f;
|
2016-09-25 16:45:22 +00:00
|
|
|
float x3b0_ = 0.f;
|
2017-04-02 03:03:37 +00:00
|
|
|
TUniqueId x3b4_scanningObject = kInvalidUniqueId;
|
2016-09-25 16:45:22 +00:00
|
|
|
u32 x3b8_ = 0;
|
|
|
|
float x3bc_ = 0.f;
|
|
|
|
float x3c0_ = 1.0f;
|
|
|
|
float x3c4_ = 0.f;
|
|
|
|
float x3c8_ = 0.f;
|
|
|
|
float x3cc_ = 0.f;
|
|
|
|
float x3d0_ = 0.f;
|
|
|
|
float x3d4_ = 0.f;
|
|
|
|
float x3d8_ = 0.f;
|
2017-04-07 05:35:09 +00:00
|
|
|
bool x3dc_inFreeLook = 0;
|
2016-09-25 16:45:22 +00:00
|
|
|
bool x3dd_ = 0;
|
2017-04-07 05:35:09 +00:00
|
|
|
bool x3de_lookControlHeld = 0;
|
2017-02-12 03:17:18 +00:00
|
|
|
float x3e4_ = 0.f;
|
|
|
|
float x3e8_ = 0.f;
|
|
|
|
float x3ec_ = 0.f;
|
2016-09-25 16:45:22 +00:00
|
|
|
float x3f0_ = 0.f;
|
2017-05-30 03:45:31 +00:00
|
|
|
TUniqueId x3f4_aimTarget = kInvalidUniqueId;
|
|
|
|
zeus::CVector3f x3f8_targetAimPosition = zeus::CVector3f::skZero;
|
|
|
|
TReservedAverage<zeus::CVector3f, 20> x404_aimTargetAverage;
|
|
|
|
zeus::CVector3f x480_assistedTargetAim = zeus::CVector3f::skZero;
|
2016-09-25 16:45:22 +00:00
|
|
|
float x48c_ = 0.f;
|
2016-08-14 21:11:44 +00:00
|
|
|
std::unique_ptr<CPlayerGun> x490_gun;
|
2017-03-20 05:09:53 +00:00
|
|
|
float x494_mapAlpha = 1.f;
|
2017-06-12 04:23:34 +00:00
|
|
|
float x49c_gunNotFiringTimeout;
|
|
|
|
std::unique_ptr<CInputFilter> x4a0_inputFilter;
|
2016-09-25 16:45:22 +00:00
|
|
|
u32 x4a4_ = 0;
|
2017-02-12 03:17:18 +00:00
|
|
|
float x4f8_ = 0.f;
|
|
|
|
float x4fc_ = 0.f;
|
2017-06-18 01:58:13 +00:00
|
|
|
zeus::CVector3f x500_ = x34_transform.basis[1];
|
|
|
|
zeus::CVector3f x50c_ = x34_transform.basis[1];
|
|
|
|
zeus::CVector3f x518_ = x34_transform.basis[1];
|
|
|
|
zeus::CVector3f x524_ = x34_transform.basis[1];
|
|
|
|
zeus::CVector3f x530_ = x34_transform.basis[1];
|
|
|
|
zeus::CVector3f x53c_ = x34_transform.basis[1];
|
|
|
|
zeus::CVector3f x548_ = x34_transform.basis[1];
|
|
|
|
float x554_ = x34_transform.basis[1].x;
|
2017-02-12 03:17:18 +00:00
|
|
|
bool x558_ = false;
|
|
|
|
float x55c_ = 0.f;
|
|
|
|
float x560_ = 0.f;
|
2016-09-25 16:45:22 +00:00
|
|
|
zeus::CVector3f x564_;
|
2017-02-12 03:17:18 +00:00
|
|
|
float x570_ = 0.f;
|
2017-03-06 06:33:51 +00:00
|
|
|
float x574_morphTime = 0.f;
|
|
|
|
float x578_morphDuration = 0.f;
|
2017-02-12 03:17:18 +00:00
|
|
|
u32 x57c_ = 0;
|
|
|
|
u32 x580_ = 0;
|
|
|
|
float x588_alpha = 1.f;
|
|
|
|
u32 x594_ = 0;
|
|
|
|
u32 x658_ = 0;
|
|
|
|
u32 x71c_ = 0;
|
2017-06-12 04:23:34 +00:00
|
|
|
std::vector<std::unique_ptr<CModelData>> x730_;
|
2017-02-12 03:17:18 +00:00
|
|
|
float x740_ = 0.f;
|
|
|
|
float x744_ = 0.f;
|
|
|
|
float x748_ = 0.f;
|
2017-05-18 19:27:21 +00:00
|
|
|
float x74c_visorStaticAlpha = 1.f;
|
2017-02-12 03:17:18 +00:00
|
|
|
float x750_ = 0.f;
|
|
|
|
u32 x754_ = 0;
|
|
|
|
float x758_ = 0.f;
|
|
|
|
u32 x75c_ = 0;
|
2017-06-12 04:23:34 +00:00
|
|
|
bool x760_controlsFrozen = false;
|
|
|
|
float x764_controlsFrozenTimeout = 0.f;
|
2016-07-22 19:46:30 +00:00
|
|
|
std::unique_ptr<CMorphBall> x768_morphball;
|
2016-09-15 07:26:35 +00:00
|
|
|
std::unique_ptr<CPlayerCameraBob> x76c_cameraBob;
|
2016-09-25 16:45:22 +00:00
|
|
|
CSfxHandle x770_;
|
2017-02-12 03:17:18 +00:00
|
|
|
float x774_ = 0.f;
|
|
|
|
u32 x778_ = 0;
|
2017-06-12 04:23:34 +00:00
|
|
|
CSfxHandle x77c_samusVoiceSfx;
|
|
|
|
int x780_samusVoicePriority = 0;
|
2017-02-12 03:17:18 +00:00
|
|
|
float x784_ = 0.f;
|
|
|
|
u16 x788_ = 0;
|
|
|
|
float x78c_ = 0.f;
|
|
|
|
u32 x790_ = 0;
|
|
|
|
zeus::CVector3f x794_;
|
|
|
|
CVisorSteam x7a0_visorSteam = CVisorSteam(0.f, 0.f, 0.f, -1);
|
|
|
|
ResId x7cc_ = -1;
|
|
|
|
CAnimRes x7d0_animRes;
|
2017-06-18 01:58:13 +00:00
|
|
|
CPlayerState::EBeamId x7ec_beam = CPlayerState::EBeamId::Power;
|
2017-02-12 03:17:18 +00:00
|
|
|
std::unique_ptr<CModelData> x7f0_ballTransitionBeamModel;
|
|
|
|
zeus::CTransform x7f4_;
|
|
|
|
float x824_ = 0.f;
|
2017-06-12 04:23:34 +00:00
|
|
|
float x828_waterLevelOnPlayer = 0.f;
|
2017-02-12 03:17:18 +00:00
|
|
|
bool x82c_ = false;
|
2017-06-12 04:23:34 +00:00
|
|
|
TUniqueId x82e_ridingPlatform = kInvalidUniqueId;
|
2017-02-12 03:17:18 +00:00
|
|
|
TUniqueId x830_ = kInvalidUniqueId;
|
|
|
|
u32 x834_ = 1000;
|
|
|
|
u32 x838_ = 0;
|
|
|
|
u32 x93c_ = 0;
|
|
|
|
u32 x980_ = 0;
|
|
|
|
|
|
|
|
union
|
|
|
|
{
|
|
|
|
struct
|
|
|
|
{
|
|
|
|
bool x9c4_24_ : 1;
|
|
|
|
bool x9c4_25_ : 1;
|
|
|
|
bool x9c4_26_ : 1;
|
|
|
|
bool x9c4_27_ : 1;
|
|
|
|
bool x9c4_28_ : 1;
|
|
|
|
bool x9c4_29_ : 1;
|
|
|
|
bool x9c4_30_ : 1;
|
2017-06-19 07:00:50 +00:00
|
|
|
bool x9c4_31_dampUnderwaterMotion : 1;
|
2017-02-12 03:17:18 +00:00
|
|
|
bool x9c5_24_ : 1;
|
2017-06-12 04:23:34 +00:00
|
|
|
bool x9c5_25_splashUpdated : 1;
|
2017-02-12 03:17:18 +00:00
|
|
|
bool x9c5_26_ : 1;
|
|
|
|
bool x9c5_27_ : 1;
|
2017-06-19 07:00:50 +00:00
|
|
|
bool x9c5_28_slidingOnWall : 1;
|
|
|
|
bool x9c5_29_hitWall : 1;
|
2017-02-12 03:17:18 +00:00
|
|
|
bool x9c5_30_ : 1;
|
|
|
|
bool x9c5_31_ : 1;
|
|
|
|
bool x9c6_24_ : 1;
|
|
|
|
bool x9c6_25_ : 1;
|
|
|
|
bool x9c6_26_ : 1;
|
2017-05-30 03:45:31 +00:00
|
|
|
bool x9c6_27_aimingAtProjectile : 1;
|
2017-02-12 03:17:18 +00:00
|
|
|
bool x9c6_28_ : 1;
|
2017-03-24 05:30:16 +00:00
|
|
|
bool x9c6_29_disableInput : 1;
|
2017-04-02 03:03:37 +00:00
|
|
|
bool x9c6_30_newScanScanning : 1;
|
2017-04-07 05:35:09 +00:00
|
|
|
bool x9c6_31_overrideRadarRadius : 1;
|
2017-02-12 03:17:18 +00:00
|
|
|
bool x9c7_24_ : 1;
|
|
|
|
bool x9c7_25_ : 1;
|
|
|
|
};
|
|
|
|
u32 _dummy = 0;
|
|
|
|
};
|
|
|
|
|
|
|
|
float x9c8_ = 0.f;
|
|
|
|
float x9cc_ = 0.f;
|
|
|
|
u32 x9d0_ = 0;
|
|
|
|
u32 x9d4_ = 0;
|
|
|
|
float x9d8_ = 0.f;
|
|
|
|
float x9dc_ = 1.f;
|
|
|
|
float x9e0_ = 0.f;
|
2017-05-30 03:45:31 +00:00
|
|
|
rstl::reserved_vector<TUniqueId, 5> x9e4_orbitDisableList;
|
2017-02-12 03:17:18 +00:00
|
|
|
|
2017-03-26 19:36:07 +00:00
|
|
|
float x9f4_deathTime = 0.f;
|
2017-02-12 03:17:18 +00:00
|
|
|
float x9f8_ = 0.f;
|
|
|
|
float x9fc_ = 0.f;
|
|
|
|
TUniqueId xa00_ = kInvalidUniqueId;
|
|
|
|
float xa04_ = 0.f;
|
|
|
|
ResId xa08_steamTextureId = -1;
|
2016-09-25 16:45:22 +00:00
|
|
|
ResId xa0c_;
|
2017-06-12 04:23:34 +00:00
|
|
|
u32 xa10_phazonCounter = 0;
|
2017-02-12 03:17:18 +00:00
|
|
|
float xa14_ = 0.f;
|
|
|
|
float xa18_ = 0.f;
|
2017-04-09 06:14:22 +00:00
|
|
|
float xa1c_threatOverride = 0.f;
|
2017-04-07 05:35:09 +00:00
|
|
|
float xa20_radarXYRadiusOverride = 1.f;
|
|
|
|
float xa24_radarZRadiusOverride = 1.f;
|
2017-02-12 03:17:18 +00:00
|
|
|
float xa28_ = 0.f;
|
|
|
|
u32 xa2c_ = 2;
|
|
|
|
float xa30_ = 4.f;
|
2016-12-19 18:27:58 +00:00
|
|
|
|
2017-06-12 04:23:34 +00:00
|
|
|
void StartLandingControlFreeze();
|
|
|
|
void EndLandingControlFreeze();
|
|
|
|
void ProcessFrozenInput(float dt, CStateManager& mgr);
|
|
|
|
bool CheckSubmerged() const;
|
|
|
|
void UpdateSubmerged(CStateManager& mgr);
|
2017-06-18 01:58:13 +00:00
|
|
|
void InitializeBallTransition();
|
2017-06-12 04:23:34 +00:00
|
|
|
|
2016-07-22 19:46:30 +00:00
|
|
|
public:
|
2017-06-18 01:58:13 +00:00
|
|
|
CPlayer(TUniqueId, const zeus::CTransform&, const zeus::CAABox&, ResId w1, const zeus::CVector3f&, float, float,
|
2016-12-19 18:27:58 +00:00
|
|
|
float, float, const CMaterialList&);
|
2016-08-14 21:11:44 +00:00
|
|
|
|
2016-08-15 01:19:04 +00:00
|
|
|
bool IsTransparent() const;
|
|
|
|
void Update(float, CStateManager& mgr);
|
2017-06-12 04:23:34 +00:00
|
|
|
bool StartSamusVoiceSfx(u16 sfx, float vol, int prio);
|
2016-08-15 01:19:04 +00:00
|
|
|
bool IsPlayerDeadEnough() const;
|
|
|
|
void AsyncLoadSuit(CStateManager& mgr);
|
|
|
|
void LoadAnimationTokens();
|
2016-08-31 00:33:59 +00:00
|
|
|
virtual bool CanRenderUnsorted(CStateManager& mgr) const;
|
2016-12-19 18:27:58 +00:00
|
|
|
virtual const CDamageVulnerability* GetDamageVulnerability(const zeus::CVector3f& v1, const zeus::CVector3f& v2,
|
|
|
|
const CDamageInfo& info) const;
|
2016-08-31 00:33:59 +00:00
|
|
|
virtual const CDamageVulnerability* GetDamageVulnerability() const;
|
|
|
|
virtual zeus::CVector3f GetHomingPosition(CStateManager& mgr, float) const;
|
2016-08-15 01:19:04 +00:00
|
|
|
zeus::CVector3f GetAimPosition(CStateManager& mgr, float) const;
|
2016-08-31 00:33:59 +00:00
|
|
|
virtual void FluidFXThink(CActor::EFluidState, CScriptWater& water, CStateManager& mgr);
|
2016-08-15 01:19:04 +00:00
|
|
|
zeus::CVector3f GetDamageLocationWR() const;
|
|
|
|
float GetPrevDamageAmount() const;
|
|
|
|
float GetDamageAmount() const;
|
|
|
|
bool WasDamaged() const;
|
|
|
|
void TakeDamage(bool, const zeus::CVector3f&, float, EWeaponType, CStateManager& mgr);
|
|
|
|
void Accept(IVisitor& visitor);
|
2017-04-02 03:03:37 +00:00
|
|
|
static CHealthInfo* HealthInfo(const CStateManager& mgr);
|
2016-08-15 01:19:04 +00:00
|
|
|
bool IsUnderBetaMetroidAttack(CStateManager& mgr) const;
|
|
|
|
rstl::optional_object<zeus::CAABox> GetTouchBounds() const;
|
|
|
|
void Touch(CActor&, CStateManager& mgr);
|
2017-03-24 05:30:16 +00:00
|
|
|
void DoPreThink(float dt, CStateManager& mgr);
|
2017-03-26 05:53:04 +00:00
|
|
|
void DoThink(float dt, CStateManager& mgr);
|
2016-08-15 01:19:04 +00:00
|
|
|
void UpdateScanningState(const CFinalInput& input, CStateManager& mgr, float);
|
|
|
|
void ValidateScanning(const CFinalInput& input, CStateManager& mgr);
|
|
|
|
void SetScanningState(EPlayerScanState, CStateManager& mgr);
|
2017-01-07 01:58:05 +00:00
|
|
|
void SetSpawnedMorphBallState(EPlayerMorphBallState, CStateManager&);
|
2016-08-15 01:19:04 +00:00
|
|
|
bool GetExplorationMode() const;
|
|
|
|
bool GetCombatMode() const;
|
2017-03-06 06:33:51 +00:00
|
|
|
void RenderGun(const CStateManager& mgr, const zeus::CVector3f&) const;
|
|
|
|
void Render(const CStateManager& mgr) const;
|
2016-08-15 01:19:04 +00:00
|
|
|
void RenderReflectedPlayer(CStateManager& mgr) const;
|
|
|
|
void PreRender(CStateManager& mgr, const zeus::CFrustum&);
|
2016-11-20 21:53:15 +00:00
|
|
|
void CalculateRenderBounds();
|
2017-03-04 04:31:08 +00:00
|
|
|
void AddToRenderer(const zeus::CFrustum&, const CStateManager&);
|
2016-08-15 01:19:04 +00:00
|
|
|
void ComputeFreeLook(const CFinalInput& input);
|
|
|
|
void UpdateFreeLook(float dt);
|
|
|
|
float GetMaximumPlayerPositiveVerticalVelocity(CStateManager&) const;
|
|
|
|
void ProcessInput(const CFinalInput&, CStateManager&);
|
2017-03-29 02:51:12 +00:00
|
|
|
void Stop(CStateManager& stateMgr);
|
2016-08-15 01:19:04 +00:00
|
|
|
bool GetFrozenState() const;
|
|
|
|
void Think(float, CStateManager&);
|
|
|
|
void PreThink(float, CStateManager&);
|
|
|
|
void AcceptScriptMsg(EScriptObjectMessage, TUniqueId, CStateManager&);
|
|
|
|
void SetVisorSteam(float, float, float, u32, bool);
|
|
|
|
void UpdateFootstepBounds(const CFinalInput& input, CStateManager&, float);
|
2017-06-12 04:23:34 +00:00
|
|
|
u16 GetMaterialSoundUnderPlayer(CStateManager& mgr, const u16*, u32, u16);
|
2016-12-26 07:58:44 +00:00
|
|
|
u16 SfxIdFromMaterial(const CMaterialList&, const u16*, u32, u16);
|
2016-08-15 01:19:04 +00:00
|
|
|
void UpdateCrosshairsState(const CFinalInput&);
|
|
|
|
void UpdateVisorTransition(float, CStateManager& mgr);
|
|
|
|
void UpdateVisorState(const CFinalInput&, float, CStateManager& mgr);
|
|
|
|
void ForceGunOrientation(const zeus::CTransform&, CStateManager& mgr);
|
|
|
|
void UpdateDebugCamera(CStateManager& mgr);
|
|
|
|
CFirstPersonCamera& GetFirstPersonCamera(CStateManager& mgr);
|
|
|
|
void UpdateGunTransform(const zeus::CVector3f&, float, CStateManager& mgr, bool);
|
2017-05-30 03:45:31 +00:00
|
|
|
void UpdateAssistedAiming(const zeus::CTransform& xf, const CStateManager& mgr);
|
|
|
|
void UpdateAimTargetPrediction(const zeus::CTransform& xf, const CStateManager& mgr);
|
|
|
|
void ResetAimTargetPrediction(TUniqueId target);
|
2016-08-15 01:19:04 +00:00
|
|
|
void DrawGun(CStateManager& mgr);
|
|
|
|
void HolsterGun(CStateManager& mgr);
|
2017-05-21 16:01:04 +00:00
|
|
|
EPlayerCameraState GetCameraState() const { return x2f4_cameraState; }
|
2017-04-02 03:03:37 +00:00
|
|
|
EPlayerMorphBallState GetMorphballTransitionState() const { return x2f8_morphTransState; }
|
2016-08-15 01:19:04 +00:00
|
|
|
void UpdateGrappleArmTransform(const zeus::CVector3f&, CStateManager& mgr, float);
|
|
|
|
void ApplyGrappleForces(const CFinalInput& input, CStateManager& mgr, float);
|
|
|
|
bool ValidateFPPosition(const zeus::CVector3f& pos, CStateManager& mgr);
|
|
|
|
void UpdateGrappleState(const CFinalInput& input, CStateManager& mgr);
|
|
|
|
void ApplyGrappleJump(CStateManager& mgr);
|
|
|
|
void BeginGrapple(zeus::CVector3f&, CStateManager& mgr);
|
|
|
|
void BreakGrapple(CStateManager& mgr);
|
2017-06-12 04:23:34 +00:00
|
|
|
void SetOrbitRequest(EPlayerOrbitRequest req, CStateManager& mgr);
|
2016-08-15 01:19:04 +00:00
|
|
|
void PreventFallingCameraPitch();
|
|
|
|
void OrbitCarcass(CStateManager&);
|
|
|
|
void OrbitPoint(EPlayerOrbitType, CStateManager& mgr);
|
|
|
|
zeus::CVector3f GetHUDOrbitTargetPosition() const;
|
|
|
|
void SetOrbitState(EPlayerOrbitState, CStateManager& mgr);
|
2017-05-30 03:45:31 +00:00
|
|
|
void SetOrbitTargetId(TUniqueId, CStateManager& mgr);
|
2016-08-15 01:19:04 +00:00
|
|
|
void UpdateOrbitPosition(float, CStateManager& mgr);
|
|
|
|
void UpdateOrbitZPosition();
|
|
|
|
void UpdateOrbitFixedPosition();
|
|
|
|
void SetOrbitPosition(float, CStateManager& mgr);
|
|
|
|
void UpdateAimTarget(CStateManager& mgr);
|
|
|
|
void UpdateAimTargetTimer(float);
|
|
|
|
bool ValidateAimTargetId(TUniqueId, CStateManager& mgr);
|
|
|
|
bool ValidateObjectForMode(TUniqueId, CStateManager& mgr) const;
|
|
|
|
TUniqueId FindAimTargetId(CStateManager& mgr);
|
2016-12-19 18:27:58 +00:00
|
|
|
TUniqueId CheckEnemiesAgainstOrbitZone(const std::vector<TUniqueId>&, EPlayerZoneInfo, EPlayerZoneType,
|
|
|
|
CStateManager& mgr) const;
|
2016-08-15 01:19:04 +00:00
|
|
|
TUniqueId FindOrbitTargetId(CStateManager& mgr);
|
|
|
|
void UpdateOrbitableObjects(CStateManager& mgr);
|
|
|
|
TUniqueId FindBestOrbitableObject(const std::vector<TUniqueId>&, EPlayerZoneInfo, CStateManager& mgr) const;
|
2017-05-30 03:45:31 +00:00
|
|
|
void FindOrbitableObjects(const rstl::reserved_vector<TUniqueId, 1024>&, std::vector<TUniqueId>&,
|
|
|
|
EPlayerZoneInfo, EPlayerZoneType, CStateManager& mgr, bool) const;
|
2016-08-15 01:19:04 +00:00
|
|
|
bool WithinOrbitScreenBox(const zeus::CVector3f&, EPlayerZoneInfo, EPlayerZoneType) const;
|
|
|
|
bool WithinOrbitScreenEllipse(const zeus::CVector3f&, EPlayerZoneInfo) const;
|
2017-05-30 03:45:31 +00:00
|
|
|
bool CheckOrbitDisableSourceList(CStateManager& mgr);
|
|
|
|
bool CheckOrbitDisableSourceList() const { return x9e4_orbitDisableList.size() != 0; }
|
2016-08-15 01:19:04 +00:00
|
|
|
void RemoveOrbitDisableSource(TUniqueId);
|
|
|
|
void AddOrbitDisableSource(CStateManager& mgr, TUniqueId);
|
|
|
|
void UpdateOrbitPreventionTimer(float);
|
|
|
|
void UpdateOrbitModeTimer(float);
|
|
|
|
void UpdateOrbitZone(CStateManager& mgr);
|
|
|
|
void UpdateOrbitInput(const CFinalInput& input, CStateManager& mgr);
|
2017-06-12 04:23:34 +00:00
|
|
|
void ActivateOrbitSource(CStateManager& mgr);
|
2016-08-15 01:19:04 +00:00
|
|
|
void UpdateOrbitSelection(const CFinalInput& input, CStateManager& mgr);
|
|
|
|
void UpdateOrbitOrientation(CStateManager& mgr);
|
|
|
|
void UpdateOrbitTarget(CStateManager& mgr);
|
|
|
|
float GetOrbitMaxLockDistance(CStateManager& mgr) const;
|
|
|
|
float GetOrbitMaxTargetDistance(CStateManager& mgr) const;
|
|
|
|
bool ValidateOrbitTargetId(TUniqueId, CStateManager& mgr) const;
|
|
|
|
bool ValidateCurrentOrbitTargetId(CStateManager& mgr);
|
|
|
|
bool ValidateOrbitTargetIdAndPointer(TUniqueId, CStateManager& mgr) const;
|
|
|
|
zeus::CVector3f GetBallPosition() const;
|
|
|
|
zeus::CVector3f GetEyePosition() const;
|
|
|
|
float GetEyeHeight() const;
|
|
|
|
float GetStepUpHeight() const;
|
|
|
|
float GetStepDownHeight() const;
|
2016-08-14 21:11:44 +00:00
|
|
|
void Teleport(const zeus::CTransform& xf, CStateManager& mgr, bool);
|
2017-03-29 02:51:12 +00:00
|
|
|
void BombJump(const zeus::CVector3f& pos, CStateManager& mgr);
|
2016-08-15 01:19:04 +00:00
|
|
|
zeus::CTransform CreateTransformFromMovementDirection() const;
|
2017-03-03 22:13:23 +00:00
|
|
|
const CCollisionPrimitive* GetCollisionPrimitive() const;
|
2016-08-15 01:19:04 +00:00
|
|
|
zeus::CTransform GetPrimitiveTransform() const;
|
2017-06-18 01:58:13 +00:00
|
|
|
void CollidedWith(TUniqueId, const CCollisionInfoList&, CStateManager& mgr);
|
2016-08-15 01:19:04 +00:00
|
|
|
float GetActualFirstPersonMaxVelocity() const;
|
|
|
|
void SetMoveState(EPlayerMovementState, CStateManager& mgr);
|
|
|
|
float JumpInput(const CFinalInput& input, CStateManager& mgr);
|
|
|
|
float TurnInput(const CFinalInput& input) const;
|
|
|
|
float StrafeInput(const CFinalInput& input) const;
|
|
|
|
float ForwardInput(const CFinalInput& input, float) const;
|
|
|
|
void ComputeMovement(const CFinalInput& input, CStateManager& mgr, float);
|
|
|
|
float GetWeight() const;
|
|
|
|
float GetDampedClampedVelocityWR() const;
|
2017-02-12 03:17:18 +00:00
|
|
|
const CVisorSteam& GetVisorSteam() const { return x7a0_visorSteam; }
|
2017-05-18 19:27:21 +00:00
|
|
|
float GetVisorStaticAlpha() const { return x74c_visorStaticAlpha; }
|
2017-03-20 05:09:53 +00:00
|
|
|
float GetMapAlpha() const { return x494_mapAlpha; }
|
2017-02-18 02:19:50 +00:00
|
|
|
void UpdateCinematicState(CStateManager& mgr);
|
2017-03-24 05:30:16 +00:00
|
|
|
void SetCameraState(EPlayerCameraState camState, CStateManager& stateMgr);
|
2017-04-02 03:03:37 +00:00
|
|
|
bool IsEnergyLow(const CStateManager& mgr) const;
|
2017-04-03 01:39:23 +00:00
|
|
|
EPlayerOrbitState GetOrbitState() const { return x304_orbitState; }
|
2017-04-02 03:03:37 +00:00
|
|
|
EPlayerScanState GetScanningState() const { return x3a8_scanState; }
|
|
|
|
float GetScanningTime() const { return x3ac_scanningTime; }
|
2017-06-12 04:23:34 +00:00
|
|
|
TUniqueId GetOrbitTargetId() const { return x310_orbitTargetId; }
|
2017-04-02 03:03:37 +00:00
|
|
|
TUniqueId GetScanningObjectId() const { return x3b4_scanningObject; }
|
|
|
|
bool IsNewScanScanning() const { return x9c6_30_newScanScanning; }
|
2017-04-09 06:14:22 +00:00
|
|
|
float GetThreatOverride() const { return xa1c_threatOverride; }
|
2017-04-07 05:35:09 +00:00
|
|
|
bool IsOverrideRadarRadius() const { return x9c6_31_overrideRadarRadius; }
|
|
|
|
float GetRadarXYRadiusOverride() const { return xa20_radarXYRadiusOverride; }
|
|
|
|
float GetRadarZRadiusOverride() const { return xa24_radarZRadiusOverride; }
|
2017-04-02 03:03:37 +00:00
|
|
|
bool ObjectInScanningRange(TUniqueId id, const CStateManager& mgr) const;
|
2017-04-03 01:39:23 +00:00
|
|
|
float GetMorphTime() const { return x574_morphTime; }
|
|
|
|
float GetMorphDuration() const { return x578_morphDuration; }
|
2017-04-07 05:35:09 +00:00
|
|
|
bool IsInFreeLook() const { return x3dc_inFreeLook; }
|
|
|
|
bool IsLookControlHeld() const { return x3de_lookControlHeld; }
|
2017-02-18 02:19:50 +00:00
|
|
|
CPlayerGun* GetPlayerGun() const { return x490_gun.get(); }
|
|
|
|
CMorphBall* GetMorphBall() const { return x768_morphball.get(); }
|
2017-04-09 06:14:22 +00:00
|
|
|
CPlayerCameraBob* GetCameraBob() const { return x76c_cameraBob.get(); }
|
2017-05-21 16:01:04 +00:00
|
|
|
float GetDeathTime() const { return x9f4_deathTime; }
|
|
|
|
const CPlayerEnergyDrain& GetEnergyDrain() const { return x274_energyDrain; }
|
2017-05-30 03:45:31 +00:00
|
|
|
EPlayerZoneInfo GetOrbitZone() const { return x330_orbitZone; }
|
|
|
|
EPlayerZoneType GetOrbitType() const { return x334_orbitType; }
|
|
|
|
const zeus::CTransform& GetFirstPersonCameraTransform(const CStateManager& mgr) const;
|
|
|
|
const std::vector<TUniqueId>& GetNearbyOrbitObjects() const { return x344_nearbyOrbitObjects; }
|
|
|
|
const std::vector<TUniqueId>& GetOnScreenOrbitObjects() const { return x354_onScreenOrbitObjects; }
|
|
|
|
const std::vector<TUniqueId>& GetOffScreenOrbitObjects() const { return x364_offScreenOrbitObjects; }
|
2017-06-19 07:00:50 +00:00
|
|
|
void SetPlayerHitWallDuringMove();
|
2016-09-16 22:21:19 +00:00
|
|
|
|
2016-09-25 16:45:22 +00:00
|
|
|
void Touch();
|
2017-01-15 03:59:37 +00:00
|
|
|
|
|
|
|
void DecrementPhazon();
|
|
|
|
void IncrementPhazon();
|
2017-06-12 04:23:34 +00:00
|
|
|
void ApplySubmergedPitchBend(CSfxHandle& sfx);
|
2016-07-22 19:46:30 +00:00
|
|
|
};
|
|
|
|
}
|
|
|
|
|
|
|
|
#endif // __URDE_CPLAYER_HPP__
|