X-Git-Url: https://git.pterodactylus.net/?a=blobdiff_plain;f=synfig-core%2Ftrunk%2Fsrc%2Fsynfig%2Fvaluenode_animated.cpp;h=ea91caccfdbbcba43b83e97e5c27af26413b9a3b;hb=e4e1c19315920dc14783a778aa92877ead3a7430;hp=a2d42e7493f1dd6eefda6605a67fa2144517d4a0;hpb=e802271c263e2a49ab4edb3660f89c27e642d123;p=synfig.git diff --git a/synfig-core/trunk/src/synfig/valuenode_animated.cpp b/synfig-core/trunk/src/synfig/valuenode_animated.cpp index a2d42e7..ea91cac 100644 --- a/synfig-core/trunk/src/synfig/valuenode_animated.cpp +++ b/synfig-core/trunk/src/synfig/valuenode_animated.cpp @@ -6,6 +6,7 @@ ** ** \legal ** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley +** Copyright (c) 2007 Chris Moore ** ** This package is free software; you can redistribute it and/or ** modify it under the terms of the GNU General Public License as @@ -160,6 +161,7 @@ struct is_angle_type } }; +#ifdef ANGLES_USE_LINEAR_INTERPOLATION template <> struct is_angle_type { @@ -168,6 +170,7 @@ struct is_angle_type return true; } }; +#endif // ANGLES_USE_LINEAR_INTERPOLATION /* === G L O B A L S ======================================================= */ @@ -379,7 +382,7 @@ public: const Real& c(iter->get_continuity()); // Continuity const Real& b(iter->get_bias()); // Bias - // The folloing line works where the previous line fails. + // The following line works where the previous line fails. value_type Pp; Pp=curve_list.back().second.p1(); // P_{i-1} const value_type& Pc(curve.second.p1()); // P_i @@ -461,24 +464,24 @@ public: // if this isn't the first curve else if(iter_get_after != INTERPOLATION_LINEAR && !curve_list.empty()) // adjust it for the curve that came before it - curve.second.t1() *= + curve.second.t1() = static_cast(curve.second.t1() * // cast to prevent warning // (time span of this curve) * 1.5 // ----------------------------------------------------------------- // ((time span of this curve) * 0.5) + (time span of previous curve) - (curve.second.get_dt()*(timeadjust+1)) / - (curve.second.get_dt()*timeadjust + curve_list.back().second.get_dt()); + (curve.second.get_dt()*(timeadjust+1)) / + (curve.second.get_dt()*timeadjust + curve_list.back().second.get_dt())); if(next_get_before==INTERPOLATION_HALT) curve.second.t2()*=0; // if this isn't the last curve else if(next_get_before != INTERPOLATION_LINEAR && after_next!=waypoint_list_.end()) // adjust it for the curve that came after it - curve.second.t2() *= + curve.second.t2() = static_cast(curve.second.t2() * // cast to prevent warning // (time span of this curve) * 1.5 // ------------------------------------------------------------- // ((time span of this curve) * 0.5) + (time span of next curve) - (curve.second.get_dt()*(timeadjust+1)) / - (curve.second.get_dt()*timeadjust+(after_next->get_time()-next->get_time())); + (curve.second.get_dt()*(timeadjust+1)) / + (curve.second.get_dt()*timeadjust+(after_next->get_time()-next->get_time()))); } // not CONSTANT }