Commits

minz  committed 856f972

Change python wrap name

  • Participants
  • Parent commits 83c9b7b
  • Branches physics

Comments (0)

Files changed (7)

File include/pgJointObject.h

 
 pgJointObject* PG_DistanceJointNew(pgBodyObject* b1,pgBodyObject* b2,int bCollideConnect,double distance,pgVector2 a1,pgVector2 a2);
 
-#endif //_PYGAME_PHYSICS_JOINT_
+#endif //_PYGAME_PHYSICS_JOINT_
+

File src/pgBodyObject.c

 {
 	PyObject_HEAD_INIT(NULL)
 	0,
-	"physics.body",            /* tp_name */
+	"physics.Body",            /* tp_name */
 	sizeof(pgBodyObject),      /* tp_basicsize */
 	0,                          /* tp_itemsize */
 	(destructor)PG_BodyDestroy,/* tp_dealloc */

File src/pgCollision.c

 	contact->joint.SolveConstraintVelocity = PG_UpdateV;
 
 	return (pgJointObject*)contact;
-}
+}
+

File src/pgJointObject.c

 {
 	PyObject_HEAD_INIT(NULL)
 	0,
-	"physics.joint",            /* tp_name */
+	"physics.Joint",            /* tp_name */
 	sizeof(pgJointObject),      /* tp_basicsize */
 	0,                          /* tp_itemsize */
 	(destructor) PG_JointDestroy,/* tp_dealloc */
 	}
 }
 
-//just for C test useage, not for python
+//just for C test usage, not for python
 pgJointObject* PG_DistanceJointNew(pgBodyObject* b1,pgBodyObject* b2,int bCollideConnect,double dist,pgVector2 a1,pgVector2 a2)
 {
 	pgDistanceJointObject* pjoint = (pgDistanceJointObject*)PyObject_MALLOC(sizeof(pgDistanceJointObject));	
 {
 	PyObject_HEAD_INIT(NULL)
 	0,
-	"physics.distance_joint",            /* tp_name */
+	"physics.Distance_Joint",            /* tp_name */
 	sizeof(pgDistanceJointObject),      /* tp_basicsize */
 	0,                          /* tp_itemsize */
 	(destructor) 0,				/* tp_dealloc */

File src/pgModuleInit.c

 
 	/* Init the module and add the object types. */
 	mod = Py_InitModule3("physics", NULL, "Simple 2D physics module");
-	PyModule_AddObject (mod, "world", (PyObject *) &pgWorldType);
-	PyModule_AddObject (mod, "body", (PyObject *) &pgBodyType);
-	PyModule_AddObject (mod, "joint", (PyObject *) &pgJointType);
-	PyModule_AddObject (mod, "distance_joint", (PyObject *) &pgDistanceJointType);
+	PyModule_AddObject (mod, "World", (PyObject *) &pgWorldType);
+	PyModule_AddObject (mod, "Body", (PyObject *) &pgBodyType);
+	PyModule_AddObject (mod, "Joint", (PyObject *) &pgJointType);
+	PyModule_AddObject (mod, "DistanceJoint", (PyObject *) &pgDistanceJointType);
 
-}
+}
+

File src/pgShapeObject.c

 			id = i;
 		}
 	}
-
+	PG_Set_Vector2(normal, 0, 0);
 	//generate contactNormal
 	switch(id)
 	{

File src/pgWorldObject.c

 {
 	PyObject_HEAD_INIT(NULL)
 	0,
-	"physics.world",            /* tp_name */
+	"physics.World",            /* tp_name */
 	sizeof(pgWorldObject),      /* tp_basicsize */
 	0,                          /* tp_itemsize */
 	(destructor) PG_WorldDestroy,/* tp_dealloc */