2022-10-09 05:13:17 +00:00
|
|
|
#ifndef _CCHARANIMTIME
|
|
|
|
#define _CCHARANIMTIME
|
2022-08-14 18:38:41 +00:00
|
|
|
|
|
|
|
#include "types.h"
|
|
|
|
|
2022-12-09 21:00:39 +00:00
|
|
|
class COutputStream;
|
2022-12-09 20:16:05 +00:00
|
|
|
class CInputStream;
|
2022-08-14 18:38:41 +00:00
|
|
|
class CCharAnimTime {
|
|
|
|
public:
|
|
|
|
enum EType {
|
|
|
|
kT_NonZero,
|
|
|
|
kT_ZeroIncreasing,
|
|
|
|
kT_ZeroSteady,
|
|
|
|
kT_ZeroDecreasing,
|
|
|
|
kT_Infinity,
|
|
|
|
};
|
2022-10-14 13:36:01 +00:00
|
|
|
float GetSeconds() const { return x0_time; }
|
|
|
|
|
2022-12-09 20:16:05 +00:00
|
|
|
explicit CCharAnimTime(CInputStream& in);
|
2022-12-09 21:00:39 +00:00
|
|
|
explicit CCharAnimTime(float time);
|
2022-11-11 14:51:34 +00:00
|
|
|
explicit CCharAnimTime(EType type, float time) : x0_time(time), x4_type(type) {}
|
2022-10-14 13:36:01 +00:00
|
|
|
CCharAnimTime(const CCharAnimTime& other) : x0_time(other.x0_time), x4_type(other.x4_type) {}
|
2022-08-14 18:38:41 +00:00
|
|
|
|
2022-12-09 20:16:05 +00:00
|
|
|
bool operator>(const CCharAnimTime& other) const;
|
2022-12-09 21:00:39 +00:00
|
|
|
bool operator==(const CCharAnimTime& other) const;
|
|
|
|
bool operator!=(const CCharAnimTime& other) const;
|
2022-12-09 20:16:05 +00:00
|
|
|
bool operator<(const CCharAnimTime& other) const;
|
2022-12-09 21:00:39 +00:00
|
|
|
CCharAnimTime operator/(const CCharAnimTime& other) const;
|
|
|
|
CCharAnimTime operator*(const float& other) const;
|
|
|
|
CCharAnimTime operator-(const CCharAnimTime& other) const;
|
|
|
|
CCharAnimTime operator+(const CCharAnimTime& other) const;
|
|
|
|
const CCharAnimTime& operator+=(const CCharAnimTime& other);
|
|
|
|
const CCharAnimTime& operator-=(const CCharAnimTime& other);
|
|
|
|
bool operator<=(const CCharAnimTime& other) const;
|
|
|
|
bool operator>=(const CCharAnimTime& other) const;
|
|
|
|
bool GreaterThanZero() const;
|
|
|
|
bool EqualsZero() const;
|
|
|
|
void PutTo(COutputStream& out) const;
|
2022-11-11 14:51:34 +00:00
|
|
|
static CCharAnimTime Infinity() { return CCharAnimTime(kT_Infinity, 1.0f); }
|
|
|
|
|
2022-08-14 18:38:41 +00:00
|
|
|
private:
|
2022-10-09 05:37:23 +00:00
|
|
|
float x0_time;
|
2022-08-14 18:38:41 +00:00
|
|
|
EType x4_type;
|
|
|
|
};
|
|
|
|
CHECK_SIZEOF(CCharAnimTime, 0x8)
|
|
|
|
|
2022-10-09 05:13:17 +00:00
|
|
|
#endif // _CCHARANIMTIME
|