diff options
author | aap <aap@papnet.eu> | 2020-11-26 16:47:19 +0100 |
---|---|---|
committer | aap <aap@papnet.eu> | 2020-11-26 17:39:59 +0100 |
commit | d857758c167ee06840ec806524191e95ff37f98a (patch) | |
tree | fcfdf828156ae6e394ba768756629906f9d73eab /src/collision | |
parent | memory heap starting to work (diff) | |
download | re3-d857758c167ee06840ec806524191e95ff37f98a.tar re3-d857758c167ee06840ec806524191e95ff37f98a.tar.gz re3-d857758c167ee06840ec806524191e95ff37f98a.tar.bz2 re3-d857758c167ee06840ec806524191e95ff37f98a.tar.lz re3-d857758c167ee06840ec806524191e95ff37f98a.tar.xz re3-d857758c167ee06840ec806524191e95ff37f98a.tar.zst re3-d857758c167ee06840ec806524191e95ff37f98a.zip |
Diffstat (limited to '')
-rw-r--r-- | src/collision/ColModel.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/collision/ColModel.cpp b/src/collision/ColModel.cpp index 650e6958..fb90e7dd 100644 --- a/src/collision/ColModel.cpp +++ b/src/collision/ColModel.cpp @@ -1,6 +1,7 @@ #include "common.h" #include "ColModel.h" #include "Game.h" +#include "MemoryHeap.h" CColModel::CColModel(void) { @@ -48,10 +49,15 @@ CColModel::RemoveCollisionVolumes(void) void CColModel::CalculateTrianglePlanes(void) { + PUSH_MEMID(MEMID_COLLISION); + // HACK: allocate space for one more element to stuff the link pointer into trianglePlanes = (CColTrianglePlane*)RwMalloc(sizeof(CColTrianglePlane) * (numTriangles+1)); + REGISTER_MEMPTR(&trianglePlanes); for(int i = 0; i < numTriangles; i++) trianglePlanes[i].Set(vertices, triangles[i]); + + POP_MEMID(); } void |