浏览代码

Review bool type check

pull/1092/head
Ray 5 年前
父节点
当前提交
02a533768c
共有 1 个文件被更改,包括 7 次插入6 次删除
  1. +7
    -6
      src/physac.h

+ 7
- 6
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;

正在加载...
取消
保存