mirror of https://github.com/raysan5/raylib
Improved boolean definitions (#2485)
This commit is contained in:
parent
426e8252d4
commit
5bdd8f134f
|
@ -247,10 +247,6 @@ typedef struct tagBITMAPINFOHEADER {
|
||||||
#include "external/dr_flac.h" // FLAC loading functions
|
#include "external/dr_flac.h" // FLAC loading functions
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined(_MSC_VER)
|
|
||||||
#undef bool
|
|
||||||
#endif
|
|
||||||
|
|
||||||
//----------------------------------------------------------------------------------
|
//----------------------------------------------------------------------------------
|
||||||
// Defines and Macros
|
// Defines and Macros
|
||||||
//----------------------------------------------------------------------------------
|
//----------------------------------------------------------------------------------
|
||||||
|
|
|
@ -177,10 +177,10 @@
|
||||||
// Structures Definition
|
// Structures Definition
|
||||||
//----------------------------------------------------------------------------------
|
//----------------------------------------------------------------------------------
|
||||||
// Boolean type
|
// Boolean type
|
||||||
#if defined(__STDC__) && __STDC_VERSION__ >= 199901L
|
#if (defined(__STDC__) && __STDC_VERSION__ >= 199901L) || (defined(_MSC_VER) && _MSC_VER >= 1800)
|
||||||
#include <stdbool.h>
|
#include <stdbool.h>
|
||||||
#elif !defined(__cplusplus) && !defined(bool)
|
#elif !defined(__cplusplus) && !defined(bool)
|
||||||
typedef enum bool { false, true } bool;
|
typedef enum bool { false = 0, true = !false } bool;
|
||||||
#define RL_BOOL_TYPE
|
#define RL_BOOL_TYPE
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
|
@ -62,10 +62,10 @@
|
||||||
// NOTE: Below types are required for GESTURES_STANDALONE usage
|
// NOTE: Below types are required for GESTURES_STANDALONE usage
|
||||||
//----------------------------------------------------------------------------------
|
//----------------------------------------------------------------------------------
|
||||||
// Boolean type
|
// Boolean type
|
||||||
#if defined(__STDC__) && __STDC_VERSION__ >= 199901L
|
#if (defined(__STDC__) && __STDC_VERSION__ >= 199901L) || (defined(_MSC_VER) && _MSC_VER >= 1800)
|
||||||
#include <stdbool.h>
|
#include <stdbool.h>
|
||||||
#elif !defined(__cplusplus) && !defined(bool) && !defined(RL_BOOL_TYPE)
|
#elif !defined(__cplusplus) && !defined(bool) && !defined(RL_BOOL_TYPE)
|
||||||
typedef enum bool { false, true } bool;
|
typedef enum bool { false = 0, true = !false } bool;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if !defined(RL_VECTOR2_TYPE)
|
#if !defined(RL_VECTOR2_TYPE)
|
||||||
|
|
|
@ -358,11 +358,11 @@ typedef struct rlRenderBatch {
|
||||||
float currentDepth; // Current depth value for next draw
|
float currentDepth; // Current depth value for next draw
|
||||||
} rlRenderBatch;
|
} rlRenderBatch;
|
||||||
|
|
||||||
#if defined(__STDC__) && __STDC_VERSION__ >= 199901L
|
#if (defined(__STDC__) && __STDC_VERSION__ >= 199901L) || (defined(_MSC_VER) && _MSC_VER >= 1800)
|
||||||
#include <stdbool.h>
|
#include <stdbool.h>
|
||||||
#elif !defined(__cplusplus) && !defined(bool) && !defined(RL_BOOL_TYPE)
|
#elif !defined(__cplusplus) && !defined(bool) && !defined(RL_BOOL_TYPE)
|
||||||
// Boolean type
|
// Boolean type
|
||||||
typedef enum bool { false, true } bool;
|
typedef enum bool { false = 0, true = !false } bool;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if !defined(RL_MATRIX_TYPE)
|
#if !defined(RL_MATRIX_TYPE)
|
||||||
|
|
Loading…
Reference in New Issue