Review bool type check
This commit is contained in:
parent
46046bf018
commit
02a533768c
13
src/physac.h
13
src/physac.h
@ -106,17 +106,18 @@
|
|||||||
// NOTE: Below types are required for PHYSAC_STANDALONE usage
|
// NOTE: Below types are required for PHYSAC_STANDALONE usage
|
||||||
//----------------------------------------------------------------------------------
|
//----------------------------------------------------------------------------------
|
||||||
#if defined(PHYSAC_STANDALONE)
|
#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
|
// Vector2 type
|
||||||
typedef struct Vector2 {
|
typedef struct Vector2 {
|
||||||
float x;
|
float x;
|
||||||
float y;
|
float y;
|
||||||
} Vector2;
|
} Vector2;
|
||||||
|
|
||||||
// Boolean type
|
|
||||||
#if !defined(_STDBOOL_H)
|
|
||||||
typedef enum { false, true } bool;
|
|
||||||
#define _STDBOOL_H
|
|
||||||
#endif
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
typedef enum PhysicsShapeType { PHYSICS_CIRCLE, PHYSICS_POLYGON } PhysicsShapeType;
|
typedef enum PhysicsShapeType { PHYSICS_CIRCLE, PHYSICS_POLYGON } PhysicsShapeType;
|
||||||
|
Loading…
Reference in New Issue
Block a user