summaryrefslogtreecommitdiffstats
path: root/src/collision/ColModel.cpp
diff options
context:
space:
mode:
authorNikolay <nickvnuk@gmail.com>2020-12-19 17:15:52 +0100
committerGitHub <noreply@github.com>2020-12-19 17:15:52 +0100
commit867133e93d57dba5319bb13abeeb3f73bbaf6ae1 (patch)
treee16891b3bd62f38bc959c295ebeca1aa6b9952d7 /src/collision/ColModel.cpp
parentsilly mistake (diff)
parentfixed cmakelists (diff)
downloadre3-867133e93d57dba5319bb13abeeb3f73bbaf6ae1.tar
re3-867133e93d57dba5319bb13abeeb3f73bbaf6ae1.tar.gz
re3-867133e93d57dba5319bb13abeeb3f73bbaf6ae1.tar.bz2
re3-867133e93d57dba5319bb13abeeb3f73bbaf6ae1.tar.lz
re3-867133e93d57dba5319bb13abeeb3f73bbaf6ae1.tar.xz
re3-867133e93d57dba5319bb13abeeb3f73bbaf6ae1.tar.zst
re3-867133e93d57dba5319bb13abeeb3f73bbaf6ae1.zip
Diffstat (limited to '')
-rw-r--r--src/collision/ColModel.cpp8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/collision/ColModel.cpp b/src/collision/ColModel.cpp
index ba33c134..d2e01f50 100644
--- a/src/collision/ColModel.cpp
+++ b/src/collision/ColModel.cpp
@@ -2,6 +2,7 @@
#include "ColModel.h"
#include "Collision.h"
#include "Game.h"
+#include "MemoryHeap.h"
#include "Pools.h"
CColModel::CColModel(void)
@@ -65,10 +66,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
@@ -198,4 +204,4 @@ CColModel::operator=(const CColModel &other)
vertices = nil;
}
return *this;
-} \ No newline at end of file
+}