From 777cb967a51d9b28be181a694ef3a9eb37c040b9 Mon Sep 17 00:00:00 2001 From: jacob1 Date: Sat, 28 Apr 2018 00:26:43 -0400 Subject: [PATCH] add M_PI definition back --- src/common/tpt-compat.h | 4 ++++ src/graphics/Renderer.cpp | 3 ++- src/simulation/Element.h | 2 ++ src/simulation/Elements.h | 1 - 4 files changed, 8 insertions(+), 2 deletions(-) diff --git a/src/common/tpt-compat.h b/src/common/tpt-compat.h index e74f59c08b..476f42bac4 100644 --- a/src/common/tpt-compat.h +++ b/src/common/tpt-compat.h @@ -21,6 +21,10 @@ #define strcasecmp stricmp #endif +#ifndef M_PI +#define M_PI 3.14159265f +#endif + typedef unsigned short Uint16; #ifndef NULL diff --git a/src/graphics/Renderer.cpp b/src/graphics/Renderer.cpp index 6353cf30ff..fda17c4c02 100644 --- a/src/graphics/Renderer.cpp +++ b/src/graphics/Renderer.cpp @@ -7,8 +7,9 @@ #include "Misc.h" #include "Renderer.h" #include "Graphics.h" -#include "common/tpt-rand.h" +#include "common/tpt-compat.h" #include "common/tpt-minmax.h" +#include "common/tpt-rand.h" #include "gui/game/RenderPreset.h" #include "simulation/Elements.h" #include "simulation/ElementGraphics.h" diff --git a/src/simulation/Element.h b/src/simulation/Element.h index 82b0f8d30e..cd12d1c753 100644 --- a/src/simulation/Element.h +++ b/src/simulation/Element.h @@ -7,6 +7,8 @@ #include "Gravity.h" #include "Misc.h" #include "Simulation.h" +#include "common/tpt-compat.h" +#include "common/tpt-rand.h" #include "graphics/Renderer.h" #define IPL -257.0f diff --git a/src/simulation/Elements.h b/src/simulation/Elements.h index 89e07ea604..295e6ee78b 100644 --- a/src/simulation/Elements.h +++ b/src/simulation/Elements.h @@ -70,7 +70,6 @@ struct playerst; #include "ElementClasses.h" -#include "common/tpt-rand.h" #endif /* ELEMENTS_H_ */