Batch #3454 by eAthena: 1 byte-identical, 16 confirmed by peer review. - fn_19007 CElectricEffect::Slot04: logic confirmed by peer review - fn_19008 CEmitterEffect::CEmitterEffect: logic confirmed by peer review - fn_19009 CEmitterEffect::`scalar deleting destructor': logic confirmed by peer review - fn_19013 CEmitterEffect::InitParticle: logic confirmed by peer review - fn_19014 CEmitterEffect::Slot07: logic confirmed by peer review - fn_19015 CEmitterEffect::Slot06: logic confirmed by peer review - fn_19016 CEmitterEffect::Slot03: logic confirmed by peer review - fn_19017 CEmitterEffect::Slot04: logic confirmed by peer review - fn_19018 CEmitterEffect::UpdateParticle: logic confirmed by peer review - fn_19019 CEmitterEffect::SetCount: logic confirmed by peer review - fn_19020 CEmitterEffect::SetParticleSpeed: logic confirmed by peer review - fn_19021 CEmitterEffect::Slot02: logic confirmed by peer review - fn_19022 CEnergyOrbEffect::CEnergyOrbEffect: logic confirmed by peer review - fn_19023 CEnergyOrbEffect::`scalar deleting destructor': logic confirmed by peer review - fn_19026 CEnergyOrbEffect::Slot06: byte-identical - fn_19028 CEnergyOrbEffect::Slot04: logic confirmed by peer review - fn_19029 CEnergyOrbEffect::SetCount: logic confirmed by peer review Peer-reviewed-by: superintelligence, meitogi Reviewed-by: ragnarok-clanker Adds to the build: Source/Contents/Effects/EmitterEffect.cpp, Source/Contents/Effects/EnergyOrbEffect.cpp, Source/Contents/Effects/ElectricEffect.cpp
26 lines
913 B
C++
26 lines
913 B
C++
#include "Contents/Effects/ElectricEffect.h"
|
|
#include "Contents/Effects/Particle.h"
|
|
|
|
// OFFSET: 0x00B4F930
|
|
// FUNCTION: fn_19007
|
|
void CElectricEffect::Slot04() {
|
|
for (CParticle* bolt : this->bolts) {
|
|
if (bolt && static_cast<unsigned>(bolt->unknown_000C - 1) <= 17 && bolt->unknown_0008 > 0) {
|
|
const int frame = bolt->unknown_000C;
|
|
const int alpha = bolt->alpha;
|
|
const int faded = alpha - frame * 5;
|
|
bolt->alpha = faded < 0 ? 0 : faded;
|
|
bolt->SetColor(static_cast<short>(frame * 6), static_cast<short>(frame * 6), 255);
|
|
ParticleQuad quad;
|
|
quad.billboard = false;
|
|
quad.top = static_cast<float>(bolt->unknown_000C - 1) / 21.0f;
|
|
quad.bottom = static_cast<float>(bolt->unknown_000C) / 21.0f;
|
|
quad.left = 0.0f;
|
|
quad.right = 1.0f;
|
|
quad.unused = false;
|
|
quad.depth = true;
|
|
bolt->Render(quad);
|
|
bolt->alpha = alpha;
|
|
}
|
|
}
|
|
}
|