2
0
mirror of https://github.com/AxioDL/metaforce.git synced 2025-12-14 09:26:09 +00:00

RE COutput/InputStream and friends and migrate over

This branch is probably still horribly broken, but it's a good first step to migrating away from having hecl embedded in the runtime
This commit is contained in:
2022-02-17 23:37:54 -08:00
parent c679c2e0f8
commit dad7249927
172 changed files with 3629 additions and 2780 deletions

View File

@@ -538,14 +538,13 @@ CAreaOctTree::CAreaOctTree(const zeus::CAABox& aabb, Node::ETreeType treeType, c
}
std::unique_ptr<CAreaOctTree> CAreaOctTree::MakeFromMemory(const u8* buf, unsigned int size) {
athena::io::MemoryReader r(buf + 8, size - 8);
r.readUint32Big();
r.readUint32Big();
zeus::CAABox aabb;
aabb.readBoundingBoxBig(r);
Node::ETreeType nodeType = Node::ETreeType(r.readUint32Big());
u32 treeSize = r.readUint32Big();
const u8* cur = reinterpret_cast<const u8*>(buf) + 8 + r.position();
CMemoryInStream r(buf + 8, size - 8, CMemoryInStream::EOwnerShip::NotOwned);
r.ReadLong();
r.ReadLong();
zeus::CAABox aabb = r.Get<zeus::CAABox>();
Node::ETreeType nodeType = Node::ETreeType(r.ReadLong());
u32 treeSize = r.ReadLong();
const u8* cur = reinterpret_cast<const u8*>(buf) + 8 + r.GetReadPosition();
const u8* treeBuf = cur;
cur += treeSize;