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).
This commit is contained in:
parent
05452d75ed
commit
cf5e8e6111
2 changed files with 64 additions and 0 deletions
|
|
@ -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 <algorithm>
|
||||
#include <cstdlib>
|
||||
|
||||
// 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<const vector3d*>(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<float*>(&particle->unknown_00C4) = static_cast<float>(startAngle);
|
||||
particle->alpha = 50;
|
||||
particle->unknown_004C = tilt;
|
||||
particle->scale = 7.0f - static_cast<float>(ring);
|
||||
particle->unknown_0054 = 28.0f - static_cast<float>(ring) * 5.0f;
|
||||
*reinterpret_cast<float*>(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() {
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue