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

Batch #1853 by ragnarok-clanker: 1 byte-identical, 2 confirmed by peer review.

- fn_19849 EffectPrimitiveState::UpdateColor: logic confirmed by peer review
- fn_19762 EffectPrimitiveSlot::EffectPrimitiveSlot: byte-identical (already on main)
- fn_19865 DrawEffectPrimitive15: logic confirmed by peer review

Peer-reviewed-by: Yommy
Accepted without human review: peers confirmed the logic ("same" ahead by at least 3, with 70% of the votes).
This commit is contained in:
ragnarok-clanker 2026-10-28 22:53:38 +00:00
commit 2e808aaa74
11 changed files with 255 additions and 41 deletions

View file

@ -15,12 +15,12 @@ void EffectPrimitiveState::InitializeRecords(const RenderObjectState& render) {
record.scale = this->scale;
record.angle = this->unknown_030C;
std::memcpy(record.matrix, this->matrix1, sizeof(record.matrix));
record.alpha = this->unknown_0324;
record.alpha = this->alpha;
record.red = this->red;
record.green = this->green;
record.blue = this->blue;
const int alpha = TruncateToInt(this->unknown_0324);
const int alpha = TruncateToInt(this->alpha);
record.color = static_cast<unsigned char>(this->blue) +
((static_cast<unsigned char>(this->green) + ((static_cast<unsigned char>(this->red) + (static_cast<std::uint32_t>(alpha) << 8)) << 8)) << 8);
}