2016-07-22 19:46:30 +00:00
|
|
|
#ifndef __URDE_CMORPHBALL_HPP__
|
|
|
|
#define __URDE_CMORPHBALL_HPP__
|
|
|
|
|
2016-07-22 22:22:36 +00:00
|
|
|
#include "World/CActor.hpp"
|
|
|
|
#include "World/ScriptObjectSupport.hpp"
|
|
|
|
#include "zeus/CVector3f.hpp"
|
|
|
|
#include "Collision/CCollidableSphere.hpp"
|
|
|
|
#include "RetroTypes.hpp"
|
|
|
|
|
2016-07-22 19:46:30 +00:00
|
|
|
namespace urde
|
|
|
|
{
|
2016-07-22 22:22:36 +00:00
|
|
|
class CActorLights;
|
2016-07-22 19:46:30 +00:00
|
|
|
class CPlayer;
|
2016-07-22 22:22:36 +00:00
|
|
|
class CDamageInfo;
|
|
|
|
class CFinalInput;
|
|
|
|
class CScriptWater;
|
|
|
|
class CStateManager;
|
2017-03-06 06:33:51 +00:00
|
|
|
class CMorphBallShadow;
|
2016-07-22 19:46:30 +00:00
|
|
|
|
|
|
|
class CMorphBall
|
|
|
|
{
|
2016-07-22 22:22:36 +00:00
|
|
|
public:
|
|
|
|
enum class EBallBoostState
|
|
|
|
{
|
|
|
|
Zero
|
|
|
|
};
|
|
|
|
|
|
|
|
enum class ESpiderBallState
|
|
|
|
{
|
|
|
|
Zero
|
|
|
|
};
|
2017-08-19 06:52:13 +00:00
|
|
|
|
|
|
|
enum class EBombJumpState
|
|
|
|
{
|
|
|
|
Zero,
|
|
|
|
One
|
|
|
|
};
|
2016-07-22 22:22:36 +00:00
|
|
|
private:
|
2016-07-22 19:46:30 +00:00
|
|
|
CPlayer& x0_player;
|
2017-07-31 05:19:05 +00:00
|
|
|
std::unique_ptr<CModelData> x58_ballModel;
|
|
|
|
u32 x5c_ballModelShader = 0;
|
|
|
|
std::unique_ptr<CModelData> x60_spiderBallGlassModel;
|
|
|
|
u32 x64_spiderBallGlassModelShader = 0;
|
|
|
|
std::unique_ptr<CModelData> x68_lowPolyBallModel;
|
|
|
|
u32 x6c_lowPolyBallModelShader = 0;
|
|
|
|
std::unique_ptr<CModelData> x70_frozenBallModel;
|
|
|
|
u32 x74_frozenBallModelShader = 0;
|
2017-06-12 04:23:34 +00:00
|
|
|
u32 x187c_ = 0;
|
2017-08-02 07:13:11 +00:00
|
|
|
float x1914_ = 0.f;
|
|
|
|
float x1918_ = 0.f;
|
2017-07-05 18:34:12 +00:00
|
|
|
float x191c_damageTimer = 0.f;
|
2017-08-02 07:13:11 +00:00
|
|
|
bool x1920_ = false;
|
|
|
|
zeus::CTransform x1924_;
|
|
|
|
bool x1954_isProjectile = false;
|
|
|
|
u32 x195c_ = false;
|
|
|
|
u32 x1960_ = false;
|
|
|
|
u32 x1964_ = false;
|
2017-08-18 01:30:15 +00:00
|
|
|
u32 x19dc_ = false;
|
2017-08-19 06:52:13 +00:00
|
|
|
union
|
|
|
|
{
|
|
|
|
struct
|
|
|
|
{
|
|
|
|
bool x1de4_25 : 1;
|
|
|
|
};
|
|
|
|
u32 _dummy = 0;
|
|
|
|
};
|
2017-02-18 02:19:50 +00:00
|
|
|
float x1DE8_boostTime = 0.f;
|
2017-08-19 06:52:13 +00:00
|
|
|
EBombJumpState x1e40_bombJumpState = EBombJumpState::Zero;
|
2017-03-06 06:33:51 +00:00
|
|
|
CMorphBallShadow* x1e50_shadow = nullptr;
|
2016-07-22 22:22:36 +00:00
|
|
|
|
2016-07-22 19:46:30 +00:00
|
|
|
public:
|
|
|
|
CMorphBall(CPlayer& player, float);
|
2017-08-13 05:26:14 +00:00
|
|
|
void AcceptScriptMsg(EScriptObjectMessage msg, TUniqueId sender, CStateManager& mgr);
|
2016-07-22 22:22:36 +00:00
|
|
|
ESpiderBallState GetSpiderBallState() const { return ESpiderBallState::Zero; }
|
2017-08-19 06:52:13 +00:00
|
|
|
bool InSpiderMode() const { return false; }
|
2016-07-22 22:22:36 +00:00
|
|
|
zeus::CVector3f GetBallContactSurfaceNormal() const { return {}; }
|
|
|
|
void GetModel() const {}
|
2017-07-16 06:13:37 +00:00
|
|
|
const CCollidableSphere* GetCollidableSphere() const { return nullptr; }
|
2017-08-02 07:13:11 +00:00
|
|
|
bool IsProjectile() const { return x1954_isProjectile; }
|
2016-07-22 22:22:36 +00:00
|
|
|
void GetBallContactMeterials() const {}
|
|
|
|
void GetWallBumpCounter() const {}
|
|
|
|
void GetBoostChargeTimer() const {}
|
|
|
|
bool IsBoosting() const { return false; }
|
|
|
|
float GetBallRadius() const { return 0.f; }
|
|
|
|
float GetBallTouchRadius() const { return 0.f; }
|
|
|
|
void ForwardInput(const CFinalInput&) const {}
|
2017-06-12 04:23:34 +00:00
|
|
|
void ComputeBallMovement(const CFinalInput&, CStateManager&, float) {}
|
2016-07-22 22:22:36 +00:00
|
|
|
bool IsMovementAllowed() const { return false; }
|
|
|
|
void UpdateSpiderBall(const CFinalInput&, CStateManager&, float) {}
|
|
|
|
void ApplySpiderBallSwingingForces(const CFinalInput&, CStateManager&, float) {}
|
|
|
|
void ApplySpiderBallRollForces(const CFinalInput&, CStateManager&, float) {}
|
|
|
|
void CalculateSpiderBallAttractionSurfaceForces(const CFinalInput&, CStateManager&,
|
|
|
|
const zeus::CTransform&) {}
|
|
|
|
void CheckForSwitchToSpiderBallSwinging(CStateManager&) {}
|
|
|
|
void FindClosestSpiderBallWaypoint(CStateManager&, const zeus::CVector3f&, zeus::CVector3f&,
|
|
|
|
zeus::CVector3f&, zeus::CVector3f&, float&, zeus::CVector3f&, bool&,
|
|
|
|
zeus::CTransform&) const {}
|
|
|
|
void SetSpiderBallSwingingState(bool) {}
|
|
|
|
void GetSpiderBallControllerMovement(const CFinalInput&, bool, bool) {}
|
|
|
|
void ResetSpiderBallSwingControllerMovementTimer() {}
|
|
|
|
void UpdateSpiderBallSwingControllerMovementTimer(float, float) {}
|
|
|
|
float GetSpiderBallSwingControllerMovementScalar() const { return 0.f; }
|
|
|
|
void CreateSpiderBallParticles(const zeus::CVector3f&, const zeus::CVector3f&) {}
|
|
|
|
void ComputeMarioMovement(const CFinalInput&, CStateManager&, float) {}
|
|
|
|
void SetSpiderBallState(ESpiderBallState) {}
|
|
|
|
void GetSwooshToWorld() const {}
|
2017-07-31 05:19:05 +00:00
|
|
|
zeus::CTransform GetBallToWorld() const { return {}; }
|
2016-07-22 22:22:36 +00:00
|
|
|
void CalculateSurfaceToWorld(const zeus::CVector3f&, const zeus::CVector3f&, const zeus::CVector3f&) const {}
|
|
|
|
void CalculateBallContactInfo(zeus::CVector3f&, zeus::CVector3f&) const {}
|
|
|
|
void BallTurnInput(const CFinalInput&) const {}
|
|
|
|
void UpdateBallDynamics(CStateManager&, float) {}
|
|
|
|
void SwitchToMarble() {}
|
|
|
|
void SwitchToTire() {}
|
|
|
|
void Update(float, CStateManager&) {}
|
|
|
|
void UpdateScriptMessage(EScriptObjectMessage, TUniqueId, CStateManager&) {}
|
|
|
|
void DeleteLight(CStateManager&) {}
|
|
|
|
void SetBallLightActive(CStateManager&, bool) {}
|
|
|
|
void EnterMorphBallState(CStateManager&) {}
|
|
|
|
void LeaveMorphBallState(CStateManager&) {}
|
|
|
|
void UpdateEffects(float, CStateManager&) {}
|
|
|
|
void ComputeBoostBallMovement(const CFinalInput&, const CStateManager&, float) {}
|
|
|
|
void EnterBoosting() {}
|
|
|
|
void LeaveBoosting() {}
|
|
|
|
void CancelBoosting() {}
|
|
|
|
void UpdateMarbleDynamics(CStateManager&, float, const zeus::CVector3f&) {}
|
|
|
|
void ApplyFriction(float) {}
|
|
|
|
void DampLinearAndAngularVelocities(float, float) {}
|
|
|
|
zeus::CTransform GetPrimitiveTransform() const { return {}; }
|
|
|
|
void DrawCollisionPrimitive() const {}
|
|
|
|
void GetMinimumAlignmentSpeed() const {}
|
2017-07-31 05:19:05 +00:00
|
|
|
void PreRender(CStateManager&, const zeus::CFrustum&) {}
|
2016-07-22 22:22:36 +00:00
|
|
|
void Render(const CStateManager&, const CActorLights*) const {}
|
|
|
|
void ResetMorphBallTransitionFlash() {}
|
|
|
|
void UpdateMorphBallTransitionFlash(float) {}
|
|
|
|
void RenderMorphBallTransitionFlash(const CStateManager&) const {}
|
2017-08-18 01:30:15 +00:00
|
|
|
bool IsMorphBallTransitionFlashValid() const { return x19dc_ != 0; }
|
2016-07-22 22:22:36 +00:00
|
|
|
void RenderDamageEffects(const CStateManager&, const zeus::CTransform&) const {}
|
|
|
|
void UpdateHalfPipeStatus(CStateManager&, float) {}
|
2017-06-12 04:23:34 +00:00
|
|
|
bool GetIsInHalfPipeMode() const { return false; }
|
2016-07-22 22:22:36 +00:00
|
|
|
void SetIsInHalfPipeMode(bool) {}
|
|
|
|
void GetIsInHalfPipeModeInAir() const {}
|
|
|
|
void SetIsInHalfPipeModeInAir(bool) {}
|
|
|
|
void GetTouchedHalfPipeRecently() const {}
|
|
|
|
void SetTouchedHalfPipeRecently(bool) {}
|
|
|
|
void DisableHalfPipeStatus() {}
|
2017-08-20 05:23:22 +00:00
|
|
|
bool BallCloseToCollision(const CStateManager&, float, const CMaterialFilter& filter) const { return false; }
|
2017-08-06 07:15:42 +00:00
|
|
|
void CollidedWith(TUniqueId, const CCollisionInfoList&, CStateManager&) {}
|
2017-07-31 05:19:05 +00:00
|
|
|
bool IsInFrustum(const zeus::CFrustum&) const { return false; }
|
2016-07-22 22:22:36 +00:00
|
|
|
void ComputeLiftForces(const zeus::CVector3f&, const zeus::CVector3f&, const CStateManager&) {}
|
|
|
|
void CalculateSurfaceFriction() const {}
|
|
|
|
void ApplyGravity(CStateManager&) {}
|
|
|
|
void SpinToSpeed(float, zeus::CVector3f, float) {}
|
|
|
|
void ComputeMaxSpeed() const {}
|
|
|
|
void Touch(CActor&, CStateManager&) {}
|
2017-07-31 05:19:05 +00:00
|
|
|
bool IsClimbable(const CCollisionInfo&) const { return false; }
|
2016-07-22 22:22:36 +00:00
|
|
|
void FluidFXThink(CActor::EFluidState, CScriptWater&, CStateManager&) {}
|
|
|
|
void GetMorphBallModel(const std::string&, float) {}
|
2017-08-02 07:13:11 +00:00
|
|
|
void LoadMorphBallModel(CStateManager& mgr) {}
|
2016-07-22 22:22:36 +00:00
|
|
|
void AddSpiderBallElectricalEffect() {}
|
|
|
|
void UpdateSpiderBallElectricalEffect() {}
|
|
|
|
void RenderSpiderBallElectricalEffect() const {}
|
|
|
|
void RenderEnergyDrainEffects(const CStateManager&) const {}
|
|
|
|
void TouchModel(const CStateManager&) const {}
|
|
|
|
void SetAsProjectile(const CDamageInfo&, const CDamageInfo&) {}
|
|
|
|
EBallBoostState GetBallBoostState() const { return EBallBoostState::Zero; }
|
|
|
|
void SetBallBoostState(EBallBoostState) {}
|
2017-08-19 06:52:13 +00:00
|
|
|
EBombJumpState GetBombJumpState() const { return x1e40_bombJumpState; }
|
2016-07-22 22:22:36 +00:00
|
|
|
void LoadAnimationTokens(const std::string&) {}
|
|
|
|
void TakeDamage(float) {}
|
2017-03-06 06:33:51 +00:00
|
|
|
void DrawBallShadow(const CStateManager& mgr);
|
2017-07-31 05:19:05 +00:00
|
|
|
void DeleteBallShadow();
|
|
|
|
void CreateBallShadow();
|
|
|
|
void RenderToShadowTex(CStateManager& mgr);
|
2017-06-12 04:23:34 +00:00
|
|
|
void StartLandingSfx() {}
|
2017-08-18 01:30:15 +00:00
|
|
|
bool GetX187c() const { return x187c_ != 0; }
|
2017-07-05 18:34:12 +00:00
|
|
|
void SetDamageTimer(float t) { x191c_damageTimer = t; }
|
2017-07-16 06:13:37 +00:00
|
|
|
void Stop() {}
|
2017-08-16 05:34:02 +00:00
|
|
|
void StopSounds() {}
|
2017-08-19 06:52:13 +00:00
|
|
|
void ActorAttached() {}
|
2017-07-31 05:19:05 +00:00
|
|
|
CModelData& GetMorphballModelData() const { return *x58_ballModel; }
|
|
|
|
u32 GetMorphballModelShader() const { return x5c_ballModelShader; }
|
2017-08-19 06:52:13 +00:00
|
|
|
bool GetX1DE4_25() const { return x1de4_25; }
|
|
|
|
void SetX1DE4_25(bool b) { x1de4_25 = b; }
|
2016-07-22 19:46:30 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
#endif // __URDE_CMORPHBALL_HPP__
|