aboutsummaryrefslogtreecommitdiff
path: root/examples
diff options
context:
space:
mode:
authorvictorfisac <victorfisac@gmail.com>2016-06-14 20:38:49 +0200
committervictorfisac <victorfisac@gmail.com>2016-06-14 20:38:49 +0200
commit4e84ded7ef3b165081e08a83d95bf54387a413ca (patch)
tree8c6ec76c879bf26b8a7c1fbdc186890a40067e9e /examples
parent1a8fbe5cf0b982cf74434f1ba4654fced71a0450 (diff)
downloadraylib-4e84ded7ef3b165081e08a83d95bf54387a413ca.tar.gz
raylib-4e84ded7ef3b165081e08a83d95bf54387a413ca.zip
Fixed spacing and set UpdatePhysics() function as static...
and remove static from PhysicsThread().
Diffstat (limited to 'examples')
-rw-r--r--examples/physics_basic_rigidbody.c8
-rw-r--r--examples/physics_forces.c2
2 files changed, 4 insertions, 6 deletions
diff --git a/examples/physics_basic_rigidbody.c b/examples/physics_basic_rigidbody.c
index b85f7543..084bfb0e 100644
--- a/examples/physics_basic_rigidbody.c
+++ b/examples/physics_basic_rigidbody.c
@@ -21,7 +21,6 @@
#define MOVE_VELOCITY 5
#define JUMP_VELOCITY 30
-
int main()
{
// Initialization
@@ -30,7 +29,7 @@ int main()
int screenHeight = 450;
InitWindow(screenWidth, screenHeight, "raylib [physac] example - basic rigidbody");
- InitPhysics((Vector2){ 0.0f, -9.81f/2 }); // Initialize physics module
+ // InitPhysics((Vector2){ 0.0f, -9.81f/2 }); // Initialize physics module
// Debug variables
bool isDebug = false;
@@ -64,8 +63,7 @@ int main()
while (!WindowShouldClose()) // Detect window close button or ESC key
{
// Update
- //----------------------------------------------------------------------------------
-
+ //----------------------------------------------------------------------------------
// Check rectangle movement inputs
if (IsKeyPressed('W')) rectangle->rigidbody.velocity.y = JUMP_VELOCITY;
if (IsKeyDown('A')) rectangle->rigidbody.velocity.x = -MOVE_VELOCITY;
@@ -121,7 +119,7 @@ int main()
}
// De-Initialization
- //--------------------------------------------------------------------------------------
+ //--------------------------------------------------------------------------------------
ClosePhysics(); // Unitialize physics (including all loaded objects)
CloseWindow(); // Close window and OpenGL context
//--------------------------------------------------------------------------------------
diff --git a/examples/physics_forces.c b/examples/physics_forces.c
index 7de85483..efe8e240 100644
--- a/examples/physics_forces.c
+++ b/examples/physics_forces.c
@@ -178,7 +178,7 @@ int main()
}
// De-Initialization
- //--------------------------------------------------------------------------------------
+ //--------------------------------------------------------------------------------------
ClosePhysics(); // Unitialize physics module
CloseWindow(); // Close window and OpenGL context
//--------------------------------------------------------------------------------------