mirror of
https://github.com/Heretek-AI/GDevelop.git
synced 2026-07-21 17:45:25 -04:00
92 lines
2.7 KiB
C++
92 lines
2.7 KiB
C++
/**
|
|
|
|
GDevelop - Particle System Extension
|
|
Copyright (c) 2010-2014 Florian Rival (Florian.Rival@gmail.com)
|
|
This project is released under the MIT License.
|
|
*/
|
|
|
|
#include "GDCpp/ExtensionBase.h"
|
|
#include "GDCore/Tools/Version.h"
|
|
#include "GDCpp/AutomatismsSharedData.h"
|
|
#include "ParticleEmitterObject.h"
|
|
#include "ParticleObstacleAutomatism.h"
|
|
#include "ExtensionSubDeclaration1.h"
|
|
#include "ExtensionSubDeclaration2.h"
|
|
#include "ExtensionSubDeclaration3.h"
|
|
#include "Extension.h"
|
|
#include <boost/version.hpp>
|
|
|
|
/**
|
|
* Constructor of an extension declares everything the extension contains : Objects, actions, conditions and expressions.
|
|
*/
|
|
Extension::Extension()
|
|
{
|
|
SetExtensionInformation("ParticleSystem",
|
|
_("Particle system"),
|
|
_("Extension allowing to display a large number of small particles."),
|
|
"Florian Rival",
|
|
"Open source (MIT License)");
|
|
|
|
//Declaration of all objects available
|
|
{
|
|
gd::ObjectMetadata & obj = AddObject("ParticleEmitter",
|
|
_("Particles emitter"),
|
|
_("Displays a large number of small particles to create visual effects"),
|
|
"CppPlatform/Extensions/particleSystemicon.png",
|
|
&CreateParticleEmitterObject,
|
|
&DestroyParticleEmitterObject);
|
|
|
|
AddRuntimeObject(obj, "RuntimeParticleEmitterObject", CreateRuntimeParticleEmitterObject, DestroyRuntimeParticleEmitterObject);
|
|
#if defined(GD_IDE_ONLY)
|
|
|
|
obj.SetIncludeFile("ParticleSystem/ParticleEmitterObject.h");
|
|
|
|
//Declaration is too big to be compiled by GCC in one file, unless you have 4GB+ ram. :/
|
|
ExtensionSubDeclaration1(obj);
|
|
ExtensionSubDeclaration2(obj);
|
|
ExtensionSubDeclaration3(obj);
|
|
|
|
#endif
|
|
|
|
}
|
|
|
|
/* Work in progress
|
|
{
|
|
gd::AutomatismMetadata & aut = AddAutomatism("ParticleObstacleAutomatism",
|
|
_("Obstacle"),
|
|
_("ParticleObstacle"),
|
|
_("Automatisme permettant de repousser les particules"),
|
|
"",
|
|
"res/path32.png",
|
|
ParticleObstacleAutomatism,
|
|
AutomatismsSharedData)
|
|
|
|
#if defined(GD_IDE_ONLY)
|
|
|
|
automatismInfo.SetIncludeFile("ParticleSystem/ParticleObstacleAutomatism.h");
|
|
|
|
#endif
|
|
|
|
}
|
|
*/
|
|
|
|
GD_COMPLETE_EXTENSION_COMPILATION_INFORMATION();
|
|
};
|
|
|
|
/**
|
|
* Used by GDevelop to create the extension class
|
|
* -- Do not need to be modified. --
|
|
*/
|
|
extern "C" ExtensionBase * GD_EXTENSION_API CreateGDExtension() {
|
|
return new Extension;
|
|
}
|
|
|
|
/**
|
|
* Used by GDevelop to destroy the extension class
|
|
* -- Do not need to be modified. --
|
|
*/
|
|
extern "C" void GD_EXTENSION_API DestroyGDExtension(ExtensionBase * p) {
|
|
delete p;
|
|
}
|
|
|