# HG changeset patch # User Extrawurst # Date 1291333476 -3600 # Node ID 427db6df205cab6a32ab1f877f3c780d540dbbac # Parent 99dd8466b46592eaccce4c60558d0f7e86212277 cleanup diff -r 99dd8466b465 -r 427db6df205c trunk/tests/helloworld.d --- a/trunk/tests/helloworld.d Fri Dec 03 00:41:30 2010 +0100 +++ b/trunk/tests/helloworld.d Fri Dec 03 00:44:36 2010 +0100 @@ -4,7 +4,8 @@ void main() { - // this allocated internal memory of the engine and must be called befor any collision can occur otherwise things get ugly + // This allocated internal memory of the engine and must be + // called befor any collision can occur otherwise things get ugly cpInitChipmunk(); // Create a space, a space is a simulation world. It simulates the motions of rigid bodies, @@ -49,17 +50,21 @@ // Add a circle shape for the ball. - // Shapes are always defined relative to the center of gravity of the body they are attached to. + // Shapes are always defined relative to the center of + // gravity of the body they are attached to. // When the body moves or rotates, the shape will move with it. - // Additionally, all of the cpSpaceAdd*() functions return the thing they added so you can create and add in one go. + // Additionally, all of the cpSpaceAdd*() functions return + // the thing they added so you can create and add in one go. cpShape *ballShape = cpSpaceAddShape(space, cpCircleShapeNew(ballBody, radius, cpvzero)); ballShape.e = 0.0f; ballShape.u = 0.9f; bool finished=false; while(!finished) { - // Chipmunk allows you to use a different timestep each frame, but it works much better when you use a fixed timestep. - // An excellent article on why fixed timesteps for game logic can be found here: http://gafferongames.com/game-physics/fix-your-timestep/ + // Chipmunk allows you to use a different timestep each frame, + // but it works much better when you use a fixed timestep. + // An excellent article on why fixed timesteps for game logic can + // be found here: http://gafferongames.com/game-physics/fix-your-timestep/ cpSpaceStep(space, 1.0f/60.0f); // print position