mirror of
https://github.com/AxioDL/metaforce.git
synced 2025-12-17 20:45:23 +00:00
Begin transitioning to new CModel/CCubeModel & friends
This commit is contained in:
19
Runtime/Graphics/CCubeSurface.cpp
Normal file
19
Runtime/Graphics/CCubeSurface.cpp
Normal file
@@ -0,0 +1,19 @@
|
||||
#include "CCubeSurface.hpp"
|
||||
|
||||
#include "Streams/IOStreams.hpp"
|
||||
|
||||
namespace metaforce {
|
||||
CCubeSurface::CCubeSurface(const u8* ptr, u32 len) : x0_data(ptr) {
|
||||
CMemoryInStream mem(ptr, len, CMemoryInStream::EOwnerShip::NotOwned);
|
||||
x0_center = mem.Get<zeus::CVector3f>();
|
||||
xc_materialIndex = mem.ReadLong();
|
||||
x10_displayListSize = mem.ReadLong();
|
||||
mem.ReadLong(); // x14_parent
|
||||
mem.ReadLong(); // x18_nextSurface
|
||||
x1c_extraSize = mem.ReadLong();
|
||||
x20_normal = mem.Get<zeus::CVector3f>();
|
||||
if (x1c_extraSize > 0) {
|
||||
x24_bounds = mem.Get<zeus::CAABox>();
|
||||
}
|
||||
}
|
||||
} // namespace metaforce
|
||||
Reference in New Issue
Block a user