Skip to content

Commit

Permalink
Fix bullet memory pools to work on N64 without expansion pak
Browse files Browse the repository at this point in the history
  • Loading branch information
Hazematman committed Dec 9, 2021
1 parent df20779 commit 8719789
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,11 @@ int main(void)
data_cache_hit_writeback(&viewport, sizeof(viewport));

/* Initalize bullet physics stuff */
btDefaultCollisionConfiguration* collisionConfiguration = new btDefaultCollisionConfiguration();
// We need to lower the default memory heap sizes to fix within the N64 memory limitations
btDefaultCollisionConstructionInfo constructionInfo = btDefaultCollisionConstructionInfo();
constructionInfo.m_defaultMaxCollisionAlgorithmPoolSize = 512;
constructionInfo.m_defaultMaxPersistentManifoldPoolSize = 512;
btDefaultCollisionConfiguration* collisionConfiguration = new btDefaultCollisionConfiguration(constructionInfo);
btCollisionDispatcher* dispatcher = new btCollisionDispatcher(collisionConfiguration);
btBroadphaseInterface* overlappingPairCache = new btDbvtBroadphase();
btSequentialImpulseConstraintSolver* solver = new btSequentialImpulseConstraintSolver;
Expand Down

0 comments on commit 8719789

Please sign in to comment.