Decompile 2 functions in Source/Contents/EffectResourceSwitcher.cpp, Source/Contents/EffectResourceSwitcher.h, ...

Batch #2906 by eAthena: 2 byte-identical, 0 confirmed by peer review.

- fn_06967 CEZ2STREffect::IsFinished: byte-identical
- fn_06976 CEZ2STREffect::Slot32: byte-identical

Merged automatically: every function is byte-identical to the original.
This commit is contained in:
ragnarok-clanker 2026-10-29 19:53:59 +00:00
commit 4559126ea6
3 changed files with 122 additions and 8 deletions

View file

@ -57,11 +57,15 @@ int CEffect::Slot28() {
return 0;
}
// OFFSET: 0x005A21A0
// OFFSET: 0x005A21C0
// FUNCTION: fn_03092
void CEffect::Slot01() {
}
// OFFSET: 0x005A21D0
// OFFSET: 0x005A22E0
// FUNCTION: fn_03094
void CEffect::Slot12() {
@ -72,6 +76,10 @@ void CEffect::Slot12() {
void CEffect::Slot07() {
}
// OFFSET: 0x005A2300
// OFFSET: 0x005A2330
// OFFSET: 0x005A2430
// FUNCTION: fn_03098
void CEffect::Slot04() {
@ -84,7 +92,7 @@ void CEffect::Slot00(int) {
// OFFSET: 0x005A2450
// FUNCTION: fn_03100
void CEffect::Slot23(int) {
void CEffect::Slot23(float) {
}
// OFFSET: 0x005A2460
@ -129,12 +137,12 @@ void CEffect::Slot17(float) {
// OFFSET: 0x005A24E0
// FUNCTION: fn_03109
void CEffect::Slot18(int) {
void CEffect::Slot18(float) {
}
// OFFSET: 0x005A24F0
// FUNCTION: fn_03110
void CEffect::Slot19(int) {
void CEffect::Slot19(float) {
}
// OFFSET: 0x005A2500
@ -171,6 +179,46 @@ CEZ2STREffectMgr* Singleton<CEZ2STREffectMgr>::GetInstance() {
return s_instance;
}
// OFFSET: 0x006FFA00
// FUNCTION: fn_06967
bool CEZ2STREffect::IsFinished() {
if (!this->emitter) {
return false;
}
return this->emitter->currentFrame >= this->emitter->frameCount;
}
// OFFSET: 0x006FFBF0
// OFFSET: 0x006FFEF0
// OFFSET: 0x006FFF10
// OFFSET: 0x006FFF30
// OFFSET: 0x006FFF50
// OFFSET: 0x006FFF80
// FUNCTION: fn_06976
void CEZ2STREffect::Slot32() {
this->alternateRender = 1;
}
// OFFSET: 0x006FFF90
// OFFSET: 0x006FFFB0
// OFFSET: 0x006FFFD0
// OFFSET: 0x006FFFF0
// OFFSET: 0x00700010
// OFFSET: 0x00700030
// OFFSET: 0x00700A10
// OFFSET: 0x00700A90
// FUNCTION: fn_06989
int CEZ2STREffectMgr::EffectId(const std::string& name) {

View file

@ -2,6 +2,7 @@
#define RAGNAROK_SOURCE_CONTENTS_EFFECTRESOURCESWITCHER_H
#include "Contents/Effects/Effect.h"
#include "Utility/Math/Vector3d.h"
#include "Utility/Singleton.h"
#include <cstddef>
@ -20,26 +21,91 @@ class CEZ2STREffectMgr : public Singleton<CEZ2STREffectMgr> {
public:
/* 0004 */ std::map<std::string, EZ2STREffectInfo> effects;
EZ2STREffectInfo* FindById(int id);
int EffectId(const std::string& name);
};
struct EZ2STREmitter {
/* 0000 */ unsigned char unknown_0000[0xCC];
/* 00CC */ float lifetime;
/* 00D0 */ unsigned char unknown_00D0[0x18];
/* 00E8 */ int elapsed;
/* 00EC */ unsigned char unknown_00EC[0x3BD8];
/* 3CC4 */ int currentFrame;
/* 3CC8 */ int frameCount;
/* 3CCC */ unsigned char unknown_3CCC[0x290];
/* 3F5C */ unsigned char looping;
/* 3F5D */ unsigned char fadeOut;
/* 3F5E */ unsigned char unknown_3F5E[0x3A];
/* 3F98 */ int unknown_3F98;
/* 3F9C */ int unknown_3F9C;
/* 3FA0 */ int duration;
/* 3FA4 */ float unknown_3FA4;
/* 3FA8 */ float unknown_3FA8;
/* 3FAC */ float unknown_3FAC;
/* 3FB0 */ float unknown_3FB0;
/* 3FB4 */ float remainingTime;
/* 3FB8 */ unsigned char unknown_3FB8[0x30];
/* 3FE8 */ unsigned char unknown_3FE8;
/* 3FE9 */ unsigned char unknown_3FE9;
};
class CEZ2STREffect : public CEffect {
public:
/* 00CC */ EZ2STREmitter* emitter;
/* 00D0 */ unsigned char timed;
/* 00D1 */ unsigned char unknown_00D1[3];
/* 00D4 */ int frameStep;
/* 00D8 */ unsigned char alternateRender;
bool Slot06() override;
void Slot14(int argument) override;
void Slot16(int argument) override;
void Slot17(float argument) override;
void Slot18(float argument) override;
void Slot19(float argument) override;
void Slot22(float argument) override;
void Slot23(float argument) override;
void Slot26(int argument) override;
void Slot27(int argument) override;
void Slot32() override;
bool IsFinished();
void EndLoop(unsigned char fadeOut);
};
class EffectResourceSwitcher : public CEffect {
public:
/* 00CC */ unsigned char active;
/* 00CD */ unsigned char unknown_00CD[3];
/* 00D0 */ CEffect* effect;
/* 00D4 */ int unknown_00D4[3];
/* 00D0 */ CEZ2STREffect* effect;
/* 00D4 */ vector3d spawnPosition;
/* 00E0 */ std::string sourceName;
/* 00F8 */ std::string targetName;
// INLINED
~EffectResourceSwitcher() override {
this->RetireEffects();
}
void Slot03() override;
bool Slot06() override;
void Slot16(int argument) override;
void Start();
void SetNames(const std::string& source, const std::string& target);
void RetireEffects();
};
#if defined(_WIN32) && !defined(_WIN64)
static_assert(sizeof(EZ2STREffectInfo) == 0x48);
static_assert(sizeof(CEZ2STREffectMgr) == 0xC);
static_assert(offsetof(EZ2STREmitter, currentFrame) == 0x3CC4);
static_assert(offsetof(EZ2STREmitter, looping) == 0x3F5C);
static_assert(offsetof(EZ2STREmitter, unknown_3F98) == 0x3F98);
static_assert(offsetof(EZ2STREmitter, remainingTime) == 0x3FB4);
static_assert(offsetof(EZ2STREmitter, unknown_3FE9) == 0x3FE9);
static_assert(offsetof(CEZ2STREffect, alternateRender) == 0xD8);
static_assert(offsetof(EffectResourceSwitcher, effect) == 0xD0);
static_assert(offsetof(EffectResourceSwitcher, targetName) == 0xF8);
static_assert(sizeof(EffectResourceSwitcher) == 0x110);

View file

@ -37,12 +37,12 @@ public:
virtual void Slot15(int argument);
virtual void Slot16(int) {}
virtual void Slot17(float argument);
virtual void Slot18(int argument);
virtual void Slot19(int argument);
virtual void Slot18(float argument);
virtual void Slot19(float argument);
virtual void Slot20(int argument);
virtual void Slot21(int argument);
virtual void Slot22(float argument);
virtual void Slot23(int argument);
virtual void Slot23(float argument);
virtual void Slot24(int argument1, int argument2, int argument3, int argument4, int argument5);
virtual vector3d Slot25();
virtual void Slot26(int argument);