Fixed various compiler warnings.
git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/trunk@12542 178a84e3-b1eb-0310-8ba1-8eac791a3b58
This commit is contained in:
parent
502042432c
commit
62ea0bbbe0
@ -161,14 +161,6 @@ CutsceneWorld::~CutsceneWorld()
|
|||||||
{
|
{
|
||||||
} // ~CutsceneWorld
|
} // ~CutsceneWorld
|
||||||
|
|
||||||
//-----------------------------------------------------------------------------
|
|
||||||
/** Called when a kart is hit.
|
|
||||||
* \param kart_id The world kart id of the kart that was hit.
|
|
||||||
*/
|
|
||||||
void CutsceneWorld::kartHit(const int kart_id)
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
/** Returns the internal identifier for this race.
|
/** Returns the internal identifier for this race.
|
||||||
*/
|
*/
|
||||||
|
@ -85,7 +85,6 @@ public:
|
|||||||
|
|
||||||
virtual const std::string& getIdent() const OVERRIDE;
|
virtual const std::string& getIdent() const OVERRIDE;
|
||||||
|
|
||||||
virtual void kartHit(const int kart_id) OVERRIDE;
|
|
||||||
virtual void update(float dt) OVERRIDE;
|
virtual void update(float dt) OVERRIDE;
|
||||||
|
|
||||||
virtual void createRaceGUI() OVERRIDE;
|
virtual void createRaceGUI() OVERRIDE;
|
||||||
|
@ -124,10 +124,9 @@ void ThreeStrikesBattle::kartAdded(AbstractKart* kart, scene::ISceneNode* node)
|
|||||||
/** Called when a kart is hit.
|
/** Called when a kart is hit.
|
||||||
* \param kart_id The world kart id of the kart that was hit.
|
* \param kart_id The world kart id of the kart that was hit.
|
||||||
*/
|
*/
|
||||||
void ThreeStrikesBattle::kartHit(const int kart_id)
|
void ThreeStrikesBattle::kartHit(const unsigned int kart_id)
|
||||||
{
|
{
|
||||||
assert(kart_id >= 0);
|
assert(kart_id < m_karts.size());
|
||||||
assert(kart_id < (int)m_karts.size());
|
|
||||||
|
|
||||||
// make kart lose a life
|
// make kart lose a life
|
||||||
m_kart_info[kart_id].m_lives--;
|
m_kart_info[kart_id].m_lives--;
|
||||||
|
@ -101,7 +101,7 @@ public:
|
|||||||
|
|
||||||
virtual const std::string& getIdent() const;
|
virtual const std::string& getIdent() const;
|
||||||
|
|
||||||
virtual void kartHit(const int kart_id);
|
virtual void kartHit(const unsigned int kart_id);
|
||||||
virtual void update(float dt);
|
virtual void update(float dt);
|
||||||
|
|
||||||
virtual void kartAdded(AbstractKart* kart, scene::ISceneNode* node);
|
virtual void kartAdded(AbstractKart* kart, scene::ISceneNode* node);
|
||||||
|
@ -242,7 +242,7 @@ public:
|
|||||||
virtual void newLap(unsigned int kart_index) {}
|
virtual void newLap(unsigned int kart_index) {}
|
||||||
// ------------------------------------------------------------------------
|
// ------------------------------------------------------------------------
|
||||||
/** Called when a kart was hit by a projectile. */
|
/** Called when a kart was hit by a projectile. */
|
||||||
virtual void kartHit(const int kart_id) {};
|
virtual void kartHit(const unsigned int kart_id) {};
|
||||||
// ------------------------------------------------------------------------
|
// ------------------------------------------------------------------------
|
||||||
virtual void onMouseClick(int x, int y) {};
|
virtual void onMouseClick(int x, int y) {};
|
||||||
|
|
||||||
|
@ -82,7 +82,7 @@ void AmbientLightSphere::update(float dt)
|
|||||||
* additional data.
|
* additional data.
|
||||||
*/
|
*/
|
||||||
bool AmbientLightSphere::isTriggered(const Vec3 &old_pos, const Vec3 &new_pos,
|
bool AmbientLightSphere::isTriggered(const Vec3 &old_pos, const Vec3 &new_pos,
|
||||||
int indx)
|
unsigned int indx)
|
||||||
{
|
{
|
||||||
for(unsigned int i=0; i<Camera::getNumCameras(); i++)
|
for(unsigned int i=0; i<Camera::getNumCameras(); i++)
|
||||||
{
|
{
|
||||||
|
@ -53,7 +53,7 @@ public:
|
|||||||
virtual ~AmbientLightSphere() {};
|
virtual ~AmbientLightSphere() {};
|
||||||
virtual void update(float dt);
|
virtual void update(float dt);
|
||||||
virtual bool isTriggered(const Vec3 &old_pos, const Vec3 &new_pos,
|
virtual bool isTriggered(const Vec3 &old_pos, const Vec3 &new_pos,
|
||||||
int indx);
|
unsigned int indx);
|
||||||
}; // AmbientLightSphere
|
}; // AmbientLightSphere
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
@ -59,7 +59,7 @@ void CheckGoal::update(float dt)
|
|||||||
assert(tom);
|
assert(tom);
|
||||||
|
|
||||||
PtrVector<TrackObject>& objects = tom->getObjects();
|
PtrVector<TrackObject>& objects = tom->getObjects();
|
||||||
int ball_index = 0;
|
unsigned int ball_index = 0;
|
||||||
for(int i=0; i<objects.size(); i++)
|
for(int i=0; i<objects.size(); i++)
|
||||||
{
|
{
|
||||||
TrackObject* obj = objects.get(i);
|
TrackObject* obj = objects.get(i);
|
||||||
@ -96,7 +96,8 @@ void CheckGoal::trigger(unsigned int kart_index)
|
|||||||
world->onCheckGoalTriggered(m_first_goal);
|
world->onCheckGoalTriggered(m_first_goal);
|
||||||
} // CheckGoal
|
} // CheckGoal
|
||||||
|
|
||||||
bool CheckGoal::isTriggered(const Vec3 &old_pos, const Vec3 &new_pos, int indx)
|
bool CheckGoal::isTriggered(const Vec3 &old_pos, const Vec3 &new_pos,
|
||||||
|
unsigned int indx)
|
||||||
{
|
{
|
||||||
core::vector2df cross_point;
|
core::vector2df cross_point;
|
||||||
|
|
||||||
|
@ -48,7 +48,8 @@ public:
|
|||||||
virtual ~CheckGoal() {}
|
virtual ~CheckGoal() {}
|
||||||
virtual void update(float dt) OVERRIDE;
|
virtual void update(float dt) OVERRIDE;
|
||||||
virtual void trigger(unsigned int kart_index);
|
virtual void trigger(unsigned int kart_index);
|
||||||
virtual bool isTriggered(const Vec3 &old_pos, const Vec3 &new_pos, int indx) OVERRIDE;
|
virtual bool isTriggered(const Vec3 &old_pos, const Vec3 &new_pos,
|
||||||
|
unsigned int indx) OVERRIDE;
|
||||||
virtual void reset(const Track &track) OVERRIDE;
|
virtual void reset(const Track &track) OVERRIDE;
|
||||||
}; // CheckLine
|
}; // CheckLine
|
||||||
|
|
||||||
|
@ -57,7 +57,8 @@ void CheckLap::reset(const Track &track)
|
|||||||
* \param indx Index of the kart, can be used to store kart specific
|
* \param indx Index of the kart, can be used to store kart specific
|
||||||
* additional data.
|
* additional data.
|
||||||
*/
|
*/
|
||||||
bool CheckLap::isTriggered(const Vec3 &old_pos, const Vec3 &new_pos, int indx)
|
bool CheckLap::isTriggered(const Vec3 &old_pos, const Vec3 &new_pos,
|
||||||
|
unsigned int indx)
|
||||||
{
|
{
|
||||||
float track_length = World::getWorld()->getTrack()->getTrackLength();
|
float track_length = World::getWorld()->getTrack()->getTrackLength();
|
||||||
LinearWorld *lin_world = dynamic_cast<LinearWorld*>(World::getWorld());
|
LinearWorld *lin_world = dynamic_cast<LinearWorld*>(World::getWorld());
|
||||||
|
@ -40,7 +40,7 @@ public:
|
|||||||
CheckLap(const XMLNode &node, unsigned int index);
|
CheckLap(const XMLNode &node, unsigned int index);
|
||||||
virtual ~CheckLap() {};
|
virtual ~CheckLap() {};
|
||||||
virtual bool isTriggered(const Vec3 &old_pos, const Vec3 &new_pos,
|
virtual bool isTriggered(const Vec3 &old_pos, const Vec3 &new_pos,
|
||||||
int indx);
|
unsigned int indx);
|
||||||
virtual void reset(const Track &track);
|
virtual void reset(const Track &track);
|
||||||
}; // CheckLine
|
}; // CheckLine
|
||||||
|
|
||||||
|
@ -149,7 +149,8 @@ void CheckLine::changeDebugColor(bool is_active)
|
|||||||
* \param indx Index of the kart, can be used to store kart specific
|
* \param indx Index of the kart, can be used to store kart specific
|
||||||
* additional data.
|
* additional data.
|
||||||
*/
|
*/
|
||||||
bool CheckLine::isTriggered(const Vec3 &old_pos, const Vec3 &new_pos, int indx)
|
bool CheckLine::isTriggered(const Vec3 &old_pos, const Vec3 &new_pos,
|
||||||
|
unsigned int indx)
|
||||||
{
|
{
|
||||||
core::vector2df p=new_pos.toIrrVector2d();
|
core::vector2df p=new_pos.toIrrVector2d();
|
||||||
bool sign = m_line.getPointOrientation(p)>=0;
|
bool sign = m_line.getPointOrientation(p)>=0;
|
||||||
|
@ -75,7 +75,7 @@ public:
|
|||||||
CheckLine(const XMLNode &node, unsigned int index);
|
CheckLine(const XMLNode &node, unsigned int index);
|
||||||
virtual ~CheckLine();
|
virtual ~CheckLine();
|
||||||
virtual bool isTriggered(const Vec3 &old_pos, const Vec3 &new_pos,
|
virtual bool isTriggered(const Vec3 &old_pos, const Vec3 &new_pos,
|
||||||
int indx);
|
unsigned int indx);
|
||||||
virtual void reset(const Track &track);
|
virtual void reset(const Track &track);
|
||||||
virtual void changeDebugColor(bool is_active);
|
virtual void changeDebugColor(bool is_active);
|
||||||
/** Returns the actual line data for this checkpoint. */
|
/** Returns the actual line data for this checkpoint. */
|
||||||
|
@ -56,7 +56,8 @@ CheckSphere::CheckSphere(const XMLNode &node, unsigned int index)
|
|||||||
* \param kart_id Index of the kart, can be used to store kart specific
|
* \param kart_id Index of the kart, can be used to store kart specific
|
||||||
* additional data.
|
* additional data.
|
||||||
*/
|
*/
|
||||||
bool CheckSphere::isTriggered(const Vec3 &old_pos, const Vec3 &new_pos, int kart_id)
|
bool CheckSphere::isTriggered(const Vec3 &old_pos, const Vec3 &new_pos,
|
||||||
|
unsigned int kart_id)
|
||||||
{
|
{
|
||||||
float old_dist2 = (old_pos-m_center_point).length2();
|
float old_dist2 = (old_pos-m_center_point).length2();
|
||||||
float new_dist2 = (new_pos-m_center_point).length2();
|
float new_dist2 = (new_pos-m_center_point).length2();
|
||||||
|
@ -48,7 +48,7 @@ public:
|
|||||||
CheckSphere(const XMLNode &node, unsigned int index);
|
CheckSphere(const XMLNode &node, unsigned int index);
|
||||||
virtual ~CheckSphere() {};
|
virtual ~CheckSphere() {};
|
||||||
virtual bool isTriggered(const Vec3 &old_pos, const Vec3 &new_pos,
|
virtual bool isTriggered(const Vec3 &old_pos, const Vec3 &new_pos,
|
||||||
int kart_id);
|
unsigned int kart_id);
|
||||||
// ------------------------------------------------------------------------
|
// ------------------------------------------------------------------------
|
||||||
/** Returns if kart indx is currently inside of the sphere. */
|
/** Returns if kart indx is currently inside of the sphere. */
|
||||||
bool isInside(int index) const { return m_is_inside[index]; }
|
bool isInside(int index) const { return m_is_inside[index]; }
|
||||||
|
@ -114,7 +114,7 @@ public:
|
|||||||
* additional data.
|
* additional data.
|
||||||
*/
|
*/
|
||||||
virtual bool isTriggered(const Vec3 &old_pos, const Vec3 &new_pos,
|
virtual bool isTriggered(const Vec3 &old_pos, const Vec3 &new_pos,
|
||||||
int indx)=0;
|
unsigned int indx)=0;
|
||||||
virtual void trigger(unsigned int kart_index);
|
virtual void trigger(unsigned int kart_index);
|
||||||
virtual void reset(const Track &track);
|
virtual void reset(const Track &track);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user