mirror of
https://github.com/AxioDL/metaforce.git
synced 2025-12-09 08:27:42 +00:00
New code style refactor
This commit is contained in:
@@ -5,59 +5,42 @@
|
||||
#undef min
|
||||
#undef max
|
||||
|
||||
namespace urde
|
||||
{
|
||||
namespace urde {
|
||||
|
||||
class CCharAnimTime
|
||||
{
|
||||
class CCharAnimTime {
|
||||
public:
|
||||
enum class EType
|
||||
{
|
||||
NonZero,
|
||||
ZeroIncreasing,
|
||||
ZeroSteady,
|
||||
ZeroDecreasing,
|
||||
Infinity
|
||||
};
|
||||
enum class EType { NonZero, ZeroIncreasing, ZeroSteady, ZeroDecreasing, Infinity };
|
||||
|
||||
private:
|
||||
float x0_time = 0.f;
|
||||
EType x4_type = EType::ZeroSteady;
|
||||
float x0_time = 0.f;
|
||||
EType x4_type = EType::ZeroSteady;
|
||||
|
||||
public:
|
||||
CCharAnimTime() = default;
|
||||
CCharAnimTime(CInputStream& in)
|
||||
: x0_time(in.readFloatBig()),
|
||||
x4_type(EType(in.readUint32Big())) {}
|
||||
CCharAnimTime(float time)
|
||||
: x0_time(time),
|
||||
x4_type(x0_time != 0.f ? EType::NonZero : EType::ZeroSteady) {}
|
||||
CCharAnimTime() = default;
|
||||
CCharAnimTime(CInputStream& in) : x0_time(in.readFloatBig()), x4_type(EType(in.readUint32Big())) {}
|
||||
CCharAnimTime(float time) : x0_time(time), x4_type(x0_time != 0.f ? EType::NonZero : EType::ZeroSteady) {}
|
||||
|
||||
CCharAnimTime(EType type, const float& t)
|
||||
: x0_time(t)
|
||||
, x4_type(type)
|
||||
{
|
||||
}
|
||||
CCharAnimTime(EType type, const float& t) : x0_time(t), x4_type(type) {}
|
||||
|
||||
static CCharAnimTime Infinity();
|
||||
float GetSeconds() const { return x0_time; }
|
||||
|
||||
bool EqualsZero() const;
|
||||
bool EpsilonZero() const;
|
||||
bool GreaterThanZero() const;
|
||||
bool operator ==(const CCharAnimTime& other) const;
|
||||
bool operator !=(const CCharAnimTime& other) const;
|
||||
bool operator>=(const CCharAnimTime& other) const;
|
||||
bool operator<=(const CCharAnimTime& other) const;
|
||||
bool operator >(const CCharAnimTime& other) const;
|
||||
bool operator <(const CCharAnimTime& other) const;
|
||||
CCharAnimTime& operator*=(const CCharAnimTime& other);
|
||||
CCharAnimTime& operator+=(const CCharAnimTime& other);
|
||||
CCharAnimTime operator+(const CCharAnimTime& other) const;
|
||||
CCharAnimTime& operator-=(const CCharAnimTime& other);
|
||||
CCharAnimTime operator-(const CCharAnimTime& other) const;
|
||||
CCharAnimTime operator*(const CCharAnimTime& other) const;
|
||||
CCharAnimTime operator*(const float& other) const;
|
||||
float operator/(const CCharAnimTime& other) const;
|
||||
static CCharAnimTime Infinity();
|
||||
float GetSeconds() const { return x0_time; }
|
||||
|
||||
bool EqualsZero() const;
|
||||
bool EpsilonZero() const;
|
||||
bool GreaterThanZero() const;
|
||||
bool operator==(const CCharAnimTime& other) const;
|
||||
bool operator!=(const CCharAnimTime& other) const;
|
||||
bool operator>=(const CCharAnimTime& other) const;
|
||||
bool operator<=(const CCharAnimTime& other) const;
|
||||
bool operator>(const CCharAnimTime& other) const;
|
||||
bool operator<(const CCharAnimTime& other) const;
|
||||
CCharAnimTime& operator*=(const CCharAnimTime& other);
|
||||
CCharAnimTime& operator+=(const CCharAnimTime& other);
|
||||
CCharAnimTime operator+(const CCharAnimTime& other) const;
|
||||
CCharAnimTime& operator-=(const CCharAnimTime& other);
|
||||
CCharAnimTime operator-(const CCharAnimTime& other) const;
|
||||
CCharAnimTime operator*(const CCharAnimTime& other) const;
|
||||
CCharAnimTime operator*(const float& other) const;
|
||||
float operator/(const CCharAnimTime& other) const;
|
||||
};
|
||||
}
|
||||
|
||||
} // namespace urde
|
||||
|
||||
Reference in New Issue
Block a user