rodecomp/Source/Contents/MapSkyMgr.h
ragnarok-clanker 2c5a3974bf Decompile fn_21288 (CGameMode::InitializeState)
Batch #8883 by youko: 0 byte-identical, 1 confirmed by peer review.

- fn_21288 CGameMode::InitializeState: logic confirmed by peer review

Peer-reviewed-by: ragnarok-clanker, KWDev, Romain, pedrao
Accepted without human review: peers confirmed the logic ("same" ahead by at least 3, with 70% of the votes).
2026-11-01 00:29:25 +00:00

71 lines
1.6 KiB
C++

#ifndef RAGNAROK_SOURCE_CONTENTS_MAPSKYMGR_H
#define RAGNAROK_SOURCE_CONTENTS_MAPSKYMGR_H
#include "Script/LuaScript.h"
#include "Utility/Math/Vector3d.h"
#include <string>
#include <utility>
#include <vector>
struct CRagEffect;
class CWeatherEffect {
public:
CWeatherEffect();
void AddMapWeather(std::string mapName, std::string weather);
vector3d GetWindDirection() const;
void Play(char kind);
void StartDarken();
void StopDarken();
void Fireworks();
void Snow();
void StartLightning();
void StopLightning();
void Process();
void ResetEffect();
void ApplyMapWeather(std::string mapName);
void ExtendEffect();
void Unused();
/* 0000 */ unsigned char darken;
/* 0001 */ unsigned char unknown_0001;
/* 0002 */ unsigned char lightning;
/* 0004 */ std::vector<std::pair<std::string, std::string>> mapWeathers;
/* 0010 */ void* actor;
/* 0014 */ float color[3];
/* 0020 */ float targetColor[3];
/* 002C */ float fog[3];
/* 0038 */ float lightColor[3];
/* 0044 */ CRagEffect* effect;
/* 0048 */ unsigned char unknown_0048[0x10];
/* 0058 */ int counter;
};
class CMapSkyMgr {
public:
CMapSkyMgr();
// INLINED
virtual ~CMapSkyMgr() {
if (this->m_script) {
this->m_script->Close();
delete this->m_script;
this->m_script = nullptr;
}
}
bool LoadData();
void Unused();
void CreateClouds(const std::string& mapName);
void Apply(const std::string& mapName);
private:
/* 0004 */ LuaScript* m_script;
};
extern CWeatherEffect g_weatherEffect;
extern float g_depthAverageHalf;
extern CMapSkyMgr* g_mapSkyMgr;
#endif