Fixed compilation problem on linux, and removed several warnings
(one actually indicating a bug). git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/trunk@11100 178a84e3-b1eb-0310-8ba1-8eac791a3b58
This commit is contained in:
parent
c0f5484c9c
commit
e3876a58b9
@ -120,7 +120,6 @@ void AnimationBase::computeLengths()
|
||||
// Divide (on average) each segment into STEPS points, and use
|
||||
// a simple linear approximation for this part of the curve
|
||||
const float STEPS = 100.0f * (max_points-1);
|
||||
float x = 0;
|
||||
float dx = max_time / STEPS ;
|
||||
float distance = 0;
|
||||
|
||||
|
@ -188,7 +188,7 @@ float Ipo::get(float time) const
|
||||
(m_points[n+1].getX()-m_points[n].getX());
|
||||
}
|
||||
case IP_BEZIER: {
|
||||
if(n==m_points.size()-1)
|
||||
if(n==(int)m_points.size()-1)
|
||||
{
|
||||
// FIXME: only const implemented atm.
|
||||
return m_points[n].getY();
|
||||
@ -264,7 +264,7 @@ void Ipo::extend(float x, unsigned int n)
|
||||
case IP_LINEAR:
|
||||
{
|
||||
Vec3 new_point(x, m_points[n].getY(), 0);
|
||||
if(n=0)
|
||||
if(n==0)
|
||||
m_points.insert(m_points.begin(), new_point);
|
||||
else
|
||||
m_points.push_back(new_point);
|
||||
|
@ -83,8 +83,8 @@ private:
|
||||
Vec3 m_initial_hpr;
|
||||
|
||||
void extend(float x, unsigned int n);
|
||||
float Ipo::getCubicBezier(float t, float p0, float p1,
|
||||
float p2, float p3) const;
|
||||
float getCubicBezier(float t, float p0, float p1,
|
||||
float p2, float p3) const;
|
||||
public:
|
||||
Ipo(const XMLNode &curve, float fps);
|
||||
void update(float time, Vec3 *xyz, Vec3 *hpr, Vec3 *scale);
|
||||
|
Loading…
Reference in New Issue
Block a user