summaryrefslogtreecommitdiffhomepage
path: root/examples/physac
diff options
context:
space:
mode:
authorraysan5 <[email protected]>2017-04-16 19:08:19 +0200
committerraysan5 <[email protected]>2017-04-16 19:08:19 +0200
commitb4d28cc7a1a0d9f5ce0c556535c612e67215bd18 (patch)
tree51ad480c49cddf96a966c24695d9af55ee8b1995 /examples/physac
parentc67cffea38637f20dc733fec1986111b69a11119 (diff)
downloadraylib-b4d28cc7a1a0d9f5ce0c556535c612e67215bd18.tar.gz
raylib-b4d28cc7a1a0d9f5ce0c556535c612e67215bd18.zip
Working on examples...
- Removed rbmf font example - Reviewed physac examples
Diffstat (limited to 'examples/physac')
-rw-r--r--examples/physac/physics_demo.c9
-rw-r--r--examples/physac/physics_friction.c10
-rw-r--r--examples/physac/physics_movement.c12
-rw-r--r--examples/physac/physics_restitution.c10
-rw-r--r--examples/physac/physics_shatter.c10
5 files changed, 35 insertions, 16 deletions
diff --git a/examples/physac/physics_demo.c b/examples/physac/physics_demo.c
index b12ac708..9bf04d50 100644
--- a/examples/physac/physics_demo.c
+++ b/examples/physac/physics_demo.c
@@ -2,9 +2,11 @@
*
* Physac - Physics demo
*
-* NOTE: Physac requires multi-threading, when InitPhysics() a second thread is created to manage physics calculations.
+* NOTE 1: Physac requires multi-threading, when InitPhysics() a second thread is created to manage physics calculations.
+* NOTE 2: Physac requires static C library linkage to avoid dependency on MinGW DLL (-static -lpthread)
+*
+* Use the following line to compile:
*
-* Use the following code to compile (-static -lpthread):
* gcc -o $(NAME_PART).exe $(FILE_NAME) -s $(RAYLIB_DIR)\raylib\raylib_icon -static -lraylib -lpthread
* -lglfw3 -lopengl32 -lgdi32 -lopenal32 -lwinmm -std=c99 -Wl,--subsystem,windows -Wl,-allow-multiple-definition
*
@@ -15,7 +17,7 @@
#include "raylib.h"
#define PHYSAC_IMPLEMENTATION
-#include "../src/physac.h"
+#include "physac.h"
int main()
{
@@ -123,3 +125,4 @@ int main()
return 0;
}
+
diff --git a/examples/physac/physics_friction.c b/examples/physac/physics_friction.c
index db1b5f4c..25f31d3f 100644
--- a/examples/physac/physics_friction.c
+++ b/examples/physac/physics_friction.c
@@ -2,9 +2,11 @@
*
* Physac - Physics friction
*
-* NOTE: Physac requires multi-threading, when InitPhysics() a second thread is created to manage physics calculations.
+* NOTE 1: Physac requires multi-threading, when InitPhysics() a second thread is created to manage physics calculations.
+* NOTE 2: Physac requires static C library linkage to avoid dependency on MinGW DLL (-static -lpthread)
+*
+* Use the following line to compile:
*
-* Use the following code to compile (-static -lpthread):
* gcc -o $(NAME_PART).exe $(FILE_NAME) -s $(RAYLIB_DIR)\raylib\raylib_icon -static -lraylib -lpthread
* -lglfw3 -lopengl32 -lgdi32 -lopenal32 -lwinmm -std=c99 -Wl,--subsystem,windows -Wl,-allow-multiple-definition
*
@@ -15,7 +17,7 @@
#include "raylib.h"
#define PHYSAC_IMPLEMENTATION
-#include "../src/physac.h"
+#include "physac.h"
int main()
{
@@ -132,8 +134,10 @@ int main()
// De-Initialization
//--------------------------------------------------------------------------------------
ClosePhysics(); // Unitialize physics
+
CloseWindow(); // Close window and OpenGL context
//--------------------------------------------------------------------------------------
return 0;
}
+
diff --git a/examples/physac/physics_movement.c b/examples/physac/physics_movement.c
index 3345404d..f81316ed 100644
--- a/examples/physac/physics_movement.c
+++ b/examples/physac/physics_movement.c
@@ -2,9 +2,11 @@
*
* Physac - Physics movement
*
-* NOTE: Physac requires multi-threading, when InitPhysics() a second thread is created to manage physics calculations.
+* NOTE 1: Physac requires multi-threading, when InitPhysics() a second thread is created to manage physics calculations.
+* NOTE 2: Physac requires static C library linkage to avoid dependency on MinGW DLL (-static -lpthread)
+*
+* Use the following line to compile:
*
-* Use the following code to compile (-static -lpthread):
* gcc -o $(NAME_PART).exe $(FILE_NAME) -s $(RAYLIB_DIR)\raylib\raylib_icon -static -lraylib -lpthread
* -lglfw3 -lopengl32 -lgdi32 -lopenal32 -lwinmm -std=c99 -Wl,--subsystem,windows -Wl,-allow-multiple-definition
*
@@ -15,9 +17,9 @@
#include "raylib.h"
#define PHYSAC_IMPLEMENTATION
-#include "../src/physac.h"
+#include "physac.h"
-#define VELOCITY 0.5f
+#define VELOCITY 0.5f
int main()
{
@@ -118,8 +120,10 @@ int main()
// De-Initialization
//--------------------------------------------------------------------------------------
ClosePhysics(); // Unitialize physics
+
CloseWindow(); // Close window and OpenGL context
//--------------------------------------------------------------------------------------
return 0;
}
+
diff --git a/examples/physac/physics_restitution.c b/examples/physac/physics_restitution.c
index 534d125e..d58ec6e3 100644
--- a/examples/physac/physics_restitution.c
+++ b/examples/physac/physics_restitution.c
@@ -2,9 +2,11 @@
*
* Physac - Physics restitution
*
-* NOTE: Physac requires multi-threading, when InitPhysics() a second thread is created to manage physics calculations.
+* NOTE 1: Physac requires multi-threading, when InitPhysics() a second thread is created to manage physics calculations.
+* NOTE 2: Physac requires static C library linkage to avoid dependency on MinGW DLL (-static -lpthread)
+*
+* Use the following line to compile:
*
-* Use the following code to compile (-static -lpthread):
* gcc -o $(NAME_PART).exe $(FILE_NAME) -s $(RAYLIB_DIR)\raylib\raylib_icon -static -lraylib -lpthread
* -lglfw3 -lopengl32 -lgdi32 -lopenal32 -lwinmm -std=c99 -Wl,--subsystem,windows -Wl,-allow-multiple-definition
*
@@ -15,7 +17,7 @@
#include "raylib.h"
#define PHYSAC_IMPLEMENTATION
-#include "../src/physac.h"
+#include "physac.h"
int main()
{
@@ -111,8 +113,10 @@ int main()
// De-Initialization
//--------------------------------------------------------------------------------------
ClosePhysics(); // Unitialize physics
+
CloseWindow(); // Close window and OpenGL context
//--------------------------------------------------------------------------------------
return 0;
}
+
diff --git a/examples/physac/physics_shatter.c b/examples/physac/physics_shatter.c
index fac90714..4e3b0cb6 100644
--- a/examples/physac/physics_shatter.c
+++ b/examples/physac/physics_shatter.c
@@ -2,9 +2,11 @@
*
* Physac - Body shatter
*
-* NOTE: Physac requires multi-threading, when InitPhysics() a second thread is created to manage physics calculations.
+* NOTE 1: Physac requires multi-threading, when InitPhysics() a second thread is created to manage physics calculations.
+* NOTE 2: Physac requires static C library linkage to avoid dependency on MinGW DLL (-static -lpthread)
+*
+* Use the following line to compile:
*
-* Use the following code to compile (-static -lpthread):
* gcc -o $(NAME_PART).exe $(FILE_NAME) -s $(RAYLIB_DIR)\raylib\raylib_icon -static -lraylib -lpthread
* -lglfw3 -lopengl32 -lgdi32 -lopenal32 -lwinmm -std=c99 -Wl,--subsystem,windows -Wl,-allow-multiple-definition
*
@@ -15,7 +17,7 @@
#include "raylib.h"
#define PHYSAC_IMPLEMENTATION
-#include "../src/physac.h"
+#include "physac.h"
int main()
{
@@ -103,8 +105,10 @@ int main()
// De-Initialization
//--------------------------------------------------------------------------------------
ClosePhysics(); // Unitialize physics
+
CloseWindow(); // Close window and OpenGL context
//--------------------------------------------------------------------------------------
return 0;
}
+