From 73e944ddedb1fe9f3b1c406d4891d5c14c9765ac Mon Sep 17 00:00:00 2001 From: ragnarok-clanker Date: Wed, 28 Oct 2026 22:19:15 +0000 Subject: [PATCH] Decompile 2 functions in Source/Contents/Effects/EffectPrimitiveMotion.cpp, Source/Contents/Effects/EffectParticle.h Batch #1789 by ragnarok-clanker: 0 byte-identical, 2 confirmed by peer review. - fn_19795 EffectParticle::PrimChemical2: logic confirmed by peer review - fn_19797 EffectParticle::PrimChemical: logic confirmed by peer review Peer-reviewed-by: Yommy Reviewed-by: ragnarok-clanker --- Source/Contents/Effects/EffectParticle.h | 3 + .../Effects/EffectPrimitiveMotion.cpp | 58 +++++++++++++++++++ 2 files changed, 61 insertions(+) diff --git a/Source/Contents/Effects/EffectParticle.h b/Source/Contents/Effects/EffectParticle.h index 92afaf4..2a8c3ab 100644 --- a/Source/Contents/Effects/EffectParticle.h +++ b/Source/Contents/Effects/EffectParticle.h @@ -25,6 +25,9 @@ struct EffectParticle : CRenderObject { void PrimBottom(); void PrimBottomOut(); void PrimBubbleDrop(); + void PrimChemical2(); + void PrimChemical3(); + void PrimChemical(); bool AdvanceFrame(); void UpdateRecords(); diff --git a/Source/Contents/Effects/EffectPrimitiveMotion.cpp b/Source/Contents/Effects/EffectPrimitiveMotion.cpp index 83eae37..fb4748c 100644 --- a/Source/Contents/Effects/EffectPrimitiveMotion.cpp +++ b/Source/Contents/Effects/EffectPrimitiveMotion.cpp @@ -1048,6 +1048,64 @@ void EffectParticle::PrimBubbleDrop() { } } +// OFFSET: 0x00BBB9D0 +// FUNCTION: fn_19795 +void EffectParticle::PrimChemical2() { + FaceCamera(this->state.slots); + + const AttachedEffect* master = this->state.master; + this->render.position[0] = master->render.position[0]; + this->render.position[1] = master->render.position[1]; + this->render.position[2] = master->render.position[2]; + + for (int index = 0; index < 4; ++index) { + EffectPrimitiveSlot& slot = this->state.slots[index]; + + if (slot.life != 1) { + continue; + } + + ++slot.process; + + if (slot.process <= 20) { + slot.alphaB += 4; + } else if (slot.process > 50) { + slot.alphaB -= 2; + + if (slot.alphaB < 0) { + slot.alphaB = 0; + } + } + } +} + +// OFFSET: 0x00BBBB40 + +// OFFSET: 0x00BBBC40 +// FUNCTION: fn_19797 +void EffectParticle::PrimChemical() { + FaceCamera(this->state.slots); + + for (int index = 0; index < 4; ++index) { + EffectPrimitiveSlot& slot = this->state.slots[index]; + + if (slot.life != 1) { + continue; + } + + ++slot.process; + + if (slot.process <= 10) { + slot.alphaB += 18; + } else if (slot.process > 20) { + slot.alphaB -= 15; + + if (slot.alphaB < 0) { + slot.alphaB = 0; + } + } + } +} // OFFSET: 0x00BB6F30 // FUNCTION: fn_19779 bool EffectParticle::UpdateHit6() {