Batch #17225 by ragnarok-clanker: forced by an admin (0 lower score(s), 1 changed function(s)); checked with 75 compiled unit(s), including every includer of Source/Utility/StdIntVectorCopy.h, Source/Utility/StdStringConcat.h, Source/Utility/StdStringCopy.h, Source/Utility/StdStringInsert.h, Source/Utility/StdStringMoveAssign.h, Source/Utility/StdStringVectorDestroy.h, Source/Utility/StdTraitsEqual.h, Source/Utility/StdTraitsFind.h, Source/Utility/StdWindowListEmplace.h.
54 lines
1.9 KiB
C++
54 lines
1.9 KiB
C++
#include "Contents/Effects/Particles/AnimatedEmitterEffect.h"
|
|
|
|
#include "Contents/Effects/Particles/Particle.h"
|
|
|
|
#include <cstdlib>
|
|
|
|
#include "Utility/StdStringCopy.h"
|
|
|
|
// OFFSET: 0x006F9EC0
|
|
// FUNCTION: fn_06888
|
|
CAnimatedEmitterEffect::CAnimatedEmitterEffect() {
|
|
this->acceleration = {0.0f, 0.0f, 0.0f};
|
|
this->velocityMin = {-3.0f, -1.0f, -3.0f};
|
|
this->velocityMax = {3.0f, 1.0f, 3.0f};
|
|
this->spread = {0.0f, 0.0f, 0.0f};
|
|
this->scaleMin = 10.0f;
|
|
this->scaleMax = 20.0f;
|
|
this->lifeMin = 3.0f;
|
|
this->lifeMax = 4.0f;
|
|
this->rateMin = 1.0f;
|
|
this->rateMax = 3.0f;
|
|
this->count = 4;
|
|
}
|
|
|
|
// OFFSET: 0x006FA0F0
|
|
// FUNCTION: fn_06890
|
|
void CAnimatedEmitterEffect::Open() {
|
|
this->frames[0].push_back(std::string("EFFECT\\shockwave_a.bmp"));
|
|
this->frames[0].push_back(std::string("EFFECT\\shockwave_b.bmp"));
|
|
this->frames[0].push_back(std::string("EFFECT\\shockwave_c.bmp"));
|
|
this->frames[0].push_back(std::string("EFFECT\\shockwave_d.bmp"));
|
|
this->frames[0].push_back(std::string("EFFECT\\shockwave_e.bmp"));
|
|
this->frames[1].push_back(std::string("EFFECT\\plazma_a.bmp"));
|
|
this->frames[1].push_back(std::string("EFFECT\\plazma_b.bmp"));
|
|
this->frames[1].push_back(std::string("EFFECT\\plazma_c.bmp"));
|
|
this->frames[1].push_back(std::string("EFFECT\\plazma_a.bmp"));
|
|
this->frames[1].push_back(std::string("EFFECT\\plazma_b.bmp"));
|
|
CEmitterEffect::Open();
|
|
}
|
|
|
|
// OFFSET: 0x006FA7C0
|
|
// FUNCTION: fn_06891
|
|
void CAnimatedEmitterEffect::InitParticle(CParticle* particle) {
|
|
particle->animationParameter = static_cast<float>(rand() % 2);
|
|
CEmitterEffect::InitParticle(particle);
|
|
}
|
|
|
|
// OFFSET: 0x006FA800
|
|
// FUNCTION: fn_06892
|
|
void CAnimatedEmitterEffect::UpdateParticle(CParticle* particle) {
|
|
int kind = static_cast<int>(particle->animationParameter);
|
|
particle->SetTexture(this->frames[kind][particle->elapsedFrames / 8 % 5]);
|
|
CEmitterEffect::UpdateParticle(particle);
|
|
}
|