ManaPlus
|
#include <particleengine.h>
Public Member Functions | |
ParticleEngine () | |
~ParticleEngine () | |
void | clear () |
bool | update () |
Particle * | createChild () |
Particle * | addEffect (const std::string &particleEffectFile, const int pixelX, const int pixelY, const int rotation) |
Particle * | addTextSplashEffect (const std::string &text, const int x, const int y, const Color *const color, Font *const font, const bool outline) |
Particle * | addTextRiseFadeOutEffect (const std::string &text, const int x, const int y, const Color *const color, Font *const font, const bool outline) |
void | setMap (Map *const map) |
Static Public Member Functions | |
static void | setupEngine () |
Static Public Attributes | |
static const float | PARTICLE_SKY = 800.0F |
static ParticlePhysicsT | fastPhysics = ParticlePhysics::Best |
static int | particleCount = 0 |
static int | maxCount = 0 |
static int | emitterSkip = 1 |
static bool | enabled = true |
Private Attributes | |
Particles | mChildParticles |
Particles | mChildMoveParticles |
Map * | mMap |
Definition at line 47 of file particleengine.h.
ParticleEngine::ParticleEngine | ( | ) |
ParticleEngine::~ParticleEngine | ( | ) |
Destructor.
Definition at line 61 of file particleengine.cpp.
References clear(), and particleCount.
Particle * ParticleEngine::addEffect | ( | const std::string & | particleEffectFile, |
const int | pixelX, | ||
const int | pixelY, | ||
const int | rotation | ||
) |
Creates a child particle that hosts some emitters described in the particleEffectFile.
Definition at line 130 of file particleengine.cpp.
References Particle::addEmitter(), CAST_S8, AliveStatus::DEAD_FLOOR, AliveStatus::DEAD_IMPACT, AliveStatus::DEAD_OTHER, AliveStatus::DEAD_SKY, AliveStatus::DEAD_TIMEOUT, Resource::decRef(), XML::findFirstChildByName(), for_each_xml_child_node, XML::getBoolProperty(), XML::getFloatProperty(), Loader::getImage(), XML::getProperty(), Loader::getXml(), Dye::instantiate(), Logger::log(), logger, Ea::GameRecv::mMap, Particle::moveTo(), restrict, XML::Document::rootNode(), Particle::setAllowSizeAdjust(), Particle::setDeathEffect(), Particle::setLifetime(), Actor::setMap(), SkipError_false, and UseVirtFs_true.
Referenced by Being::addItemParticles(), Being::addItemParticlesCards(), StatusEffect::getParticle(), StatusEffect::getStartParticle(), Map::initializeParticleEffects(), Being::recreateItemParticles(), LocalPlayer::setTestParticle(), ActorSprite::setupSpriteDisplay(), EffectManager::trigger(), EffectManager::triggerReturn(), and Particle::updateSelf().
Particle * ParticleEngine::addTextRiseFadeOutEffect | ( | const std::string & | text, |
const int | x, | ||
const int | y, | ||
const Color *const | color, | ||
Font *const | font, | ||
const bool | outline | ||
) |
Creates a standalone text particle.
Definition at line 310 of file particleengine.cpp.
References Ea::GameRecv::mMap, Particle::moveTo(), Particle::setFadeIn(), Particle::setFadeOut(), Particle::setGravity(), Particle::setLifetime(), Actor::setMap(), Particle::setVelocity(), x, and y.
Referenced by LocalPlayer::logic().
Particle * ParticleEngine::addTextSplashEffect | ( | const std::string & | text, |
const int | x, | ||
const int | y, | ||
const Color *const | color, | ||
Font *const | font, | ||
const bool | outline | ||
) |
Creates a standalone text particle.
Definition at line 279 of file particleengine.cpp.
References Ea::GameRecv::mMap, Particle::moveTo(), Particle::setBounce(), Particle::setFadeOut(), Particle::setGravity(), Particle::setLifetime(), Actor::setMap(), Particle::setVelocity(), x, and y.
Referenced by Being::takeDamage().
void ParticleEngine::clear | ( | ) |
Deletes all child particles and emitters.
Definition at line 339 of file particleengine.cpp.
References delete_all(), mChildMoveParticles, and mChildParticles.
Referenced by Game::changeMap(), and ~ParticleEngine().
Particle * ParticleEngine::createChild | ( | ) |
Creates a blank particle as a child of the current particle Useful for creating target particles
Definition at line 122 of file particleengine.cpp.
References mChildParticles, mMap, and Actor::setMap().
Referenced by Being::fireMissile().
|
inline |
Definition at line 122 of file particleengine.h.
References mMap.
Referenced by Game::changeMap(), and initEngines().
|
static |
Gives a particle the properties of an engine root particle and loads the particle-related config settings.
Definition at line 68 of file particleengine.cpp.
References config, emitterSkip, enabled, fastPhysics, fromInt, Configuration::getBoolValue(), Configuration::getIntValue(), Logger::log1(), logger, and maxCount.
Referenced by initEngines().
bool ParticleEngine::update | ( | ) |
Updates particle position, returns false when the particle should be deleted.
Definition at line 82 of file particleengine.cpp.
References Viewport::getCameraX(), Viewport::getCameraY(), mChildMoveParticles, mChildParticles, mMap, restrict, and viewport.
Referenced by Game::logic().
|
static |
Definition at line 54 of file particleengine.h.
Referenced by Game::adjustPerfomance(), Client::optionChanged(), Game::resetAdjustLevel(), setupEngine(), and Particle::updateSelf().
|
static |
Definition at line 56 of file particleengine.h.
Referenced by Being::addItemParticles(), Being::addItemParticlesCards(), Being::addSpecialEffect(), EAthena::BeingRecv::processBeingSelfEffect(), TmwAthena::BeingRecv::processBeingSelfEffect(), EAthena::BeingRecv::processBeingSpecialEffect(), Being::setAction(), Being::setSpiritBalls(), setupEngine(), and ActorSprite::setupSpriteDisplay().
|
static |
Definition at line 51 of file particleengine.h.
Referenced by setupEngine(), and Particle::updateSelf().
|
static |
Definition at line 53 of file particleengine.h.
Referenced by ParticleEmitter::createParticles(), and setupEngine().
|
private |
Definition at line 128 of file particleengine.h.
|
private |
Definition at line 127 of file particleengine.h.
Referenced by clear(), createChild(), and update().
|
private |
Definition at line 129 of file particleengine.h.
Referenced by createChild(), setMap(), and update().
|
static |
Definition at line 50 of file particleengine.h.
Referenced by Particle::updateSelf().
|
static |
Definition at line 52 of file particleengine.h.
Referenced by ParticleEmitter::createParticles(), MapDebugTab::logic(), Particle::Particle(), ParticleEngine(), Particle::~Particle(), and ~ParticleEngine().