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
This commit is contained in:
ragnarok-clanker 2026-10-28 22:19:15 +00:00
commit 73e944dded
2 changed files with 61 additions and 0 deletions

View file

@ -25,6 +25,9 @@ struct EffectParticle : CRenderObject {
void PrimBottom();
void PrimBottomOut();
void PrimBubbleDrop();
void PrimChemical2();
void PrimChemical3();
void PrimChemical();
bool AdvanceFrame();
void UpdateRecords();

View file

@ -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() {