Fix compilation for MSVC 6.0 for Bullet and COLLADA DOM.

Fix issues with btDbvt: use ATTRIBUTE_ALIGNED16
Removed several places where variable was declared within for statement: for (int i=0; should be int i; for (i=0
This commit is contained in:
erwin.coumans
2008-11-12 18:37:05 +00:00
parent 444fbfeb40
commit 5feea39803
68 changed files with 365 additions and 208 deletions

View File

@@ -37,11 +37,11 @@ static DBVT_INLINE int indexof(const btDbvtNode* node)
static DBVT_INLINE btDbvtVolume merge( const btDbvtVolume& a,
const btDbvtVolume& b)
{
#if DBVT_MERGE_IMPL==DBVT_IMPL_SSE
DBVT_ALIGN char locals[sizeof(btDbvtAabbMm)];
#if (DBVT_MERGE_IMPL==DBVT_IMPL_SSE)
ATTRIBUTE_ALIGNED16(char locals[sizeof(btDbvtAabbMm)]);
btDbvtVolume& res=*(btDbvtVolume*)locals;
#else
btDbvtVolume res;
btDbvtVolume res;
#endif
Merge(a,b,res);
return(res);
@@ -249,7 +249,7 @@ static void split( const tNodeArray& leaves,
static btDbvtVolume bounds( const tNodeArray& leaves)
{
#if DBVT_MERGE_IMPL==DBVT_IMPL_SSE
DBVT_ALIGN char locals[sizeof(btDbvtVolume)];
ATTRIBUTE_ALIGNED16(char locals[sizeof(btDbvtVolume)]);
btDbvtVolume& volume=*(btDbvtVolume*)locals;
volume=leaves[0]->volume;
#else

View File

@@ -53,12 +53,6 @@ subject to the following restrictions:
// Inlining
#define DBVT_INLINE SIMD_FORCE_INLINE
// Align
#ifdef WIN32
#define DBVT_ALIGN __declspec(align(16))
#else
#define DBVT_ALIGN
#endif
// Specific methods implementation

View File

@@ -792,7 +792,7 @@ public:
return false;
///don't do CCD when the collision filters are not matching
if (!btCollisionWorld::ClosestConvexResultCallback::needsCollision(proxy0))
if (!ClosestConvexResultCallback::needsCollision(proxy0))
return false;
///don't do CCD when there are already contact points (touching contact/penetration)

View File

@@ -641,7 +641,9 @@ btSoftBody* btSoftBodyHelpers::CreatePatchUV(btSoftBodyWorldInfo& worldInfo,
btVector3* x=new btVector3[tot];
btScalar* m=new btScalar[tot];
for(int iy=0;iy<ry;++iy)
int iy;
for(iy=0;iy<ry;++iy)
{
const btScalar ty=iy/(btScalar)(ry-1);
const btVector3 py0=lerp(corner00,corner01,ty);
@@ -669,7 +671,7 @@ btSoftBody* btSoftBodyHelpers::CreatePatchUV(btSoftBodyWorldInfo& worldInfo,
int z = 0;
/* Create links and faces */
for(int iy=0;iy<ry;++iy)
for(iy=0;iy<ry;++iy)
{
for(int ix=0;ix<rx;++ix)
{

View File

@@ -298,6 +298,7 @@ void CProfileManager::DumpRecursive(CProfileIterator* profileIterator, int spaci
int numChildren = 0;
for (i = 0; !profileIterator->Is_Done(); i++,profileIterator->Next())
{
numChildren++;
@@ -318,7 +319,8 @@ void CProfileManager::DumpRecursive(CProfileIterator* profileIterator, int spaci
}
for (i=0;i<spacing;i++) printf(".");
printf("%s (%.3f %%) :: %.3f ms\n", "Unaccounted:",parent_time > SIMD_EPSILON ? ((parent_time - accumulated_time) / parent_time) * 100 : 0.f, parent_time - accumulated_time);
for (int i=0;i<numChildren;i++)
for (i=0;i<numChildren;i++)
{
profileIterator->Enter_Child(i);
DumpRecursive(profileIterator,spacing+3);