diff options
author | Sergey Sharybin <sergey.vfx@gmail.com> | 2011-09-20 21:23:52 +0400 |
---|---|---|
committer | Sergey Sharybin <sergey.vfx@gmail.com> | 2011-09-20 21:23:52 +0400 |
commit | 3449c0270a622150987e2a5fd6cffab703d1179e (patch) | |
tree | 8e2e50245bd494739ce958e3e5a2a7630ffe063d | |
parent | 8cf8fd7326f0961bad2cd633092fccbcadf0cc92 (diff) |
Another set of fixes for MSVC
-rw-r--r-- | source/blender/blenkernel/BKE_navmesh_conversion.h | 1 | ||||
-rw-r--r-- | source/blender/blenkernel/intern/navmesh_conversion.c | 5 | ||||
-rw-r--r-- | source/blender/modifiers/intern/MOD_navmesh.c | 4 |
3 files changed, 6 insertions, 4 deletions
diff --git a/source/blender/blenkernel/BKE_navmesh_conversion.h b/source/blender/blenkernel/BKE_navmesh_conversion.h index 5f8359d1e3d..01d32321c81 100644 --- a/source/blender/blenkernel/BKE_navmesh_conversion.h +++ b/source/blender/blenkernel/BKE_navmesh_conversion.h @@ -61,4 +61,5 @@ int polyIsConvex(const unsigned short* p, const int vertsPerPoly, const float* v int polyFindVertex(const unsigned short* p, const int vertsPerPoly, unsigned short vertexIdx); float distPointToSegmentSq(const float* point, const float* a, const float* b); + #endif //NAVMESH_CONVERSION_H diff --git a/source/blender/blenkernel/intern/navmesh_conversion.c b/source/blender/blenkernel/intern/navmesh_conversion.c index 7df8e902ccd..8a2ec1e5169 100644 --- a/source/blender/blenkernel/intern/navmesh_conversion.c +++ b/source/blender/blenkernel/intern/navmesh_conversion.c @@ -37,16 +37,17 @@ #include "BKE_navmesh_conversion.h" #include "BKE_cdderivedmesh.h" +#include "BLI_utildefines.h" #include "BLI_math.h" #include "recast-capi.h" -inline float area2(const float* a, const float* b, const float* c) +BM_INLINE float area2(const float* a, const float* b, const float* c) { return (b[0] - a[0]) * (c[2] - a[2]) - (c[0] - a[0]) * (b[2] - a[2]); } -inline int left(const float* a, const float* b, const float* c) +BM_INLINE int left(const float* a, const float* b, const float* c) { return area2(a, b, c) < 0; } diff --git a/source/blender/modifiers/intern/MOD_navmesh.c b/source/blender/modifiers/intern/MOD_navmesh.c index 5a8c79ba4dd..cf4e01ad516 100644 --- a/source/blender/modifiers/intern/MOD_navmesh.c +++ b/source/blender/modifiers/intern/MOD_navmesh.c @@ -48,12 +48,12 @@ #include "BKE_customdata.h" #include "MEM_guardedalloc.h" -static int bit(int a, int b) +BM_INLINE int bit(int a, int b) { return (a & (1 << b)) >> b; } -static void intToCol(int i, float* col) +BM_INLINE void intToCol(int i, float* col) { int r = bit(i, 0) + bit(i, 3) * 2 + 1; int g = bit(i, 1) + bit(i, 4) * 2 + 1; |