Add missed VectorElement

This commit is contained in:
Phillip Stephens 2016-02-17 00:07:32 -08:00
parent 8c659f9fb8
commit 25de1ca641
3 changed files with 23 additions and 0 deletions

View File

@ -476,6 +476,11 @@ CVectorElement* CParticleDataFactory::GetVectorElement(CInputStream& in)
CVectorElement* b = GetVectorElement(in); CVectorElement* b = GetVectorElement(in);
return new CVESubtract(a, b); return new CVESubtract(a, b);
} }
case SBIG('CTVC'):
{
CColorElement* a = GetColorElement(in);
return new CVEColorToVector(a);
}
default: break; default: break;
} }
return nullptr; return nullptr;

View File

@ -328,4 +328,12 @@ bool CVESubtract::GetValue(int frame, Zeus::CVector3f& valOut) const
return false; return false;
} }
bool CVEColorToVector::GetValue(int frame, Zeus::CVector3f &valOut) const
{
Zeus::CColor black = {0.0, 0.0, 0.0, 1.0};
x4_a->GetValue(frame, black);
valOut = Zeus::CVector3f{black.r, valOut.y, black.g };
return false;
}
} }

View File

@ -203,6 +203,16 @@ public:
bool GetValue(int frame, Zeus::CVector3f& valOut) const; bool GetValue(int frame, Zeus::CVector3f& valOut) const;
}; };
class CVEColorToVector : public CVectorElement
{
std::unique_ptr<CColorElement> x4_a;
public:
CVEColorToVector(CColorElement* a)
: x4_a(a) {}
bool GetValue(int frame, Zeus::CVector3f& valOut) const;
};
} }
#endif // __PSHAG_CVECTORELEMENT_HPP__ #endif // __PSHAG_CVECTORELEMENT_HPP__