summaryrefslogtreecommitdiffstats
path: root/src/collision/ColModel.cpp
diff options
context:
space:
mode:
authoraap <aap@papnet.eu>2020-12-19 17:27:01 +0100
committeraap <aap@papnet.eu>2020-12-19 17:27:01 +0100
commit2a51e1da0456e9b7397562102d3241e5c3ddbd6e (patch)
tree308cfd8f4e23e713fec89e041d92ecc96ba462c5 /src/collision/ColModel.cpp
parentanim compression (diff)
parentMerge pull request #891 from Nick007J/miami (diff)
downloadre3-2a51e1da0456e9b7397562102d3241e5c3ddbd6e.tar
re3-2a51e1da0456e9b7397562102d3241e5c3ddbd6e.tar.gz
re3-2a51e1da0456e9b7397562102d3241e5c3ddbd6e.tar.bz2
re3-2a51e1da0456e9b7397562102d3241e5c3ddbd6e.tar.lz
re3-2a51e1da0456e9b7397562102d3241e5c3ddbd6e.tar.xz
re3-2a51e1da0456e9b7397562102d3241e5c3ddbd6e.tar.zst
re3-2a51e1da0456e9b7397562102d3241e5c3ddbd6e.zip
Diffstat (limited to 'src/collision/ColModel.cpp')
-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
+}