Implement all simple operators in CCharAnimTime

This commit is contained in:
Phillip Stephens 2022-12-09 13:16:10 -08:00
parent f7e3f059b2
commit 44c34072f9
2 changed files with 15 additions and 8 deletions

View File

@ -25,8 +25,8 @@ public:
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) const; float operator/(const CCharAnimTime& other) const;
CCharAnimTime operator*(const float& other) const; float operator*(const float& other) const;
CCharAnimTime operator-(const CCharAnimTime& other) const; CCharAnimTime operator-(const CCharAnimTime& 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);

View File

@ -9,22 +9,29 @@ CCharAnimTime::CCharAnimTime(CInputStream& in)
CCharAnimTime::CCharAnimTime(float time) : x0_time(time) { CCharAnimTime::CCharAnimTime(float time) : x0_time(time) {
if (time == 0.f) { if (time == 0.f) {
x4_type = kT_ZeroSteady; x4_type = kT_ZeroSteady;
return; } else {
}
x4_type = kT_NonZero; x4_type = kT_NonZero;
}
} }
bool CCharAnimTime::operator<(const CCharAnimTime& other) const {} bool CCharAnimTime::operator<(const CCharAnimTime& other) const {}
bool CCharAnimTime::operator==(const CCharAnimTime& other) const {} bool CCharAnimTime::operator==(const CCharAnimTime& other) const {}
bool CCharAnimTime::operator!=(const CCharAnimTime& other) const {} bool CCharAnimTime::operator!=(const CCharAnimTime& other) const { return !(*this == other); }
bool CCharAnimTime::operator>(const CCharAnimTime& other) const {} bool CCharAnimTime::operator>(const CCharAnimTime& other) const {
return !(*this == other) && !(*this < other);
}
CCharAnimTime CCharAnimTime::operator/(const CCharAnimTime& other) const {} float CCharAnimTime::operator/(const CCharAnimTime& other) const {
if (EqualsZero())
return 0.f;
CCharAnimTime CCharAnimTime::operator*(const float& other) const {} return x0_time / other.x0_time;
}
float CCharAnimTime::operator*(const float& other) const {}
CCharAnimTime CCharAnimTime::operator-(const CCharAnimTime& other) const {} CCharAnimTime CCharAnimTime::operator-(const CCharAnimTime& other) const {}