Add _IRR_COMPILE_WITH_PARTICLES_ to control compilation of particle system

git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@5566 dfc29bdd-3216-0410-991c-e03cc46cb475
master
cutealien 2017-11-06 14:18:17 +00:00
parent f37045af53
commit 9c0cd04730
27 changed files with 118 additions and 6 deletions

View File

@ -1,5 +1,6 @@
--------------------------
Changes in 1.9 (not yet released)
- Add _IRR_COMPILE_WITH_PARTICLES_ to control compilation of particle system
- Add IGUIImage::setDrawBackground to allow disabling background drawing even when no texture is set.
- Add gui event EGET_ELEMENT_REMOVED.
- Fix: IGUIContextMenu now raises sub-menu when they would otherwise be displayed below bottom-border of root gui element.

View File

@ -243,6 +243,13 @@ you will not be able to use anything provided by the GUI Environment, including
#undef _IRR_COMPILE_WITH_GUI_
#endif
//! Define _IRR_COMPILE_WITH_PARTICLES to compile the engine the withe build-in particle system
/** You can disable this if you don't need particles or use an external particle system. */
#define _IRR_COMPILE_WITH_PARTICLES_
#ifdef NO_IRR_COMPILE_WITH_PARTICLES_
#undef _IRR_COMPILE_WITH_PARTICLES_
#endif
//! Define _IRR_WCHAR_FILESYSTEM to enable unicode filesystem support for the engine.
/** This enables the engine to read/write from unicode filesystem. If you
disable this feature, the engine behave as before (ansi). This is currently only supported

View File

@ -3,6 +3,9 @@
// For conditions of distribution and use, see copyright notice in irrlicht.h
#include "CParticleAttractionAffector.h"
#ifdef _IRR_COMPILE_WITH_PARTICLES_
#include "IAttributes.h"
namespace irr
@ -82,3 +85,4 @@ void CParticleAttractionAffector::deserializeAttributes(io::IAttributes* in, io:
} // end namespace scene
} // end namespace irr
#endif // _IRR_COMPILE_WITH_PARTICLES_

View File

@ -5,6 +5,9 @@
#ifndef __C_PARTICLE_ATTRACTION_AFFECTOR_H_INCLUDED__
#define __C_PARTICLE_ATTRACTION_AFFECTOR_H_INCLUDED__
#include "IrrCompileConfig.h"
#ifdef _IRR_COMPILE_WITH_PARTICLES_
#include "IParticleAttractionAffector.h"
namespace irr
@ -81,6 +84,7 @@ private:
} // end namespace scene
} // end namespace irr
#endif // _IRR_COMPILE_WITH_PARTICLES_
#endif // __C_PARTICLE_ATTRACTION_AFFECTOR_H_INCLUDED__

View File

@ -3,6 +3,9 @@
// For conditions of distribution and use, see copyright notice in irrlicht.h
#include "CParticleBoxEmitter.h"
#ifdef _IRR_COMPILE_WITH_PARTICLES_
#include "os.h"
#include "IAttributes.h"
#include "irrMath.h"
@ -186,3 +189,4 @@ void CParticleBoxEmitter::deserializeAttributes(io::IAttributes* in, io::SAttrib
} // end namespace scene
} // end namespace irr
#endif // _IRR_COMPILE_WITH_PARTICLES_

View File

@ -5,6 +5,9 @@
#ifndef __C_PARTICLE_BOX_EMITTER_H_INCLUDED__
#define __C_PARTICLE_BOX_EMITTER_H_INCLUDED__
#include "IrrCompileConfig.h"
#ifdef _IRR_COMPILE_WITH_PARTICLES_
#include "IParticleBoxEmitter.h"
#include "irrArray.h"
#include "aabbox3d.h"
@ -127,6 +130,7 @@ private:
} // end namespace scene
} // end namespace irr
#endif // _IRR_COMPILE_WITH_PARTICLES_
#endif

View File

@ -3,6 +3,10 @@
// For conditions of distribution and use, see copyright notice in irrlicht.h
#include "CParticleCylinderEmitter.h"
#include "IrrCompileConfig.h"
#ifdef _IRR_COMPILE_WITH_PARTICLES_
#include "os.h"
#include "IAttributes.h"
@ -185,3 +189,5 @@ void CParticleCylinderEmitter::deserializeAttributes(io::IAttributes* in, io::SA
} // end namespace scene
} // end namespace irr
#endif // _IRR_COMPILE_WITH_PARTICLES_

View File

@ -5,6 +5,9 @@
#ifndef __C_PARTICLE_CYLINDER_EMITTER_H_INCLUDED__
#define __C_PARTICLE_CYLINDER_EMITTER_H_INCLUDED__
#include "IrrCompileConfig.h"
#ifdef _IRR_COMPILE_WITH_PARTICLES_
#include "IParticleCylinderEmitter.h"
#include "irrArray.h"
@ -158,6 +161,7 @@ private:
} // end namespace scene
} // end namespace irr
#endif // _IRR_COMPILE_WITH_PARTICLES_
#endif

View File

@ -3,6 +3,9 @@
// For conditions of distribution and use, see copyright notice in irrlicht.h
#include "CParticleFadeOutAffector.h"
#ifdef _IRR_COMPILE_WITH_PARTICLES_
#include "IAttributes.h"
#include "os.h"
@ -68,3 +71,4 @@ void CParticleFadeOutAffector::deserializeAttributes(io::IAttributes* in, io::SA
} // end namespace scene
} // end namespace irr
#endif // _IRR_COMPILE_WITH_PARTICLES_

View File

@ -5,6 +5,9 @@
#ifndef __C_PARTICLE_FADE_OUT_AFFECTOR_H_INCLUDED__
#define __C_PARTICLE_FADE_OUT_AFFECTOR_H_INCLUDED__
#include "IrrCompileConfig.h"
#ifdef _IRR_COMPILE_WITH_PARTICLES_
#include "IParticleFadeOutAffector.h"
#include "SColor.h"
@ -59,5 +62,7 @@ private:
} // end namespace irr
#endif // _IRR_COMPILE_WITH_PARTICLES_
#endif

View File

@ -3,6 +3,9 @@
// For conditions of distribution and use, see copyright notice in irrlicht.h
#include "CParticleGravityAffector.h"
#ifdef _IRR_COMPILE_WITH_PARTICLES_
#include "os.h"
#include "IAttributes.h"
@ -62,3 +65,4 @@ void CParticleGravityAffector::deserializeAttributes(io::IAttributes* in, io::SA
} // end namespace scene
} // end namespace irr
#endif // _IRR_COMPILE_WITH_PARTICLES_

View File

@ -5,6 +5,9 @@
#ifndef __C_PARTICLE_GRAVITY_AFFECTOR_H_INCLUDED__
#define __C_PARTICLE_GRAVITY_AFFECTOR_H_INCLUDED__
#include "IrrCompileConfig.h"
#ifdef _IRR_COMPILE_WITH_PARTICLES_
#include "IParticleGravityAffector.h"
#include "SColor.h"
@ -59,6 +62,7 @@ private:
} // end namespace scene
} // end namespace irr
#endif // _IRR_COMPILE_WITH_PARTICLES_
#endif

View File

@ -2,8 +2,11 @@
// This file is part of the "Irrlicht Engine".
// For conditions of distribution and use, see copyright notice in irrlicht.h
#include "IrrCompileConfig.h"
#include "CParticleMeshEmitter.h"
#include "IrrCompileConfig.h"
#ifdef _IRR_COMPILE_WITH_PARTICLES_
#include "os.h"
namespace irr
@ -188,3 +191,4 @@ void CParticleMeshEmitter::setMesh(IMesh* mesh)
} // end namespace scene
} // end namespace irr
#endif // _IRR_COMPILE_WITH_PARTICLES_

View File

@ -5,6 +5,9 @@
#ifndef __C_PARTICLE_MESH_EMITTER_H_INCLUDED__
#define __C_PARTICLE_MESH_EMITTER_H_INCLUDED__
#include "IrrCompileConfig.h"
#ifdef _IRR_COMPILE_WITH_PARTICLES_
#include "IParticleMeshEmitter.h"
#include "irrArray.h"
#include "aabbox3d.h"
@ -154,6 +157,7 @@ private:
} // end namespace scene
} // end namespace irr
#endif // _IRR_COMPILE_WITH_PARTICLES_
#endif // __C_PARTICLE_MESH_EMITTER_H_INCLUDED__

View File

@ -3,6 +3,9 @@
// For conditions of distribution and use, see copyright notice in irrlicht.h
#include "CParticlePointEmitter.h"
#ifdef _IRR_COMPILE_WITH_PARTICLES_
#include "os.h"
#include "IAttributes.h"
@ -145,3 +148,4 @@ void CParticlePointEmitter::deserializeAttributes(io::IAttributes* in, io::SAttr
} // end namespace scene
} // end namespace irr
#endif // _IRR_COMPILE_WITH_PARTICLES_

View File

@ -5,6 +5,9 @@
#ifndef __C_PARTICLE_POINT_EMITTER_H_INCLUDED__
#define __C_PARTICLE_POINT_EMITTER_H_INCLUDED__
#include "IrrCompileConfig.h"
#ifdef _IRR_COMPILE_WITH_PARTICLES_
#include "IParticleEmitter.h"
#include "irrArray.h"
@ -117,6 +120,6 @@ private:
} // end namespace scene
} // end namespace irr
#endif // _IRR_COMPILE_WITH_PARTICLES_
#endif

View File

@ -3,6 +3,9 @@
// For conditions of distribution and use, see copyright notice in irrlicht.h
#include "CParticleRingEmitter.h"
#ifdef _IRR_COMPILE_WITH_PARTICLES_
#include "os.h"
#include "IAttributes.h"
@ -175,3 +178,4 @@ void CParticleRingEmitter::deserializeAttributes(io::IAttributes* in, io::SAttri
} // end namespace scene
} // end namespace irr
#endif // _IRR_COMPILE_WITH_PARTICLES_

View File

@ -5,6 +5,9 @@
#ifndef __C_PARTICLE_RING_EMITTER_H_INCLUDED__
#define __C_PARTICLE_RING_EMITTER_H_INCLUDED__
#include "IrrCompileConfig.h"
#ifdef _IRR_COMPILE_WITH_PARTICLES_
#include "IParticleRingEmitter.h"
#include "irrArray.h"
@ -142,6 +145,7 @@ private:
} // end namespace scene
} // end namespace irr
#endif // _IRR_COMPILE_WITH_PARTICLES_
#endif

View File

@ -3,6 +3,10 @@
// For conditions of distribution and use, see copyright notice in irrlicht.h
#include "CParticleRotationAffector.h"
#include "IrrCompileConfig.h"
#ifdef _IRR_COMPILE_WITH_PARTICLES_
#include "IAttributes.h"
namespace irr
@ -65,3 +69,4 @@ void CParticleRotationAffector::deserializeAttributes(io::IAttributes* in, io::S
} // end namespace scene
} // end namespace irr
#endif // _IRR_COMPILE_WITH_PARTICLES_

View File

@ -5,6 +5,9 @@
#ifndef __C_PARTICLE_ROTATION_AFFECTOR_H_INCLUDED__
#define __C_PARTICLE_ROTATION_AFFECTOR_H_INCLUDED__
#include "IrrCompileConfig.h"
#ifdef _IRR_COMPILE_WITH_PARTICLES_
#include "IParticleRotationAffector.h"
namespace irr
@ -51,6 +54,6 @@ private:
} // end namespace scene
} // end namespace irr
#endif // _IRR_COMPILE_WITH_PARTICLES_
#endif // __C_PARTICLE_ROTATION_AFFECTOR_H_INCLUDED__

View File

@ -3,6 +3,9 @@
// For conditions of distribution and use, see copyright notice in irrlicht.h
#include "CParticleScaleAffector.h"
#ifdef _IRR_COMPILE_WITH_PARTICLES_
#include "IAttributes.h"
namespace irr
@ -51,3 +54,4 @@ namespace irr
}
}
#endif // _IRR_COMPILE_WITH_PARTICLES_

View File

@ -5,6 +5,9 @@
#ifndef C_PARTICLE_SCALE_AFFECTOR_H
#define C_PARTICLE_SCALE_AFFECTOR_H
#include "IrrCompileConfig.h"
#ifdef _IRR_COMPILE_WITH_PARTICLES_
#include "IParticleAffector.h"
namespace irr
@ -39,6 +42,7 @@ namespace irr
}
}
#endif // _IRR_COMPILE_WITH_PARTICLES_
#endif // C_PARTICLE_SCALE_AFFECTOR_H

View File

@ -2,8 +2,10 @@
// This file is part of the "Irrlicht Engine".
// For conditions of distribution and use, see copyright notice in irrlicht.h
#include "IrrCompileConfig.h"
#include "CParticleSphereEmitter.h"
#ifdef _IRR_COMPILE_WITH_PARTICLES_
#include "os.h"
#include "IAttributes.h"
@ -173,3 +175,4 @@ void CParticleSphereEmitter::deserializeAttributes(io::IAttributes* in, io::SAtt
} // end namespace scene
} // end namespace irr
#endif // _IRR_COMPILE_WITH_PARTICLES_

View File

@ -5,6 +5,9 @@
#ifndef __C_PARTICLE_SPHERE_EMITTER_H_INCLUDED__
#define __C_PARTICLE_SPHERE_EMITTER_H_INCLUDED__
#include "IrrCompileConfig.h"
#ifdef _IRR_COMPILE_WITH_PARTICLES_
#include "IParticleSphereEmitter.h"
#include "irrArray.h"
#include "aabbox3d.h"
@ -135,6 +138,7 @@ private:
} // end namespace scene
} // end namespace irr
#endif // _IRR_COMPILE_WITH_PARTICLES_
#endif

View File

@ -3,6 +3,9 @@
// For conditions of distribution and use, see copyright notice in irrlicht.h
#include "CParticleSystemSceneNode.h"
#ifdef _IRR_COMPILE_WITH_PARTICLES_
#include "os.h"
#include "ISceneManager.h"
#include "ICameraSceneNode.h"
@ -780,4 +783,4 @@ void CParticleSystemSceneNode::deserializeAttributes(io::IAttributes* in, io::SA
} // end namespace scene
} // end namespace irr
#endif // _IRR_COMPILE_WITH_PARTICLES_

View File

@ -5,6 +5,9 @@
#ifndef __C_PARTICLE_SYSTEM_SCENE_NODE_H_INCLUDED__
#define __C_PARTICLE_SYSTEM_SCENE_NODE_H_INCLUDED__
#include "IrrCompileConfig.h"
#ifdef _IRR_COMPILE_WITH_PARTICLES_
#include "IParticleSystemSceneNode.h"
#include "irrArray.h"
#include "irrList.h"
@ -240,6 +243,7 @@ private:
} // end namespace scene
} // end namespace irr
#endif // _IRR_COMPILE_WITH_PARTICLES_
#endif

View File

@ -148,7 +148,11 @@
#include "CMeshSceneNode.h"
#include "CSkyBoxSceneNode.h"
#include "CSkyDomeSceneNode.h"
#ifdef _IRR_COMPILE_WITH_PARTICLES_
#include "CParticleSystemSceneNode.h"
#endif // _IRR_COMPILE_WITH_PARTICLES_
#include "CDummyTransformationSceneNode.h"
#include "CWaterSurfaceSceneNode.h"
#include "CTerrainSceneNode.h"
@ -848,6 +852,7 @@ IParticleSystemSceneNode* CSceneManager::addParticleSystemSceneNode(
const core::vector3df& position, const core::vector3df& rotation,
const core::vector3df& scale)
{
#ifdef _IRR_COMPILE_WITH_PARTICLES_
if (!parent)
parent = this;
@ -856,6 +861,9 @@ IParticleSystemSceneNode* CSceneManager::addParticleSystemSceneNode(
node->drop();
return node;
#else
return 0;
#endif // _IRR_COMPILE_WITH_PARTICLES_
}