summaryrefslogtreecommitdiffhomepage
path: root/examples/physac/physics_demo.c
diff options
context:
space:
mode:
authorRay <[email protected]>2019-05-20 16:36:42 +0200
committerRay <[email protected]>2019-05-20 16:36:42 +0200
commitb525039e0ab8bcaa2fd6bde34c72a6405f88ae49 (patch)
tree08f1c79bfe693643564ed78202c9474b7eb83a79 /examples/physac/physics_demo.c
parenta43a7980a30a52462956b23f2473e8ef8f38d1fb (diff)
downloadraylib-b525039e0ab8bcaa2fd6bde34c72a6405f88ae49.tar.gz
raylib-b525039e0ab8bcaa2fd6bde34c72a6405f88ae49.zip
Review ALL examples
Diffstat (limited to 'examples/physac/physics_demo.c')
-rw-r--r--examples/physac/physics_demo.c20
1 files changed, 10 insertions, 10 deletions
diff --git a/examples/physac/physics_demo.c b/examples/physac/physics_demo.c
index a92bb9e1..421c82a9 100644
--- a/examples/physac/physics_demo.c
+++ b/examples/physac/physics_demo.c
@@ -10,7 +10,7 @@
* gcc -o $(NAME_PART).exe $(FILE_NAME) -s -static /
* -lraylib -lpthread -lglfw3 -lopengl32 -lgdi32 -lopenal32 -lwinmm /
* -std=c99 -Wl,--subsystem,windows -Wl,-allow-multiple-definition
-*
+*
* Copyright (c) 2016-2018 Victor Fisac
*
********************************************************************************************/
@@ -21,12 +21,12 @@
#define PHYSAC_NO_THREADS
#include "physac.h"
-int main()
+int main(void)
{
// Initialization
//--------------------------------------------------------------------------------------
- int screenWidth = 800;
- int screenHeight = 450;
+ const int screenWidth = 800;
+ const int screenHeight = 450;
SetConfigFlags(FLAG_MSAA_4X_HINT);
InitWindow(screenWidth, screenHeight, "Physac [raylib] - Physics demo");
@@ -41,13 +41,13 @@ int main()
// Create floor rectangle physics body
PhysicsBody floor = CreatePhysicsBodyRectangle((Vector2){ screenWidth/2, screenHeight }, 500, 100, 10);
- floor->enabled = false; // Disable body state to convert it to static (no dynamics, but collisions)
+ floor->enabled = false; // Disable body state to convert it to static (no dynamics, but collisions)
// Create obstacle circle physics body
PhysicsBody circle = CreatePhysicsBodyCircle((Vector2){ screenWidth/2, screenHeight/2 }, 45, 10);
- circle->enabled = false; // Disable body state to convert it to static (no dynamics, but collisions)
-
- SetTargetFPS(60);
+ circle->enabled = false; // Disable body state to convert it to static (no dynamics, but collisions)
+
+ SetTargetFPS(60); // Set our game to run at 60 frames-per-second
//--------------------------------------------------------------------------------------
// Main game loop
@@ -132,9 +132,9 @@ int main()
}
// De-Initialization
- //--------------------------------------------------------------------------------------
+ //--------------------------------------------------------------------------------------
ClosePhysics(); // Unitialize physics
-
+
CloseWindow(); // Close window and OpenGL context
//--------------------------------------------------------------------------------------