From 07ed73caee6d933014c0b3c7f98b5ef8376c8724 Mon Sep 17 00:00:00 2001 From: Sergey Sharybin Date: Tue, 20 Sep 2011 14:07:40 +0000 Subject: - Fix for compiling without international support - Enable international support for win64 msvc by default --- source/gameengine/GamePlayer/ghost/GPG_ghost.cpp | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'source/gameengine') diff --git a/source/gameengine/GamePlayer/ghost/GPG_ghost.cpp b/source/gameengine/GamePlayer/ghost/GPG_ghost.cpp index eee27ca0790..726a1d4119a 100644 --- a/source/gameengine/GamePlayer/ghost/GPG_ghost.cpp +++ b/source/gameengine/GamePlayer/ghost/GPG_ghost.cpp @@ -998,7 +998,11 @@ int main(int argc, char** argv) // Cleanup RNA_exit(); BLF_exit(); + +#ifdef INTERNATIONAL BLF_free_unifont(); +#endif + IMB_exit(); free_nodesystem(); -- cgit v1.2.3 From 0169079bd1c3ce69690153321fb09c3647b9d930 Mon Sep 17 00:00:00 2001 From: Sergey Sharybin Date: Tue, 20 Sep 2011 16:24:50 +0000 Subject: Get rid of c++ in blenkernel and modifiers Also use guarded allocations for navmesh stuff. --- source/gameengine/Ketsji/KX_NavMeshObject.cpp | 19 ++++++++++++++++--- 1 file changed, 16 insertions(+), 3 deletions(-) (limited to 'source/gameengine') diff --git a/source/gameengine/Ketsji/KX_NavMeshObject.cpp b/source/gameengine/Ketsji/KX_NavMeshObject.cpp index f72c98fb4bf..5747d8641d0 100644 --- a/source/gameengine/Ketsji/KX_NavMeshObject.cpp +++ b/source/gameengine/Ketsji/KX_NavMeshObject.cpp @@ -26,6 +26,8 @@ * ***** END GPL LICENSE BLOCK ***** */ +#include "MEM_guardedalloc.h" + #include "BLI_math_vector.h" #include "KX_NavMeshObject.h" #include "RAS_MeshObject.h" @@ -117,8 +119,12 @@ bool KX_NavMeshObject::BuildVertIndArrays(float *&vertices, int& nverts, int *dtrisToPolysMap=NULL, *dtrisToTrisMap=NULL, *trisToFacesMap=NULL; int nAllVerts = 0; float *allVerts = NULL; - buildNavMeshDataByDerivedMesh(dm, vertsPerPoly, nAllVerts, allVerts, ndtris, dtris, - npolys, dmeshes, polys, dtrisToPolysMap, dtrisToTrisMap, trisToFacesMap); + buildNavMeshDataByDerivedMesh(dm, &vertsPerPoly, &nAllVerts, &allVerts, &ndtris, &dtris, + &npolys, &dmeshes, &polys, &dtrisToPolysMap, &dtrisToTrisMap, &trisToFacesMap); + + MEM_freeN(dtrisToPolysMap); + MEM_freeN(dtrisToTrisMap); + MEM_freeN(trisToFacesMap); unsigned short *verticesMap = new unsigned short[nAllVerts]; memset(verticesMap, 0xffff, sizeof(unsigned short)*nAllVerts); @@ -207,6 +213,8 @@ bool KX_NavMeshObject::BuildVertIndArrays(float *&vertices, int& nverts, } } } + + MEM_freeN(allVerts); } else { @@ -445,7 +453,12 @@ bool KX_NavMeshObject::BuildNavMesh() m_navMesh->init(data, dataSize, true); delete [] vertices; - delete [] polys; + + /* navmesh conversion is using C guarded alloc for memory allocaitons */ + MEM_freeN(polys); + if (dmeshes) MEM_freeN(dmeshes); + if (dtris) MEM_freeN(dtris); + if (dvertices) { delete [] dvertices; -- cgit v1.2.3