Code cleanup (BULLET #ifdefs).

git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/trunk/supertuxkart@1423 178a84e3-b1eb-0310-8ba1-8eac791a3b58
This commit is contained in:
hikerstk 2008-01-30 04:36:00 +00:00
parent 818ab3d164
commit 935e1a8c18
5 changed files with 6 additions and 31 deletions

View File

@ -132,9 +132,7 @@ void CollectableManager::LoadNode(const lisp::Lisp* lisp, int collectType )
else
{
m_all_models[collectType] = 0;
#ifdef BULLET
m_all_extends[collectType] = btVector3(0.0f,0.0f,0.0f);
#endif
}
// Load special attributes for certain collectables

View File

@ -22,10 +22,7 @@
#include "lisp/parser.hpp"
#include "lisp/lisp.hpp"
#ifdef BULLET
#include "btBulletDynamicsCommon.h"
#endif
class Material;
class ssgEntity;
@ -59,9 +56,7 @@ public:
float getForceToTarget(int type) const {return m_all_force_to_target[type]; }
float getMaxDistance (int type) const {return m_all_max_distance[type];}
float getMaxTurnAngle (int type) const {return m_all_max_turn_angle[type];}
#ifdef BULLET
const btVector3& getExtend (int type) const {return m_all_extends[type]; }
#endif
};
extern CollectableManager* collectable_manager;

View File

@ -113,27 +113,15 @@ void KartProperties::getAllData(const lisp::Lisp* lisp)
lisp->get("wheel-base", m_wheel_base);
lisp->get("heightCOG", m_height_cog);
#ifdef BULLET
lisp->get("bullet-engine-power", m_engine_power);
#else
lisp->get("engine-power", m_engine_power);
#endif
lisp->get("time-full-steer", m_time_full_steer);
lisp->get("brake-factor", m_brake_factor);
lisp->get("brake-force", m_brake_force);
lisp->get("roll-resistance", m_roll_resistance);
#ifdef BULLET
lisp->get("bullet-mass", m_mass);
#else
lisp->get("mass", m_mass);
#endif
lisp->get("air-resistance", m_air_resistance);
lisp->get("tire-grip", m_tire_grip);
#ifdef BULLET
lisp->get("bullet-max-steer-angle", m_max_steer_angle);
#else
lisp->get("max-steer-angle", m_max_steer_angle);
#endif
lisp->get("corn-f", m_corn_f);
lisp->get("corn-r", m_corn_r);
lisp->get("inertia", m_inertia);
@ -162,7 +150,6 @@ void KartProperties::getAllData(const lisp::Lisp* lisp)
lisp->get("gravity-center-shift", m_gravity_center_shift );
lisp->get("suspension-rest", m_suspension_rest );
lisp->get("jump-velocity", m_jump_velocity );
#ifdef BULLET
// getVector appends to existing vectors, so a new one must be used to load
std::vector<float> temp;
lisp->getVector("gear-switch-ratio", temp);
@ -170,7 +157,6 @@ void KartProperties::getAllData(const lisp::Lisp* lisp)
temp.clear();
lisp->getVector("gear-power-increase", temp);
if(temp.size()>0) m_gear_power_increase = temp;
#endif
} // getAllData

View File

@ -66,12 +66,11 @@
#include "gui/menu_manager.hpp"
#include "scene.hpp"
#ifdef BULLET
# ifdef __APPLE__
# include <GLUT/glut.h>
# else
# include <GL/glut.h>
# endif
// Only needed for bullet debug!
#ifdef __APPLE__
# include <GLUT/glut.h>
#else
# include <GL/glut.h>
#endif
void cmdLineHelp (char* invocation)
@ -387,9 +386,7 @@ int main(int argc, char *argv[] )
{
try {
initTranslations();
#ifdef BULLET
glutInit(&argc, argv);
#endif
InitTuxkart();
//handleCmdLine() needs InitTuxkart() so it can't be called first

View File

@ -232,7 +232,6 @@ World::~World()
*/
void World::resetAllKarts()
{
#ifdef BULLET
bool all_finished=false;
for(int i=0; i<10; i++) m_physics->update(1.f/60.f);
while(!all_finished)
@ -248,7 +247,7 @@ void World::resetAllKarts()
}
}
} // while
#endif
} // resetAllKarts
//-----------------------------------------------------------------------------