From 561c486ceb2d1563fbcd0bec60a1f1d9e94cb7c0 Mon Sep 17 00:00:00 2001 From: raysan5 Date: Fri, 10 May 2019 20:51:48 +0200 Subject: Add WinMM library for linkage Now it's required on Windows if not using a busy wait loop --- src/physac.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/physac.h') diff --git a/src/physac.h b/src/physac.h index 038361a4..374aa4bc 100644 --- a/src/physac.h +++ b/src/physac.h @@ -43,7 +43,7 @@ * NOTE 2: Physac requires static C library linkage to avoid dependency on MinGW DLL (-static -lpthread) * * Use the following code to compile: -* gcc -o $(NAME_PART).exe $(FILE_NAME) -s -static -lraylib -lpthread -lopengl32 -lgdi32 -std=c99 +* gcc -o $(NAME_PART).exe $(FILE_NAME) -s -static -lraylib -lpthread -lopengl32 -lgdi32 -lwinmm -std=c99 * * VERY THANKS TO: * Ramon Santamaria (github: @raysan5) -- cgit v1.2.3 From 72ab65277b0050635bfcde0b7ff471358e563659 Mon Sep 17 00:00:00 2001 From: Ray Date: Mon, 20 May 2019 16:37:44 +0200 Subject: Avoid some warnings --- src/physac.h | 19 ++----------------- 1 file changed, 2 insertions(+), 17 deletions(-) (limited to 'src/physac.h') diff --git a/src/physac.h b/src/physac.h index 374aa4bc..42cb0198 100644 --- a/src/physac.h +++ b/src/physac.h @@ -323,8 +323,6 @@ static void InitTimer(void); static uint64_t GetTimeCount(void); // Get hi-res MONOTONIC time measure in mseconds static double GetCurrentTime(void); // Get current time measure in milliseconds -static int GetRandomNumber(int min, int max); // Returns a random number between min and max (both included) - // Math functions static Vector2 MathCross(float value, Vector2 vector); // Returns the cross product of a vector and a value static float MathCrossVector2(Vector2 v1, Vector2 v2); // Returns the cross product of two vectors @@ -1771,7 +1769,7 @@ static float FindAxisLeastPenetration(int *faceIndex, PhysicsShape shapeA, Physi int bestIndex = 0; PolygonData dataA = shapeA.vertexData; - PolygonData dataB = shapeB.vertexData; + //PolygonData dataB = shapeB.vertexData; for (int i = 0; i < dataA.vertexCount; i++) { @@ -1921,7 +1919,7 @@ static void InitTimer(void) // Get hi-res MONOTONIC time measure in seconds static uint64_t GetTimeCount(void) { - uint64_t value; + uint64_t value = 0; #if defined(_WIN32) QueryPerformanceCounter((unsigned long long int *) &value); @@ -1946,19 +1944,6 @@ static double GetCurrentTime(void) return (double)(GetTimeCount() - baseTime)/frequency*1000; } -// Returns a random number between min and max (both included) -static int GetRandomNumber(int min, int max) -{ - if (min > max) - { - int tmp = max; - max = min; - min = tmp; - } - - return (rand()%(abs(max - min) + 1) + min); -} - // Returns the cross product of a vector and a value static inline Vector2 MathCross(float value, Vector2 vector) { -- cgit v1.2.3