From 98a6003999eb198d9b953c11cca43aad181788c9 Mon Sep 17 00:00:00 2001 From: Philipp Sehmisch Date: Sat, 18 Jun 2011 20:16:47 +0200 Subject: Fixed compilation problems on windows caused by the switch to C++0x. The M_PI constant from is not standard anymore, so I replaced it with an own PI constant. WIN32 isn't defined anymore which caused the enet UNIX header to be included, so I had to define it in the project compilation settings. Reviewed-by: Thorbjorn --- src/particleemitterprop.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/particleemitterprop.h b/src/particleemitterprop.h index c73d044c..b1268e8d 100644 --- a/src/particleemitterprop.h +++ b/src/particleemitterprop.h @@ -21,6 +21,8 @@ #include +static const double PI = 3.14159265; + enum ChangeFunc { @@ -64,7 +66,7 @@ template struct ParticleEmitterProp switch (changeFunc) { case FUNC_SINE: - val += (T) std::sin(M_PI * 2 * ((double)(tick%changePeriod) / (double)changePeriod)) * changeAmplitude; + val += (T) std::sin(PI * 2 * ((double)(tick%changePeriod) / (double)changePeriod)) * changeAmplitude; break; case FUNC_SAW: val += (T) (changeAmplitude * ((double)(tick%changePeriod) / (double)changePeriod)) * 2 - changeAmplitude; -- cgit v1.2.3-70-g09d2