mirror of
https://github.com/PrimeDecomp/prime.git
synced 2025-12-10 06:27:41 +00:00
Start matching CScriptPlatform; more CScriptMazeNode
Former-commit-id: 135d63412c
This commit is contained in:
@@ -64,7 +64,7 @@ public:
|
||||
void GenerateObstacles();
|
||||
|
||||
SMazeCell& GetCell(uint col, uint row);
|
||||
SMazeCell& GetCell2(uint col, uint row); // ????
|
||||
const SMazeCell& GetCell(uint col, uint row) const;
|
||||
SMazeCell& GetCellInline(uint col, uint row) { return x4_cells[col + row * skMazeCols]; } // ????
|
||||
inline SMazeCell& GetCell(uint idx) { return x4_cells[idx]; }
|
||||
};
|
||||
@@ -77,14 +77,10 @@ public:
|
||||
|
||||
void Accept(IVisitor& visitor) override;
|
||||
void AcceptScriptMsg(EScriptObjectMessage msg, TUniqueId uid, CStateManager& mgr) override;
|
||||
void Think(float dt, CStateManager& mgr) override;
|
||||
void Think(f32 dt, CStateManager& mgr) override;
|
||||
|
||||
static void LoadMazeSeeds();
|
||||
|
||||
static inline void SendScriptMsg(CStateManager& mgr, CEntity* to, TUniqueId sender, EScriptObjectMessage msg) {
|
||||
mgr.SendScriptMsg(to, sender, msg);
|
||||
}
|
||||
|
||||
private:
|
||||
enum ESide {
|
||||
Invalid = -1,
|
||||
@@ -98,7 +94,7 @@ private:
|
||||
int xec_row;
|
||||
ESide xf0_side;
|
||||
TUniqueId xf4_gateEffectId;
|
||||
float xf8_msgTimer;
|
||||
f32 xf8_msgTimer;
|
||||
TUniqueId xfc_actorId;
|
||||
CVector3f x100_actorPos;
|
||||
TUniqueId x10c_triggerId;
|
||||
|
||||
96
include/MetroidPrime/ScriptObjects/CScriptPlatform.hpp
Normal file
96
include/MetroidPrime/ScriptObjects/CScriptPlatform.hpp
Normal file
@@ -0,0 +1,96 @@
|
||||
#ifndef _CSCRIPTPLATFORM_HPP
|
||||
#define _CSCRIPTPLATFORM_HPP
|
||||
|
||||
#include "types.h"
|
||||
|
||||
#include "MetroidPrime/CDamageVulnerability.hpp"
|
||||
#include "MetroidPrime/CHealthInfo.hpp"
|
||||
#include "MetroidPrime/CPhysicsActor.hpp"
|
||||
|
||||
#include "Kyoto/CRandom16.hpp"
|
||||
#include "Kyoto/Math/CQuaternion.hpp"
|
||||
#include "Kyoto/Math/CVector3f.hpp"
|
||||
|
||||
#include "rstl/auto_ptr.hpp"
|
||||
#include "rstl/optional_object.hpp"
|
||||
#include "rstl/vector.hpp"
|
||||
|
||||
class CCollidableOBBTreeGroup;
|
||||
class CCollidableOBBTreeGroupContainer;
|
||||
class CFluidPlane;
|
||||
|
||||
struct SRiders {
|
||||
TUniqueId x0_uid;
|
||||
f32 x4_decayTimer;
|
||||
CTransform4f x8_transform;
|
||||
};
|
||||
|
||||
class CScriptPlatform : public CPhysicsActor {
|
||||
public:
|
||||
CScriptPlatform(
|
||||
TUniqueId uid, const rstl::string& name, const CEntityInfo& info, const CTransform4f& xf,
|
||||
const CModelData& mData, const CActorParameters& actParams, const CAABox& aabb, f32 speed,
|
||||
bool detectCollision, f32 xrayAlpha, bool active, const CHealthInfo& hInfo,
|
||||
const CDamageVulnerability& dVuln,
|
||||
const rstl::optional_object< TLockedToken< CCollidableOBBTreeGroupContainer > >& dcln,
|
||||
bool rainSplashes, uint maxRainSplashes, uint rainGenRate);
|
||||
|
||||
// CEntity
|
||||
~CScriptPlatform() override;
|
||||
void Accept(IVisitor& visitor) override;
|
||||
void PreThink(f32 dt, CStateManager& mgr) override;
|
||||
void Think(f32 dt, CStateManager& mgr) override;
|
||||
void AcceptScriptMsg(EScriptObjectMessage msg, TUniqueId uid, CStateManager& mgr) override;
|
||||
|
||||
// CActor
|
||||
void PreRender(CStateManager&, const CFrustumPlanes&) override;
|
||||
void Render(const CStateManager&) const override;
|
||||
CHealthInfo* HealthInfo(CStateManager&) override;
|
||||
const CDamageVulnerability* GetDamageVulnerability() const override;
|
||||
rstl::optional_object< CAABox > GetTouchBounds() const override;
|
||||
CVector3f GetOrbitPosition(const CStateManager&) const override;
|
||||
CVector3f GetAimPosition(const CStateManager&, float) const override;
|
||||
CAABox GetSortingBounds(const CTransform4f&) const override;
|
||||
|
||||
// CPhysicsActor
|
||||
const CCollisionPrimitive* GetCollisionPrimitive() const override;
|
||||
CTransform4f GetPrimitiveTransform() const override;
|
||||
|
||||
// CScriptPlatform
|
||||
virtual void SplashThink(const CAABox&, const CFluidPlane&, float, CStateManager&) const;
|
||||
virtual CQuaternion Move(float, CStateManager&);
|
||||
|
||||
private:
|
||||
TUniqueId x258_currentWaypoint;
|
||||
TUniqueId x25a_targetWaypoint;
|
||||
f32 x25c_currentSpeed;
|
||||
f32 x260_moveDelay;
|
||||
f32 x264_collisionRecoverDelay;
|
||||
f32 x268_fadeInTime;
|
||||
f32 x26c_fadeOutTime;
|
||||
CVector3f x270_dragDelta;
|
||||
CQuaternion x27c_rotDelta;
|
||||
CHealthInfo x28c_initialHealth;
|
||||
CHealthInfo x294_health;
|
||||
CDamageVulnerability x29c_damageVuln;
|
||||
rstl::optional_object< TLockedToken< CCollidableOBBTreeGroupContainer > > x304_treeGroupContainer;
|
||||
rstl::single_ptr< CCollidableOBBTreeGroup > x314_treeGroup;
|
||||
rstl::vector< SRiders > x318_riders;
|
||||
rstl::vector< SRiders > x328_slavesStatic;
|
||||
rstl::vector< SRiders > x338_slavesDynamic;
|
||||
f32 x348_xrayAlpha;
|
||||
uint x34c_maxRainSplashes;
|
||||
uint x350_rainGenRate;
|
||||
TUniqueId x354_boundsTrigger;
|
||||
bool x356_24_dead : 1;
|
||||
bool x356_25_controlledAnimation : 1;
|
||||
bool x356_26_detectCollision : 1;
|
||||
bool x356_27_squishedRider : 1;
|
||||
bool x356_28_rainSplashes : 1;
|
||||
bool x356_29_setXrayDrawFlags : 1;
|
||||
bool x356_30_disableXrayAlpha : 1;
|
||||
bool x356_31_xrayFog : 1;
|
||||
};
|
||||
CHECK_SIZEOF(CScriptPlatform, 0x358)
|
||||
|
||||
#endif
|
||||
Reference in New Issue
Block a user