2022-10-09 05:13:17 +00:00
|
|
|
#ifndef _CENVFXMANAGER
|
|
|
|
#define _CENVFXMANAGER
|
2022-08-13 02:48:34 +00:00
|
|
|
|
|
|
|
#include "types.h"
|
|
|
|
|
|
|
|
#include "MetroidPrime/TGameTypes.hpp"
|
|
|
|
|
2022-08-15 04:51:06 +00:00
|
|
|
#include "Kyoto/Audio/CSfxHandle.hpp"
|
2022-08-13 02:48:34 +00:00
|
|
|
#include "Kyoto/Math/CAABox.hpp"
|
|
|
|
#include "Kyoto/Math/CVector2i.hpp"
|
|
|
|
#include "Kyoto/Math/CVector3f.hpp"
|
|
|
|
#include "Kyoto/TToken.hpp"
|
|
|
|
|
|
|
|
#include "rstl/pair.hpp"
|
|
|
|
#include "rstl/reserved_vector.hpp"
|
|
|
|
#include "rstl/vector.hpp"
|
|
|
|
|
|
|
|
class CGenDescription;
|
|
|
|
class CTexture;
|
|
|
|
|
2022-10-14 16:03:05 +00:00
|
|
|
enum EPhazonType { kPT_None, kPT_Blue, kPT_Orange };
|
|
|
|
|
2022-08-13 02:48:34 +00:00
|
|
|
class CVectorFixed8_8 {
|
|
|
|
private:
|
2022-10-09 05:37:23 +00:00
|
|
|
short x;
|
|
|
|
short y;
|
|
|
|
short z;
|
2022-08-13 02:48:34 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
class CEnvFxManagerGrid {
|
|
|
|
private:
|
|
|
|
bool x0_24_blockDirty;
|
2022-10-09 05:37:23 +00:00
|
|
|
CVector2i x4_position; /* 8.8 fixed point */
|
|
|
|
CVector2i xc_extent; /* 8.8 fixed point */
|
|
|
|
rstl::pair< bool, float > x14_block; /* Blocked-bool, Z-coordinate */
|
2022-08-13 02:48:34 +00:00
|
|
|
rstl::vector< CVectorFixed8_8 > x1c_particles;
|
|
|
|
};
|
|
|
|
|
|
|
|
class CEnvFxManager {
|
2022-09-13 04:26:54 +00:00
|
|
|
public:
|
2022-11-15 01:08:30 +00:00
|
|
|
CEnvFxManager();
|
|
|
|
|
2022-09-13 04:26:54 +00:00
|
|
|
static void Initialize();
|
2022-10-09 05:37:23 +00:00
|
|
|
void SetFxDensity(int, float);
|
2022-10-21 12:01:25 +00:00
|
|
|
void SetSplashRate(float f) { xb54_baseSplashRate = f; }
|
2023-01-07 22:59:28 +00:00
|
|
|
bool IsSplashActive() const { return x24_enableSplash; }
|
|
|
|
float GetRainMagnitude() const { return x30_fxDensity; }
|
2022-11-14 23:08:47 +00:00
|
|
|
void Cleanup();
|
2022-09-13 04:26:54 +00:00
|
|
|
|
2022-08-13 02:48:34 +00:00
|
|
|
private:
|
|
|
|
CAABox x0_particleBounds;
|
|
|
|
CVector3f x18_focusCellPosition;
|
|
|
|
bool x24_enableSplash;
|
2022-10-09 05:37:23 +00:00
|
|
|
float x28_firstSnowForce;
|
2022-09-05 04:01:13 +00:00
|
|
|
int x2c_lastBlockedGridIdx;
|
2022-10-09 05:37:23 +00:00
|
|
|
float x30_fxDensity;
|
|
|
|
float x34_targetFxDensity;
|
|
|
|
float x38_maxDensityDeltaSpeed;
|
2022-08-13 02:48:34 +00:00
|
|
|
bool x3c_snowflakeTextureMipBlanked;
|
|
|
|
TLockedToken< CTexture > x40_txtrEnvGradient;
|
2023-10-17 21:36:08 +00:00
|
|
|
rstl::reserved_vector< CEnvFxManagerGrid, 64 > x4c_grids;
|
|
|
|
int xb50_; // padding?
|
2022-10-09 05:37:23 +00:00
|
|
|
float xb54_baseSplashRate;
|
2022-08-13 02:48:34 +00:00
|
|
|
TLockedToken< CGenDescription > xb58_envRainSplash;
|
2022-09-13 04:26:54 +00:00
|
|
|
bool xb64_;
|
|
|
|
TUniqueId xb68_envRainSplashId;
|
2022-08-13 02:48:34 +00:00
|
|
|
bool xb6a_rainSoundActive;
|
|
|
|
CSfxHandle xb6c_leftRainSound;
|
|
|
|
CSfxHandle xb70_rightRainSound;
|
|
|
|
TLockedToken< CTexture > xb74_txtrSnowFlake;
|
|
|
|
bool xb80_;
|
|
|
|
rstl::reserved_vector< CVector3f, 16 > xb84_snowZDeltas;
|
|
|
|
TLockedToken< CTexture > xc48_underwaterFlake;
|
|
|
|
bool xc54_;
|
|
|
|
};
|
2022-11-15 13:45:15 +00:00
|
|
|
CHECK_SIZEOF(CEnvFxManager, 0xc58);
|
2022-08-13 02:48:34 +00:00
|
|
|
|
2022-10-09 05:13:17 +00:00
|
|
|
#endif // _CENVFXMANAGER
|