prime/include/MetroidPrime/CFluidPlane.hpp

76 lines
2.3 KiB
C++
Raw Normal View History

#ifndef _CFLUIDPLANE
#define _CFLUIDPLANE
2024-09-22 22:58:50 +00:00
#include "MetroidPrime/CFluidUVMotion.hpp"
#include "MetroidPrime/TGameTypes.hpp"
#include "Kyoto/Math/CVector3f.hpp"
2024-09-22 22:58:50 +00:00
#include "Kyoto/TToken.hpp"
2024-09-22 23:00:06 +00:00
#include "rstl/optional_object.hpp"
class CScriptWater;
class CStateManager;
2024-09-22 23:00:06 +00:00
class CTexture;
extern "C" uint sub_8012f098();
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
};
2024-09-22 22:58:50 +00:00
CFluidPlane(uint, uint, uint, CFluidPlane::EFluidType, float, const CFluidUVMotion&);
virtual ~CFluidPlane();
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
2024-09-22 23:00:06 +00:00
protected:
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;
};
2024-09-22 22:58:50 +00:00
CHECK_SIZEOF(CFluidPlane, 0xA0);
#endif // _CFLUIDPLANE