diff options
Diffstat (limited to 'src/core/common.h')
-rw-r--r-- | src/core/common.h | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/src/core/common.h b/src/core/common.h index 36f67bfa..b3a271c6 100644 --- a/src/core/common.h +++ b/src/core/common.h @@ -156,7 +156,7 @@ public: inline float sq(float x) { return x*x; } #define SQR(x) ((x) * (x)) -#define PI M_PI +#define PI (float)M_PI #define TWOPI (PI*2) #define HALFPI (PI/2) #define DEGTORAD(x) ((x) * PI / 180.0f) @@ -171,16 +171,16 @@ inline float sq(float x) { return x*x; } int myrand(void); void mysrand(unsigned int seed); -void re3_debug(char *format, ...); -void re3_trace(const char *filename, unsigned int lineno, const char *func, char *format, ...); +void re3_debug(const char *format, ...); +void re3_trace(const char *filename, unsigned int lineno, const char *func, const char *format, ...); void re3_assert(const char *expr, const char *filename, unsigned int lineno, const char *func); #define DEBUGBREAK() __debugbreak(); -#define debug(f, ...) re3_debug("[DBG]: " f, __VA_ARGS__) -#define DEV(f, ...) re3_debug("[DEV]: " f, __VA_ARGS__) -#define TRACE(f, ...) re3_trace(__FILE__, __LINE__, __FUNCTION__, f, __VA_ARGS__) -#define Error(f, ...) re3_debug("[ERROR]: " f, __VA_ARGS__) +#define debug(f, ...) re3_debug("[DBG]: " f, ## __VA_ARGS__) +#define DEV(f, ...) re3_debug("[DEV]: " f, ## __VA_ARGS__) +#define TRACE(f, ...) re3_trace(__FILE__, __LINE__, __FUNCTION__, f, ## __VA_ARGS__) +#define Error(f, ...) re3_debug("[ERROR]: " f, ## __VA_ARGS__) #define assert(_Expression) (void)( (!!(_Expression)) || (re3_assert(#_Expression, __FILE__, __LINE__, __FUNCTION__), 0) ) #define ASSERT assert @@ -200,7 +200,6 @@ void re3_assert(const char *expr, const char *filename, unsigned int lineno, con #define ABS(a) (((a) < 0) ? (-(a)) : (a)) #define norm(value, min, max) (((value) < (min)) ? 0 : (((value) > (max)) ? 1 : (((value) - (min)) / ((max) - (min))))) - #define STRINGIFY(x) #x #define STR(x) STRINGIFY(x) #define CONCAT_(x,y) x##y |