mirror of https://github.com/AxioDL/metaforce.git
Merge branch 'master' of https://github.com/AxioDL/urde
This commit is contained in:
commit
5cf217dd7a
|
@ -12,8 +12,10 @@ namespace MP1
|
|||
class CBeetle : public CPatterned
|
||||
{
|
||||
public:
|
||||
enum EEntranceType
|
||||
enum class EEntranceType : u32
|
||||
{
|
||||
FacePlayer,
|
||||
UseOrientation
|
||||
};
|
||||
private:
|
||||
public:
|
||||
|
|
|
@ -0,0 +1,12 @@
|
|||
#include "CDamageInfo.hpp"
|
||||
#include "CDamageVulnerability.hpp"
|
||||
|
||||
namespace urde
|
||||
{
|
||||
|
||||
float CDamageInfo::GetRadiusDamage(const CDamageVulnerability& dVuln)
|
||||
{
|
||||
return 0.f;
|
||||
}
|
||||
|
||||
}
|
|
@ -7,6 +7,7 @@
|
|||
namespace urde
|
||||
{
|
||||
|
||||
class CDamageVulnerability;
|
||||
class CDamageInfo
|
||||
{
|
||||
EWeaponType x0_type = EWeaponType::None;
|
||||
|
@ -20,8 +21,8 @@ class CDamageInfo
|
|||
};
|
||||
u8 _dummy = 0;
|
||||
};
|
||||
float x8_damage1;
|
||||
float xc_damage2;
|
||||
float x8_damage;
|
||||
float xc_radiusDamage;
|
||||
float x10_radius;
|
||||
float x14_knockback;
|
||||
bool x18_ = false;
|
||||
|
@ -31,11 +32,14 @@ public:
|
|||
{
|
||||
in.readUint32Big();
|
||||
x0_type = EWeaponType(in.readUint32Big());
|
||||
x8_damage1 = in.readFloatBig();
|
||||
xc_damage2 = x8_damage1;
|
||||
x8_damage = in.readFloatBig();
|
||||
xc_radiusDamage = x8_damage;
|
||||
x10_radius = in.readFloatBig();
|
||||
x14_knockback = in.readFloatBig();
|
||||
}
|
||||
|
||||
float GetRadiusDamage() const { return xc_radiusDamage; }
|
||||
float GetRadiusDamage(const CDamageVulnerability& dVuln);
|
||||
};
|
||||
|
||||
}
|
||||
|
|
|
@ -0,0 +1 @@
|
|||
#include "CHUDMemoParms.hpp"
|
|
@ -0,0 +1,22 @@
|
|||
#ifndef CHUDMEMOPARMS_HPP
|
||||
#define CHUDMEMOPARMS_HPP
|
||||
|
||||
#include "IOStreams.hpp"
|
||||
|
||||
namespace urde
|
||||
{
|
||||
class CHUDMemoParms
|
||||
{
|
||||
float x0_;
|
||||
bool x4_;
|
||||
bool x5_ = false;
|
||||
bool x6_ = false;
|
||||
public:
|
||||
CHUDMemoParms(CInputStream& in)
|
||||
: x0_(in.readFloatBig()),
|
||||
x4_(in.readBool())
|
||||
{}
|
||||
};
|
||||
}
|
||||
|
||||
#endif // CHUDMEMOPARMS_HPP
|
|
@ -40,6 +40,8 @@ set(WORLD_SOURCES
|
|||
CScriptMemoryRelay.hpp CScriptMemoryRelay.cpp
|
||||
CScriptRandomRelay.hpp CScriptRandomRelay.cpp
|
||||
CScriptRelay.hpp CScriptRelay.cpp
|
||||
CScriptHUDMemo.hpp CScriptHUDMemo.cpp
|
||||
CScriptCameraFilterKeyframe.hpp CScriptCameraFilterKeyframe.cpp
|
||||
CScriptDamageableTrigger.hpp CScriptDamageableTrigger.cpp
|
||||
CScriptActorRotate.hpp CScriptActorRotate.cpp
|
||||
CScriptSpecialFunction.hpp CScriptSpecialFunction.cpp
|
||||
|
@ -55,6 +57,7 @@ set(WORLD_SOURCES
|
|||
CPatternedInfo.hpp CPatternedInfo.cpp
|
||||
CHealthInfo.hpp CHealthInfo.cpp
|
||||
CPatterned.hpp CPatterned.cpp
|
||||
CHUDMemoParms.hpp CHUDMemoParms.cpp
|
||||
CFluidPlane.hpp)
|
||||
|
||||
runtime_add_list(World WORLD_SOURCES)
|
||||
|
|
|
@ -0,0 +1,11 @@
|
|||
#include "CScriptCameraFilterKeyframe.hpp"
|
||||
|
||||
namespace urde
|
||||
{
|
||||
CScriptCameraFilterKeyframe::CScriptCameraFilterKeyframe(TUniqueId uid, const std::string &name, const CEntityInfo& info,
|
||||
u32, u32, u32, u32, const zeus::CColor&, float, float,
|
||||
u32, bool active)
|
||||
: CEntity(uid, info, active, name)
|
||||
{}
|
||||
|
||||
}
|
|
@ -0,0 +1,25 @@
|
|||
#ifndef CSCRIPTCAMERAFILTERKEYFRAME_HPP
|
||||
#define CSCRIPTCAMERAFILTERKEYFRAME_HPP
|
||||
|
||||
#include "CEntity.hpp"
|
||||
#include "zeus/CColor.hpp"
|
||||
|
||||
namespace urde
|
||||
{
|
||||
class CScriptCameraFilterKeyframe : public CEntity
|
||||
{
|
||||
u32 x34_;
|
||||
u32 x38_;
|
||||
u32 x3c_;
|
||||
u32 x40_;
|
||||
zeus::CColor x44_;
|
||||
float x48_;
|
||||
float x4c_;
|
||||
u32 x50_;
|
||||
public:
|
||||
CScriptCameraFilterKeyframe(TUniqueId, const std::string&, const CEntityInfo&, u32, u32, u32, u32, const zeus::CColor&,
|
||||
float, float, u32, bool);
|
||||
};
|
||||
}
|
||||
|
||||
#endif // CSCRIPTCAMERAFILTERKEYFRAME_HPP
|
|
@ -0,0 +1,12 @@
|
|||
#include "CScriptHUDMemo.hpp"
|
||||
|
||||
namespace urde
|
||||
{
|
||||
|
||||
CScriptHUDMemo::CScriptHUDMemo(TUniqueId uid, const std::string& name, const CEntityInfo& info, const CHUDMemoParms&,
|
||||
CScriptHUDMemo::EDisplayType, ResId, bool active)
|
||||
: CEntity(uid, info, active, name)
|
||||
{
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,25 @@
|
|||
#ifndef CSCRIPTHUDMEMO_HPP
|
||||
#define CSCRIPTHUDMEMO_HPP
|
||||
|
||||
#include "CEntity.hpp"
|
||||
#include "CHUDMemoParms.hpp"
|
||||
|
||||
namespace urde
|
||||
{
|
||||
class CScriptHUDMemo : public CEntity
|
||||
{
|
||||
public:
|
||||
enum class EDisplayType
|
||||
{
|
||||
StatusMessage,
|
||||
MessageBox,
|
||||
};
|
||||
|
||||
private:
|
||||
public:
|
||||
CScriptHUDMemo(TUniqueId, const std::string&, const CEntityInfo&, const CHUDMemoParms&,
|
||||
CScriptHUDMemo::EDisplayType, ResId, bool);
|
||||
};
|
||||
}
|
||||
|
||||
#endif // CSCRIPTHUDMEMO_HPP
|
|
@ -34,6 +34,8 @@
|
|||
#include "CScriptMemoryRelay.hpp"
|
||||
#include "CScriptRandomRelay.hpp"
|
||||
#include "CScriptRelay.hpp"
|
||||
#include "CScriptHUDMemo.hpp"
|
||||
#include "CScriptCameraFilterKeyframe.hpp"
|
||||
#include "CScriptDamageableTrigger.hpp"
|
||||
#include "CScriptActorRotate.hpp"
|
||||
#include "CScriptSpecialFunction.hpp"
|
||||
|
@ -1012,11 +1014,37 @@ CEntity* ScriptLoader::LoadBeetle(CStateManager& mgr, CInputStream& in,
|
|||
CEntity* ScriptLoader::LoadHUDMemo(CStateManager& mgr, CInputStream& in,
|
||||
int propCount, const CEntityInfo& info)
|
||||
{
|
||||
if (propCount != 5 && !EnsurePropertyCount(propCount, 6, "HUDMemo"))
|
||||
return 0;
|
||||
const std::string* name = mgr.HashInstanceName(in);
|
||||
CHUDMemoParms hParms(in);
|
||||
CScriptHUDMemo::EDisplayType displayType = CScriptHUDMemo::EDisplayType::MessageBox;
|
||||
if (propCount == 6)
|
||||
displayType = CScriptHUDMemo::EDisplayType(in.readUint32Big());
|
||||
ResId message = in.readUint32Big();
|
||||
bool active = in.readBool();
|
||||
|
||||
return new CScriptHUDMemo(mgr.AllocateUniqueId(), *name, info, hParms, displayType, message, active);
|
||||
}
|
||||
|
||||
CEntity* ScriptLoader::LoadCameraFilterKeyframe(CStateManager& mgr, CInputStream& in,
|
||||
int propCount, const CEntityInfo& info)
|
||||
{
|
||||
if (!EnsurePropertyCount(propCount, 10, "CameraFilterKeyframe"))
|
||||
return nullptr;
|
||||
const std::string* name = mgr.HashInstanceName(in);
|
||||
bool active = in.readBool();
|
||||
u32 w1 = in.readUint32Big();
|
||||
u32 w2 = in.readUint32Big();
|
||||
u32 w3 = in.readUint32Big();
|
||||
u32 w4 = in.readUint32Big();
|
||||
zeus::CColor color;
|
||||
color.readRGBABig(in);
|
||||
float f1 = in.readFloatBig();
|
||||
float f2 = in.readFloatBig();
|
||||
u32 w5 = in.readUint32Big();
|
||||
|
||||
return new CScriptCameraFilterKeyframe(mgr.AllocateUniqueId(), *name, info, w1, w2, w3, w4, color, f1, f2, w5, active);
|
||||
}
|
||||
|
||||
CEntity* ScriptLoader::LoadCameraBlurKeyframe(CStateManager& mgr, CInputStream& in,
|
||||
|
|
Loading…
Reference in New Issue