diff --git a/changes.txt b/changes.txt index 40f1ddcc..554f1b1f 100644 --- a/changes.txt +++ b/changes.txt @@ -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. @@ -26,7 +27,7 @@ Changes in 1.9 (not yet released) - Add access functions to ITextSceneNode (getText, getTextColor, setFont, getFont). - Try harder to move Window to custom WindowPosition set in SIrrlichtCreationParameters on X11. Thx@ Hernan Ezequiel Di Giorgi for the patch (#304). - Fix bug in virtual filessystem which prevented createFileList from working. Thx @Cube for reporting a problem. -- ITriangleSelector now can also return meshbuffer collision information. +- ITriangleSelector now can also return meshbuffer collision information. - core::string::split now adds delimiter to token before delimiter when keepSeparators is true. That way we never end up with 2 tokens for an original string with a single character. - Bugfix: SMesh::recalculateBoundingBox() does now ignore empty boundingboxes of meshbuffers instead of adding them. - IIrrXMLReader::getAttributeValueAsInt and IIrrXMLReader::getAttributeValueAsFloat can now return a custom default-value when the attribute is not found. diff --git a/include/IrrCompileConfig.h b/include/IrrCompileConfig.h index 0ffe35ee..82baf126 100644 --- a/include/IrrCompileConfig.h +++ b/include/IrrCompileConfig.h @@ -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 diff --git a/source/Irrlicht/CParticleAttractionAffector.cpp b/source/Irrlicht/CParticleAttractionAffector.cpp index 83887c90..8ae7367e 100644 --- a/source/Irrlicht/CParticleAttractionAffector.cpp +++ b/source/Irrlicht/CParticleAttractionAffector.cpp @@ -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_ diff --git a/source/Irrlicht/CParticleAttractionAffector.h b/source/Irrlicht/CParticleAttractionAffector.h index d8712294..6e126cd9 100644 --- a/source/Irrlicht/CParticleAttractionAffector.h +++ b/source/Irrlicht/CParticleAttractionAffector.h @@ -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__ diff --git a/source/Irrlicht/CParticleBoxEmitter.cpp b/source/Irrlicht/CParticleBoxEmitter.cpp index 20969d76..1ff40ee7 100644 --- a/source/Irrlicht/CParticleBoxEmitter.cpp +++ b/source/Irrlicht/CParticleBoxEmitter.cpp @@ -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_ diff --git a/source/Irrlicht/CParticleBoxEmitter.h b/source/Irrlicht/CParticleBoxEmitter.h index 37f8083e..21d8dd3e 100644 --- a/source/Irrlicht/CParticleBoxEmitter.h +++ b/source/Irrlicht/CParticleBoxEmitter.h @@ -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 diff --git a/source/Irrlicht/CParticleCylinderEmitter.cpp b/source/Irrlicht/CParticleCylinderEmitter.cpp index fb438cbc..a0d0ef2e 100644 --- a/source/Irrlicht/CParticleCylinderEmitter.cpp +++ b/source/Irrlicht/CParticleCylinderEmitter.cpp @@ -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_ + diff --git a/source/Irrlicht/CParticleCylinderEmitter.h b/source/Irrlicht/CParticleCylinderEmitter.h index b0a5a8f8..c49c939a 100644 --- a/source/Irrlicht/CParticleCylinderEmitter.h +++ b/source/Irrlicht/CParticleCylinderEmitter.h @@ -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 diff --git a/source/Irrlicht/CParticleFadeOutAffector.cpp b/source/Irrlicht/CParticleFadeOutAffector.cpp index b14d8306..4c6957e8 100644 --- a/source/Irrlicht/CParticleFadeOutAffector.cpp +++ b/source/Irrlicht/CParticleFadeOutAffector.cpp @@ -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_ diff --git a/source/Irrlicht/CParticleFadeOutAffector.h b/source/Irrlicht/CParticleFadeOutAffector.h index 48608de5..f0bbf057 100644 --- a/source/Irrlicht/CParticleFadeOutAffector.h +++ b/source/Irrlicht/CParticleFadeOutAffector.h @@ -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 diff --git a/source/Irrlicht/CParticleGravityAffector.cpp b/source/Irrlicht/CParticleGravityAffector.cpp index 450a5dfc..1938a542 100644 --- a/source/Irrlicht/CParticleGravityAffector.cpp +++ b/source/Irrlicht/CParticleGravityAffector.cpp @@ -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_ diff --git a/source/Irrlicht/CParticleGravityAffector.h b/source/Irrlicht/CParticleGravityAffector.h index dd5b0f87..1c926fc2 100644 --- a/source/Irrlicht/CParticleGravityAffector.h +++ b/source/Irrlicht/CParticleGravityAffector.h @@ -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 diff --git a/source/Irrlicht/CParticleMeshEmitter.cpp b/source/Irrlicht/CParticleMeshEmitter.cpp index e7726715..ef667c52 100644 --- a/source/Irrlicht/CParticleMeshEmitter.cpp +++ b/source/Irrlicht/CParticleMeshEmitter.cpp @@ -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_ diff --git a/source/Irrlicht/CParticleMeshEmitter.h b/source/Irrlicht/CParticleMeshEmitter.h index 5dc80fd7..08a076c1 100644 --- a/source/Irrlicht/CParticleMeshEmitter.h +++ b/source/Irrlicht/CParticleMeshEmitter.h @@ -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__ diff --git a/source/Irrlicht/CParticlePointEmitter.cpp b/source/Irrlicht/CParticlePointEmitter.cpp index 71864278..38c7e276 100644 --- a/source/Irrlicht/CParticlePointEmitter.cpp +++ b/source/Irrlicht/CParticlePointEmitter.cpp @@ -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_ diff --git a/source/Irrlicht/CParticlePointEmitter.h b/source/Irrlicht/CParticlePointEmitter.h index b882e3e3..985bb490 100644 --- a/source/Irrlicht/CParticlePointEmitter.h +++ b/source/Irrlicht/CParticlePointEmitter.h @@ -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 - diff --git a/source/Irrlicht/CParticleRingEmitter.cpp b/source/Irrlicht/CParticleRingEmitter.cpp index 239d691a..7fc6ec86 100644 --- a/source/Irrlicht/CParticleRingEmitter.cpp +++ b/source/Irrlicht/CParticleRingEmitter.cpp @@ -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_ diff --git a/source/Irrlicht/CParticleRingEmitter.h b/source/Irrlicht/CParticleRingEmitter.h index c03175c8..f36254dd 100644 --- a/source/Irrlicht/CParticleRingEmitter.h +++ b/source/Irrlicht/CParticleRingEmitter.h @@ -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 diff --git a/source/Irrlicht/CParticleRotationAffector.cpp b/source/Irrlicht/CParticleRotationAffector.cpp index e59854a9..f30ab964 100644 --- a/source/Irrlicht/CParticleRotationAffector.cpp +++ b/source/Irrlicht/CParticleRotationAffector.cpp @@ -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_ diff --git a/source/Irrlicht/CParticleRotationAffector.h b/source/Irrlicht/CParticleRotationAffector.h index f485bff0..2828b8ef 100644 --- a/source/Irrlicht/CParticleRotationAffector.h +++ b/source/Irrlicht/CParticleRotationAffector.h @@ -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__ - diff --git a/source/Irrlicht/CParticleScaleAffector.cpp b/source/Irrlicht/CParticleScaleAffector.cpp index 1817bcf5..9b8d0262 100644 --- a/source/Irrlicht/CParticleScaleAffector.cpp +++ b/source/Irrlicht/CParticleScaleAffector.cpp @@ -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_ diff --git a/source/Irrlicht/CParticleScaleAffector.h b/source/Irrlicht/CParticleScaleAffector.h index 1703da33..0f403c91 100644 --- a/source/Irrlicht/CParticleScaleAffector.h +++ b/source/Irrlicht/CParticleScaleAffector.h @@ -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 diff --git a/source/Irrlicht/CParticleSphereEmitter.cpp b/source/Irrlicht/CParticleSphereEmitter.cpp index c7933a8f..c97d6daa 100644 --- a/source/Irrlicht/CParticleSphereEmitter.cpp +++ b/source/Irrlicht/CParticleSphereEmitter.cpp @@ -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_ diff --git a/source/Irrlicht/CParticleSphereEmitter.h b/source/Irrlicht/CParticleSphereEmitter.h index ed2bf132..1d9475bd 100644 --- a/source/Irrlicht/CParticleSphereEmitter.h +++ b/source/Irrlicht/CParticleSphereEmitter.h @@ -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 diff --git a/source/Irrlicht/CParticleSystemSceneNode.cpp b/source/Irrlicht/CParticleSystemSceneNode.cpp index c2bc0c06..994a43c3 100644 --- a/source/Irrlicht/CParticleSystemSceneNode.cpp +++ b/source/Irrlicht/CParticleSystemSceneNode.cpp @@ -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_ diff --git a/source/Irrlicht/CParticleSystemSceneNode.h b/source/Irrlicht/CParticleSystemSceneNode.h index 322f12b5..779f7141 100644 --- a/source/Irrlicht/CParticleSystemSceneNode.h +++ b/source/Irrlicht/CParticleSystemSceneNode.h @@ -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 diff --git a/source/Irrlicht/CSceneManager.cpp b/source/Irrlicht/CSceneManager.cpp index 25d52717..f564091d 100644 --- a/source/Irrlicht/CSceneManager.cpp +++ b/source/Irrlicht/CSceneManager.cpp @@ -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_ }