From 1a48ee0945aa7ea31c7ca2ac2f4098c8bd192637 Mon Sep 17 00:00:00 2001 From: ragnarok-clanker Date: Fri, 30 Oct 2026 00:26:00 +0000 Subject: [PATCH] Decompile 2 functions in Source/Contents/Effects/SmokeEffect.cpp, Source/Contents/Effects/SmokeEffect.h Batch #3993 by Yommy: 2 byte-identical, 0 confirmed by peer review. - fn_19178 CSmokeEffect::Slot06: byte-identical - fn_19180 CSmokeEffect::Slot04: byte-identical Merged automatically: every function is byte-identical to the original. Adds to the build: Source/Contents/Effects/SmokeEffect.cpp --- Source/Contents/Effects/SmokeEffect.cpp | 33 +++++++++++++++++++++++++ Source/Contents/Effects/SmokeEffect.h | 31 +++++++++++++++++++++++ data/compile.json | 1 + 3 files changed, 65 insertions(+) create mode 100644 Source/Contents/Effects/SmokeEffect.cpp create mode 100644 Source/Contents/Effects/SmokeEffect.h diff --git a/Source/Contents/Effects/SmokeEffect.cpp b/Source/Contents/Effects/SmokeEffect.cpp new file mode 100644 index 00000000..7925fdf8 --- /dev/null +++ b/Source/Contents/Effects/SmokeEffect.cpp @@ -0,0 +1,33 @@ +#include "Contents/Effects/SmokeEffect.h" + +#include "Contents/Effects/EffectMemoryMgr.h" +#include "Contents/Effects/SpriteParticle.h" +#include "Utility/Math/AffineMatrix.h" + +#include +#include +#include + +// OFFSET: 0x00B763E0 + +// OFFSET: 0x00B76540 + +// OFFSET: 0x00B76580 + +// OFFSET: 0x00B76710 +// FUNCTION: fn_19178 +bool CSmokeEffect::Slot06() { + return this->ActorExists(); +} + +// OFFSET: 0x00B76720 + +// OFFSET: 0x00B76D80 +// FUNCTION: fn_19180 +void CSmokeEffect::Slot04() { + for (auto it = this->particles.begin(); it != this->particles.end(); ++it) { + if (*it && (*it)->unknown_000C < this->visibleCount) { + (*it)->sub_B40F30(1); + } + } +} diff --git a/Source/Contents/Effects/SmokeEffect.h b/Source/Contents/Effects/SmokeEffect.h new file mode 100644 index 00000000..953b7928 --- /dev/null +++ b/Source/Contents/Effects/SmokeEffect.h @@ -0,0 +1,31 @@ +#ifndef RAGNAROK_SOURCE_CONTENTS_EFFECTS_SMOKEEFFECT_H +#define RAGNAROK_SOURCE_CONTENTS_EFFECTS_SMOKEEFFECT_H + +#include "Contents/Effects/Effect.h" + +#include +#include + +class CSpriteParticle; + +class CSmokeEffect : public CEffect { +public: + CSmokeEffect(); + + void Slot01() override; + void Slot03() override; + void Slot04() override; + void Close() override; + bool Slot06() override; + + /* 00CC */ int visibleCount; + /* 00D0 */ std::vector particles; +}; + +#if defined(_WIN32) && !defined(_WIN64) +static_assert(sizeof(CSmokeEffect) == 0xDC); +static_assert(offsetof(CSmokeEffect, visibleCount) == 0xCC); +static_assert(offsetof(CSmokeEffect, particles) == 0xD0); +#endif + +#endif diff --git a/data/compile.json b/data/compile.json index 9a809962..3832c5c9 100644 --- a/data/compile.json +++ b/data/compile.json @@ -372,6 +372,7 @@ "Source/Contents/Effects/RotateItemEffect.cpp": 4, "Source/Contents/Effects/SaintCastingEffect.cpp": 4, "Source/Contents/Effects/ScatterEffect.cpp": 4, + "Source/Contents/Effects/SmokeEffect.cpp": 4, "Source/Contents/Effects/SphereWind2Effect.cpp": 4, "Source/Contents/Effects/SpriteParticle.cpp": 4, "Source/Contents/Effects/SquareRangeEffect.cpp": 4,