summaryrefslogtreecommitdiffhomepage
path: root/src/physac.h
diff options
context:
space:
mode:
authorRay <[email protected]>2020-01-29 12:10:09 +0100
committerRay <[email protected]>2020-01-29 12:10:09 +0100
commit02a533768c8f60031602fdcebcf51e843c4478f7 (patch)
tree6e5828e8f6b8e8c3cdf86fcfb1aa844b354851ca /src/physac.h
parent46046bf018cc05adac81b960aa70fa212b6e4098 (diff)
downloadraylib-02a533768c8f60031602fdcebcf51e843c4478f7.tar.gz
raylib-02a533768c8f60031602fdcebcf51e843c4478f7.zip
Review bool type check
Diffstat (limited to 'src/physac.h')
-rw-r--r--src/physac.h13
1 files changed, 7 insertions, 6 deletions
diff --git a/src/physac.h b/src/physac.h
index 3e05f217..fb03e2a6 100644
--- a/src/physac.h
+++ b/src/physac.h
@@ -106,17 +106,18 @@
// NOTE: Below types are required for PHYSAC_STANDALONE usage
//----------------------------------------------------------------------------------
#if defined(PHYSAC_STANDALONE)
+ // Boolean type
+ #if defined(__STDC__) && __STDC_VERSION__ >= 199901L
+ #include <stdbool.h>
+ #elif !defined(__cplusplus) && !defined(bool)
+ typedef enum { false, true } bool;
+ #endif
+
// Vector2 type
typedef struct Vector2 {
float x;
float y;
} Vector2;
-
- // Boolean type
- #if !defined(_STDBOOL_H)
- typedef enum { false, true } bool;
- #define _STDBOOL_H
- #endif
#endif
typedef enum PhysicsShapeType { PHYSICS_CIRCLE, PHYSICS_POLYGON } PhysicsShapeType;