mirror of
https://bitbucket.org/mfeemster/fractorium.git
synced 2025-01-21 21:20:07 -05:00
Convert motion_frequency to floating point
This commit is contained in:
parent
1a37504b09
commit
d75a15136d
@ -731,7 +731,7 @@ public:
|
||||
{
|
||||
//Original only pulls these from the first motion xform which is a bug. Want to pull it from each one.
|
||||
Xform<T>& currentMot = xform.m_Motion[i];
|
||||
intmax_t freq = currentMot.m_MotionFreq;
|
||||
T freq = currentMot.m_MotionFreq;
|
||||
eMotion func = currentMot.m_MotionFunc;
|
||||
|
||||
//Clamp these to the appropriate range after all are applied.
|
||||
@ -1232,7 +1232,7 @@ public:
|
||||
T m_Animate;//Whether or not this xform rotates during animation. 0 means stationary, > 0 means rotate. Use T instead of bool so it can be interpolated.
|
||||
T m_Wind[2];
|
||||
eMotion m_MotionFunc;
|
||||
intmax_t m_MotionFreq;
|
||||
T m_MotionFreq;
|
||||
vector<Xform<T>> m_Motion;
|
||||
string m_Name;
|
||||
|
||||
|
@ -971,7 +971,7 @@ private:
|
||||
if (theXform)
|
||||
{
|
||||
//Check for non-zero motion params.
|
||||
if (theXform->m_MotionFreq != 0)//Original checked for motion func being non-zero, but it was set to MOTION_SIN (1) in Xform::Init(), so don't check for 0 here.
|
||||
if (abs(theXform->m_MotionFreq) > 0.0)//Original checked for motion func being non-zero, but it was set to MOTION_SIN (1) in Xform::Init(), so don't check for 0 here.
|
||||
{
|
||||
m_ErrorReport.push_back(string(loc) + " : Motion parameters should not be specified in regular, non-motion xforms");
|
||||
}
|
||||
@ -1047,9 +1047,7 @@ private:
|
||||
else if (ParseAndAssignFloat(curAtt->name, attStr, "animate", xform.m_Animate, success)) { }
|
||||
else if (ParseAndAssignFloat(curAtt->name, attStr, "opacity", xform.m_Opacity, success)) { }
|
||||
else if (ParseAndAssignFloat(curAtt->name, attStr, "var_color", xform.m_DirectColor, success)) { }
|
||||
|
||||
//Parse simple int reads.
|
||||
else if (ParseAndAssignInt(curAtt->name, attStr, "motion_frequency", xform.m_MotionFreq, success)) { }
|
||||
else if (ParseAndAssignFloat(curAtt->name, attStr, "motion_frequency", xform.m_MotionFreq, success)) { }
|
||||
|
||||
//Parse more complicated reads that have multiple possible values.
|
||||
else if (!Compare(curAtt->name, "name"))
|
||||
|
Loading…
Reference in New Issue
Block a user