![]() |
CRM64Pro GDK v0.19.0
A free cross-platform game development kit built on top of SDL 3.0
|
Particle manager class. More...
Particle manager class.
Creates, loads, updates, renders and destroys ParticleEmitter objects. Access this manager through Main::particleMgr().
Public Member Functions | |
| bool | info (Sint32 iMode=0) override |
| Request Particle Manager information. | |
| Sint32 | create (const string &sName, Uint32 iVersion=10) override |
| Create a new ParticleEmitter. | |
| Sint32 | playOneShot (eParticleEffectPreset ePreset, float fX, float fY) |
| Create and play a temporary one-shot preset emitter. | |
| Sint32 | closeOneShots () |
| Close all temporary one-shot emitters. | |
| Sint32 | getPresetCount () const |
| Get the number of built-in particle presets. | |
| const ParticlePresetDesc * | getPresetDesc (Sint32 iIndex) const |
| Get a built-in particle preset descriptor by index. | |
| const ParticlePresetDesc * | getPresetDesc (eParticleEffectPreset ePreset) const |
| Get a built-in particle preset descriptor by preset identifier. | |
| Sint32 | close (Sint32 idParticle) override |
| Close and destroy a ParticleEmitter. | |
| Sint32 | getCount () const override |
| Get number of loaded ParticleEmitter objects. | |
| Sint32 | setName (Sint32 idParticle, const string &sName) override |
| Change the ParticleEmitter name. | |
| ParticleEmitter * | get (Sint32 idParticle) |
| Get a ParticleEmitter pointer. | |
| Sint32 | load (const string &sCDCFile, const string &sName) |
| Load a ParticleEmitter from a CDC file. | |
| Sint32 | load (Sint32 idCDC, const string &sName) |
| Load a ParticleEmitter from an opened CDC archive. | |
| Sint32 | remove (Sint32 idCDC, const string &sName) |
| Remove a ParticleEmitter resource from an opened CDC archive. | |
| bool | exists (Sint32 idCDC, const string &sName) const |
| Check if a ParticleEmitter resource exists in an opened CDC archive. | |
| bool | exists (const string &sCDCFile, const string &sName) const |
| Check if a ParticleEmitter resource exists in a CDC file. | |
| bool | update (float fDeltaTime) |
| Advance all loaded ParticleEmitter objects. | |
| Sint32 | render (Sint32 idRes=0) |
| Render all loaded ParticleEmitter objects. | |
|
override |
Request Particle Manager information.
Writes information to the default log.
| iMode | Reserved for future use. Pass 0. |
|
override |
Create a new ParticleEmitter.
| sName | Name of the new emitter. Must be unique. |
| iVersion | Particle resource version. Default is 10. |
| Sint32 CRM64Pro::ParticleMgr::playOneShot | ( | eParticleEffectPreset | ePreset, |
| float | fX, | ||
| float | fY ) |
Create and play a temporary one-shot preset emitter.
| ePreset | Built-in preset to apply. The preset must have a finite duration. |
| fX | Horizontal emitter position in pixels. |
| fY | Vertical emitter position in pixels. |
| Sint32 CRM64Pro::ParticleMgr::closeOneShots | ( | ) |
Close all temporary one-shot emitters.
| Sint32 CRM64Pro::ParticleMgr::getPresetCount | ( | ) | const |
Get the number of built-in particle presets.
| const ParticlePresetDesc * CRM64Pro::ParticleMgr::getPresetDesc | ( | Sint32 | iIndex | ) | const |
Get a built-in particle preset descriptor by index.
| iIndex | Preset descriptor index in the range [0, getPresetCount()). |
| const ParticlePresetDesc * CRM64Pro::ParticleMgr::getPresetDesc | ( | eParticleEffectPreset | ePreset | ) | const |
Get a built-in particle preset descriptor by preset identifier.
| ePreset | Preset identifier. |
|
override |
Close and destroy a ParticleEmitter.
| idParticle | ParticleEmitter id. |
|
override |
Get number of loaded ParticleEmitter objects.
|
override |
Change the ParticleEmitter name.
| idParticle | ParticleEmitter id. |
| sName | New emitter name. Must be unique. |
| ParticleEmitter * CRM64Pro::ParticleMgr::get | ( | Sint32 | idParticle | ) |
Get a ParticleEmitter pointer.
| idParticle | ParticleEmitter id. |
| Sint32 CRM64Pro::ParticleMgr::load | ( | const string & | sCDCFile, |
| const string & | sName ) |
Load a ParticleEmitter from a CDC file.
| sCDCFile | string containing the [directory]+filename. |
| sName | Resource name inside the CDC archive. |
| Sint32 CRM64Pro::ParticleMgr::load | ( | Sint32 | idCDC, |
| const string & | sName ) |
Load a ParticleEmitter from an opened CDC archive.
| idCDC | CDC id. |
| sName | Resource name inside the CDC archive. |
| Sint32 CRM64Pro::ParticleMgr::remove | ( | Sint32 | idCDC, |
| const string & | sName ) |
Remove a ParticleEmitter resource from an opened CDC archive.
| idCDC | CDC id. |
| sName | Resource name inside the CDC archive. |
| bool CRM64Pro::ParticleMgr::exists | ( | Sint32 | idCDC, |
| const string & | sName ) const |
Check if a ParticleEmitter resource exists in an opened CDC archive.
| idCDC | CDC id. |
| sName | Resource name inside the CDC archive. |
| bool CRM64Pro::ParticleMgr::exists | ( | const string & | sCDCFile, |
| const string & | sName ) const |
Check if a ParticleEmitter resource exists in a CDC file.
| sCDCFile | string containing the [directory]+filename. |
| sName | Resource name inside the CDC archive. |
| bool CRM64Pro::ParticleMgr::update | ( | float | fDeltaTime | ) |
Advance all loaded ParticleEmitter objects.
| fDeltaTime | Elapsed time in seconds in the range [0, 1]. Each emitter's scaled delta must also be no greater than 1. |
| Sint32 CRM64Pro::ParticleMgr::render | ( | Sint32 | idRes = 0 | ) |
Render all loaded ParticleEmitter objects.
| idRes | Render target id. Use 0 for the default screen target. |