More minor code cleanup.

git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/trunk/supertuxkart@1424 178a84e3-b1eb-0310-8ba1-8eac791a3b58
This commit is contained in:
hikerstk 2008-01-30 04:55:11 +00:00
parent 935e1a8c18
commit b75c9ec869
4 changed files with 11 additions and 24 deletions

View File

@ -87,6 +87,7 @@ void HighscoreManager::Load()
} }
catch(std::exception& err) catch(std::exception& err)
{ {
(void)err; // remove warning about unused variable
Save(); Save();
if(m_can_write) if(m_can_write)
{ {

View File

@ -17,7 +17,6 @@
// along with this program; if not, write to the Free Software // along with this program; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. // Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#ifdef BULLET
#ifndef HEADER_MOVING_PHYSICS_H #ifndef HEADER_MOVING_PHYSICS_H
#define HEADER_MOVING_PHYSICS_H #define HEADER_MOVING_PHYSICS_H
#include <plib/ssg.h> #include <plib/ssg.h>
@ -45,7 +44,6 @@ public:
const char *getTypeName() {return "moving physics";} const char *getTypeName() {return "moving physics";}
}; // MovingPhysics }; // MovingPhysics
#endif
#endif #endif
/* EOF */ /* EOF */

View File

@ -24,14 +24,11 @@
#include "world.hpp" #include "world.hpp"
#include "user_config.hpp" #include "user_config.hpp"
#include "btBulletDynamicsCommon.h"
#ifdef BULLET #ifdef __APPLE__
# include "btBulletDynamicsCommon.h" # include <GLUT/glut.h>
# ifdef __APPLE__ #else
# include <GLUT/glut.h> # include <GL/glut.h>
# else
# include <GL/glut.h>
# endif
#endif #endif
#include "scene.hpp" #include "scene.hpp"
@ -132,12 +129,9 @@ void Scene::draw(float dt)
(*i)->update(dt); (*i)->update(dt);
(*i) -> apply () ; (*i) -> apply () ;
#ifdef BULLET
if(!user_config->m_bullet_debug) if(!user_config->m_bullet_debug)
{ {
#endif
ssgCullAndDraw ( m_scenegraph ); ssgCullAndDraw ( m_scenegraph );
#ifdef BULLET
} }
else else
{ {
@ -187,7 +181,6 @@ void Scene::draw(float dt)
} }
world->getPhysics()->draw(); world->getPhysics()->draw();
} // bullet_debug } // bullet_debug
#endif
} // for cameras } // for cameras
if (TRACK->useFog()) if (TRACK->useFog())

View File

@ -68,16 +68,11 @@ public:
/** debug text that will be overlaid to the screen */ /** debug text that will be overlaid to the screen */
std::string m_debug_text[10]; std::string m_debug_text[10];
World(const RaceSetup& raceSetup); World(const RaceSetup& raceSetup);
virtual ~World(); virtual ~World();
#ifndef BULLET void update(float delta);
float GetHOT(sgVec3 start, sgVec3 end, ssgLeaf** leaf, sgVec4** nrm) void restartRace();
{return m_track->GetHOT(start, end, leaf, nrm);} void disableRace(); // Put race into limbo phase
int Collision(sgSphere* s, AllHits *a) const {return m_track->Collision(s,a); }
#endif
void update(float delta);
void restartRace();
void disableRace(); // Put race into limbo phase
PlayerKart* getPlayerKart(int player) PlayerKart* getPlayerKart(int player)
{ {