2016-04-20 05:44:08 +00:00
|
|
|
#ifndef __URDE_CFLUIDUVMOTION_HPP__
|
|
|
|
#define __URDE_CFLUIDUVMOTION_HPP__
|
|
|
|
|
|
|
|
#include "rstl.hpp"
|
2017-07-30 11:00:30 +00:00
|
|
|
#include "RetroTypes.hpp"
|
2016-04-20 05:44:08 +00:00
|
|
|
|
|
|
|
namespace urde
|
|
|
|
{
|
|
|
|
class CFluidUVMotion
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
enum class EFluidUVMotion
|
|
|
|
{
|
2017-07-30 11:00:30 +00:00
|
|
|
Zero,
|
|
|
|
One,
|
|
|
|
Two,
|
2016-04-20 05:44:08 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
struct SFluidLayerMotion
|
|
|
|
{
|
|
|
|
EFluidUVMotion x0_motion = EFluidUVMotion::Zero;
|
2017-08-13 07:56:35 +00:00
|
|
|
float x4_ooTimeToWrap = 0.16666667f;
|
|
|
|
float x8_orientation = 0.f;
|
|
|
|
float xc_magnitude = 1.f;
|
2017-08-08 06:03:57 +00:00
|
|
|
float x10_uvMul = 5.f;
|
|
|
|
float x14_uvScale = 0.2f;
|
2016-04-20 05:44:08 +00:00
|
|
|
|
|
|
|
SFluidLayerMotion() = default;
|
2017-08-13 07:56:35 +00:00
|
|
|
SFluidLayerMotion(EFluidUVMotion motion, float timeToWrap, float orientation, float magnitude, float uvMul)
|
|
|
|
: x0_motion(motion), x4_ooTimeToWrap(1.f / timeToWrap), x8_orientation(orientation),
|
|
|
|
xc_magnitude(magnitude), x10_uvMul(uvMul), x14_uvScale(1.f / uvMul)
|
2016-04-20 05:44:08 +00:00
|
|
|
{
|
|
|
|
}
|
2017-08-08 06:03:57 +00:00
|
|
|
|
|
|
|
float GetUVScale() const { return x14_uvScale; }
|
2016-04-20 05:44:08 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
private:
|
|
|
|
rstl::reserved_vector<SFluidLayerMotion, 3> x0_fluidLayers;
|
2017-08-13 07:56:35 +00:00
|
|
|
float x4c_ooTimeToWrap;
|
|
|
|
float x50_orientation;
|
2016-04-20 05:44:08 +00:00
|
|
|
public:
|
2017-08-13 07:56:35 +00:00
|
|
|
CFluidUVMotion(float timeToWrap, float orientation, const SFluidLayerMotion& colorLayer,
|
|
|
|
const SFluidLayerMotion& pattern1Layer, const SFluidLayerMotion& pattern2Layer);
|
|
|
|
CFluidUVMotion(float timeToWrap, float orientation);
|
2016-04-29 10:08:46 +00:00
|
|
|
|
2017-07-30 11:00:30 +00:00
|
|
|
const rstl::reserved_vector<SFluidLayerMotion, 3>& GetFluidLayers() const { return x0_fluidLayers; }
|
2017-08-13 07:56:35 +00:00
|
|
|
float GetOrientation() const { return x50_orientation; }
|
|
|
|
float GetOOTimeToWrapTexPage() const { return x4c_ooTimeToWrap; }
|
2017-08-08 06:03:57 +00:00
|
|
|
void CalculateFluidTextureOffset(float, float[3][2]) const;
|
2016-04-20 05:44:08 +00:00
|
|
|
};
|
|
|
|
}
|
|
|
|
#endif // __URDE_CFLUIDUVMOTION_HPP__
|