rodecomp/Source/Contents/Effects/EffectLists.h
ragnarok-clanker 3841fddaf8 Decompile fn_18775 (EffectLists::SpawnLevel99)
Batch #3585 by willerthal: 0 byte-identical, 1 confirmed by peer review.

- fn_18775 EffectLists::SpawnLevel99: logic confirmed by peer review

Peer-reviewed-by: eAthena, Yommy, bigodeira
Accepted without human review: peers confirmed the logic ("same" ahead by at least 3, with 70% of the votes).
2026-10-29 22:51:44 +00:00

64 lines
1.9 KiB
C++

#ifndef RAGNAROK_SOURCE_CONTENTS_EFFECTS_EFFECTLISTS_H
#define RAGNAROK_SOURCE_CONTENTS_EFFECTS_EFFECTLISTS_H
#include "Contents/Effects/Effect.h"
#include <cstddef>
#include <cstdint>
#include <list>
#include <map>
#include <string>
#include <vector>
#include "Utility/Math/Vector3d.h"
class CRenderObject;
struct CAllocator {
virtual ~CAllocator() = default;
virtual CEffect* Create() = 0;
};
class EffectLists {
public:
/* 0004 */ bool initialized;
/* 0008 */ std::map<int, CAllocator*> allocators;
/* 0010 */ std::map<int, std::list<CEffect*>> active;
/* 0018 */ std::list<CEffect*> retired;
/* 0020 */ std::map<int, std::vector<CEffect*>> indexed;
virtual ~EffectLists();
CEffect* Spawn(int actor, int id, float x, float y, float z, std::uint32_t sourceActor, int frame, unsigned char reuse, int instance);
CEffect* Find(int actor, int id) const;
CEffect* Find(int actor, int instance, int id) const;
CEffect* At(int id, unsigned index) const;
void Add(int actor, CEffect* effect);
void Retire(CEffect* effect, unsigned char removeActive);
void Retire(int actor, int id);
void Retire(int actor, int instance, int id);
void RetireActor(int actor);
void Render();
void Clear();
void Release();
void SpawnLevel99(CRenderObject* actor, unsigned char flag, int extra);
};
#if defined(_WIN32) && !defined(_WIN64)
static_assert(sizeof(EffectLists) == 0x28);
static_assert(offsetof(EffectLists, allocators) == 0x08);
static_assert(offsetof(EffectLists, active) == 0x10);
static_assert(offsetof(EffectLists, retired) == 0x18);
static_assert(offsetof(EffectLists, indexed) == 0x20);
#endif
bool CreateEffectMgr();
void DestroyEffectMgr();
float DirectionAngle(float x, float z);
double ScreenAngle(vector3d from, vector3d to);
std::string CurrentMapScriptName();
std::string EffectFunctionName(std::string name);
extern EffectLists* g_effectMgr;
#endif