summaryrefslogtreecommitdiffhomepage
path: root/docs/examples/src/physac
diff options
context:
space:
mode:
Diffstat (limited to 'docs/examples/src/physac')
-rw-r--r--docs/examples/src/physac/physics_demo.c16
-rw-r--r--docs/examples/src/physac/physics_friction.c17
-rw-r--r--docs/examples/src/physac/physics_movement.c19
-rw-r--r--docs/examples/src/physac/physics_restitution.c17
-rw-r--r--docs/examples/src/physac/physics_shatter.c17
5 files changed, 60 insertions, 26 deletions
diff --git a/docs/examples/src/physac/physics_demo.c b/docs/examples/src/physac/physics_demo.c
index bed7c94d..55588363 100644
--- a/docs/examples/src/physac/physics_demo.c
+++ b/docs/examples/src/physac/physics_demo.c
@@ -2,17 +2,22 @@
*
* Physac - Physics demo
*
-* NOTE: Physac requires multi-threading, when InitPhysics() a second thread is created to manage physics calculations.
-* The file pthreadGC2.dll is required to run the program; you can find it in 'src\external'
+* 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)
*
-* Copyright (c) 2016 Victor Fisac
+* Use the following line to compile:
+*
+* 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
+*
+* Copyright (c) 2017 Victor Fisac
*
********************************************************************************************/
#include "raylib.h"
#define PHYSAC_IMPLEMENTATION
-#include "..\src\physac.h"
+#include "physac.h"
int main()
{
@@ -114,9 +119,10 @@ int main()
// De-Initialization
//--------------------------------------------------------------------------------------
- ClosePhysics(); // Unitialize physics
+ ClosePhysics(); // Uninitialize physics
CloseWindow(); // Close window and OpenGL context
//--------------------------------------------------------------------------------------
return 0;
}
+
diff --git a/docs/examples/src/physac/physics_friction.c b/docs/examples/src/physac/physics_friction.c
index 28d3c4b8..6ce1d406 100644
--- a/docs/examples/src/physac/physics_friction.c
+++ b/docs/examples/src/physac/physics_friction.c
@@ -2,17 +2,22 @@
*
* Physac - Physics friction
*
-* NOTE: Physac requires multi-threading, when InitPhysics() a second thread is created to manage physics calculations.
-* The file pthreadGC2.dll is required to run the program; you can find it in 'src\external'
+* 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)
*
-* Copyright (c) 2016 Victor Fisac
+* Use the following line to compile:
+*
+* 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
+*
+* Copyright (c) 2017 Victor Fisac
*
********************************************************************************************/
#include "raylib.h"
#define PHYSAC_IMPLEMENTATION
-#include "..\src\physac.h"
+#include "physac.h"
int main()
{
@@ -128,9 +133,11 @@ int main()
// De-Initialization
//--------------------------------------------------------------------------------------
- ClosePhysics(); // Unitialize physics
+ ClosePhysics(); // Uninitialize physics
+
CloseWindow(); // Close window and OpenGL context
//--------------------------------------------------------------------------------------
return 0;
}
+
diff --git a/docs/examples/src/physac/physics_movement.c b/docs/examples/src/physac/physics_movement.c
index ca18f3df..534997bf 100644
--- a/docs/examples/src/physac/physics_movement.c
+++ b/docs/examples/src/physac/physics_movement.c
@@ -2,19 +2,24 @@
*
* Physac - Physics movement
*
-* NOTE: Physac requires multi-threading, when InitPhysics() a second thread is created to manage physics calculations.
-* The file pthreadGC2.dll is required to run the program; you can find it in 'src\external'
+* 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)
*
-* Copyright (c) 2016 Victor Fisac
+* Use the following line to compile:
+*
+* 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
+*
+* Copyright (c) 2017 Victor Fisac
*
********************************************************************************************/
#include "raylib.h"
#define PHYSAC_IMPLEMENTATION
-#include "..\src\physac.h"
+#include "physac.h"
-#define VELOCITY 0.5f
+#define VELOCITY 0.5f
int main()
{
@@ -114,9 +119,11 @@ int main()
// De-Initialization
//--------------------------------------------------------------------------------------
- ClosePhysics(); // Unitialize physics
+ ClosePhysics(); // Uninitialize physics
+
CloseWindow(); // Close window and OpenGL context
//--------------------------------------------------------------------------------------
return 0;
}
+
diff --git a/docs/examples/src/physac/physics_restitution.c b/docs/examples/src/physac/physics_restitution.c
index 3543db69..0809697c 100644
--- a/docs/examples/src/physac/physics_restitution.c
+++ b/docs/examples/src/physac/physics_restitution.c
@@ -2,17 +2,22 @@
*
* Physac - Physics restitution
*
-* NOTE: Physac requires multi-threading, when InitPhysics() a second thread is created to manage physics calculations.
-* The file pthreadGC2.dll is required to run the program; you can find it in 'src\external'
+* 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)
*
-* Copyright (c) 2016 Victor Fisac
+* Use the following line to compile:
+*
+* 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
+*
+* Copyright (c) 2017 Victor Fisac
*
********************************************************************************************/
#include "raylib.h"
#define PHYSAC_IMPLEMENTATION
-#include "..\src\physac.h"
+#include "physac.h"
int main()
{
@@ -107,9 +112,11 @@ int main()
// De-Initialization
//--------------------------------------------------------------------------------------
- ClosePhysics(); // Unitialize physics
+ ClosePhysics(); // Uninitialize physics
+
CloseWindow(); // Close window and OpenGL context
//--------------------------------------------------------------------------------------
return 0;
}
+
diff --git a/docs/examples/src/physac/physics_shatter.c b/docs/examples/src/physac/physics_shatter.c
index 2cb9d195..b237bfca 100644
--- a/docs/examples/src/physac/physics_shatter.c
+++ b/docs/examples/src/physac/physics_shatter.c
@@ -2,17 +2,22 @@
*
* Physac - Body shatter
*
-* NOTE: Physac requires multi-threading, when InitPhysics() a second thread is created to manage physics calculations.
-* The file pthreadGC2.dll is required to run the program; you can find it in 'src\external'
+* 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)
*
-* Copyright (c) 2016 Victor Fisac
+* Use the following line to compile:
+*
+* 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
+*
+* Copyright (c) 2017 Victor Fisac
*
********************************************************************************************/
#include "raylib.h"
#define PHYSAC_IMPLEMENTATION
-#include "..\src\physac.h"
+#include "physac.h"
int main()
{
@@ -99,9 +104,11 @@ int main()
// De-Initialization
//--------------------------------------------------------------------------------------
- ClosePhysics(); // Unitialize physics
+ ClosePhysics(); // Uninitialize physics
+
CloseWindow(); // Close window and OpenGL context
//--------------------------------------------------------------------------------------
return 0;
}
+