2016-04-17 02:50:45 +00:00
|
|
|
#ifndef __URDE_CENVFXMANAGER_HPP__
|
|
|
|
#define __URDE_CENVFXMANAGER_HPP__
|
|
|
|
|
2016-10-02 03:06:20 +00:00
|
|
|
#include "RetroTypes.hpp"
|
|
|
|
#include "CToken.hpp"
|
|
|
|
#include "zeus/CAABox.hpp"
|
2017-03-31 19:51:40 +00:00
|
|
|
#include "Particle/CGenDescription.hpp"
|
2016-10-02 03:06:20 +00:00
|
|
|
|
2016-04-17 02:50:45 +00:00
|
|
|
namespace urde
|
|
|
|
{
|
2016-08-15 01:19:04 +00:00
|
|
|
class CStateManager;
|
2016-10-02 03:06:20 +00:00
|
|
|
class CTexture;
|
2016-04-17 02:50:45 +00:00
|
|
|
|
2016-04-23 18:04:49 +00:00
|
|
|
enum class EEnvFxType
|
|
|
|
{
|
|
|
|
None,
|
2017-08-22 03:20:22 +00:00
|
|
|
Snow,
|
|
|
|
Rain
|
2016-04-23 18:04:49 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
enum class EPhazonType
|
|
|
|
{
|
|
|
|
None,
|
|
|
|
Blue,
|
|
|
|
Orange
|
|
|
|
};
|
|
|
|
|
2017-03-31 19:51:40 +00:00
|
|
|
class CVectorFixed8_8
|
|
|
|
{
|
|
|
|
u16 x0_[3];
|
|
|
|
};
|
|
|
|
|
|
|
|
class CEnvFxManagerGrid
|
|
|
|
{
|
|
|
|
friend class CEnvFxManager;
|
|
|
|
bool x0_24_ = true;
|
|
|
|
zeus::CVector2i x4_;
|
|
|
|
zeus::CVector2i xc_;
|
|
|
|
std::pair<bool, float> x14_ = {false, FLT_MAX};
|
|
|
|
std::vector<CVectorFixed8_8> x1c_;
|
|
|
|
public:
|
|
|
|
CEnvFxManagerGrid(const zeus::CVector2i& a, const zeus::CVector2i& b,
|
|
|
|
const std::vector<CVectorFixed8_8>& vec, int reserve)
|
|
|
|
: x4_(a), xc_(b), x1c_(vec)
|
|
|
|
{
|
|
|
|
x1c_.reserve(reserve);
|
|
|
|
}
|
|
|
|
};
|
|
|
|
|
2016-04-17 02:50:45 +00:00
|
|
|
class CEnvFxManager
|
|
|
|
{
|
2016-10-02 03:06:20 +00:00
|
|
|
zeus::CAABox x0_ = zeus::CAABox(-63.5, 63.5);
|
|
|
|
zeus::CVector3f x18_ = zeus::CVector3f::skZero;
|
2017-08-22 03:20:22 +00:00
|
|
|
bool x24_ = false;
|
2016-10-02 03:06:20 +00:00
|
|
|
float x28_ = 0.f;
|
|
|
|
u32 x2c_ = -1;
|
2017-08-22 03:20:22 +00:00
|
|
|
float x30_rainMagnitude = 0.f;
|
2016-10-02 03:06:20 +00:00
|
|
|
float x34_fxDensity = 0.f;
|
|
|
|
float x38_ = 0.f;
|
|
|
|
u8 x3c = 0;
|
|
|
|
|
2017-03-31 19:51:40 +00:00
|
|
|
rstl::reserved_vector<CEnvFxManagerGrid, 64> x50_grids;
|
|
|
|
|
2017-07-05 18:34:12 +00:00
|
|
|
float xb54_;
|
2017-03-31 19:51:40 +00:00
|
|
|
TLockedToken<CGenDescription> xb58_envRainSplash;
|
|
|
|
bool xb64_ = true;
|
|
|
|
|
2016-10-02 03:06:20 +00:00
|
|
|
void SetupSnowTevs();
|
|
|
|
void SetupRainTevs();
|
2016-08-15 01:19:04 +00:00
|
|
|
public:
|
2016-10-02 03:06:20 +00:00
|
|
|
CEnvFxManager();
|
2016-08-15 01:19:04 +00:00
|
|
|
void AsyncLoadResources(CStateManager& mgr);
|
2016-10-02 03:06:20 +00:00
|
|
|
|
2017-03-24 05:30:16 +00:00
|
|
|
void Update(float, const CStateManager&);
|
2017-03-06 06:33:51 +00:00
|
|
|
void Render(const CStateManager& mgr);
|
2016-10-02 03:06:20 +00:00
|
|
|
void SetFxDensity(s32, float);
|
|
|
|
void MoveWrapCells(s32, s32);
|
|
|
|
void GetParticleBoundsToWorldScale() const;
|
2017-03-31 19:51:40 +00:00
|
|
|
void AreaLoaded();
|
2017-07-05 18:34:12 +00:00
|
|
|
void SetXB54(float f) { xb54_ = f; }
|
2017-08-22 03:20:22 +00:00
|
|
|
bool GetX24() const { return x24_; }
|
|
|
|
float GetRainMagnitude() const { return x30_rainMagnitude; }
|
2016-04-17 02:50:45 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
#endif // __URDE_CENVFXMANAGER_HPP__
|