#ifndef __URDE_CSCRIPTWATER_HPP__ #define __URDE_CSCRIPTWATER_HPP__ #include "CScriptTrigger.hpp" #include "CFluidPlaneCPU.hpp" namespace urde { class CDamageInfo; class CFluidUVMotion; class CScriptWater : public CScriptTrigger { private: static const float kSplashScales[6]; u32 x150_ = 0; std::unique_ptr x1b4_fluidPlane; zeus::CVector3f x1b8_; float x1f4_; float x1f8_lightmapDoubleBlendFactor = 0.f; zeus::CVector3f x1d4_; std::list> x1fc_waterInhabitants; u32 x210_; float x214_; float x218_; float x21c_; float x220_; float x224_; zeus::CColor x228_; u32 x22c_; u32 x230_; u32 x234_; u32 x238_; u32 x248_; u32 x24c_; std::experimental::optional> x250_visorRunoffEffect; u16 x260_; u16 x262_visorRunoffSfx; u32 x264_ = 0; TLockedToken x268_splashEffects[5]; u16 x29c_splashSounds[5]; u32 x2c0_tesselationSize; u32 x2c4_gridDimX = 0; u32 x2c8_gridDimY = 0; u32 x2cc_gridCellCount = 0; std::unique_ptr x2d8_gridFlags; std::unique_ptr x2e0_; u32 x2e4_gridCellCount2 = 0; union { struct { bool x2e8_24 : 1; bool x2e8_25 : 1; bool x2e8_26 : 1; bool x2e8_27 : 1; bool x2e8_28 : 1; }; u32 _dummy = 0; }; void SetupGrid(bool b); public: CScriptWater(CStateManager&, TUniqueId, const std::string& name, const CEntityInfo&, const zeus::CVector3f&, const zeus::CAABox&, CDamageInfo const&, zeus::CVector3f&, ETriggerFlags, bool, bool, ResId, ResId, ResId, ResId, ResId, ResId, ResId, const zeus::CVector3f&, float, float, float, bool, CFluidPlane::EFluidType, bool, float, const CFluidUVMotion&, float, float, float, float, float, float, float, float, const zeus::CColor&, const zeus::CColor&, ResId, ResId, ResId, ResId, ResId, s32, s32, s32, s32, s32, float, u32, float, float, float, float, float, float, float, float, const zeus::CColor&, ResId, float, float, float, u32, u32, bool, s32, s32, const u32*); void Think(float, CStateManager&); void AcceptScriptMsg(EScriptObjectMessage, TUniqueId, CStateManager&); void PreRender(CStateManager &, const zeus::CFrustum &); void AddToRenderer(const zeus::CFrustum&, const CStateManager&) const; void Render(const CStateManager&) const; void Touch(CActor &, CStateManager &); void CalculateRenderBounds(); zeus::CAABox GetSortingBounds(const CStateManager&) const; void RenderSurface(); EWeaponCollisionResponseTypes GetCollisionResponseType(const zeus::CVector3f&, const zeus::CVector3f&, CWeaponMode&, int); void UpdateSplashInhabitants(CStateManager&); s16 GetSplashSound(float) const; const TLockedToken& GetSplashEffect(float) const; float GetSplashEffectScale(float) const; u32 GetSplashIndex(float) const; void FluidPlane(); zeus::CPlane GetWRSurfacePlane() const; float GetSurfaceZ() const; bool IsMorphing() const; void SetMorphing(bool); zeus::CColor GetSplashColor() const; void SetFrustumPlanes(const zeus::CFrustum& frustum); const zeus::CFrustum& GetFrustumPlanes() const; CFluidPlaneCPU& GetFluidPlane() const { return *x1b4_fluidPlane; } const std::experimental::optional>& GetVisorRunoffEffect() const { return x250_visorRunoffEffect; } u16 GetVisorRunoffSfx() const { return x262_visorRunoffSfx; } const CScriptWater* GetNextConnectedWater(const CStateManager& mgr) const; float GetLightmapDoubleBlendFactor() const { return x1f8_lightmapDoubleBlendFactor; } }; } #endif // __URDE_CSCRIPTWATER_HPP__