Implement CScriptDebugCameraWaypoint loader

This commit is contained in:
Phillip Stephens 2018-10-30 15:21:29 -07:00
parent 93e9e2f6f1
commit 134f5a68a2
3 changed files with 15 additions and 1 deletions

View File

@ -1,5 +1,6 @@
#include "CScriptDebugCameraWaypoint.hpp"
#include "CActorParameters.hpp"
#include "TCastTo.hpp"
namespace urde
{
@ -11,4 +12,9 @@ CScriptDebugCameraWaypoint::CScriptDebugCameraWaypoint(TUniqueId uid, std::strin
{
}
void CScriptDebugCameraWaypoint::Accept(IVisitor& visitor)
{
visitor.Visit(this);
}
}

View File

@ -11,6 +11,8 @@ class CScriptDebugCameraWaypoint : public CActor
public:
CScriptDebugCameraWaypoint(TUniqueId uid, std::string_view name, const CEntityInfo& info,
const zeus::CTransform& xf, u32 w1);
void Accept(IVisitor&);
};
}

View File

@ -84,6 +84,7 @@
#include "CScriptWater.hpp"
#include "CScriptWaypoint.hpp"
#include "CScriptWorldTeleporter.hpp"
#include "CScriptDebugCameraWaypoint.hpp"
#include "CScriptSpiderBallAttractionSurface.hpp"
#include "CScriptSpindleCamera.hpp"
#include "MP1/World/CAtomicAlpha.hpp"
@ -1699,7 +1700,12 @@ CEntity* ScriptLoader::LoadPuddleSpore(CStateManager& mgr, CInputStream& in, int
CEntity* ScriptLoader::LoadDebugCameraWaypoint(CStateManager& mgr, CInputStream& in, int propCount,
const CEntityInfo& info)
{
if (!EnsurePropertyCount(propCount, 4, "DebugCameraWaypoint"))
return nullptr;
SActorHead actHead = LoadActorHead(in, mgr);
u32 w1 = in.readUint32Big();
return new CScriptDebugCameraWaypoint(mgr.AllocateUniqueId(), actHead.x0_name, info, actHead.x10_transform, w1);
}
CEntity* ScriptLoader::LoadSpiderBallAttractionSurface(CStateManager& mgr, CInputStream& in, int propCount,