metaforce/Runtime/Graphics/CPVSAreaSet.cpp

24 lines
701 B
C++
Raw Normal View History

2016-07-27 23:06:57 +00:00
#include "CPVSAreaSet.hpp"
namespace urde
{
2017-02-19 09:27:01 +00:00
CPVSAreaSet::CPVSAreaSet(const u8* data, u32 len)
2016-07-27 23:06:57 +00:00
{
2017-02-19 09:27:01 +00:00
CMemoryInStream r(data, len);
x0_numFeatures = r.readUint32Big();
x4_numLights = r.readUint32Big();
x8_num2ndLights = r.readUint32Big();
2017-02-19 09:27:01 +00:00
xc_numActors = r.readUint32Big();
x10_leafSize = r.readUint32Big();
x14_lightIndexCount = r.readUint32Big();
2018-06-28 06:47:34 +00:00
x18_entityIndex.reserve(xc_numActors);
for (int i=0 ; i<xc_numActors ; ++i)
x18_entityIndex.push_back(r.readUint32Big());
x1c_lightLeaves = data + r.position();
2017-02-19 09:27:01 +00:00
const u8* octreeData = x1c_lightLeaves + x14_lightIndexCount * x10_leafSize;
x20_octree = CPVSVisOctree::MakePVSVisOctree(octreeData);
2016-07-27 23:06:57 +00:00
}
}