aboutsummaryrefslogtreecommitdiff
path: root/docs/examples/src/physac
diff options
context:
space:
mode:
authorraysan5 <raysan5@gmail.com>2017-04-17 16:42:01 +0200
committerraysan5 <raysan5@gmail.com>2017-04-17 16:42:01 +0200
commit881f134f4d2fb4419d50382284e19b4f8ca4660e (patch)
tree065658f8b462dd76837f849450bdd3895134121a /docs/examples/src/physac
parent3e082f1d6251e366d7be6019d0950ea7a9e6b5b4 (diff)
downloadraylib-881f134f4d2fb4419d50382284e19b4f8ca4660e.tar.gz
raylib-881f134f4d2fb4419d50382284e19b4f8ca4660e.zip
Review and recompile web examples
Diffstat (limited to 'docs/examples/src/physac')
-rw-r--r--docs/examples/src/physac/physics_demo.c14
-rw-r--r--docs/examples/src/physac/physics_friction.c15
-rw-r--r--docs/examples/src/physac/physics_movement.c17
-rw-r--r--docs/examples/src/physac/physics_restitution.c15
-rw-r--r--docs/examples/src/physac/physics_shatter.c15
5 files changed, 55 insertions, 21 deletions
diff --git a/docs/examples/src/physac/physics_demo.c b/docs/examples/src/physac/physics_demo.c
index bed7c94d..9bf04d50 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()
{
@@ -120,3 +125,4 @@ int main()
return 0;
}
+
diff --git a/docs/examples/src/physac/physics_friction.c b/docs/examples/src/physac/physics_friction.c
index 28d3c4b8..25f31d3f 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()
{
@@ -129,8 +134,10 @@ int main()
// De-Initialization
//--------------------------------------------------------------------------------------
ClosePhysics(); // Unitialize 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..f81316ed 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()
{
@@ -115,8 +120,10 @@ int main()
// De-Initialization
//--------------------------------------------------------------------------------------
ClosePhysics(); // Unitialize 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..d58ec6e3 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()
{
@@ -108,8 +113,10 @@ int main()
// De-Initialization
//--------------------------------------------------------------------------------------
ClosePhysics(); // Unitialize 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..4e3b0cb6 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()
{
@@ -100,8 +105,10 @@ int main()
// De-Initialization
//--------------------------------------------------------------------------------------
ClosePhysics(); // Unitialize physics
+
CloseWindow(); // Close window and OpenGL context
//--------------------------------------------------------------------------------------
return 0;
}
+