2
0
mirror of https://github.com/AxioDL/metaforce.git synced 2025-05-14 11:11:21 +00:00
metaforce/Runtime/World/CScriptMazeNode.cpp
Lioncash 221cc5c6b8 RuntimeCommonB: Normalize cpp file includes
Like the prior changes normalizing the inclusions within headers, this
tackles the cpp files of the RuntimeCommonB target, making these source
files consistent with their headers.
2019-12-22 18:12:04 -05:00

38 lines
1.3 KiB
C++

#include "Runtime/World/CScriptMazeNode.hpp"
#include "Runtime/GameGlobalObjects.hpp"
#include "Runtime/Character/CModelData.hpp"
#include "Runtime/World/CActorParameters.hpp"
#include "TCastTo.hpp" // Generated file, do not modify include path
namespace urde {
atUint32 CScriptMazeNode::sMazeSeeds[300] = {0};
CScriptMazeNode::CScriptMazeNode(TUniqueId uid, std::string_view name, const CEntityInfo& info,
const zeus::CTransform& xf, bool active, s32 w1, s32 w2, s32 w3,
const zeus::CVector3f& vec1, const zeus::CVector3f& vec2, const zeus::CVector3f& vec3)
: CActor(uid, active, name, info, xf, CModelData::CModelDataNull(), CMaterialList(), CActorParameters::None(),
kInvalidUniqueId)
, xe8_(w1)
, xec_(w1)
, xf0_(w2)
, x100_(vec1)
, x110_(vec2)
, x120_(vec3) {
x13c_24_ = true;
}
void CScriptMazeNode::Accept(IVisitor& visitor) { visitor.Visit(this); }
void CScriptMazeNode::LoadMazeSeeds() {
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();
}
} // namespace urde