2022-10-09 05:13:17 +00:00
|
|
|
#ifndef _CRAINSPLASHGENERATOR
|
|
|
|
#define _CRAINSPLASHGENERATOR
|
2022-10-06 10:38:13 +00:00
|
|
|
|
2022-10-06 12:51:36 +00:00
|
|
|
#include "rstl/reserved_vector.hpp"
|
|
|
|
#include "rstl/vector.hpp"
|
2022-10-06 10:38:13 +00:00
|
|
|
#include "types.h"
|
|
|
|
|
|
|
|
class CVector3f;
|
|
|
|
|
|
|
|
class CRainSplashGenerator {
|
2022-10-06 12:51:36 +00:00
|
|
|
struct SSplashLine {
|
|
|
|
float x0_t;
|
|
|
|
float x4_xEnd;
|
|
|
|
float x8_yEnd;
|
|
|
|
float xc_speed;
|
|
|
|
float x10_zParabolaHeight;
|
|
|
|
u8 x14_;
|
|
|
|
u8 x15_length;
|
|
|
|
bool x16_active : 1;
|
|
|
|
SSplashLine();
|
|
|
|
void Update(float dt, CStateManager& mgr);
|
|
|
|
void Draw(float alpha, float dt, const CVector3f& pos);
|
|
|
|
void SetActive() { x16_active = true; }
|
|
|
|
};
|
|
|
|
|
|
|
|
struct SRainSplash {
|
|
|
|
rstl::reserved_vector< SSplashLine, 4 > x0_lines;
|
|
|
|
CVector3f x64_pos;
|
|
|
|
float x70_;
|
|
|
|
SRainSplash();
|
|
|
|
void Update(float dt, CStateManager& mgr);
|
|
|
|
bool IsActive() const;
|
|
|
|
void Draw(float alpha, float dt, const CVector3f& pos);
|
|
|
|
void SetPoint(const CVector3f& pos);
|
|
|
|
};
|
|
|
|
|
2022-10-06 10:38:13 +00:00
|
|
|
public:
|
|
|
|
CRainSplashGenerator(const CVector3f& scale, int maxSplashes, int genRate, float minZ,
|
|
|
|
float alpha);
|
2022-10-06 12:51:36 +00:00
|
|
|
~CRainSplashGenerator() {}
|
2022-10-06 10:38:13 +00:00
|
|
|
|
|
|
|
private:
|
2022-10-06 12:51:36 +00:00
|
|
|
rstl::vector< SRainSplash > x0_rainSplashes;
|
|
|
|
CRandom16 x10_random;
|
|
|
|
CVector3f x14_scale;
|
|
|
|
u8 x0_pad[0x2c];
|
2022-10-06 10:38:13 +00:00
|
|
|
};
|
|
|
|
CHECK_SIZEOF(CRainSplashGenerator, 0x4c)
|
|
|
|
|
2022-10-09 05:13:17 +00:00
|
|
|
#endif // _CRAINSPLASHGENERATOR
|