mirror of https://github.com/PrimeDecomp/prime.git
FINALLY match and link CCharAnimTime
This commit is contained in:
parent
1e7dc8884b
commit
fb1a193a90
|
@ -951,7 +951,7 @@ config.libs = [
|
|||
Object(NonMatching, "Kyoto/Math/CFrustumPlanes.cpp"),
|
||||
Object(NonMatching, "Kyoto/Graphics/CCubeMaterial.cpp"),
|
||||
Object(Matching, "Kyoto/Graphics/CCubeSurface.cpp"),
|
||||
Object(NonMatching, "Kyoto/Animation/CCharAnimTime.cpp"),
|
||||
Object(Matching, "Kyoto/Animation/CCharAnimTime.cpp"),
|
||||
Object(Matching, "Kyoto/Animation/CSegIdList.cpp"),
|
||||
Object(Matching, "Kyoto/Input/CFinalInput.cpp"),
|
||||
Object(Matching, "Kyoto/Graphics/CColor.cpp"),
|
||||
|
|
|
@ -36,10 +36,10 @@ public:
|
|||
bool GreaterThanZero() const;
|
||||
bool EqualsZero() const;
|
||||
void PutTo(COutputStream& out) const;
|
||||
//static CCharAnimTime Infinity() { return CCharAnimTime(kT_Infinity, 1.0f); }
|
||||
static CCharAnimTime Infinity() { return CCharAnimTime(kT_Infinity, 1.0f); }
|
||||
static CCharAnimTime ZeroFlat() { return CCharAnimTime(kT_ZeroSteady, 0.f); }
|
||||
//static CCharAnimTime ZeroPlus() { return CCharAnimTime(kT_ZeroIncreasing, 0.f); }
|
||||
//static CCharAnimTime ZeroMinus() { return CCharAnimTime(kT_ZeroDecreasing, 0.f); }
|
||||
static CCharAnimTime ZeroPlus() { return CCharAnimTime(kT_ZeroIncreasing, 0.f); }
|
||||
static CCharAnimTime ZeroMinus() { return CCharAnimTime(kT_ZeroDecreasing, 0.f); }
|
||||
|
||||
int ZeroOrdering() const {
|
||||
if (x4_type == kT_ZeroDecreasing) {
|
||||
|
@ -62,6 +62,15 @@ public:
|
|||
return kT_ZeroIncreasing;
|
||||
}
|
||||
|
||||
CCharAnimTime ZeroSignScale(float other) const {
|
||||
if (other > 0.f) {
|
||||
return *this;
|
||||
} else if (other < 0.f) {
|
||||
return CCharAnimTime(ZeroTypeFromOrdering(-ZeroOrdering()), 0.f);
|
||||
}
|
||||
return ZeroFlat();
|
||||
}
|
||||
|
||||
private:
|
||||
float x0_time;
|
||||
EType x4_type;
|
||||
|
|
|
@ -91,12 +91,7 @@ CCharAnimTime CCharAnimTime::operator*(const float& other) const {
|
|||
}
|
||||
|
||||
if (EqualsZero()) {
|
||||
if (other > 0.f) {
|
||||
return *this;
|
||||
} else if (other < 0.f) {
|
||||
return CCharAnimTime(ZeroTypeFromOrdering(-ZeroOrdering()), 0.f);
|
||||
}
|
||||
return ZeroFlat();
|
||||
return ZeroSignScale(other);
|
||||
}
|
||||
|
||||
return CCharAnimTime(x0_time * other);
|
||||
|
|
Loading…
Reference in New Issue