From 819b017c80cf31ebe89bf97628ee21fb08fbc731 Mon Sep 17 00:00:00 2001 From: ragnarok-clanker Date: Wed, 28 Oct 2026 12:44:52 +0000 Subject: [PATCH] Decompile fn_19783 (EffectParticle::UpdateWarp) Batch #1424 by ragnarok-clanker: 0 byte-identical, 1 confirmed by peer review. - fn_19783 EffectParticle::UpdateWarp: logic confirmed by peer review Reviewed-by: ragnarok-clanker --- .../Effects/EffectPrimitiveMotion.cpp | 35 +++++++++++++++++++ 1 file changed, 35 insertions(+) diff --git a/Source/Contents/Effects/EffectPrimitiveMotion.cpp b/Source/Contents/Effects/EffectPrimitiveMotion.cpp index 0b3677e..bf08432 100644 --- a/Source/Contents/Effects/EffectPrimitiveMotion.cpp +++ b/Source/Contents/Effects/EffectPrimitiveMotion.cpp @@ -1073,6 +1073,41 @@ bool EffectParticle::UpdateExit() { } // OFFSET: 0x00BB8180 +// FUNCTION: fn_19783 +bool EffectParticle::UpdateWarp() { + const RagEffectState* parent = this->state.parent; + this->state.origin = { + std::bit_cast(parent->unknown_013C[3]) + this->state.velocity.x, std::bit_cast(parent->unknown_013C[4]) + this->state.velocity.y, + std::bit_cast(parent->unknown_013C[5]) + this->state.velocity.z + }; + + const int angle = static_cast(this->state.unknown_0314); + const float lateral = this->state.unknown_0334; + this->state.unknown_0334 = lateral + this->state.unknown_0340; + this->state.unknown_0310 = lateral + this->state.unknown_0310; + this->state.unknown_02BC = this->state.unknown_02C0 + this->state.unknown_02BC; + this->state.unknown_02EC = this->state.unknown_02F0 + this->state.unknown_02EC; + + const float distance = this->state.unknown_02BC - this->state.unknown_02EC; + this->state.unknown_0370 = Forward(distance, this->state.matrix1); + reinterpret_cast(this->state.matrix2)->SetAxisRotation(this->state.unknown_0290, ClientRadians(angle)); + + const float move = this->state.unknown_0310; + this->state.unknown_03A0 = Lift(move, this->state.matrix2); + this->state.scale = this->state.unknown_031C + this->state.scale; + + this->state.offset.x = this->state.offset.x - this->state.unknown_0370.x; + this->state.offset.y = this->state.offset.y - this->state.unknown_0370.y; + this->state.offset.z = this->state.offset.z - this->state.unknown_0370.z; + + this->render.position[0] = this->state.offset.x + this->state.origin.x + this->state.unknown_03A0.x; + this->render.position[1] = this->state.offset.y + this->state.origin.y + this->state.unknown_03A0.y; + this->render.position[2] = this->state.offset.z + this->state.origin.z + this->state.unknown_03A0.z; + + this->state.UpdateColor(); + this->UpdateRecords(); + return this->AdvanceFrame(); +} // OFFSET: 0x00BE6FE0 // FUNCTION: fn_19931