1
0
forked from 0ad/0ad

Fix Linux build, don't EVER #include <windows.h> again!

Removed some apparently unnecessary #includes
Merged multiple M_PI definitions into maths/MathUtil.h
Add newline at end of file

This was SVN commit r3384.
This commit is contained in:
prefect 2006-01-21 20:01:17 +00:00
parent 5d4ec7f4bb
commit f953258a9d
8 changed files with 18 additions and 25 deletions

View File

@ -7,6 +7,7 @@
/////////////////////////////////////////////////////
#include "precompiled.h"
#include "maths/MathUtil.h"
#include "DefaultEmitter.h"
CDefaultEmitter::CDefaultEmitter(const int MAX_PARTICLES, const int lifetime) : CEmitter(MAX_PARTICLES, lifetime)
@ -154,4 +155,4 @@ bool CDefaultEmitter::updateEmitter()
}
}
return false;
}
}

View File

@ -35,4 +35,4 @@ public:
virtual ~CDefaultEmitter(void);
};
#endif
#endif

View File

@ -186,4 +186,4 @@ bool CEmitter::renderEmitter()
return true;
}
return false;
}
}

View File

@ -9,20 +9,6 @@
#ifndef _PARTICLEEMITTER_H_
#define _PARTICLEEMITTER_H_
#include "precompiled.h"
#include <iostream>
#include <windows.h>
#include "ogl.h"
#include <math.h>
#define M_PI 3.14159265358979323846f
#define HALF_PI 1.57079632679489661923f
#define DEGTORAD(d) ((d * (float)M_PI) / 180.0f);
#define RADTODEG(r) ((r * 180.0f) /(float)M_PI);
const int HALF_RAND = (RAND_MAX / 2);
struct tVector
{
float x,y,z;
@ -30,6 +16,8 @@ struct tVector
class CEmitter
{
static const int HALF_RAND = (RAND_MAX / 2);
public:
struct tColor
{
@ -265,4 +253,4 @@ public:
virtual ~CEmitter(void);
};
#endif
#endif

View File

@ -8,7 +8,6 @@
#include "precompiled.h"
#include "ParticleEngine.h"
#include <windows.h>
#include "ogl.h"
CParticleEngine *CParticleEngine::m_pInstance = 0;
@ -250,4 +249,4 @@ void CParticleEngine::LeaveParticleContext(void)
glPopMatrix();
glEnable(GL_LIGHTING);
glDisable(GL_BLEND);
}
}

View File

@ -139,4 +139,4 @@ private:
friend class CEmitter;
};
#endif
#endif

View File

@ -25,10 +25,7 @@
#include <deque>
#include <math.h>
// (some math.h versions omit this)
#ifndef M_PI
# define M_PI 3.14159265358979323846
#endif
#include "maths/MathUtil.h"
#ifdef __APPLE__
# include <OpenAL/alut.h>

View File

@ -5,6 +5,14 @@
#define PI 3.14159265358979323846f
#endif
#ifndef M_PI
#define M_PI 3.14159265358979323846
#endif
#ifndef M_PI_2
#define M_PI_2 1.57079632679489661923
#endif
#define DEGTORAD(a) ((a) * (PI/180.0f))
#define RADTODEG(a) ((a) * (180.0f/PI))
#define SQR(x) ((x) * (x))