2
0
mirror of https://github.com/AxioDL/metaforce.git synced 2025-12-14 03:26:10 +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

@@ -253,16 +253,16 @@ void CCubeModel::MakeTexturesFromMats(const u8* ptr, std::vector<TCachedToken<CT
#pragma region CCubeSurface
CCubeSurface::CCubeSurface(u8* ptr) : x0_data(ptr) {
CMemoryInStream mem(ptr, 10000); // Oversized so we can read everything in
x0_center.readBig(mem);
xc_materialIndex = mem.readUint32Big();
x10_displayListSize = mem.readUint32Big();
x14_parent = reinterpret_cast<CCubeModel*>(mem.readUint32Big());
x18_nextSurface = reinterpret_cast<CCubeSurface*>(mem.readUint32Big());
x1c_extraSize = mem.readUint32Big();
x20_normal.readBig(mem);
CMemoryInStream mem(ptr, 10000, CMemoryInStream::EOwnerShip::NotOwned); // Oversized so we can read everything in
x0_center = mem.Get<zeus::CVector3f>();
xc_materialIndex = mem.ReadLong();
x10_displayListSize = mem.ReadLong();
x14_parent = reinterpret_cast<CCubeModel*>(mem.ReadLong());
x18_nextSurface = reinterpret_cast<CCubeSurface*>(mem.ReadLong());
x1c_extraSize = mem.ReadLong();
x20_normal = mem.Get<zeus::CVector3f>();
if (x1c_extraSize > 0) {
x2c_bounds = zeus::CAABox::ReadBoundingBoxBig(mem);
x2c_bounds = mem.Get<zeus::CAABox>();
}
}