diff --git a/src/common/tpt-compat.h b/src/common/tpt-compat.h index e74f59c08..476f42bac 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 6353cf30f..fda17c4c0 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 82b0f8d30..cd12d1c75 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 89e07ea60..295e6ee78 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_ */