mirror of https://github.com/AxioDL/metaforce.git
Add CameraWaypoint loader
This commit is contained in:
parent
4272e8207b
commit
9e652db6f0
|
@ -7,6 +7,7 @@ namespace urde
|
|||
{
|
||||
enum class EMaterialTypes
|
||||
{
|
||||
Zero = 0,
|
||||
Six = 6,
|
||||
Eight = 8,
|
||||
Ten = 10,
|
||||
|
|
|
@ -29,6 +29,7 @@ add_library(RuntimeCommonWorld
|
|||
CScriptWater.hpp CScriptWater.cpp
|
||||
CScriptGrapplePoint.hpp CScriptGrapplePoint.cpp
|
||||
CScriptAreaAttributes.hpp CScriptAreaAttributes.cpp
|
||||
CScriptCameraWaypoint.hpp CScriptCameraWaypoint.cpp
|
||||
CGrappleParameters.hpp
|
||||
CActorParameters.hpp
|
||||
CLightParameters.hpp
|
||||
|
|
|
@ -0,0 +1,15 @@
|
|||
#include "CScriptCameraWaypoint.hpp"
|
||||
#include "CActorParameters.hpp"
|
||||
|
||||
namespace urde
|
||||
{
|
||||
|
||||
CScriptCameraWaypoint::CScriptCameraWaypoint(TUniqueId uid, const std::string& name, const CEntityInfo& info,
|
||||
const zeus::CTransform& xf, bool active, float, u32)
|
||||
: CActor(uid, active, name, info, xf, CModelData::CModelDataNull(), CMaterialList(EMaterialTypes::Zero),
|
||||
CActorParameters::None(), kInvalidUniqueId)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,18 @@
|
|||
#ifndef __URDE_CSCRIPTCAMERAWAYPOINT_HPP__
|
||||
#define __URDE_CSCRIPTCAMERAWAYPOINT_HPP__
|
||||
|
||||
#include "CActor.hpp"
|
||||
|
||||
namespace urde
|
||||
{
|
||||
|
||||
class CScriptCameraWaypoint : public CActor
|
||||
{
|
||||
public:
|
||||
CScriptCameraWaypoint(TUniqueId uid, const std::string& name, const CEntityInfo& info,
|
||||
const zeus::CTransform& xf, bool active, float, u32);
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
#endif // __URDE_CSCRIPTCAMERAWAYPOINT_HPP__
|
|
@ -26,6 +26,7 @@
|
|||
#include "CScriptGenerator.hpp"
|
||||
#include "CScriptGrapplePoint.hpp"
|
||||
#include "CScriptAreaAttributes.hpp"
|
||||
#include "CScriptCameraWaypoint.hpp"
|
||||
#include "Camera/CCinematicCamera.hpp"
|
||||
#include "CSimplePool.hpp"
|
||||
#include "Collision/CCollidableOBBTreeGroup.hpp"
|
||||
|
@ -764,6 +765,17 @@ CEntity* ScriptLoader::LoadCamera(CStateManager& mgr, CInputStream& in,
|
|||
CEntity* ScriptLoader::LoadCameraWaypoint(CStateManager& mgr, CInputStream& in,
|
||||
int propCount, const CEntityInfo& info)
|
||||
{
|
||||
if (!EnsurePropertyCount(propCount, 6, "CameraWaypoint"))
|
||||
return nullptr;
|
||||
|
||||
SActorHead head = LoadActorHead(in, mgr);
|
||||
|
||||
bool b1 = in.readBool();
|
||||
float f1 = in.readFloatBig();
|
||||
u32 w1 = in.readUint32Big();
|
||||
|
||||
return new CScriptCameraWaypoint(mgr.AllocateUniqueId(), head.x0_name, info,
|
||||
head.x10_transform, b1, f1, w1);
|
||||
}
|
||||
|
||||
CEntity* ScriptLoader::LoadNewIntroBoss(CStateManager& mgr, CInputStream& in,
|
||||
|
|
Loading…
Reference in New Issue