mirror of https://github.com/axmolengine/axmol.git
issue #3900: JSBool -> bool, JS_TRUE -> true, JS_FALSE -> false.
This commit is contained in:
parent
408c3fdda9
commit
e4366e3e00
|
@ -1 +1 @@
|
|||
2a8f07a22574900290f772ad5a580ef9fc57a9b8
|
||||
9bb3730d93acc86d6c8c9754a8212fddccda980c
|
|
@ -1 +1 @@
|
|||
ac3eca550f3b923d03d042ed63edf3b66cc183b7
|
||||
ca3ec96cd3436fb02c9d259995efad5500c5c041
|
|
@ -10,279 +10,279 @@
|
|||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
JSBool JSB_cpArbiterGetCount(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
JSBool JSB_cpArbiterGetDepth(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
JSBool JSB_cpArbiterGetElasticity(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
JSBool JSB_cpArbiterGetFriction(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
JSBool JSB_cpArbiterGetNormal(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
JSBool JSB_cpArbiterGetPoint(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
JSBool JSB_cpArbiterGetSurfaceVelocity(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
JSBool JSB_cpArbiterIgnore(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
JSBool JSB_cpArbiterIsFirstContact(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
JSBool JSB_cpArbiterSetElasticity(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
JSBool JSB_cpArbiterSetFriction(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
JSBool JSB_cpArbiterSetSurfaceVelocity(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
JSBool JSB_cpArbiterTotalImpulse(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
JSBool JSB_cpArbiterTotalImpulseWithFriction(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
JSBool JSB_cpArbiterTotalKE(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
JSBool JSB_cpAreaForCircle(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
JSBool JSB_cpAreaForSegment(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
JSBool JSB_cpBBArea(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
JSBool JSB_cpBBClampVect(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
JSBool JSB_cpBBContainsBB(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
JSBool JSB_cpBBContainsVect(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
JSBool JSB_cpBBExpand(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
JSBool JSB_cpBBIntersects(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
JSBool JSB_cpBBIntersectsSegment(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
JSBool JSB_cpBBMerge(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
JSBool JSB_cpBBMergedArea(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
JSBool JSB_cpBBNew(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
JSBool JSB_cpBBNewForCircle(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
JSBool JSB_cpBBSegmentQuery(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
JSBool JSB_cpBBWrapVect(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
JSBool JSB_cpBodyActivate(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
JSBool JSB_cpBodyActivateStatic(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
JSBool JSB_cpBodyApplyForce(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
JSBool JSB_cpBodyApplyImpulse(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
JSBool JSB_cpBodyDestroy(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
JSBool JSB_cpBodyFree(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
JSBool JSB_cpBodyGetAngVel(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
JSBool JSB_cpBodyGetAngVelLimit(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
JSBool JSB_cpBodyGetAngle(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
JSBool JSB_cpBodyGetForce(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
JSBool JSB_cpBodyGetMass(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
JSBool JSB_cpBodyGetMoment(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
JSBool JSB_cpBodyGetPos(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
JSBool JSB_cpBodyGetRot(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
JSBool JSB_cpBodyGetSpace(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
JSBool JSB_cpBodyGetTorque(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
JSBool JSB_cpBodyGetVel(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
JSBool JSB_cpBodyGetVelAtLocalPoint(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
JSBool JSB_cpBodyGetVelAtWorldPoint(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
JSBool JSB_cpBodyGetVelLimit(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
JSBool JSB_cpBodyInit(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
JSBool JSB_cpBodyInitStatic(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
JSBool JSB_cpBodyIsRogue(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
JSBool JSB_cpBodyIsSleeping(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
JSBool JSB_cpBodyIsStatic(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
JSBool JSB_cpBodyKineticEnergy(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
JSBool JSB_cpBodyLocal2World(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
JSBool JSB_cpBodyNew(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
JSBool JSB_cpBodyNewStatic(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
JSBool JSB_cpBodyResetForces(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
JSBool JSB_cpBodySetAngVel(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
JSBool JSB_cpBodySetAngVelLimit(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
JSBool JSB_cpBodySetAngle(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
JSBool JSB_cpBodySetForce(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
JSBool JSB_cpBodySetMass(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
JSBool JSB_cpBodySetMoment(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
JSBool JSB_cpBodySetPos(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
JSBool JSB_cpBodySetTorque(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
JSBool JSB_cpBodySetVel(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
JSBool JSB_cpBodySetVelLimit(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
JSBool JSB_cpBodySleep(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
JSBool JSB_cpBodySleepWithGroup(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
JSBool JSB_cpBodyUpdatePosition(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
JSBool JSB_cpBodyUpdateVelocity(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
JSBool JSB_cpBodyWorld2Local(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
JSBool JSB_cpBoxShapeNew(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
JSBool JSB_cpBoxShapeNew2(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
JSBool JSB_cpCircleShapeGetOffset(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
JSBool JSB_cpCircleShapeGetRadius(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
JSBool JSB_cpCircleShapeNew(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
JSBool JSB_cpConstraintActivateBodies(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
JSBool JSB_cpConstraintDestroy(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
JSBool JSB_cpConstraintFree(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
JSBool JSB_cpConstraintGetA(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
JSBool JSB_cpConstraintGetB(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
JSBool JSB_cpConstraintGetErrorBias(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
JSBool JSB_cpConstraintGetImpulse(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
JSBool JSB_cpConstraintGetMaxBias(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
JSBool JSB_cpConstraintGetMaxForce(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
JSBool JSB_cpConstraintGetSpace(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
JSBool JSB_cpConstraintSetErrorBias(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
JSBool JSB_cpConstraintSetMaxBias(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
JSBool JSB_cpConstraintSetMaxForce(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
JSBool JSB_cpDampedRotarySpringGetDamping(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
JSBool JSB_cpDampedRotarySpringGetRestAngle(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
JSBool JSB_cpDampedRotarySpringGetStiffness(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
JSBool JSB_cpDampedRotarySpringNew(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
JSBool JSB_cpDampedRotarySpringSetDamping(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
JSBool JSB_cpDampedRotarySpringSetRestAngle(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
JSBool JSB_cpDampedRotarySpringSetStiffness(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
JSBool JSB_cpDampedSpringGetAnchr1(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
JSBool JSB_cpDampedSpringGetAnchr2(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
JSBool JSB_cpDampedSpringGetDamping(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
JSBool JSB_cpDampedSpringGetRestLength(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
JSBool JSB_cpDampedSpringGetStiffness(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
JSBool JSB_cpDampedSpringNew(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
JSBool JSB_cpDampedSpringSetAnchr1(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
JSBool JSB_cpDampedSpringSetAnchr2(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
JSBool JSB_cpDampedSpringSetDamping(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
JSBool JSB_cpDampedSpringSetRestLength(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
JSBool JSB_cpDampedSpringSetStiffness(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
JSBool JSB_cpGearJointGetPhase(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
JSBool JSB_cpGearJointGetRatio(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
JSBool JSB_cpGearJointNew(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
JSBool JSB_cpGearJointSetPhase(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
JSBool JSB_cpGearJointSetRatio(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
JSBool JSB_cpGrooveJointGetAnchr2(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
JSBool JSB_cpGrooveJointGetGrooveA(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
JSBool JSB_cpGrooveJointGetGrooveB(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
JSBool JSB_cpGrooveJointNew(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
JSBool JSB_cpGrooveJointSetAnchr2(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
JSBool JSB_cpGrooveJointSetGrooveA(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
JSBool JSB_cpGrooveJointSetGrooveB(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
JSBool JSB_cpInitChipmunk(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
JSBool JSB_cpMomentForBox(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
JSBool JSB_cpMomentForBox2(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
JSBool JSB_cpMomentForCircle(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
JSBool JSB_cpMomentForSegment(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
JSBool JSB_cpPinJointGetAnchr1(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
JSBool JSB_cpPinJointGetAnchr2(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
JSBool JSB_cpPinJointGetDist(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
JSBool JSB_cpPinJointNew(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
JSBool JSB_cpPinJointSetAnchr1(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
JSBool JSB_cpPinJointSetAnchr2(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
JSBool JSB_cpPinJointSetDist(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
JSBool JSB_cpPivotJointGetAnchr1(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
JSBool JSB_cpPivotJointGetAnchr2(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
JSBool JSB_cpPivotJointNew(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
JSBool JSB_cpPivotJointNew2(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
JSBool JSB_cpPivotJointSetAnchr1(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
JSBool JSB_cpPivotJointSetAnchr2(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
JSBool JSB_cpPolyShapeGetNumVerts(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
JSBool JSB_cpPolyShapeGetVert(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
JSBool JSB_cpRatchetJointGetAngle(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
JSBool JSB_cpRatchetJointGetPhase(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
JSBool JSB_cpRatchetJointGetRatchet(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
JSBool JSB_cpRatchetJointNew(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
JSBool JSB_cpRatchetJointSetAngle(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
JSBool JSB_cpRatchetJointSetPhase(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
JSBool JSB_cpRatchetJointSetRatchet(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
JSBool JSB_cpResetShapeIdCounter(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
JSBool JSB_cpRotaryLimitJointGetMax(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
JSBool JSB_cpRotaryLimitJointGetMin(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
JSBool JSB_cpRotaryLimitJointNew(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
JSBool JSB_cpRotaryLimitJointSetMax(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
JSBool JSB_cpRotaryLimitJointSetMin(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
JSBool JSB_cpSegmentShapeGetA(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
JSBool JSB_cpSegmentShapeGetB(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
JSBool JSB_cpSegmentShapeGetNormal(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
JSBool JSB_cpSegmentShapeGetRadius(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
JSBool JSB_cpSegmentShapeNew(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
JSBool JSB_cpSegmentShapeSetNeighbors(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
JSBool JSB_cpShapeCacheBB(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
JSBool JSB_cpShapeDestroy(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
JSBool JSB_cpShapeFree(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
JSBool JSB_cpShapeGetBB(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
JSBool JSB_cpShapeGetBody(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
JSBool JSB_cpShapeGetCollisionType(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
JSBool JSB_cpShapeGetElasticity(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
JSBool JSB_cpShapeGetFriction(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
JSBool JSB_cpShapeGetGroup(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
JSBool JSB_cpShapeGetLayers(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
JSBool JSB_cpShapeGetSensor(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
JSBool JSB_cpShapeGetSpace(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
JSBool JSB_cpShapeGetSurfaceVelocity(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
JSBool JSB_cpShapePointQuery(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
JSBool JSB_cpShapeSetBody(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
JSBool JSB_cpShapeSetCollisionType(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
JSBool JSB_cpShapeSetElasticity(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
JSBool JSB_cpShapeSetFriction(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
JSBool JSB_cpShapeSetGroup(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
JSBool JSB_cpShapeSetLayers(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
JSBool JSB_cpShapeSetSensor(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
JSBool JSB_cpShapeSetSurfaceVelocity(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
JSBool JSB_cpShapeUpdate(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
JSBool JSB_cpSimpleMotorGetRate(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
JSBool JSB_cpSimpleMotorNew(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
JSBool JSB_cpSimpleMotorSetRate(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
JSBool JSB_cpSlideJointGetAnchr1(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
JSBool JSB_cpSlideJointGetAnchr2(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
JSBool JSB_cpSlideJointGetMax(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
JSBool JSB_cpSlideJointGetMin(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
JSBool JSB_cpSlideJointNew(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
JSBool JSB_cpSlideJointSetAnchr1(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
JSBool JSB_cpSlideJointSetAnchr2(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
JSBool JSB_cpSlideJointSetMax(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
JSBool JSB_cpSlideJointSetMin(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
JSBool JSB_cpSpaceActivateShapesTouchingShape(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
JSBool JSB_cpSpaceAddBody(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
JSBool JSB_cpSpaceAddConstraint(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
JSBool JSB_cpSpaceAddShape(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
JSBool JSB_cpSpaceAddStaticShape(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
JSBool JSB_cpSpaceContainsBody(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
JSBool JSB_cpSpaceContainsConstraint(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
JSBool JSB_cpSpaceContainsShape(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
JSBool JSB_cpSpaceDestroy(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
JSBool JSB_cpSpaceFree(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
JSBool JSB_cpSpaceGetCollisionBias(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
JSBool JSB_cpSpaceGetCollisionPersistence(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
JSBool JSB_cpSpaceGetCollisionSlop(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
JSBool JSB_cpSpaceGetCurrentTimeStep(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
JSBool JSB_cpSpaceGetDamping(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
JSBool JSB_cpSpaceGetEnableContactGraph(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
JSBool JSB_cpSpaceGetGravity(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
JSBool JSB_cpSpaceGetIdleSpeedThreshold(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
JSBool JSB_cpSpaceGetIterations(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
JSBool JSB_cpSpaceGetSleepTimeThreshold(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
JSBool JSB_cpSpaceGetStaticBody(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
JSBool JSB_cpSpaceInit(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
JSBool JSB_cpSpaceIsLocked(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
JSBool JSB_cpSpaceNew(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
JSBool JSB_cpSpacePointQueryFirst(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
JSBool JSB_cpSpaceReindexShape(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
JSBool JSB_cpSpaceReindexShapesForBody(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
JSBool JSB_cpSpaceReindexStatic(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
JSBool JSB_cpSpaceRemoveBody(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
JSBool JSB_cpSpaceRemoveConstraint(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
JSBool JSB_cpSpaceRemoveShape(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
JSBool JSB_cpSpaceRemoveStaticShape(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
JSBool JSB_cpSpaceSetCollisionBias(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
JSBool JSB_cpSpaceSetCollisionPersistence(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
JSBool JSB_cpSpaceSetCollisionSlop(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
JSBool JSB_cpSpaceSetDamping(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
JSBool JSB_cpSpaceSetEnableContactGraph(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
JSBool JSB_cpSpaceSetGravity(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
JSBool JSB_cpSpaceSetIdleSpeedThreshold(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
JSBool JSB_cpSpaceSetIterations(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
JSBool JSB_cpSpaceSetSleepTimeThreshold(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
JSBool JSB_cpSpaceStep(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
JSBool JSB_cpSpaceUseSpatialHash(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
JSBool JSB_cpfabs(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
JSBool JSB_cpfclamp(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
JSBool JSB_cpfclamp01(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
JSBool JSB_cpflerp(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
JSBool JSB_cpflerpconst(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
JSBool JSB_cpfmax(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
JSBool JSB_cpfmin(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
JSBool JSB_cpvadd(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
JSBool JSB_cpvclamp(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
JSBool JSB_cpvcross(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
JSBool JSB_cpvdist(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
JSBool JSB_cpvdistsq(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
JSBool JSB_cpvdot(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
JSBool JSB_cpveql(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
JSBool JSB_cpvforangle(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
JSBool JSB_cpvlength(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
JSBool JSB_cpvlengthsq(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
JSBool JSB_cpvlerp(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
JSBool JSB_cpvlerpconst(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
JSBool JSB_cpvmult(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
JSBool JSB_cpvnear(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
JSBool JSB_cpvneg(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
JSBool JSB_cpvnormalize(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
JSBool JSB_cpvnormalize_safe(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
JSBool JSB_cpvperp(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
JSBool JSB_cpvproject(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
JSBool JSB_cpvrotate(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
JSBool JSB_cpvrperp(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
JSBool JSB_cpvslerp(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
JSBool JSB_cpvslerpconst(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
JSBool JSB_cpvsub(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
JSBool JSB_cpvtoangle(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
JSBool JSB_cpvunrotate(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
bool JSB_cpArbiterGetCount(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
bool JSB_cpArbiterGetDepth(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
bool JSB_cpArbiterGetElasticity(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
bool JSB_cpArbiterGetFriction(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
bool JSB_cpArbiterGetNormal(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
bool JSB_cpArbiterGetPoint(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
bool JSB_cpArbiterGetSurfaceVelocity(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
bool JSB_cpArbiterIgnore(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
bool JSB_cpArbiterIsFirstContact(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
bool JSB_cpArbiterSetElasticity(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
bool JSB_cpArbiterSetFriction(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
bool JSB_cpArbiterSetSurfaceVelocity(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
bool JSB_cpArbiterTotalImpulse(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
bool JSB_cpArbiterTotalImpulseWithFriction(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
bool JSB_cpArbiterTotalKE(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
bool JSB_cpAreaForCircle(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
bool JSB_cpAreaForSegment(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
bool JSB_cpBBArea(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
bool JSB_cpBBClampVect(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
bool JSB_cpBBContainsBB(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
bool JSB_cpBBContainsVect(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
bool JSB_cpBBExpand(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
bool JSB_cpBBIntersects(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
bool JSB_cpBBIntersectsSegment(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
bool JSB_cpBBMerge(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
bool JSB_cpBBMergedArea(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
bool JSB_cpBBNew(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
bool JSB_cpBBNewForCircle(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
bool JSB_cpBBSegmentQuery(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
bool JSB_cpBBWrapVect(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
bool JSB_cpBodyActivate(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
bool JSB_cpBodyActivateStatic(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
bool JSB_cpBodyApplyForce(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
bool JSB_cpBodyApplyImpulse(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
bool JSB_cpBodyDestroy(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
bool JSB_cpBodyFree(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
bool JSB_cpBodyGetAngVel(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
bool JSB_cpBodyGetAngVelLimit(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
bool JSB_cpBodyGetAngle(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
bool JSB_cpBodyGetForce(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
bool JSB_cpBodyGetMass(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
bool JSB_cpBodyGetMoment(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
bool JSB_cpBodyGetPos(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
bool JSB_cpBodyGetRot(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
bool JSB_cpBodyGetSpace(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
bool JSB_cpBodyGetTorque(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
bool JSB_cpBodyGetVel(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
bool JSB_cpBodyGetVelAtLocalPoint(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
bool JSB_cpBodyGetVelAtWorldPoint(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
bool JSB_cpBodyGetVelLimit(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
bool JSB_cpBodyInit(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
bool JSB_cpBodyInitStatic(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
bool JSB_cpBodyIsRogue(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
bool JSB_cpBodyIsSleeping(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
bool JSB_cpBodyIsStatic(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
bool JSB_cpBodyKineticEnergy(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
bool JSB_cpBodyLocal2World(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
bool JSB_cpBodyNew(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
bool JSB_cpBodyNewStatic(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
bool JSB_cpBodyResetForces(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
bool JSB_cpBodySetAngVel(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
bool JSB_cpBodySetAngVelLimit(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
bool JSB_cpBodySetAngle(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
bool JSB_cpBodySetForce(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
bool JSB_cpBodySetMass(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
bool JSB_cpBodySetMoment(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
bool JSB_cpBodySetPos(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
bool JSB_cpBodySetTorque(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
bool JSB_cpBodySetVel(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
bool JSB_cpBodySetVelLimit(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
bool JSB_cpBodySleep(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
bool JSB_cpBodySleepWithGroup(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
bool JSB_cpBodyUpdatePosition(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
bool JSB_cpBodyUpdateVelocity(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
bool JSB_cpBodyWorld2Local(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
bool JSB_cpBoxShapeNew(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
bool JSB_cpBoxShapeNew2(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
bool JSB_cpCircleShapeGetOffset(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
bool JSB_cpCircleShapeGetRadius(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
bool JSB_cpCircleShapeNew(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
bool JSB_cpConstraintActivateBodies(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
bool JSB_cpConstraintDestroy(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
bool JSB_cpConstraintFree(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
bool JSB_cpConstraintGetA(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
bool JSB_cpConstraintGetB(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
bool JSB_cpConstraintGetErrorBias(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
bool JSB_cpConstraintGetImpulse(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
bool JSB_cpConstraintGetMaxBias(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
bool JSB_cpConstraintGetMaxForce(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
bool JSB_cpConstraintGetSpace(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
bool JSB_cpConstraintSetErrorBias(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
bool JSB_cpConstraintSetMaxBias(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
bool JSB_cpConstraintSetMaxForce(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
bool JSB_cpDampedRotarySpringGetDamping(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
bool JSB_cpDampedRotarySpringGetRestAngle(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
bool JSB_cpDampedRotarySpringGetStiffness(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
bool JSB_cpDampedRotarySpringNew(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
bool JSB_cpDampedRotarySpringSetDamping(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
bool JSB_cpDampedRotarySpringSetRestAngle(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
bool JSB_cpDampedRotarySpringSetStiffness(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
bool JSB_cpDampedSpringGetAnchr1(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
bool JSB_cpDampedSpringGetAnchr2(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
bool JSB_cpDampedSpringGetDamping(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
bool JSB_cpDampedSpringGetRestLength(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
bool JSB_cpDampedSpringGetStiffness(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
bool JSB_cpDampedSpringNew(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
bool JSB_cpDampedSpringSetAnchr1(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
bool JSB_cpDampedSpringSetAnchr2(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
bool JSB_cpDampedSpringSetDamping(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
bool JSB_cpDampedSpringSetRestLength(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
bool JSB_cpDampedSpringSetStiffness(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
bool JSB_cpGearJointGetPhase(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
bool JSB_cpGearJointGetRatio(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
bool JSB_cpGearJointNew(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
bool JSB_cpGearJointSetPhase(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
bool JSB_cpGearJointSetRatio(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
bool JSB_cpGrooveJointGetAnchr2(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
bool JSB_cpGrooveJointGetGrooveA(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
bool JSB_cpGrooveJointGetGrooveB(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
bool JSB_cpGrooveJointNew(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
bool JSB_cpGrooveJointSetAnchr2(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
bool JSB_cpGrooveJointSetGrooveA(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
bool JSB_cpGrooveJointSetGrooveB(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
bool JSB_cpInitChipmunk(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
bool JSB_cpMomentForBox(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
bool JSB_cpMomentForBox2(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
bool JSB_cpMomentForCircle(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
bool JSB_cpMomentForSegment(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
bool JSB_cpPinJointGetAnchr1(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
bool JSB_cpPinJointGetAnchr2(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
bool JSB_cpPinJointGetDist(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
bool JSB_cpPinJointNew(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
bool JSB_cpPinJointSetAnchr1(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
bool JSB_cpPinJointSetAnchr2(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
bool JSB_cpPinJointSetDist(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
bool JSB_cpPivotJointGetAnchr1(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
bool JSB_cpPivotJointGetAnchr2(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
bool JSB_cpPivotJointNew(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
bool JSB_cpPivotJointNew2(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
bool JSB_cpPivotJointSetAnchr1(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
bool JSB_cpPivotJointSetAnchr2(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
bool JSB_cpPolyShapeGetNumVerts(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
bool JSB_cpPolyShapeGetVert(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
bool JSB_cpRatchetJointGetAngle(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
bool JSB_cpRatchetJointGetPhase(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
bool JSB_cpRatchetJointGetRatchet(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
bool JSB_cpRatchetJointNew(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
bool JSB_cpRatchetJointSetAngle(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
bool JSB_cpRatchetJointSetPhase(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
bool JSB_cpRatchetJointSetRatchet(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
bool JSB_cpResetShapeIdCounter(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
bool JSB_cpRotaryLimitJointGetMax(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
bool JSB_cpRotaryLimitJointGetMin(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
bool JSB_cpRotaryLimitJointNew(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
bool JSB_cpRotaryLimitJointSetMax(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
bool JSB_cpRotaryLimitJointSetMin(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
bool JSB_cpSegmentShapeGetA(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
bool JSB_cpSegmentShapeGetB(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
bool JSB_cpSegmentShapeGetNormal(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
bool JSB_cpSegmentShapeGetRadius(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
bool JSB_cpSegmentShapeNew(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
bool JSB_cpSegmentShapeSetNeighbors(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
bool JSB_cpShapeCacheBB(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
bool JSB_cpShapeDestroy(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
bool JSB_cpShapeFree(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
bool JSB_cpShapeGetBB(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
bool JSB_cpShapeGetBody(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
bool JSB_cpShapeGetCollisionType(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
bool JSB_cpShapeGetElasticity(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
bool JSB_cpShapeGetFriction(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
bool JSB_cpShapeGetGroup(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
bool JSB_cpShapeGetLayers(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
bool JSB_cpShapeGetSensor(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
bool JSB_cpShapeGetSpace(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
bool JSB_cpShapeGetSurfaceVelocity(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
bool JSB_cpShapePointQuery(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
bool JSB_cpShapeSetBody(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
bool JSB_cpShapeSetCollisionType(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
bool JSB_cpShapeSetElasticity(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
bool JSB_cpShapeSetFriction(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
bool JSB_cpShapeSetGroup(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
bool JSB_cpShapeSetLayers(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
bool JSB_cpShapeSetSensor(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
bool JSB_cpShapeSetSurfaceVelocity(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
bool JSB_cpShapeUpdate(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
bool JSB_cpSimpleMotorGetRate(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
bool JSB_cpSimpleMotorNew(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
bool JSB_cpSimpleMotorSetRate(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
bool JSB_cpSlideJointGetAnchr1(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
bool JSB_cpSlideJointGetAnchr2(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
bool JSB_cpSlideJointGetMax(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
bool JSB_cpSlideJointGetMin(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
bool JSB_cpSlideJointNew(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
bool JSB_cpSlideJointSetAnchr1(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
bool JSB_cpSlideJointSetAnchr2(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
bool JSB_cpSlideJointSetMax(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
bool JSB_cpSlideJointSetMin(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
bool JSB_cpSpaceActivateShapesTouchingShape(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
bool JSB_cpSpaceAddBody(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
bool JSB_cpSpaceAddConstraint(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
bool JSB_cpSpaceAddShape(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
bool JSB_cpSpaceAddStaticShape(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
bool JSB_cpSpaceContainsBody(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
bool JSB_cpSpaceContainsConstraint(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
bool JSB_cpSpaceContainsShape(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
bool JSB_cpSpaceDestroy(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
bool JSB_cpSpaceFree(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
bool JSB_cpSpaceGetCollisionBias(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
bool JSB_cpSpaceGetCollisionPersistence(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
bool JSB_cpSpaceGetCollisionSlop(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
bool JSB_cpSpaceGetCurrentTimeStep(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
bool JSB_cpSpaceGetDamping(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
bool JSB_cpSpaceGetEnableContactGraph(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
bool JSB_cpSpaceGetGravity(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
bool JSB_cpSpaceGetIdleSpeedThreshold(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
bool JSB_cpSpaceGetIterations(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
bool JSB_cpSpaceGetSleepTimeThreshold(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
bool JSB_cpSpaceGetStaticBody(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
bool JSB_cpSpaceInit(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
bool JSB_cpSpaceIsLocked(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
bool JSB_cpSpaceNew(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
bool JSB_cpSpacePointQueryFirst(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
bool JSB_cpSpaceReindexShape(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
bool JSB_cpSpaceReindexShapesForBody(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
bool JSB_cpSpaceReindexStatic(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
bool JSB_cpSpaceRemoveBody(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
bool JSB_cpSpaceRemoveConstraint(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
bool JSB_cpSpaceRemoveShape(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
bool JSB_cpSpaceRemoveStaticShape(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
bool JSB_cpSpaceSetCollisionBias(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
bool JSB_cpSpaceSetCollisionPersistence(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
bool JSB_cpSpaceSetCollisionSlop(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
bool JSB_cpSpaceSetDamping(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
bool JSB_cpSpaceSetEnableContactGraph(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
bool JSB_cpSpaceSetGravity(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
bool JSB_cpSpaceSetIdleSpeedThreshold(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
bool JSB_cpSpaceSetIterations(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
bool JSB_cpSpaceSetSleepTimeThreshold(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
bool JSB_cpSpaceStep(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
bool JSB_cpSpaceUseSpatialHash(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
bool JSB_cpfabs(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
bool JSB_cpfclamp(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
bool JSB_cpfclamp01(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
bool JSB_cpflerp(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
bool JSB_cpflerpconst(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
bool JSB_cpfmax(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
bool JSB_cpfmin(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
bool JSB_cpvadd(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
bool JSB_cpvclamp(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
bool JSB_cpvcross(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
bool JSB_cpvdist(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
bool JSB_cpvdistsq(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
bool JSB_cpvdot(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
bool JSB_cpveql(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
bool JSB_cpvforangle(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
bool JSB_cpvlength(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
bool JSB_cpvlengthsq(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
bool JSB_cpvlerp(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
bool JSB_cpvlerpconst(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
bool JSB_cpvmult(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
bool JSB_cpvnear(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
bool JSB_cpvneg(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
bool JSB_cpvnormalize(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
bool JSB_cpvnormalize_safe(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
bool JSB_cpvperp(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
bool JSB_cpvproject(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
bool JSB_cpvrotate(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
bool JSB_cpvrperp(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
bool JSB_cpvslerp(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
bool JSB_cpvslerpconst(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
bool JSB_cpvsub(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
bool JSB_cpvtoangle(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
bool JSB_cpvunrotate(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
|
|
|
@ -37,7 +37,7 @@ USING_NS_CC_EXT;
|
|||
void static freeSpaceChildren(cpSpace *space);
|
||||
|
||||
template<class T>
|
||||
static JSBool dummy_constructor(JSContext *cx, uint32_t argc, jsval *vp) {
|
||||
static bool dummy_constructor(JSContext *cx, uint32_t argc, jsval *vp) {
|
||||
TypeTest<T> t;
|
||||
T* cobj = new T();
|
||||
cobj->autorelease();
|
||||
|
@ -54,7 +54,7 @@ static JSBool dummy_constructor(JSContext *cx, uint32_t argc, jsval *vp) {
|
|||
JS_AddObjectRoot(cx, &pp->obj);
|
||||
JS_SET_RVAL(cx, vp, OBJECT_TO_JSVAL(_tmp));
|
||||
|
||||
return JS_TRUE;
|
||||
return true;
|
||||
}
|
||||
|
||||
#pragma mark - convertions
|
||||
|
@ -76,7 +76,7 @@ void JSPROXY_CCPhysicsSprite_finalize(JSFreeOp *fop, JSObject *obj)
|
|||
|
||||
// Arguments:
|
||||
// Ret value: cpBody* (N/A)
|
||||
JSBool JSPROXY_CCPhysicsSprite_getCPBody(JSContext *cx, uint32_t argc, jsval *vp) {
|
||||
bool JSPROXY_CCPhysicsSprite_getCPBody(JSContext *cx, uint32_t argc, jsval *vp) {
|
||||
|
||||
JSObject *obj = JS_THIS_OBJECT(cx, vp);
|
||||
js_proxy_t *proxy = jsb_get_js_proxy(obj);
|
||||
|
@ -88,12 +88,12 @@ JSBool JSPROXY_CCPhysicsSprite_getCPBody(JSContext *cx, uint32_t argc, jsval *vp
|
|||
jsval ret_jsval = c_class_to_jsval( cx, ret_val, JSB_cpBody_object, JSB_cpBody_class, "cpBody" );
|
||||
JS_SET_RVAL(cx, vp, ret_jsval);
|
||||
|
||||
return JS_TRUE;
|
||||
return true;
|
||||
}
|
||||
|
||||
// Arguments:
|
||||
// Ret value: BOOL (b)
|
||||
JSBool JSPROXY_CCPhysicsSprite_ignoreBodyRotation(JSContext *cx, uint32_t argc, jsval *vp) {
|
||||
bool JSPROXY_CCPhysicsSprite_ignoreBodyRotation(JSContext *cx, uint32_t argc, jsval *vp) {
|
||||
|
||||
JSObject *obj = JS_THIS_OBJECT(cx, vp);
|
||||
js_proxy_t *proxy = jsb_get_js_proxy(obj);
|
||||
|
@ -104,12 +104,12 @@ JSBool JSPROXY_CCPhysicsSprite_ignoreBodyRotation(JSContext *cx, uint32_t argc,
|
|||
|
||||
ret_val = real->isIgnoreBodyRotation();
|
||||
JS_SET_RVAL(cx, vp, BOOLEAN_TO_JSVAL(ret_val));
|
||||
return JS_TRUE;
|
||||
return true;
|
||||
}
|
||||
|
||||
// Arguments: cpBody*
|
||||
// Ret value: void (None)
|
||||
JSBool JSPROXY_CCPhysicsSprite_setCPBody_(JSContext *cx, uint32_t argc, jsval *vp) {
|
||||
bool JSPROXY_CCPhysicsSprite_setCPBody_(JSContext *cx, uint32_t argc, jsval *vp) {
|
||||
|
||||
JSObject *obj = JS_THIS_OBJECT(cx, vp);
|
||||
js_proxy_t *proxy = jsb_get_js_proxy(obj);
|
||||
|
@ -117,21 +117,21 @@ JSBool JSPROXY_CCPhysicsSprite_setCPBody_(JSContext *cx, uint32_t argc, jsval *v
|
|||
TEST_NATIVE_OBJECT(cx, real)
|
||||
|
||||
jsval *argvp = JS_ARGV(cx,vp);
|
||||
JSBool ok = JS_TRUE;
|
||||
bool ok = true;
|
||||
|
||||
cpBody* arg0;
|
||||
|
||||
ok &= jsval_to_opaque( cx, *argvp++, (void**)&arg0 );
|
||||
if( ! ok ) return JS_FALSE;
|
||||
if( ! ok ) return false;
|
||||
|
||||
real->setCPBody((cpBody*)arg0);
|
||||
JS_SET_RVAL(cx, vp, JSVAL_VOID);
|
||||
return JS_TRUE;
|
||||
return true;
|
||||
}
|
||||
|
||||
// Arguments: BOOL
|
||||
// Ret value: void (None)
|
||||
JSBool JSPROXY_CCPhysicsSprite_setIgnoreBodyRotation_(JSContext *cx, uint32_t argc, jsval *vp) {
|
||||
bool JSPROXY_CCPhysicsSprite_setIgnoreBodyRotation_(JSContext *cx, uint32_t argc, jsval *vp) {
|
||||
|
||||
JSObject *obj = JS_THIS_OBJECT(cx, vp);
|
||||
js_proxy_t *proxy = jsb_get_js_proxy(obj);
|
||||
|
@ -139,15 +139,15 @@ JSBool JSPROXY_CCPhysicsSprite_setIgnoreBodyRotation_(JSContext *cx, uint32_t ar
|
|||
TEST_NATIVE_OBJECT(cx, real)
|
||||
|
||||
jsval *argvp = JS_ARGV(cx,vp);
|
||||
JSBool ok = JS_TRUE;
|
||||
JSBool arg0;
|
||||
bool ok = true;
|
||||
bool arg0;
|
||||
|
||||
ok &= JS_ValueToBoolean( cx, *argvp++, &arg0 );
|
||||
if( ! ok ) return JS_FALSE;
|
||||
if( ! ok ) return false;
|
||||
|
||||
real->setIgnoreBodyRotation((bool)arg0);
|
||||
JS_SET_RVAL(cx, vp, JSVAL_VOID);
|
||||
return JS_TRUE;
|
||||
return true;
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -169,14 +169,14 @@ void JSB_CCPhysicsDebugNode_finalize(JSFreeOp *fop, JSObject *obj)
|
|||
|
||||
// Arguments: cpSpace*
|
||||
// Ret value: PhysicsDebugNode* (o)
|
||||
JSBool JSB_CCPhysicsDebugNode_debugNodeForCPSpace__static(JSContext *cx, uint32_t argc, jsval *vp) {
|
||||
JSB_PRECONDITION2( argc == 1, cx, JS_FALSE, "Invalid number of arguments" );
|
||||
bool JSB_CCPhysicsDebugNode_debugNodeForCPSpace__static(JSContext *cx, uint32_t argc, jsval *vp) {
|
||||
JSB_PRECONDITION2( argc == 1, cx, false, "Invalid number of arguments" );
|
||||
jsval *argvp = JS_ARGV(cx,vp);
|
||||
JSBool ok = JS_TRUE;
|
||||
bool ok = true;
|
||||
cpSpace* arg0;
|
||||
|
||||
ok &= jsval_to_opaque( cx, *argvp++, (void**)&arg0 );
|
||||
JSB_PRECONDITION2(ok, cx, JS_FALSE, "Error processing arguments");
|
||||
JSB_PRECONDITION2(ok, cx, false, "Error processing arguments");
|
||||
|
||||
PhysicsDebugNode* ret = PhysicsDebugNode::create(arg0);
|
||||
jsval jsret;
|
||||
|
@ -201,40 +201,40 @@ JSBool JSB_CCPhysicsDebugNode_debugNodeForCPSpace__static(JSContext *cx, uint32_
|
|||
} while (0);
|
||||
JS_SET_RVAL(cx, vp, jsret);
|
||||
|
||||
return JS_TRUE;
|
||||
return true;
|
||||
}
|
||||
|
||||
// Arguments: cpSpace*
|
||||
// Ret value: void (None)
|
||||
JSBool JSB_CCPhysicsDebugNode_setSpace_(JSContext *cx, uint32_t argc, jsval *vp) {
|
||||
bool JSB_CCPhysicsDebugNode_setSpace_(JSContext *cx, uint32_t argc, jsval *vp) {
|
||||
|
||||
JSObject* jsthis = (JSObject *)JS_THIS_OBJECT(cx, vp);
|
||||
js_proxy_t *proxy = jsb_get_js_proxy(jsthis);
|
||||
PhysicsDebugNode* real = (PhysicsDebugNode *)(proxy ? proxy->ptr : NULL);
|
||||
TEST_NATIVE_OBJECT(cx, real)
|
||||
|
||||
JSB_PRECONDITION2( argc == 1, cx, JS_FALSE, "Invalid number of arguments" );
|
||||
JSB_PRECONDITION2( argc == 1, cx, false, "Invalid number of arguments" );
|
||||
jsval *argvp = JS_ARGV(cx,vp);
|
||||
JSBool ok = JS_TRUE;
|
||||
bool ok = true;
|
||||
cpSpace* arg0;
|
||||
|
||||
ok &= jsval_to_opaque( cx, *argvp++, (void**)&arg0 );
|
||||
JSB_PRECONDITION2(ok, cx, JS_FALSE, "Error processing arguments");
|
||||
JSB_PRECONDITION2(ok, cx, false, "Error processing arguments");
|
||||
|
||||
real->setSpace(arg0);
|
||||
JS_SET_RVAL(cx, vp, JSVAL_VOID);
|
||||
return JS_TRUE;
|
||||
return true;
|
||||
}
|
||||
|
||||
// Arguments:
|
||||
// Ret value: cpSpace* (N/A)
|
||||
JSBool JSB_CCPhysicsDebugNode_space(JSContext *cx, uint32_t argc, jsval *vp) {
|
||||
bool JSB_CCPhysicsDebugNode_space(JSContext *cx, uint32_t argc, jsval *vp) {
|
||||
|
||||
JSObject* jsthis = (JSObject *)JS_THIS_OBJECT(cx, vp);
|
||||
js_proxy_t *proxy = jsb_get_js_proxy(jsthis);
|
||||
PhysicsDebugNode* real = (PhysicsDebugNode *)(proxy ? proxy->ptr : NULL);
|
||||
TEST_NATIVE_OBJECT(cx, real)
|
||||
JSB_PRECONDITION2( argc == 0, cx, JS_FALSE, "Invalid number of arguments" );
|
||||
JSB_PRECONDITION2( argc == 0, cx, false, "Invalid number of arguments" );
|
||||
cpSpace* ret_val;
|
||||
|
||||
ret_val = real->getSpace();
|
||||
|
@ -242,7 +242,7 @@ JSBool JSB_CCPhysicsDebugNode_space(JSContext *cx, uint32_t argc, jsval *vp) {
|
|||
jsval ret_jsval = opaque_to_jsval( cx, ret_val );
|
||||
JS_SET_RVAL(cx, vp, ret_jsval);
|
||||
|
||||
return JS_TRUE;
|
||||
return true;
|
||||
}
|
||||
|
||||
void JSB_CCPhysicsDebugNode_createClass(JSContext *cx, JSObject* globalObj, const char* name )
|
||||
|
@ -299,16 +299,16 @@ void JSB_CCPhysicsDebugNode_createClass(JSContext *cx, JSObject* globalObj, cons
|
|||
|
||||
// Arguments: NSString*, CGRect
|
||||
// Ret value: PhysicsSprite* (o)
|
||||
JSBool JSPROXY_CCPhysicsSprite_spriteWithFile_rect__static(JSContext *cx, uint32_t argc, jsval *vp) {
|
||||
bool JSPROXY_CCPhysicsSprite_spriteWithFile_rect__static(JSContext *cx, uint32_t argc, jsval *vp) {
|
||||
|
||||
jsval *argv = JS_ARGV(cx, vp);
|
||||
JSBool ok = JS_TRUE;
|
||||
bool ok = true;
|
||||
if (argc == 2) {
|
||||
const char* arg0;
|
||||
std::string arg0_tmp; ok &= jsval_to_std_string(cx, argv[0], &arg0_tmp); arg0 = arg0_tmp.c_str();
|
||||
cocos2d::Rect arg1;
|
||||
ok &= jsval_to_ccrect(cx, argv[1], &arg1);
|
||||
JSB_PRECONDITION2(ok, cx, JS_FALSE, "Error processing arguments");
|
||||
JSB_PRECONDITION2(ok, cx, false, "Error processing arguments");
|
||||
|
||||
PhysicsSprite* ret = PhysicsSprite::create(arg0, arg1);
|
||||
|
||||
|
@ -332,12 +332,12 @@ JSBool JSPROXY_CCPhysicsSprite_spriteWithFile_rect__static(JSContext *cx, uint32
|
|||
}
|
||||
} while (0);
|
||||
JS_SET_RVAL(cx, vp, jsret);
|
||||
return JS_TRUE;
|
||||
return true;
|
||||
}
|
||||
if (argc == 1) {
|
||||
const char* arg0;
|
||||
std::string arg0_tmp; ok &= jsval_to_std_string(cx, argv[0], &arg0_tmp); arg0 = arg0_tmp.c_str();
|
||||
JSB_PRECONDITION2(ok, cx, JS_FALSE, "Error processing arguments");
|
||||
JSB_PRECONDITION2(ok, cx, false, "Error processing arguments");
|
||||
|
||||
PhysicsSprite* ret = PhysicsSprite::create(arg0);
|
||||
|
||||
|
@ -360,15 +360,15 @@ JSBool JSPROXY_CCPhysicsSprite_spriteWithFile_rect__static(JSContext *cx, uint32
|
|||
}
|
||||
} while (0);
|
||||
JS_SET_RVAL(cx, vp, jsret);
|
||||
return JS_TRUE;
|
||||
return true;
|
||||
}
|
||||
return JS_FALSE;
|
||||
return false;
|
||||
|
||||
}
|
||||
|
||||
// Arguments: SpriteFrame*
|
||||
// Ret value: PhysicsSprite* (o)
|
||||
JSBool JSPROXY_CCPhysicsSprite_spriteWithSpriteFrame__static(JSContext *cx, uint32_t argc, jsval *vp) {
|
||||
bool JSPROXY_CCPhysicsSprite_spriteWithSpriteFrame__static(JSContext *cx, uint32_t argc, jsval *vp) {
|
||||
jsval *argv = JS_ARGV(cx, vp);
|
||||
cocos2d::SpriteFrame* arg0;
|
||||
if (argc >= 1) {
|
||||
|
@ -401,14 +401,14 @@ JSBool JSPROXY_CCPhysicsSprite_spriteWithSpriteFrame__static(JSContext *cx, uint
|
|||
}
|
||||
} while (0);
|
||||
JS_SET_RVAL(cx, vp, jsret);
|
||||
return JS_TRUE;
|
||||
return true;
|
||||
}
|
||||
|
||||
// Arguments: NSString*
|
||||
// Ret value: PhysicsSprite* (o)
|
||||
JSBool JSPROXY_CCPhysicsSprite_spriteWithSpriteFrameName__static(JSContext *cx, uint32_t argc, jsval *vp) {
|
||||
bool JSPROXY_CCPhysicsSprite_spriteWithSpriteFrameName__static(JSContext *cx, uint32_t argc, jsval *vp) {
|
||||
jsval *argv = JS_ARGV(cx, vp);
|
||||
JSBool ok = JS_TRUE;
|
||||
bool ok = true;
|
||||
const char* arg0;
|
||||
std::string arg0_tmp;
|
||||
if (argc == 1) {
|
||||
|
@ -435,11 +435,11 @@ JSBool JSPROXY_CCPhysicsSprite_spriteWithSpriteFrameName__static(JSContext *cx,
|
|||
}
|
||||
} while (0);
|
||||
JS_SET_RVAL(cx, vp, jsret);
|
||||
return JS_TRUE;
|
||||
return true;
|
||||
}
|
||||
|
||||
JS_ReportError(cx, "wrong number of arguments: %d, was expecting %d", argc, 1);
|
||||
return JS_FALSE;
|
||||
return false;
|
||||
}
|
||||
|
||||
void JSPROXY_CCPhysicsSprite_createClass(JSContext *cx, JSObject* globalObj)
|
||||
|
@ -527,10 +527,10 @@ void register_CCPhysicsDebugNode(JSContext *cx, JSObject *obj) {
|
|||
JSB_CCPhysicsDebugNode_createClass(cx, obj, "PhysicsDebugNode");
|
||||
}
|
||||
|
||||
JSBool jsval_to_cpBB( JSContext *cx, jsval vp, cpBB *ret )
|
||||
bool jsval_to_cpBB( JSContext *cx, jsval vp, cpBB *ret )
|
||||
{
|
||||
JSObject *jsobj;
|
||||
JSBool ok = JS_ValueToObject( cx, vp, &jsobj );
|
||||
bool ok = JS_ValueToObject( cx, vp, &jsobj );
|
||||
JSB_PRECONDITION( ok, "Error converting value to object");
|
||||
JSB_PRECONDITION( jsobj, "Not a valid JS object");
|
||||
|
||||
|
@ -538,7 +538,7 @@ JSBool jsval_to_cpBB( JSContext *cx, jsval vp, cpBB *ret )
|
|||
JS::RootedValue valb(cx);
|
||||
JS::RootedValue valr(cx);
|
||||
JS::RootedValue valt(cx);
|
||||
ok = JS_TRUE;
|
||||
ok = true;
|
||||
ok &= JS_GetProperty(cx, jsobj, "l", &vall);
|
||||
ok &= JS_GetProperty(cx, jsobj, "b", &valb);
|
||||
ok &= JS_GetProperty(cx, jsobj, "r", &valr);
|
||||
|
@ -557,7 +557,7 @@ JSBool jsval_to_cpBB( JSContext *cx, jsval vp, cpBB *ret )
|
|||
ret->r = r;
|
||||
ret->t = t;
|
||||
|
||||
return JS_TRUE;
|
||||
return true;
|
||||
}
|
||||
|
||||
jsval cpBB_to_jsval(JSContext *cx, cpBB bb )
|
||||
|
@ -579,11 +579,11 @@ jsval cpBB_to_jsval(JSContext *cx, cpBB bb )
|
|||
// this function expect to receive an array of numbers, and not an array of vects
|
||||
// OK: [1,2, 3,4, 5,6] <- expected
|
||||
// BAD: [{x:1, y:2}, {x:3,y:4}, {x:5, y:6}] <- not expected
|
||||
JSBool jsval_to_array_of_cpvect( JSContext *cx, jsval vp, cpVect**verts, int *numVerts)
|
||||
bool jsval_to_array_of_cpvect( JSContext *cx, jsval vp, cpVect**verts, int *numVerts)
|
||||
{
|
||||
// Parsing sequence
|
||||
JSObject *jsobj;
|
||||
JSBool ok = JS_ValueToObject( cx, vp, &jsobj );
|
||||
bool ok = JS_ValueToObject( cx, vp, &jsobj );
|
||||
JSB_PRECONDITION( ok, "Error converting value to object");
|
||||
|
||||
JSB_PRECONDITION( jsobj && JS_IsArrayObject( cx, jsobj), "Object must be an array");
|
||||
|
@ -612,7 +612,7 @@ JSBool jsval_to_array_of_cpvect( JSContext *cx, jsval vp, cpVect**verts, int *nu
|
|||
*numVerts = len/2;
|
||||
*verts = array;
|
||||
|
||||
return JS_TRUE;
|
||||
return true;
|
||||
}
|
||||
|
||||
#pragma mark - Collision Handler
|
||||
|
@ -667,11 +667,11 @@ static cpBool myCollisionBegin(cpArbiter *arb, cpSpace *space, void *data)
|
|||
JSB_AUTOCOMPARTMENT_WITH_GLOBAL_OBJCET
|
||||
|
||||
jsval rval;
|
||||
JSBool ok = JS_CallFunctionValue( handler->cx, handler->jsthis, OBJECT_TO_JSVAL(handler->begin), 2, args, &rval);
|
||||
bool ok = JS_CallFunctionValue( handler->cx, handler->jsthis, OBJECT_TO_JSVAL(handler->begin), 2, args, &rval);
|
||||
JSB_PRECONDITION2(ok, handler->cx, cpFalse, "Error calling collision callback: begin");
|
||||
|
||||
if( JSVAL_IS_BOOLEAN(rval) ) {
|
||||
JSBool ret = JSVAL_TO_BOOLEAN(rval);
|
||||
bool ret = JSVAL_TO_BOOLEAN(rval);
|
||||
return (cpBool)ret;
|
||||
}
|
||||
return cpTrue;
|
||||
|
@ -693,11 +693,11 @@ static cpBool myCollisionPre(cpArbiter *arb, cpSpace *space, void *data)
|
|||
JSB_AUTOCOMPARTMENT_WITH_GLOBAL_OBJCET
|
||||
|
||||
jsval rval;
|
||||
JSBool ok = JS_CallFunctionValue( handler->cx, handler->jsthis, OBJECT_TO_JSVAL(handler->pre), 2, args, &rval);
|
||||
JSB_PRECONDITION2(ok, handler->cx, JS_FALSE, "Error calling collision callback: pre");
|
||||
bool ok = JS_CallFunctionValue( handler->cx, handler->jsthis, OBJECT_TO_JSVAL(handler->pre), 2, args, &rval);
|
||||
JSB_PRECONDITION2(ok, handler->cx, false, "Error calling collision callback: pre");
|
||||
|
||||
if( JSVAL_IS_BOOLEAN(rval) ) {
|
||||
JSBool ret = JSVAL_TO_BOOLEAN(rval);
|
||||
bool ret = JSVAL_TO_BOOLEAN(rval);
|
||||
return (cpBool)ret;
|
||||
}
|
||||
return cpTrue;
|
||||
|
@ -720,7 +720,7 @@ static void myCollisionPost(cpArbiter *arb, cpSpace *space, void *data)
|
|||
JSB_AUTOCOMPARTMENT_WITH_GLOBAL_OBJCET
|
||||
|
||||
jsval ignore;
|
||||
JSBool ok = JS_CallFunctionValue( handler->cx, handler->jsthis, OBJECT_TO_JSVAL(handler->post), 2, args, &ignore);
|
||||
bool ok = JS_CallFunctionValue( handler->cx, handler->jsthis, OBJECT_TO_JSVAL(handler->post), 2, args, &ignore);
|
||||
JSB_PRECONDITION2(ok, handler->cx, , "Error calling collision callback: Post");
|
||||
}
|
||||
|
||||
|
@ -740,7 +740,7 @@ static void myCollisionSeparate(cpArbiter *arb, cpSpace *space, void *data)
|
|||
JSB_AUTOCOMPARTMENT_WITH_GLOBAL_OBJCET
|
||||
|
||||
jsval ignore;
|
||||
JSBool ok = JS_CallFunctionValue( handler->cx, handler->jsthis, OBJECT_TO_JSVAL(handler->separate), 2, args, &ignore);
|
||||
bool ok = JS_CallFunctionValue( handler->cx, handler->jsthis, OBJECT_TO_JSVAL(handler->separate), 2, args, &ignore);
|
||||
JSB_PRECONDITION2(ok, handler->cx, , "Error calling collision callback: Separate");}
|
||||
|
||||
#pragma mark - cpSpace
|
||||
|
@ -794,13 +794,13 @@ void JSB_cpSpace_finalize(JSFreeOp *fop, JSObject *jsthis)
|
|||
#pragma mark addCollisionHandler
|
||||
|
||||
static
|
||||
JSBool __jsb_cpSpace_addCollisionHandler(JSContext *cx, jsval *vp, jsval *argvp, cpSpace *space, unsigned int is_oo)
|
||||
bool __jsb_cpSpace_addCollisionHandler(JSContext *cx, jsval *vp, jsval *argvp, cpSpace *space, unsigned int is_oo)
|
||||
{
|
||||
struct collision_handler *handler = (struct collision_handler*) malloc( sizeof(*handler) );
|
||||
|
||||
JSB_PRECONDITION(handler, "Error allocating memory");
|
||||
|
||||
JSBool ok = JS_TRUE;
|
||||
bool ok = true;
|
||||
|
||||
// args
|
||||
ok &= jsval_to_int(cx, *argvp++, (int32_t*) &handler->typeA );
|
||||
|
@ -864,28 +864,28 @@ JSBool __jsb_cpSpace_addCollisionHandler(JSContext *cx, jsval *vp, jsval *argvp,
|
|||
|
||||
|
||||
JS_SET_RVAL(cx, vp, JSVAL_VOID);
|
||||
return JS_TRUE;
|
||||
return true;
|
||||
}
|
||||
|
||||
JSBool JSB_cpSpaceAddCollisionHandler(JSContext *cx, uint32_t argc, jsval *vp)
|
||||
bool JSB_cpSpaceAddCollisionHandler(JSContext *cx, uint32_t argc, jsval *vp)
|
||||
{
|
||||
JSB_PRECONDITION2(argc==7, cx, JS_FALSE, "Invalid number of arguments");
|
||||
JSB_PRECONDITION2(argc==7, cx, false, "Invalid number of arguments");
|
||||
|
||||
|
||||
jsval *argvp = JS_ARGV(cx,vp);
|
||||
|
||||
// args
|
||||
cpSpace *space;
|
||||
JSBool ok = jsval_to_opaque( cx, *argvp++, (void**)&space);
|
||||
bool ok = jsval_to_opaque( cx, *argvp++, (void**)&space);
|
||||
JSB_PRECONDITION(ok, "Error parsing arguments");
|
||||
|
||||
return __jsb_cpSpace_addCollisionHandler(cx, vp, argvp, space, 0);
|
||||
}
|
||||
|
||||
// method
|
||||
JSBool JSB_cpSpace_addCollisionHandler(JSContext *cx, uint32_t argc, jsval *vp)
|
||||
bool JSB_cpSpace_addCollisionHandler(JSContext *cx, uint32_t argc, jsval *vp)
|
||||
{
|
||||
JSB_PRECONDITION2(argc==6, cx, JS_FALSE, "Invalid number of arguments");
|
||||
JSB_PRECONDITION2(argc==6, cx, false, "Invalid number of arguments");
|
||||
JSObject* jsthis = (JSObject *)JS_THIS_OBJECT(cx, vp);
|
||||
JSB_PRECONDITION( jsthis, "Invalid jsthis object");
|
||||
|
||||
|
@ -898,9 +898,9 @@ JSBool JSB_cpSpace_addCollisionHandler(JSContext *cx, uint32_t argc, jsval *vp)
|
|||
#pragma mark removeCollisionHandler
|
||||
|
||||
static
|
||||
JSBool __jsb_cpSpace_removeCollisionHandler(JSContext *cx, jsval *vp, jsval *argvp, cpSpace *space)
|
||||
bool __jsb_cpSpace_removeCollisionHandler(JSContext *cx, jsval *vp, jsval *argvp, cpSpace *space)
|
||||
{
|
||||
JSBool ok = JS_TRUE;
|
||||
bool ok = true;
|
||||
|
||||
cpCollisionType typeA;
|
||||
cpCollisionType typeB;
|
||||
|
@ -932,18 +932,18 @@ JSBool __jsb_cpSpace_removeCollisionHandler(JSContext *cx, jsval *vp, jsval *arg
|
|||
}
|
||||
|
||||
JS_SET_RVAL(cx, vp, JSVAL_VOID);
|
||||
return JS_TRUE;
|
||||
return true;
|
||||
}
|
||||
|
||||
// Free function
|
||||
JSBool JSB_cpSpaceRemoveCollisionHandler(JSContext *cx, uint32_t argc, jsval *vp)
|
||||
bool JSB_cpSpaceRemoveCollisionHandler(JSContext *cx, uint32_t argc, jsval *vp)
|
||||
{
|
||||
JSB_PRECONDITION2(argc==3, cx, JS_FALSE, "Invalid number of arguments");
|
||||
JSB_PRECONDITION2(argc==3, cx, false, "Invalid number of arguments");
|
||||
|
||||
jsval *argvp = JS_ARGV(cx,vp);
|
||||
|
||||
cpSpace* space;
|
||||
JSBool ok = jsval_to_opaque( cx, *argvp++, (void**)&space);
|
||||
bool ok = jsval_to_opaque( cx, *argvp++, (void**)&space);
|
||||
|
||||
JSB_PRECONDITION(ok, "Error parsing arguments");
|
||||
|
||||
|
@ -951,9 +951,9 @@ JSBool JSB_cpSpaceRemoveCollisionHandler(JSContext *cx, uint32_t argc, jsval *vp
|
|||
}
|
||||
|
||||
// method
|
||||
JSBool JSB_cpSpace_removeCollisionHandler(JSContext *cx, uint32_t argc, jsval *vp)
|
||||
bool JSB_cpSpace_removeCollisionHandler(JSContext *cx, uint32_t argc, jsval *vp)
|
||||
{
|
||||
JSB_PRECONDITION2(argc==2, cx, JS_FALSE, "Invalid number of arguments");
|
||||
JSB_PRECONDITION2(argc==2, cx, false, "Invalid number of arguments");
|
||||
|
||||
JSObject* jsthis = (JSObject *)JS_THIS_OBJECT(cx, vp);
|
||||
JSB_PRECONDITION( jsthis, "Invalid jsthis object");
|
||||
|
@ -968,14 +968,14 @@ JSBool JSB_cpSpace_removeCollisionHandler(JSContext *cx, uint32_t argc, jsval *v
|
|||
|
||||
// Arguments: cpBody*
|
||||
// Ret value: cpBody*
|
||||
JSBool JSB_cpSpace_addBody(JSContext *cx, uint32_t argc, jsval *vp) {
|
||||
JSB_PRECONDITION2(argc==1, cx, JS_FALSE, "Invalid number of arguments");
|
||||
bool JSB_cpSpace_addBody(JSContext *cx, uint32_t argc, jsval *vp) {
|
||||
JSB_PRECONDITION2(argc==1, cx, false, "Invalid number of arguments");
|
||||
|
||||
JSObject* jsthis = (JSObject *)JS_THIS_OBJECT(cx, vp);
|
||||
struct jsb_c_proxy_s *proxy = jsb_get_c_proxy_for_jsobject(jsthis);
|
||||
cpSpace* arg0 = (cpSpace*) proxy->handle;
|
||||
jsval *argvp = JS_ARGV(cx,vp);
|
||||
JSBool ok = JS_TRUE;
|
||||
bool ok = true;
|
||||
cpBody* arg1;
|
||||
|
||||
jsval retval = *argvp; struct jsb_c_proxy_s *retproxy;
|
||||
|
@ -990,19 +990,19 @@ JSBool JSB_cpSpace_addBody(JSContext *cx, uint32_t argc, jsval *vp) {
|
|||
// addBody returns the same object that was added, so return it without conversions
|
||||
JS_SET_RVAL(cx, vp, retval);
|
||||
|
||||
return JS_TRUE;
|
||||
return true;
|
||||
}
|
||||
|
||||
// Arguments: cpConstraint*
|
||||
// Ret value: cpConstraint*
|
||||
JSBool JSB_cpSpace_addConstraint(JSContext *cx, uint32_t argc, jsval *vp) {
|
||||
JSB_PRECONDITION2(argc==1, cx, JS_FALSE, "Invalid number of arguments");
|
||||
bool JSB_cpSpace_addConstraint(JSContext *cx, uint32_t argc, jsval *vp) {
|
||||
JSB_PRECONDITION2(argc==1, cx, false, "Invalid number of arguments");
|
||||
|
||||
JSObject* jsthis = (JSObject *)JS_THIS_OBJECT(cx, vp);
|
||||
struct jsb_c_proxy_s *proxy = jsb_get_c_proxy_for_jsobject(jsthis);
|
||||
cpSpace* arg0 = (cpSpace*) proxy->handle;
|
||||
jsval *argvp = JS_ARGV(cx,vp);
|
||||
JSBool ok = JS_TRUE;
|
||||
bool ok = true;
|
||||
cpConstraint* arg1;
|
||||
|
||||
jsval retval = *argvp; struct jsb_c_proxy_s *retproxy;
|
||||
|
@ -1017,19 +1017,19 @@ JSBool JSB_cpSpace_addConstraint(JSContext *cx, uint32_t argc, jsval *vp) {
|
|||
// addConstraint returns the same object that was added, so return it without conversions
|
||||
JS_SET_RVAL(cx, vp, retval);
|
||||
|
||||
return JS_TRUE;
|
||||
return true;
|
||||
}
|
||||
|
||||
// Arguments: cpShape*
|
||||
// Ret value: cpShape*
|
||||
JSBool JSB_cpSpace_addShape(JSContext *cx, uint32_t argc, jsval *vp) {
|
||||
JSB_PRECONDITION2(argc==1, cx, JS_FALSE, "Invalid number of arguments");
|
||||
bool JSB_cpSpace_addShape(JSContext *cx, uint32_t argc, jsval *vp) {
|
||||
JSB_PRECONDITION2(argc==1, cx, false, "Invalid number of arguments");
|
||||
|
||||
JSObject* jsthis = (JSObject *)JS_THIS_OBJECT(cx, vp);
|
||||
struct jsb_c_proxy_s *proxy = jsb_get_c_proxy_for_jsobject(jsthis);
|
||||
cpSpace* arg0 = (cpSpace*) proxy->handle;
|
||||
jsval *argvp = JS_ARGV(cx,vp);
|
||||
JSBool ok = JS_TRUE;
|
||||
bool ok = true;
|
||||
cpShape* arg1;
|
||||
|
||||
jsval retval = *argvp; struct jsb_c_proxy_s *retproxy;
|
||||
|
@ -1044,19 +1044,19 @@ JSBool JSB_cpSpace_addShape(JSContext *cx, uint32_t argc, jsval *vp) {
|
|||
// addShape returns the same object that was added, so return it without conversions
|
||||
JS_SET_RVAL(cx, vp, retval);
|
||||
|
||||
return JS_TRUE;
|
||||
return true;
|
||||
}
|
||||
|
||||
// Arguments: cpShape*
|
||||
// Ret value: cpShape*
|
||||
JSBool JSB_cpSpace_addStaticShape(JSContext *cx, uint32_t argc, jsval *vp) {
|
||||
JSB_PRECONDITION2(argc==1, cx, JS_FALSE, "Invalid number of arguments");
|
||||
bool JSB_cpSpace_addStaticShape(JSContext *cx, uint32_t argc, jsval *vp) {
|
||||
JSB_PRECONDITION2(argc==1, cx, false, "Invalid number of arguments");
|
||||
|
||||
JSObject* jsthis = (JSObject *)JS_THIS_OBJECT(cx, vp);
|
||||
struct jsb_c_proxy_s *proxy = jsb_get_c_proxy_for_jsobject(jsthis);
|
||||
cpSpace* arg0 = (cpSpace*) proxy->handle;
|
||||
jsval *argvp = JS_ARGV(cx,vp);
|
||||
JSBool ok = JS_TRUE;
|
||||
bool ok = true;
|
||||
cpShape* arg1;
|
||||
|
||||
jsval retval = *argvp; struct jsb_c_proxy_s *retproxy;
|
||||
|
@ -1071,21 +1071,21 @@ JSBool JSB_cpSpace_addStaticShape(JSContext *cx, uint32_t argc, jsval *vp) {
|
|||
// addStaticShape returns the same object that was added, so return it without conversions
|
||||
JS_SET_RVAL(cx, vp, retval);
|
||||
|
||||
return JS_TRUE;
|
||||
return true;
|
||||
}
|
||||
|
||||
#pragma mark Remove functios. Untoot JSObjects
|
||||
|
||||
// Arguments: cpBody*
|
||||
// Ret value: void
|
||||
JSBool JSB_cpSpace_removeBody(JSContext *cx, uint32_t argc, jsval *vp) {
|
||||
JSB_PRECONDITION2(argc==1, cx, JS_FALSE, "Invalid number of arguments");
|
||||
bool JSB_cpSpace_removeBody(JSContext *cx, uint32_t argc, jsval *vp) {
|
||||
JSB_PRECONDITION2(argc==1, cx, false, "Invalid number of arguments");
|
||||
|
||||
JSObject* jsthis = (JSObject *)JS_THIS_OBJECT(cx, vp);
|
||||
struct jsb_c_proxy_s *proxy = jsb_get_c_proxy_for_jsobject(jsthis);
|
||||
cpSpace* arg0 = (cpSpace*) proxy->handle;
|
||||
jsval *argvp = JS_ARGV(cx,vp);
|
||||
JSBool ok = JS_TRUE;
|
||||
bool ok = true;
|
||||
cpBody* arg1;
|
||||
|
||||
struct jsb_c_proxy_s *retproxy;
|
||||
|
@ -1096,19 +1096,19 @@ JSBool JSB_cpSpace_removeBody(JSContext *cx, uint32_t argc, jsval *vp) {
|
|||
JS_RemoveObjectRoot(cx, &retproxy->jsobj);
|
||||
|
||||
JS_SET_RVAL(cx, vp, JSVAL_VOID);
|
||||
return JS_TRUE;
|
||||
return true;
|
||||
}
|
||||
|
||||
// Arguments: cpConstraint*
|
||||
// Ret value: void
|
||||
JSBool JSB_cpSpace_removeConstraint(JSContext *cx, uint32_t argc, jsval *vp) {
|
||||
JSB_PRECONDITION2(argc==1, cx, JS_FALSE, "Invalid number of arguments");
|
||||
bool JSB_cpSpace_removeConstraint(JSContext *cx, uint32_t argc, jsval *vp) {
|
||||
JSB_PRECONDITION2(argc==1, cx, false, "Invalid number of arguments");
|
||||
|
||||
JSObject* jsthis = (JSObject *)JS_THIS_OBJECT(cx, vp);
|
||||
struct jsb_c_proxy_s *proxy = jsb_get_c_proxy_for_jsobject(jsthis);
|
||||
cpSpace* arg0 = (cpSpace*) proxy->handle;
|
||||
jsval *argvp = JS_ARGV(cx,vp);
|
||||
JSBool ok = JS_TRUE;
|
||||
bool ok = true;
|
||||
cpConstraint* arg1;
|
||||
|
||||
struct jsb_c_proxy_s *retproxy;
|
||||
|
@ -1119,19 +1119,19 @@ JSBool JSB_cpSpace_removeConstraint(JSContext *cx, uint32_t argc, jsval *vp) {
|
|||
JS_RemoveObjectRoot(cx, &retproxy->jsobj);
|
||||
|
||||
JS_SET_RVAL(cx, vp, JSVAL_VOID);
|
||||
return JS_TRUE;
|
||||
return true;
|
||||
}
|
||||
|
||||
// Arguments: cpShape*
|
||||
// Ret value: void
|
||||
JSBool JSB_cpSpace_removeShape(JSContext *cx, uint32_t argc, jsval *vp) {
|
||||
JSB_PRECONDITION2(argc==1, cx, JS_FALSE, "Invalid number of arguments");
|
||||
bool JSB_cpSpace_removeShape(JSContext *cx, uint32_t argc, jsval *vp) {
|
||||
JSB_PRECONDITION2(argc==1, cx, false, "Invalid number of arguments");
|
||||
|
||||
JSObject* jsthis = (JSObject *)JS_THIS_OBJECT(cx, vp);
|
||||
struct jsb_c_proxy_s *proxy = jsb_get_c_proxy_for_jsobject(jsthis);
|
||||
cpSpace* arg0 = (cpSpace*) proxy->handle;
|
||||
jsval *argvp = JS_ARGV(cx,vp);
|
||||
JSBool ok = JS_TRUE;
|
||||
bool ok = true;
|
||||
cpShape* arg1;
|
||||
|
||||
struct jsb_c_proxy_s *retproxy;
|
||||
|
@ -1142,19 +1142,19 @@ JSBool JSB_cpSpace_removeShape(JSContext *cx, uint32_t argc, jsval *vp) {
|
|||
JS_RemoveObjectRoot(cx, &retproxy->jsobj);
|
||||
|
||||
JS_SET_RVAL(cx, vp, JSVAL_VOID);
|
||||
return JS_TRUE;
|
||||
return true;
|
||||
}
|
||||
|
||||
// Arguments: cpShape*
|
||||
// Ret value: void
|
||||
JSBool JSB_cpSpace_removeStaticShape(JSContext *cx, uint32_t argc, jsval *vp) {
|
||||
JSB_PRECONDITION2(argc==1, cx, JS_FALSE, "Invalid number of arguments");
|
||||
bool JSB_cpSpace_removeStaticShape(JSContext *cx, uint32_t argc, jsval *vp) {
|
||||
JSB_PRECONDITION2(argc==1, cx, false, "Invalid number of arguments");
|
||||
|
||||
JSObject* jsthis = (JSObject *)JS_THIS_OBJECT(cx, vp);
|
||||
struct jsb_c_proxy_s *proxy = jsb_get_c_proxy_for_jsobject(jsthis);
|
||||
cpSpace* arg0 = (cpSpace*) proxy->handle;
|
||||
jsval *argvp = JS_ARGV(cx,vp);
|
||||
JSBool ok = JS_TRUE;
|
||||
bool ok = true;
|
||||
cpShape* arg1;
|
||||
|
||||
struct jsb_c_proxy_s *retproxy;
|
||||
|
@ -1165,13 +1165,13 @@ JSBool JSB_cpSpace_removeStaticShape(JSContext *cx, uint32_t argc, jsval *vp) {
|
|||
JS_RemoveObjectRoot(cx, &retproxy->jsobj);
|
||||
|
||||
JS_SET_RVAL(cx, vp, JSVAL_VOID);
|
||||
return JS_TRUE;
|
||||
return true;
|
||||
}
|
||||
#pragma mark - Arbiter
|
||||
|
||||
#pragma mark getBodies
|
||||
static
|
||||
JSBool __jsb_cpArbiter_getBodies(JSContext *cx, jsval *vp, jsval *argvp, cpArbiter *arbiter, unsigned int is_oo)
|
||||
bool __jsb_cpArbiter_getBodies(JSContext *cx, jsval *vp, jsval *argvp, cpArbiter *arbiter, unsigned int is_oo)
|
||||
{
|
||||
cpBody *bodyA;
|
||||
cpBody *bodyB;
|
||||
|
@ -1192,27 +1192,27 @@ JSBool __jsb_cpArbiter_getBodies(JSContext *cx, jsval *vp, jsval *argvp, cpArbit
|
|||
|
||||
JS_SET_RVAL(cx, vp, OBJECT_TO_JSVAL(jsobj));
|
||||
|
||||
return JS_TRUE;
|
||||
return true;
|
||||
}
|
||||
|
||||
// Free function
|
||||
JSBool JSB_cpArbiterGetBodies(JSContext *cx, uint32_t argc, jsval *vp)
|
||||
bool JSB_cpArbiterGetBodies(JSContext *cx, uint32_t argc, jsval *vp)
|
||||
{
|
||||
JSB_PRECONDITION2(argc==1, cx, JS_FALSE, "Invalid number of arguments");
|
||||
JSB_PRECONDITION2(argc==1, cx, false, "Invalid number of arguments");
|
||||
|
||||
jsval *argvp = JS_ARGV(cx,vp);
|
||||
|
||||
cpArbiter* arbiter;
|
||||
if( ! jsval_to_opaque( cx, *argvp++, (void**)&arbiter ) )
|
||||
return JS_FALSE;
|
||||
return false;
|
||||
|
||||
return __jsb_cpArbiter_getBodies(cx, vp, argvp, arbiter, 0);
|
||||
}
|
||||
|
||||
// Method
|
||||
JSBool JSB_cpArbiter_getBodies(JSContext *cx, uint32_t argc, jsval *vp)
|
||||
bool JSB_cpArbiter_getBodies(JSContext *cx, uint32_t argc, jsval *vp)
|
||||
{
|
||||
JSB_PRECONDITION2(argc==0, cx, JS_FALSE, "Invalid number of arguments");
|
||||
JSB_PRECONDITION2(argc==0, cx, false, "Invalid number of arguments");
|
||||
|
||||
JSObject* jsthis = (JSObject *)JS_THIS_OBJECT(cx, vp);
|
||||
JSB_PRECONDITION( jsthis, "Invalid jsthis object");
|
||||
|
@ -1226,7 +1226,7 @@ JSBool JSB_cpArbiter_getBodies(JSContext *cx, uint32_t argc, jsval *vp)
|
|||
|
||||
#pragma mark getShapes
|
||||
static
|
||||
JSBool __jsb_cpArbiter_getShapes(JSContext *cx, jsval *vp, jsval *argvp, cpArbiter *arbiter, unsigned int is_oo)
|
||||
bool __jsb_cpArbiter_getShapes(JSContext *cx, jsval *vp, jsval *argvp, cpArbiter *arbiter, unsigned int is_oo)
|
||||
{
|
||||
cpShape *shapeA;
|
||||
cpShape *shapeB;
|
||||
|
@ -1247,27 +1247,27 @@ JSBool __jsb_cpArbiter_getShapes(JSContext *cx, jsval *vp, jsval *argvp, cpArbit
|
|||
|
||||
JS_SET_RVAL(cx, vp, OBJECT_TO_JSVAL(jsobj));
|
||||
|
||||
return JS_TRUE;
|
||||
return true;
|
||||
}
|
||||
|
||||
// function
|
||||
JSBool JSB_cpArbiterGetShapes(JSContext *cx, uint32_t argc, jsval *vp)
|
||||
bool JSB_cpArbiterGetShapes(JSContext *cx, uint32_t argc, jsval *vp)
|
||||
{
|
||||
JSB_PRECONDITION2(argc==1, cx, JS_FALSE, "Invalid number of arguments");
|
||||
JSB_PRECONDITION2(argc==1, cx, false, "Invalid number of arguments");
|
||||
|
||||
jsval *argvp = JS_ARGV(cx,vp);
|
||||
|
||||
cpArbiter* arbiter;
|
||||
if( ! jsval_to_opaque( cx, *argvp++, (void**) &arbiter ) )
|
||||
return JS_FALSE;
|
||||
return false;
|
||||
|
||||
return __jsb_cpArbiter_getShapes(cx, vp, argvp, arbiter, 0);
|
||||
}
|
||||
|
||||
// method
|
||||
JSBool JSB_cpArbiter_getShapes(JSContext *cx, uint32_t argc, jsval *vp)
|
||||
bool JSB_cpArbiter_getShapes(JSContext *cx, uint32_t argc, jsval *vp)
|
||||
{
|
||||
JSB_PRECONDITION2(argc==0, cx, JS_FALSE, "Invalid number of arguments");
|
||||
JSB_PRECONDITION2(argc==0, cx, false, "Invalid number of arguments");
|
||||
JSObject* jsthis = (JSObject *)JS_THIS_OBJECT(cx, vp);
|
||||
JSB_PRECONDITION( jsthis, "Invalid jsthis object");
|
||||
|
||||
|
@ -1282,12 +1282,12 @@ JSBool JSB_cpArbiter_getShapes(JSContext *cx, uint32_t argc, jsval *vp)
|
|||
#pragma mark constructor
|
||||
|
||||
// Manually added to identify static vs dynamic bodies
|
||||
JSBool JSB_cpBody_constructor(JSContext *cx, uint32_t argc, jsval *vp)
|
||||
bool JSB_cpBody_constructor(JSContext *cx, uint32_t argc, jsval *vp)
|
||||
{
|
||||
JSB_PRECONDITION2(argc==2, cx, JS_FALSE, "Invalid number of arguments");
|
||||
JSB_PRECONDITION2(argc==2, cx, false, "Invalid number of arguments");
|
||||
JSObject *jsobj = JS_NewObject(cx, JSB_cpBody_class, JSB_cpBody_object, NULL);
|
||||
jsval *argvp = JS_ARGV(cx,vp);
|
||||
JSBool ok = JS_TRUE;
|
||||
bool ok = true;
|
||||
double m; double i;
|
||||
|
||||
ok &= JS_ValueToNumber( cx, *argvp++, &m );
|
||||
|
@ -1310,37 +1310,37 @@ JSBool JSB_cpBody_constructor(JSContext *cx, uint32_t argc, jsval *vp)
|
|||
jsb_set_jsobject_for_proxy(jsobj, ret_body);
|
||||
|
||||
JS_SET_RVAL(cx, vp, OBJECT_TO_JSVAL(jsobj));
|
||||
return JS_TRUE;
|
||||
return true;
|
||||
}
|
||||
|
||||
#pragma mark getUserData
|
||||
|
||||
static
|
||||
JSBool __jsb_cpBody_getUserData(JSContext *cx, jsval *vp, jsval *argvp, cpBody *body)
|
||||
bool __jsb_cpBody_getUserData(JSContext *cx, jsval *vp, jsval *argvp, cpBody *body)
|
||||
{
|
||||
JSObject *data = (JSObject*) cpBodyGetUserData(body);
|
||||
JS_SET_RVAL(cx, vp, OBJECT_TO_JSVAL(data));
|
||||
|
||||
return JS_TRUE;
|
||||
return true;
|
||||
}
|
||||
|
||||
// free function
|
||||
JSBool JSB_cpBodyGetUserData(JSContext *cx, uint32_t argc, jsval *vp)
|
||||
bool JSB_cpBodyGetUserData(JSContext *cx, uint32_t argc, jsval *vp)
|
||||
{
|
||||
JSB_PRECONDITION2(argc==1, cx, JS_FALSE, "Invalid number of arguments");
|
||||
JSB_PRECONDITION2(argc==1, cx, false, "Invalid number of arguments");
|
||||
|
||||
jsval *argvp = JS_ARGV(cx,vp);
|
||||
cpBody *body;
|
||||
if( ! jsval_to_opaque( cx, *argvp++, (void**) &body ) )
|
||||
return JS_FALSE;
|
||||
return false;
|
||||
|
||||
return __jsb_cpBody_getUserData(cx, vp, argvp, body);
|
||||
}
|
||||
|
||||
// method
|
||||
JSBool JSB_cpBody_getUserData(JSContext *cx, uint32_t argc, jsval *vp)
|
||||
bool JSB_cpBody_getUserData(JSContext *cx, uint32_t argc, jsval *vp)
|
||||
{
|
||||
JSB_PRECONDITION2(argc==0, cx, JS_FALSE, "Invalid number of arguments");
|
||||
JSB_PRECONDITION2(argc==0, cx, false, "Invalid number of arguments");
|
||||
JSObject* jsthis = (JSObject *)JS_THIS_OBJECT(cx, vp);
|
||||
JSB_PRECONDITION( jsthis, "Invalid jsthis object");
|
||||
|
||||
|
@ -1354,36 +1354,36 @@ JSBool JSB_cpBody_getUserData(JSContext *cx, uint32_t argc, jsval *vp)
|
|||
#pragma mark setUserData
|
||||
|
||||
static
|
||||
JSBool __jsb_cpBody_setUserData(JSContext *cx, jsval *vp, jsval *argvp, cpBody *body)
|
||||
bool __jsb_cpBody_setUserData(JSContext *cx, jsval *vp, jsval *argvp, cpBody *body)
|
||||
{
|
||||
JSObject *jsobj;
|
||||
|
||||
JSBool ok = JS_ValueToObject(cx, *argvp++, &jsobj);
|
||||
bool ok = JS_ValueToObject(cx, *argvp++, &jsobj);
|
||||
|
||||
JSB_PRECONDITION(ok, "Error parsing arguments");
|
||||
|
||||
cpBodySetUserData(body, jsobj);
|
||||
JS_SET_RVAL(cx, vp, JSVAL_VOID);
|
||||
|
||||
return JS_TRUE;
|
||||
return true;
|
||||
}
|
||||
|
||||
// free function
|
||||
JSBool JSB_cpBodySetUserData(JSContext *cx, uint32_t argc, jsval *vp)
|
||||
bool JSB_cpBodySetUserData(JSContext *cx, uint32_t argc, jsval *vp)
|
||||
{
|
||||
JSB_PRECONDITION2(argc==2, cx, JS_FALSE, "Invalid number of arguments");
|
||||
JSB_PRECONDITION2(argc==2, cx, false, "Invalid number of arguments");
|
||||
|
||||
jsval *argvp = JS_ARGV(cx,vp);
|
||||
cpBody *body;
|
||||
JSBool ok = jsval_to_opaque( cx, *argvp++, (void**) &body );
|
||||
bool ok = jsval_to_opaque( cx, *argvp++, (void**) &body );
|
||||
JSB_PRECONDITION(ok, "Error parsing arguments");
|
||||
return __jsb_cpBody_setUserData(cx, vp, argvp, body);
|
||||
}
|
||||
|
||||
// method
|
||||
JSBool JSB_cpBody_setUserData(JSContext *cx, uint32_t argc, jsval *vp)
|
||||
bool JSB_cpBody_setUserData(JSContext *cx, uint32_t argc, jsval *vp)
|
||||
{
|
||||
JSB_PRECONDITION2(argc==1, cx, JS_FALSE, "Invalid number of arguments");
|
||||
JSB_PRECONDITION2(argc==1, cx, false, "Invalid number of arguments");
|
||||
JSObject* jsthis = (JSObject *)JS_THIS_OBJECT(cx, vp);
|
||||
JSB_PRECONDITION( jsthis, "Invalid jsthis object");
|
||||
|
||||
|
@ -1396,31 +1396,31 @@ JSBool JSB_cpBody_setUserData(JSContext *cx, uint32_t argc, jsval *vp)
|
|||
#pragma mark - Poly related
|
||||
|
||||
// cpFloat cpAreaForPoly(const int numVerts, const cpVect *verts);
|
||||
JSBool JSB_cpAreaForPoly(JSContext *cx, uint32_t argc, jsval *vp)
|
||||
bool JSB_cpAreaForPoly(JSContext *cx, uint32_t argc, jsval *vp)
|
||||
{
|
||||
JSB_PRECONDITION2(argc==1, cx, JS_FALSE, "Invalid number of arguments");
|
||||
JSB_PRECONDITION2(argc==1, cx, false, "Invalid number of arguments");
|
||||
jsval *argvp = JS_ARGV(cx,vp);
|
||||
JSBool ok = JS_TRUE;
|
||||
bool ok = true;
|
||||
cpVect *verts;
|
||||
int numVerts;
|
||||
|
||||
ok &= jsval_to_array_of_cpvect( cx, *argvp++, &verts, &numVerts);
|
||||
JSB_PRECONDITION2(ok, cx, JS_FALSE, "Error parsing array");
|
||||
JSB_PRECONDITION2(ok, cx, false, "Error parsing array");
|
||||
|
||||
cpFloat area = cpAreaForPoly(numVerts, verts);
|
||||
|
||||
free(verts);
|
||||
|
||||
JS_SET_RVAL(cx, vp, DOUBLE_TO_JSVAL(area));
|
||||
return JS_TRUE;
|
||||
return true;
|
||||
}
|
||||
|
||||
// cpFloat cpMomentForPoly(cpFloat m, int numVerts, const cpVect *verts, cpVect offset);
|
||||
JSBool JSB_cpMomentForPoly(JSContext *cx, uint32_t argc, jsval *vp)
|
||||
bool JSB_cpMomentForPoly(JSContext *cx, uint32_t argc, jsval *vp)
|
||||
{
|
||||
JSB_PRECONDITION2(argc==3, cx, JS_FALSE, "Invalid number of arguments");
|
||||
JSB_PRECONDITION2(argc==3, cx, false, "Invalid number of arguments");
|
||||
jsval *argvp = JS_ARGV(cx,vp);
|
||||
JSBool ok = JS_TRUE;
|
||||
bool ok = true;
|
||||
cpVect *verts; cpVect offset;
|
||||
int numVerts;
|
||||
double m;
|
||||
|
@ -1429,41 +1429,41 @@ JSBool JSB_cpMomentForPoly(JSContext *cx, uint32_t argc, jsval *vp)
|
|||
ok &= jsval_to_array_of_cpvect( cx, *argvp++, &verts, &numVerts);
|
||||
ok &= jsval_to_cpVect( cx, *argvp++, (cpVect*) &offset );
|
||||
|
||||
JSB_PRECONDITION2(ok, cx, JS_FALSE, "Error parsing args");
|
||||
JSB_PRECONDITION2(ok, cx, false, "Error parsing args");
|
||||
|
||||
cpFloat moment = cpMomentForPoly((cpFloat)m, numVerts, verts, offset);
|
||||
|
||||
free(verts);
|
||||
|
||||
JS_SET_RVAL(cx, vp, DOUBLE_TO_JSVAL(moment));
|
||||
return JS_TRUE;
|
||||
return true;
|
||||
}
|
||||
|
||||
// cpVect cpCentroidForPoly(const int numVerts, const cpVect *verts);
|
||||
JSBool JSB_cpCentroidForPoly(JSContext *cx, uint32_t argc, jsval *vp)
|
||||
bool JSB_cpCentroidForPoly(JSContext *cx, uint32_t argc, jsval *vp)
|
||||
{
|
||||
JSB_PRECONDITION2(argc==1, cx, JS_FALSE, "Invalid number of arguments");
|
||||
JSB_PRECONDITION2(argc==1, cx, false, "Invalid number of arguments");
|
||||
jsval *argvp = JS_ARGV(cx,vp);
|
||||
JSBool ok = JS_TRUE;
|
||||
bool ok = true;
|
||||
cpVect *verts;
|
||||
int numVerts;
|
||||
|
||||
ok &= jsval_to_array_of_cpvect( cx, *argvp++, &verts, &numVerts);
|
||||
JSB_PRECONDITION2(ok, cx, JS_FALSE, "Error parsing args");
|
||||
JSB_PRECONDITION2(ok, cx, false, "Error parsing args");
|
||||
|
||||
cpVect centroid = cpCentroidForPoly(numVerts, verts);
|
||||
|
||||
free(verts);
|
||||
|
||||
JS_SET_RVAL(cx, vp, cpVect_to_jsval(cx, (cpVect)centroid));
|
||||
return JS_TRUE;
|
||||
return true;
|
||||
}
|
||||
|
||||
// void cpRecenterPoly(const int numVerts, cpVect *verts);
|
||||
JSBool JSB_cpRecenterPoly(JSContext *cx, uint32_t argc, jsval *vp)
|
||||
bool JSB_cpRecenterPoly(JSContext *cx, uint32_t argc, jsval *vp)
|
||||
{
|
||||
CCASSERT(false, "NOT IMPLEMENTED");
|
||||
return JS_FALSE;
|
||||
return false;
|
||||
}
|
||||
|
||||
#pragma mark - Object Oriented Chipmunk
|
||||
|
@ -1475,14 +1475,14 @@ JSBool JSB_cpRecenterPoly(JSContext *cx, uint32_t argc, jsval *vp)
|
|||
JSClass* JSB_cpBase_class = NULL;
|
||||
JSObject* JSB_cpBase_object = NULL;
|
||||
// Constructor
|
||||
JSBool JSB_cpBase_constructor(JSContext *cx, uint32_t argc, jsval *vp)
|
||||
bool JSB_cpBase_constructor(JSContext *cx, uint32_t argc, jsval *vp)
|
||||
{
|
||||
JSB_PRECONDITION2( argc==1, cx, JS_FALSE, "Invalid arguments. Expecting 1");
|
||||
JSB_PRECONDITION2( argc==1, cx, false, "Invalid arguments. Expecting 1");
|
||||
|
||||
JSObject *jsobj = JS_NewObject(cx, JSB_cpBase_class, JSB_cpBase_object, NULL);
|
||||
|
||||
jsval *argvp = JS_ARGV(cx,vp);
|
||||
JSBool ok = JS_TRUE;
|
||||
bool ok = true;
|
||||
|
||||
void *handle = NULL;
|
||||
|
||||
|
@ -1494,7 +1494,7 @@ JSBool JSB_cpBase_constructor(JSContext *cx, uint32_t argc, jsval *vp)
|
|||
jsb_set_jsobject_for_proxy(jsobj, handle);
|
||||
|
||||
JS_SET_RVAL(cx, vp, OBJECT_TO_JSVAL(jsobj));
|
||||
return JS_TRUE;
|
||||
return true;
|
||||
}
|
||||
|
||||
// Destructor
|
||||
|
@ -1505,37 +1505,37 @@ void JSB_cpBase_finalize(JSFreeOp *fop, JSObject *obj)
|
|||
// should not delete the handle since it was manually added
|
||||
}
|
||||
|
||||
JSBool JSB_cpBase_getHandle(JSContext *cx, uint32_t argc, jsval *vp)
|
||||
bool JSB_cpBase_getHandle(JSContext *cx, uint32_t argc, jsval *vp)
|
||||
{
|
||||
JSObject* jsthis = (JSObject *)JS_THIS_OBJECT(cx, vp);
|
||||
JSB_PRECONDITION( jsthis, "Invalid jsthis object");
|
||||
JSB_PRECONDITION2(argc==0, cx, JS_FALSE, "Invalid number of arguments");
|
||||
JSB_PRECONDITION2(argc==0, cx, false, "Invalid number of arguments");
|
||||
|
||||
struct jsb_c_proxy_s* proxy = jsb_get_c_proxy_for_jsobject(jsthis);
|
||||
void *handle = proxy->handle;
|
||||
|
||||
jsval ret_val = opaque_to_jsval(cx, handle);
|
||||
JS_SET_RVAL(cx, vp, ret_val);
|
||||
return JS_TRUE;
|
||||
return true;
|
||||
}
|
||||
|
||||
JSBool JSB_cpBase_setHandle(JSContext *cx, uint32_t argc, jsval *vp)
|
||||
bool JSB_cpBase_setHandle(JSContext *cx, uint32_t argc, jsval *vp)
|
||||
{
|
||||
JSObject* jsthis = (JSObject *)JS_THIS_OBJECT(cx, vp);
|
||||
JSB_PRECONDITION( jsthis, "Invalid jsthis object");
|
||||
JSB_PRECONDITION2(argc==1, cx, JS_FALSE, "Invalid number of arguments");
|
||||
JSB_PRECONDITION2(argc==1, cx, false, "Invalid number of arguments");
|
||||
|
||||
jsval *argvp = JS_ARGV(cx,vp);
|
||||
|
||||
void *handle;
|
||||
JSBool ok = jsval_to_opaque(cx, *argvp++, &handle);
|
||||
bool ok = jsval_to_opaque(cx, *argvp++, &handle);
|
||||
JSB_PRECONDITION( ok, "Invalid parsing arguments");
|
||||
|
||||
jsb_set_c_proxy_for_jsobject(jsthis, handle, JSB_C_FLAG_DO_NOT_CALL_FREE);
|
||||
jsb_set_jsobject_for_proxy(jsthis, handle);
|
||||
|
||||
JS_SET_RVAL(cx, vp, JSVAL_VOID);
|
||||
return JS_TRUE;
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
|
@ -1566,18 +1566,18 @@ void JSB_cpBase_createClass(JSContext *cx, JSObject* globalObj, const char* name
|
|||
};
|
||||
|
||||
JSB_cpBase_object = JS_InitClass(cx, globalObj, NULL, JSB_cpBase_class, JSB_cpBase_constructor,0,properties,funcs,NULL,st_funcs);
|
||||
JSBool found;
|
||||
bool found;
|
||||
JS_SetPropertyAttributes(cx, globalObj, name, JSPROP_ENUMERATE | JSPROP_READONLY, &found);
|
||||
}
|
||||
|
||||
// Manual "methods"
|
||||
// Constructor
|
||||
JSBool JSB_cpPolyShape_constructor(JSContext *cx, uint32_t argc, jsval *vp)
|
||||
bool JSB_cpPolyShape_constructor(JSContext *cx, uint32_t argc, jsval *vp)
|
||||
{
|
||||
JSB_PRECONDITION2(argc==3, cx, JS_FALSE, "Invalid number of arguments");
|
||||
JSB_PRECONDITION2(argc==3, cx, false, "Invalid number of arguments");
|
||||
JSObject *jsobj = JS_NewObject(cx, JSB_cpPolyShape_class, JSB_cpPolyShape_object, NULL);
|
||||
jsval *argvp = JS_ARGV(cx,vp);
|
||||
JSBool ok = JS_TRUE;
|
||||
bool ok = true;
|
||||
cpBody* body; cpVect *verts; cpVect offset;
|
||||
int numVerts;
|
||||
|
||||
|
@ -1594,7 +1594,7 @@ JSBool JSB_cpPolyShape_constructor(JSContext *cx, uint32_t argc, jsval *vp)
|
|||
|
||||
free(verts);
|
||||
|
||||
return JS_TRUE;
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -37,49 +37,49 @@
|
|||
#include "js_bindings_chipmunk_auto_classes.h"
|
||||
|
||||
// Free Functions
|
||||
JSBool JSB_cpSpaceAddCollisionHandler(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
JSBool JSB_cpSpaceRemoveCollisionHandler(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
bool JSB_cpSpaceAddCollisionHandler(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
bool JSB_cpSpaceRemoveCollisionHandler(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
|
||||
JSBool JSB_cpArbiterGetBodies(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
JSBool JSB_cpArbiterGetShapes(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
bool JSB_cpArbiterGetBodies(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
bool JSB_cpArbiterGetShapes(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
|
||||
JSBool JSB_cpBodyGetUserData(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
JSBool JSB_cpBodySetUserData(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
bool JSB_cpBodyGetUserData(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
bool JSB_cpBodySetUserData(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
|
||||
// poly related
|
||||
JSBool JSB_cpAreaForPoly(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
JSBool JSB_cpMomentForPoly(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
JSBool JSB_cpCentroidForPoly(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
JSBool JSB_cpRecenterPoly(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
bool JSB_cpAreaForPoly(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
bool JSB_cpMomentForPoly(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
bool JSB_cpCentroidForPoly(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
bool JSB_cpRecenterPoly(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
|
||||
// "Methods" from the OO API
|
||||
JSBool JSB_cpSpace_addCollisionHandler(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
JSBool JSB_cpSpace_removeCollisionHandler(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
bool JSB_cpSpace_addCollisionHandler(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
bool JSB_cpSpace_removeCollisionHandler(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
|
||||
// manually wrapped for rooting/unrooting purposes
|
||||
JSBool JSB_cpSpace_addBody(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
JSBool JSB_cpSpace_addConstraint(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
JSBool JSB_cpSpace_addShape(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
JSBool JSB_cpSpace_addStaticShape(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
JSBool JSB_cpSpace_removeBody(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
JSBool JSB_cpSpace_removeConstraint(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
JSBool JSB_cpSpace_removeShape(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
JSBool JSB_cpSpace_removeStaticShape(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
bool JSB_cpSpace_addBody(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
bool JSB_cpSpace_addConstraint(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
bool JSB_cpSpace_addShape(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
bool JSB_cpSpace_addStaticShape(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
bool JSB_cpSpace_removeBody(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
bool JSB_cpSpace_removeConstraint(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
bool JSB_cpSpace_removeShape(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
bool JSB_cpSpace_removeStaticShape(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
|
||||
|
||||
JSBool JSB_cpArbiter_getBodies(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
JSBool JSB_cpArbiter_getShapes(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
bool JSB_cpArbiter_getBodies(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
bool JSB_cpArbiter_getShapes(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
|
||||
JSBool JSB_cpBody_constructor(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
JSBool JSB_cpBody_getUserData(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
JSBool JSB_cpBody_setUserData(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
bool JSB_cpBody_constructor(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
bool JSB_cpBody_getUserData(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
bool JSB_cpBody_setUserData(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
|
||||
|
||||
// convertions
|
||||
|
||||
jsval cpBB_to_jsval(JSContext *cx, cpBB bb );
|
||||
JSBool jsval_to_cpBB( JSContext *cx, jsval vp, cpBB *ret );
|
||||
JSBool jsval_to_array_of_cpvect( JSContext *cx, jsval vp, cpVect**verts, int *numVerts);
|
||||
bool jsval_to_cpBB( JSContext *cx, jsval vp, cpBB *ret );
|
||||
bool jsval_to_array_of_cpvect( JSContext *cx, jsval vp, cpVect**verts, int *numVerts);
|
||||
|
||||
// requires cocos2d
|
||||
#define cpVect_to_jsval CGPoint_to_jsval
|
||||
|
@ -94,7 +94,7 @@ extern void register_CCPhysicsSprite(JSContext *cx, JSObject *obj);
|
|||
extern void register_CCPhysicsDebugNode(JSContext *cx, JSObject *obj);
|
||||
|
||||
// Manual constructor / destructors
|
||||
JSBool JSB_cpPolyShape_constructor(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
bool JSB_cpPolyShape_constructor(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
void JSB_cpSpace_finalize(JSFreeOp *fop, JSObject *obj);
|
||||
|
||||
#endif // JSB_INCLUDE_CHIPMUNK
|
||||
|
|
Loading…
Reference in New Issue