CCharAnimTime progress

This commit is contained in:
Phillip Stephens 2024-03-18 17:07:06 -07:00
parent 7eaafd5cc4
commit 9f7d939aba
3 changed files with 59 additions and 3 deletions

View File

@ -126,7 +126,7 @@ if not is_windows():
# Tool versions # Tool versions
config.compilers_tag = "20231018" config.compilers_tag = "20231018"
config.dtk_tag = "v0.6.2" config.dtk_tag = "v0.7.5"
config.sjiswrap_tag = "v1.1.1" config.sjiswrap_tag = "v1.1.1"
config.wibo_tag = "0.6.9" config.wibo_tag = "0.6.9"

View File

@ -38,6 +38,16 @@ public:
void PutTo(COutputStream& out) const; void PutTo(COutputStream& out) const;
static CCharAnimTime Infinity() { return CCharAnimTime(kT_Infinity, 1.0f); } static CCharAnimTime Infinity() { return CCharAnimTime(kT_Infinity, 1.0f); }
int ZeroOrdering() const {
if (x4_type == kT_ZeroDecreasing) {
return -1;
}
if (x4_type == kT_ZeroSteady) {
return 0;
}
return 1;
}
private: private:
float x0_time; float x0_time;
EType x4_type; EType x4_type;

View File

@ -14,9 +14,55 @@ CCharAnimTime::CCharAnimTime(float time) : x0_time(time) {
} }
} }
bool CCharAnimTime::operator<(const CCharAnimTime& other) const {} bool CCharAnimTime::operator<(const CCharAnimTime& other) const {
if (x4_type == kT_NonZero) {
if (other.x4_type == kT_NonZero) {
return x0_time < other.x0_time;
}
bool CCharAnimTime::operator==(const CCharAnimTime& other) const {} return other.EqualsZero() ? x0_time < 0.f : other.x0_time > 0.f;
}
if (EqualsZero()) {
if (other.EqualsZero()) {
return ZeroOrdering() < ZeroOrdering();
if (other.x4_type == kT_NonZero) {
return other.x0_time > 0.f;
}
}
return other.x0_time > 0.f;
}
if (other.x4_type == kT_Infinity) {
return 0.f < x0_time || other.x0_time > 0.f;
}
return x0_time < 0.f;
}
bool CCharAnimTime::operator==(const CCharAnimTime& other) const {
int iVar1;
int iVar3;
if (x4_type == kT_NonZero) {
if (other.x4_type == kT_NonZero) {
return x0_time == other.x0_time;
}
return other.EqualsZero() ? false : false;
}
if (EqualsZero()) {
if (other.EqualsZero()) {
return ZeroOrdering() == other.ZeroOrdering();
}
return false;
}
if (other.x4_type == kT_Infinity) {
return x0_time * other.x0_time > 0.f;
}
return false;
}
bool CCharAnimTime::operator!=(const CCharAnimTime& other) const { return !(*this == other); } bool CCharAnimTime::operator!=(const CCharAnimTime& other) const { return !(*this == other); }