2016-08-14 21:38:05 +00:00
|
|
|
#include "CScriptMazeNode.hpp"
|
|
|
|
#include "Character/CModelData.hpp"
|
|
|
|
#include "GameGlobalObjects.hpp"
|
|
|
|
#include "CActorParameters.hpp"
|
2017-05-22 11:24:24 +00:00
|
|
|
#include "TCastTo.hpp"
|
2016-08-14 21:38:05 +00:00
|
|
|
|
|
|
|
namespace urde
|
|
|
|
{
|
|
|
|
|
2017-05-22 11:24:24 +00:00
|
|
|
atUint32 CScriptMazeNode::sMazeSeeds[300] = {0};
|
|
|
|
|
2017-11-13 06:19:18 +00:00
|
|
|
CScriptMazeNode::CScriptMazeNode(TUniqueId uid, std::string_view name, const CEntityInfo& info,
|
2016-08-14 21:38:05 +00:00
|
|
|
const zeus::CTransform& xf, bool active, s32 w1, s32 w2, s32 w3,
|
|
|
|
const zeus::CVector3f& vec1, const zeus::CVector3f& vec2, const zeus::CVector3f& vec3)
|
2017-01-04 04:08:30 +00:00
|
|
|
: CActor(uid, active, name, info, xf, CModelData::CModelDataNull(), CMaterialList(), CActorParameters::None(),
|
|
|
|
kInvalidUniqueId)
|
|
|
|
, xe8_(w1)
|
|
|
|
, xec_(w1)
|
|
|
|
, xf0_(w2)
|
|
|
|
, x100_(vec1)
|
|
|
|
, x110_(vec2)
|
|
|
|
, x120_(vec3)
|
2016-08-14 21:38:05 +00:00
|
|
|
{
|
|
|
|
x13c_24_ = true;
|
|
|
|
}
|
|
|
|
|
2017-05-22 11:24:24 +00:00
|
|
|
void CScriptMazeNode::Accept(IVisitor& visitor)
|
|
|
|
{
|
|
|
|
visitor.Visit(this);
|
|
|
|
}
|
|
|
|
|
|
|
|
void CScriptMazeNode::LoadMazeSeeds()
|
2016-08-14 21:38:05 +00:00
|
|
|
{
|
2017-01-04 04:08:30 +00:00
|
|
|
const SObjectTag* tag = g_ResFactory->GetResourceIdByName("DUMB_MazeSeeds");
|
|
|
|
u32 resSize = g_ResFactory->ResourceSize(*tag);
|
|
|
|
std::unique_ptr<u8[]> buf = g_ResFactory->LoadResourceSync(*tag);
|
|
|
|
CMemoryInStream in(buf.get(), resSize);
|
|
|
|
for (u32 i = 0; i<300 ; ++i)
|
|
|
|
sMazeSeeds[i] = in.readUint32Big();
|
2016-08-14 21:38:05 +00:00
|
|
|
}
|
|
|
|
}
|