2022-10-16 14:41:14 +00:00
|
|
|
#ifndef _CFLUIDPLANE
|
|
|
|
#define _CFLUIDPLANE
|
|
|
|
|
2024-09-22 22:58:50 +00:00
|
|
|
#include "MetroidPrime/CFluidUVMotion.hpp"
|
2022-10-16 14:41:14 +00:00
|
|
|
#include "MetroidPrime/TGameTypes.hpp"
|
|
|
|
|
|
|
|
#include "Kyoto/Math/CVector3f.hpp"
|
2024-09-22 22:58:50 +00:00
|
|
|
#include "Kyoto/TToken.hpp"
|
2022-10-16 14:41:14 +00:00
|
|
|
|
2024-09-22 23:00:06 +00:00
|
|
|
#include "rstl/optional_object.hpp"
|
|
|
|
|
2022-10-16 14:41:14 +00:00
|
|
|
class CScriptWater;
|
|
|
|
class CStateManager;
|
2024-09-22 23:00:06 +00:00
|
|
|
class CTexture;
|
2022-10-16 14:41:14 +00:00
|
|
|
|
2022-10-16 22:32:15 +00:00
|
|
|
extern "C" uint sub_8012f098();
|
|
|
|
|
2022-10-16 14:41:14 +00:00
|
|
|
class CFluidPlaneCPURender {
|
|
|
|
public:
|
|
|
|
struct SPatchInfo {};
|
|
|
|
struct SRippleInfo {};
|
|
|
|
struct SHFieldSample {};
|
|
|
|
};
|
|
|
|
|
|
|
|
class CFluidPlane {
|
|
|
|
public:
|
2024-09-22 22:58:50 +00:00
|
|
|
enum EFluidType {
|
2024-09-30 06:02:23 +00:00
|
|
|
kFT_NormalWater,
|
|
|
|
kFT_PoisonWater,
|
|
|
|
kFT_Lava,
|
|
|
|
kFT_PhazonFluid,
|
|
|
|
kFT_Four,
|
|
|
|
kFT_ThickLava
|
2024-09-22 22:58:50 +00:00
|
|
|
};
|
2022-10-16 14:41:14 +00:00
|
|
|
|
2024-09-22 22:58:50 +00:00
|
|
|
CFluidPlane(uint, uint, uint, CFluidPlane::EFluidType, float, const CFluidUVMotion&);
|
|
|
|
virtual ~CFluidPlane();
|
2022-10-16 14:41:14 +00:00
|
|
|
virtual void AddRipple(float mag, TUniqueId rippler, const CVector3f& center, CScriptWater& water,
|
|
|
|
CStateManager& mgr);
|
|
|
|
virtual void AddRipple(float intensity, TUniqueId rippler, const CVector3f& center,
|
|
|
|
const CVector3f& velocity, const CScriptWater& water, CStateManager& mgr,
|
|
|
|
const CVector3f& upVec);
|
2024-09-22 22:58:50 +00:00
|
|
|
// Update__11CFluidPlaneFv
|
|
|
|
|
2024-09-30 06:02:23 +00:00
|
|
|
float GetRippleScaleFromKineticEnergy(float baseI, float velDot);
|
|
|
|
|
2024-09-22 22:58:50 +00:00
|
|
|
float GetAlpha() const { return x40_alpha; }
|
|
|
|
EFluidType GetFluidType() const { return x44_fluidType; }
|
|
|
|
const CFluidUVMotion& GetUVMotion() const { return x4c_uvMotion; }
|
|
|
|
// GetColorTexture__11CFluidPlaneCFv
|
|
|
|
// HasColorTexture__11CFluidPlaneCFv
|
|
|
|
// GetTexturePattern2__11CFluidPlaneCFv
|
|
|
|
// HasTexturePattern2__11CFluidPlaneCFv
|
|
|
|
// GetTexturePattern1__11CFluidPlaneCFv
|
|
|
|
// HasTexturePattern1__11CFluidPlaneCFv
|
2022-10-16 14:41:14 +00:00
|
|
|
|
2024-09-22 23:00:06 +00:00
|
|
|
protected:
|
2022-10-16 14:41:14 +00:00
|
|
|
virtual void RenderStripWithRipples(const CFluidPlaneCPURender::SHFieldSample& heights,
|
|
|
|
const unsigned char& flags, float curY, int startYDiv,
|
|
|
|
const CFluidPlaneCPURender::SPatchInfo& info);
|
|
|
|
|
2024-09-22 22:58:50 +00:00
|
|
|
CAssetId x4_texPattern1Id;
|
|
|
|
CAssetId x8_texPattern2Id;
|
|
|
|
CAssetId xc_texColorId;
|
|
|
|
rstl::optional_object< TLockedToken< CTexture > > x10_texPattern1;
|
|
|
|
rstl::optional_object< TLockedToken< CTexture > > x20_texPattern2;
|
|
|
|
rstl::optional_object< TLockedToken< CTexture > > x30_texColor;
|
|
|
|
float x40_alpha;
|
|
|
|
EFluidType x44_fluidType;
|
|
|
|
float x48_rippleIntensity;
|
|
|
|
CFluidUVMotion x4c_uvMotion;
|
2022-10-16 14:41:14 +00:00
|
|
|
};
|
2024-09-22 22:58:50 +00:00
|
|
|
CHECK_SIZEOF(CFluidPlane, 0xA0);
|
2022-10-16 14:41:14 +00:00
|
|
|
|
|
|
|
#endif // _CFLUIDPLANE
|