This commit is contained in:
Jack Andersen 2017-08-20 19:47:41 -10:00
commit f3914d9662
4 changed files with 107 additions and 2 deletions

View File

@ -9,6 +9,7 @@ set(MP1_WORLD_SOURCES
CActorContraption.hpp CActorContraption.cpp
CThardusRockProjectile.hpp CThardusRockProjectile.cpp
CMetroidBeta.hpp CMetroidBeta.cpp
CMetroid.hpp CMetroid.cpp)
CMetroid.hpp CMetroid.cpp
CMetaree.hpp CMetaree.cpp)
runtime_add_list(World MP1_WORLD_SOURCES)

View File

@ -0,0 +1,43 @@
//
// Created by antidote on 8/19/17.
//
#include "CMetaree.hpp"
namespace urde
{
namespace MP1
{
CMetaree::CMetaree(TUniqueId uid, const std::string& name, EFlavorType flavor, const CEntityInfo& info,
const zeus::CTransform& xf, CModelData&& mData, const CPatternedInfo& pInfo, const CDamageInfo& dInfo,
float f1, const zeus::CVector3f& v1, float f2, EBodyType bodyType, float f3, float f4,
const CActorParameters& aParms)
: CPatterned(ECharacter::Metaree, uid, name, flavor, info, xf, std::move(mData), pInfo, EMovementType::Flyer,
EColliderType::Zero, bodyType, aParms, 0)
, x568_(f3)
, x56c_(f4)
, x570_(f1)
, x574_(v1)
, x580_(f2)
, x5ca_24_(true)
, x5ca_25_(false)
, x5ca_26_(false)
{
}
void CMetaree::Accept(IVisitor& visitor)
{
visitor.Visit(this);
}
void CMetaree::AcceptScriptMsg(EScriptObjectMessage msg, TUniqueId uid, CStateManager& mgr)
{
CPatterned::AcceptScriptMsg(msg, uid, mgr);
if (msg == EScriptObjectMessage::Start)
x5ca_25_ = true;
else if (msg == EScriptObjectMessage::Registered)
x450_bodyController->Activate(mgr);
}
}
}

View File

@ -0,0 +1,56 @@
#ifndef URDE_CMETAREE_HPP
#define URDE_CMETAREE_HPP
#include "World/CPatterned.hpp"
#include "World/CDamageInfo.hpp"
namespace urde
{
namespace MP1
{
class CMetaree : public CPatterned
{
float x568_;
float x56c_;
float x570_;
zeus::CVector3f x574_;
float x580_;
zeus::CVector3f x584_;
float x590_ = 0.f;
float x594_ = 0.f;
float x598_ = 0.f;
zeus::CVector3f x59c_;
u32 x5a8_ = 0;
CDamageInfo x5ac_damgeInfo;
u16 x5c8_ = 549;
struct
{
struct
{
bool x5ca_24_ : 1;
bool x5ca_25_ : 1;
bool x5ca_26_ : 1;
};
u16 _dummy;
};
u32 x5cc_;
public:
static constexpr ECharacter CharacterType = ECharacter::MetroidPrimeExo;
CMetaree(TUniqueId, const std::string&, EFlavorType, const CEntityInfo&, const zeus::CTransform&, CModelData&&,
const CPatternedInfo&, const CDamageInfo&, float, const zeus::CVector3f&, float, EBodyType, float, float,
const CActorParameters&);
void Accept(IVisitor& visitor);
void AcceptScriptMsg(EScriptObjectMessage, TUniqueId, CStateManager&);
bool Delay(CStateManager&, float)
{
return x338_ == x568_;
}
};
}
}
#endif //URDE_CMETAREE_HPP

View File

@ -66,10 +66,11 @@ public:
};
enum class EColliderType
{
Zero = 0,
One = 1
};
private:
protected:
union
{
struct
@ -83,6 +84,9 @@ private:
};
ECharacter x34c_character;
float x338_;
std::unique_ptr<CBodyController> x450_bodyController;
union
{
struct
@ -99,6 +103,7 @@ public:
CPatterned::EMovementType movement, EColliderType collider, EBodyType body,
const CActorParameters& params, int variant);
void AcceptScriptMsg(EScriptObjectMessage, TUniqueId, CStateManager&) {}
virtual void Death(CStateManager&, const zeus::CVector3f&, EStateMsg) {}
virtual void KnockBack(const zeus::CVector3f&, CStateManager&, const CDamageInfo& info, EKnockBackType, bool, float) {}