From cf5e8e6111b57d2a967244acbcc7debecf453d97 Mon Sep 17 00:00:00 2001 From: ragnarok-clanker Date: Fri, 30 Oct 2026 00:54:54 +0000 Subject: [PATCH] Decompile 3 functions in Source/Contents/Effects/RotateLineEffect.cpp, Source/Contents/Effects/RotateLineEffect.h Batch #4067 by Yommy: 1 byte-identical, 2 confirmed by peer review. - fn_19155 CRotateLineEffect::Close: logic confirmed by peer review - fn_19156 CRotateLineEffect::Slot01: logic confirmed by peer review - fn_19157 CRotateLineEffect::Slot06: byte-identical Peer-reviewed-by: ragnarok-clanker, youko, tayoba, superintelligence Accepted without human review: peers confirmed the logic ("same" ahead by at least 3, with 70% of the votes). --- Source/Contents/Effects/RotateLineEffect.cpp | 61 ++++++++++++++++++++ Source/Contents/Effects/RotateLineEffect.h | 3 + 2 files changed, 64 insertions(+) diff --git a/Source/Contents/Effects/RotateLineEffect.cpp b/Source/Contents/Effects/RotateLineEffect.cpp index c981eeb8..fe164453 100644 --- a/Source/Contents/Effects/RotateLineEffect.cpp +++ b/Source/Contents/Effects/RotateLineEffect.cpp @@ -1,13 +1,74 @@ #include "Contents/Effects/RotateLineEffect.h" +#include "Contents/Effects/EffectMemoryMgr.h" #include "Contents/Effects/Particle.h" #include "Utility/Math/AffineMatrix.h" +#include +#include + // OFFSET: 0x00B741B0 // FUNCTION: fn_19153 CRotateLineEffect::CRotateLineEffect() : CEffect(-1), scale(0), angle(0), spread(0), alpha(0), started(false), previous{} { } +// OFFSET: 0x00B74360 +// FUNCTION: fn_19155 +void CRotateLineEffect::Close() { + for (CParticle* particle : this->particles) { + FreeParticle(particle); + } + + this->particles.clear(); +} + +// OFFSET: 0x00B743A0 +// FUNCTION: fn_19156 +void CRotateLineEffect::Slot01() { + int ring = 0; + for (int startAngle = 0; startAngle < 360; startAngle += 90) { + const int tilt = std::max(rand() % 21, 0) + 80; + for (int i = 0; i < 21; ++i) { + CParticle* particle = CreateParticle(reinterpret_cast(this->position), 5); + if (!particle) { + continue; + } + + particle->unknown_0004 = this->id; + particle->unknown_000C = i; + particle->unknown_0010 = ring; + particle->unknown_0008 = 1; + particle->SetTexture("effect\\cloud11.tga"); + particle->unknown_0050 = 30; + *reinterpret_cast(&particle->unknown_00C4) = static_cast(startAngle); + particle->alpha = 50; + particle->unknown_004C = tilt; + particle->scale = 7.0f - static_cast(ring); + particle->unknown_0054 = 28.0f - static_cast(ring) * 5.0f; + *reinterpret_cast(particle->unknown_0058) = 3.0f; + switch (this->id) { + case 986: + particle->SetColor(50, 50, 50); + particle->destinationBlend = 6; + break; + case 1000: + particle->SetColor(100, 100, 255); + particle->scale += 3.0f; + break; + } + + this->particles.push_back(particle); + } + ++ring; + } +} + +// OFFSET: 0x00B74580 +// FUNCTION: fn_19157 +bool CRotateLineEffect::Slot06() { + return !this->IsFinished(); +} + // OFFSET: 0x00B74590 // FUNCTION: fn_19158 void CRotateLineEffect::Slot03() { diff --git a/Source/Contents/Effects/RotateLineEffect.h b/Source/Contents/Effects/RotateLineEffect.h index 33438cd8..f8c57968 100644 --- a/Source/Contents/Effects/RotateLineEffect.h +++ b/Source/Contents/Effects/RotateLineEffect.h @@ -13,8 +13,11 @@ class CRotateLineEffect : public CEffect { public: CRotateLineEffect(); + void Slot01() override; void Slot03() override; void Slot04() override; + void Close() override; + bool Slot06() override; /* 00CC */ float scale; /* 00D0 */ int angle;