mirror of https://github.com/axmolengine/axmol.git
Chipmunk fixes
This commit is contained in:
parent
b4bedd24d0
commit
cf2227dda5
|
@ -428,7 +428,7 @@ struct cpSpace {
|
||||||
cpArray *pooledArbiters;
|
cpArray *pooledArbiters;
|
||||||
|
|
||||||
cpArray *allocatedBuffers;
|
cpArray *allocatedBuffers;
|
||||||
unsigned int locked;
|
int locked;
|
||||||
|
|
||||||
cpBool usesWildcards;
|
cpBool usesWildcards;
|
||||||
cpHashSet *collisionHandlers;
|
cpHashSet *collisionHandlers;
|
||||||
|
|
|
@ -23,7 +23,7 @@ CP_EXPORT cpPolyline *cpPolylineSimplifyCurves(cpPolyline *line, cpFloat tol);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
Returns a copy of a polyline simplified by discarding "flat" vertexes.
|
Returns a copy of a polyline simplified by discarding "flat" vertexes.
|
||||||
This works well on straigt edged or angular shapes, not as well on smooth shapes.
|
This works well on straight edged or angular shapes, not as well on smooth shapes.
|
||||||
*/
|
*/
|
||||||
CP_EXPORT cpPolyline *cpPolylineSimplifyVertexes(cpPolyline *line, cpFloat tol);
|
CP_EXPORT cpPolyline *cpPolylineSimplifyVertexes(cpPolyline *line, cpFloat tol);
|
||||||
|
|
||||||
|
|
|
@ -234,7 +234,7 @@ cpBoxShapeInit(cpPolyShape *poly, cpBody *body, cpFloat width, cpFloat height, c
|
||||||
cpPolyShape *
|
cpPolyShape *
|
||||||
cpBoxShapeInit2(cpPolyShape *poly, cpBody *body, cpBB box, cpFloat radius)
|
cpBoxShapeInit2(cpPolyShape *poly, cpBody *body, cpBB box, cpFloat radius)
|
||||||
{
|
{
|
||||||
cpVect verts[] = {
|
cpVect verts[4] = {
|
||||||
cpv(box.r, box.b),
|
cpv(box.r, box.b),
|
||||||
cpv(box.r, box.t),
|
cpv(box.r, box.t),
|
||||||
cpv(box.l, box.t),
|
cpv(box.l, box.t),
|
||||||
|
|
|
@ -123,8 +123,6 @@ cpSpaceDebugDrawConstraint(cpConstraint *constraint, cpSpaceDebugDrawOptions *op
|
||||||
options->drawSegment(a, b, color, data);
|
options->drawSegment(a, b, color, data);
|
||||||
} else if(cpConstraintIsDampedSpring(constraint)){
|
} else if(cpConstraintIsDampedSpring(constraint)){
|
||||||
cpDampedSpring *spring = (cpDampedSpring *)constraint;
|
cpDampedSpring *spring = (cpDampedSpring *)constraint;
|
||||||
cpDataPointer data = options->data;
|
|
||||||
cpSpaceDebugColor color = options->constraintColor;
|
|
||||||
|
|
||||||
cpVect a = cpTransformPoint(body_a->transform, spring->anchorA);
|
cpVect a = cpTransformPoint(body_a->transform, spring->anchorA);
|
||||||
cpVect b = cpTransformPoint(body_b->transform, spring->anchorB);
|
cpVect b = cpTransformPoint(body_b->transform, spring->anchorB);
|
||||||
|
|
Loading…
Reference in New Issue