2
0
mirror of https://github.com/AxioDL/metaforce.git synced 2025-12-09 02:27:43 +00:00

Add some script loaders

This commit is contained in:
Jack Andersen
2016-04-19 11:25:26 -10:00
parent 76afccbdbe
commit 8537ea5d8d
17 changed files with 601 additions and 139 deletions

View File

@@ -0,0 +1,36 @@
#include "CScriptDoor.hpp"
#include "Collision/CMaterialList.hpp"
namespace urde
{
static CMaterialList MakeDoorMaterialList(bool material)
{
CMaterialList ret;
if (material)
{
ret.x0_ |= 1ull << 19;
ret.x0_ |= 1ull << 43;
ret.x0_ |= 1ull << 41;
}
else
{
ret.x0_ |= 1ull << 43;
ret.x0_ |= 1ull << 42;
ret.x0_ |= 1ull << 19;
ret.x0_ |= 1ull << 41;
}
return ret;
}
CScriptDoor::CScriptDoor(TUniqueId uid, const std::string& name, const CEntityInfo& info,
const zeus::CTransform& xf, const CModelData& mData, const CActorParameters& actParms,
const zeus::CVector3f&, const zeus::CAABox& aabb, bool active,
bool material, bool, float, bool ballDoor)
: CPhysicsActor(uid, active, name, info, xf, mData, MakeDoorMaterialList(material),
aabb, SMoverData(1.f), actParms, 0.3f, 0.1f)
{
}
}