Decompile 3 functions in Source/Contents/Effects/EffectPrimitiveMotion.cpp, Source/Contents/Effects/EffectParticle.h, ...

Batch #1792 by ragnarok-clanker: 0 byte-identical, 3 confirmed by peer review.

- fn_19796 EffectParticle::PrimChemical3: logic confirmed by peer review
- fn_19824 EffectParticle::PrimPoison: logic confirmed by peer review
- fn_19813 EffectParticle::PrimGuard: logic confirmed by peer review

Peer-reviewed-by: Yommy
Reviewed-by: ragnarok-clanker
This commit is contained in:
ragnarok-clanker 2026-10-28 22:39:29 +00:00
commit 16fade7361

View file

@ -1081,6 +1081,50 @@ void EffectParticle::PrimChemical2() {
}
// OFFSET: 0x00BBBB40
// FUNCTION: fn_19796
void EffectParticle::PrimChemical3() {
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) {
if (slot.flag1[0] < 10) {
slot.alphaB += 12;
} else {
slot.alphaB += 20;
}
}
if (slot.flag1[0] >= 10) {
slot.height[3] += 0.05f;
}
slot.height[1] += slot.height[3];
if (slot.height[1] >= 200.0f) {
slot.height[1] -= 200.0f;
}
if (slot.process > 20) {
if (slot.flag1[0] < 10) {
slot.alphaB -= 4;
} else {
slot.alphaB -= 2;
}
if (slot.alphaB < 0) {
slot.alphaB = 0;
}
}
}
}
// OFFSET: 0x00BBBC40
// FUNCTION: fn_19797
@ -1272,8 +1316,88 @@ void EffectParticle::PrimIntimidate() {
}
// OFFSET: 0x00BC09F0
// FUNCTION: fn_19824
void EffectParticle::PrimPoison() {
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.maxHeight >= 30.0f) {
slot.maxHeight -= 30.0f;
}
if (slot.flag1[10] == 1) {
if (slot.process < 10) {
if (slot.alphaB <= 45) {
slot.alphaB += 10;
}
} else if (slot.process > 65) {
if (slot.alphaB >= 10) {
slot.alphaB -= 10;
}
}
} else if (slot.alphaB <= 45) {
slot.alphaB += 5;
}
}
}
// OFFSET: 0x00BBEA00
// FUNCTION: fn_19813
void EffectParticle::PrimGuard() {
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 > 1 && slot.flag1[0] == 1) {
slot.rotStart += 10;
} else {
slot.rotStart = static_cast<std::int16_t>(static_cast<int>(this->state.master->state.parent->render.angle + 270.0f));
}
if (slot.rotStart >= 360) {
slot.rotStart -= 360;
}
if (slot.process < 10) {
if (slot.alphaB < 100) {
slot.alphaB += 20;
}
} else if (slot.process > 26) {
slot.height[0] += 0.1f;
if (slot.alphaB > 0) {
slot.alphaB -= 6;
}
if (slot.alphaB < 0) {
slot.alphaB = 0;
}
}
}
}
// OFFSET: 0x00BB6F30
// FUNCTION: fn_19779