Code cleanup (removed HAVE_IRRLICHT, ...).
git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/branches/irrlicht@3800 178a84e3-b1eb-0310-8ba1-8eac791a3b58
This commit is contained in:
parent
217ff4741a
commit
6f2eeae5a7
@ -23,12 +23,9 @@
|
||||
#define HEADER_CAMERA_HPP
|
||||
|
||||
#include "utils/vec3.hpp"
|
||||
#ifdef HAVE_IRRLICHT
|
||||
#include "irrlicht.h"
|
||||
using namespace irr;
|
||||
#else
|
||||
class ssgContext;
|
||||
#endif
|
||||
|
||||
class Kart;
|
||||
|
||||
class Camera
|
||||
@ -43,11 +40,9 @@ public:
|
||||
CM_SIMPLE_REPLAY
|
||||
};
|
||||
|
||||
protected:
|
||||
#ifdef HAVE_IRRLICHT
|
||||
private:
|
||||
scene::ICameraSceneNode
|
||||
*m_camera;
|
||||
#endif
|
||||
Mode m_mode; // Camera's mode
|
||||
Vec3 m_position; // The ultimate position which the camera wants to obtain
|
||||
Vec3 m_temp_position; // The position the camera currently has
|
||||
|
@ -90,9 +90,6 @@ Material::Material(const std::string& fname, int index, bool is_full_path)
|
||||
//-----------------------------------------------------------------------------
|
||||
Material::~Material()
|
||||
{
|
||||
#ifndef HAVE_IRRLICHT
|
||||
ssgDeRefDelete(m_state);
|
||||
#endif
|
||||
} // ~Material
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
|
@ -16,7 +16,7 @@
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with this program; if not, write to the Free Software
|
||||
// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
#ifdef HAVE_IRRLICHT
|
||||
|
||||
#include "graphics/mesh_tools.hpp"
|
||||
|
||||
void MeshTools::minMax3D(scene::IMesh* mesh, Vec3 *min, Vec3 *max) {
|
||||
@ -44,4 +44,3 @@ void MeshTools::minMax3D(scene::IMesh* mesh, Vec3 *min, Vec3 *max) {
|
||||
} // for i<getMeshBufferCount
|
||||
} // minMax3D
|
||||
|
||||
#endif
|
||||
|
@ -16,7 +16,6 @@
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with this program; if not, write to the Free Software
|
||||
// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
#ifdef HAVE_IRRLICHT
|
||||
|
||||
#ifndef HEADER_MESH_TOOLS_HPP
|
||||
#define HEADER_MESH_TOOLS_HPP
|
||||
@ -32,4 +31,3 @@ namespace MeshTools
|
||||
} // MeshTools
|
||||
|
||||
#endif
|
||||
#endif // HAVE_IRRLICHT
|
||||
|
@ -23,28 +23,20 @@
|
||||
#include <vector>
|
||||
#include "LinearMath/btVector3.h"
|
||||
|
||||
//class ssgRoot;
|
||||
//class ssgEntity;
|
||||
class Camera;
|
||||
class Kart;
|
||||
|
||||
class Scene
|
||||
{
|
||||
// ssgRoot *m_scenegraph;
|
||||
typedef std::vector<Camera*> Cameras;
|
||||
Cameras m_cameras;
|
||||
|
||||
public:
|
||||
void clear();
|
||||
|
||||
Scene ();
|
||||
~Scene ();
|
||||
Scene ();
|
||||
~Scene ();
|
||||
void reset();
|
||||
|
||||
//void add(ssgEntity *kid);
|
||||
//void remove(ssgEntity *kid);
|
||||
void clear();
|
||||
void draw(float dt);
|
||||
|
||||
Camera *createCamera(int playerId, const Kart* kart);
|
||||
};
|
||||
|
||||
|
@ -70,11 +70,7 @@ Bowling::Bowling(Kart *kart) : Flyable(kart, POWERUP_BOWLING, 50.0f /* mass */)
|
||||
} // Bowling
|
||||
|
||||
// -----------------------------------------------------------------------------
|
||||
#ifdef HAVE_IRRLICHT
|
||||
void Bowling::init(const lisp::Lisp* lisp, scene::IMesh *bowling)
|
||||
#else
|
||||
void Bowling::init(const lisp::Lisp* lisp, ssgEntity *bowling)
|
||||
#endif
|
||||
{
|
||||
Flyable::init(lisp, bowling, POWERUP_BOWLING);
|
||||
m_st_max_distance = 20.0f;
|
||||
|
@ -20,10 +20,8 @@
|
||||
#ifndef HEADER_BOWLING_HPP
|
||||
#define HEADER_BOWLING_HPP
|
||||
|
||||
#ifdef HAVE_IRRLICHT
|
||||
#include "irrlicht.h"
|
||||
using namespace irr;
|
||||
#endif
|
||||
|
||||
#include "items/flyable.hpp"
|
||||
|
||||
@ -36,11 +34,7 @@ private:
|
||||
|
||||
public:
|
||||
Bowling(Kart* kart);
|
||||
#ifdef HAVE_IRRLICHT
|
||||
static void init(const lisp::Lisp* lisp, scene::IMesh *bowling);
|
||||
#else
|
||||
static void init(const lisp::Lisp* lisp, ssgEntity* bowling);
|
||||
#endif
|
||||
virtual void update(float dt);
|
||||
|
||||
int getExplosionSound() const { return SFXManager::SOUND_BOWLING_STRIKE; }
|
||||
|
@ -19,21 +19,13 @@
|
||||
|
||||
#include "items/bubblegumitem.hpp"
|
||||
|
||||
#ifdef HAVE_IRRLICHT
|
||||
BubbleGumItem::BubbleGumItem(ItemType type, const Vec3& xyz, const Vec3 &normal,
|
||||
scene::IMesh* mesh, unsigned int item_id)
|
||||
: Item(type, xyz, normal, mesh, item_id,
|
||||
/* rotate */ false)
|
||||
{
|
||||
} // BubbleGumItem
|
||||
#else
|
||||
BubbleGumItem::BubbleGumItem(ItemType type, const Vec3& xyz, const Vec3 &normal,
|
||||
ssgEntity* model, unsigned int item_id)
|
||||
: Item(type, xyz, normal, model, item_id,
|
||||
/* rotate */ false)
|
||||
{
|
||||
} // BubbleGumItem
|
||||
#endif
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
BubbleGumItem::~BubbleGumItem()
|
||||
{
|
||||
|
@ -26,15 +26,9 @@
|
||||
class BubbleGumItem : public Item
|
||||
{
|
||||
public:
|
||||
#ifdef HAVE_IRRLICHT
|
||||
BubbleGumItem(ItemType type, const Vec3& xyz,
|
||||
const Vec3 &normal, scene::IMesh* mesh,
|
||||
unsigned int item_id);
|
||||
#else
|
||||
BubbleGumItem(ItemType type, const Vec3& xyz,
|
||||
const Vec3 &normal, ssgEntity* model,
|
||||
unsigned int item_id);
|
||||
#endif
|
||||
~BubbleGumItem ();
|
||||
virtual void collected(float t);
|
||||
}
|
||||
|
@ -135,11 +135,8 @@ void ItemManager::setDefaultItemStyle()
|
||||
i->first.c_str());
|
||||
} // if i->second
|
||||
}
|
||||
#ifndef HAVE_IRRLICHT
|
||||
// For now disable this, irrlicht does not yet load any items.
|
||||
throw std::runtime_error(msg.str());
|
||||
exit(-1);
|
||||
#endif
|
||||
} // if bError
|
||||
|
||||
} // setDefaultItemStyle
|
||||
|
@ -66,14 +66,6 @@ PowerupManager::PowerupManager()
|
||||
//-----------------------------------------------------------------------------
|
||||
void PowerupManager::removeTextures()
|
||||
{
|
||||
#ifndef HAVE_IRRLICHT
|
||||
for(int i=0; i<POWERUP_MAX; i++)
|
||||
{
|
||||
if(m_all_icons [i]) ssgDeRefDelete(m_all_icons [i]->getState());
|
||||
if(m_all_models[i]) ssgDeRefDelete(m_all_models[i] );
|
||||
} // for
|
||||
#endif
|
||||
|
||||
} // removeTextures
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
|
@ -35,19 +35,6 @@ ProjectileManager *projectile_manager=0;
|
||||
|
||||
void ProjectileManager::loadData()
|
||||
{
|
||||
#ifdef HAVE_IRRLICHT
|
||||
#else
|
||||
// Load the explosion model and find the actual selector branch in it.
|
||||
// Only the explosion model is loaded here, see powerup_manager.
|
||||
m_explosion_model = find_selector((ssgBranch*)loader->load("explode.ac",
|
||||
CB_EXPLOSION) );
|
||||
m_explosion_model->ref();
|
||||
if ( m_explosion_model == NULL )
|
||||
{
|
||||
fprintf ( stderr, "explode.ac doesn't have an 'explosion' object.\n" ) ;
|
||||
exit ( 1 ) ;
|
||||
}
|
||||
#endif
|
||||
} // loadData
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
@ -66,22 +53,15 @@ void ProjectileManager::cleanup()
|
||||
for(Projectiles::iterator i = m_active_projectiles.begin();
|
||||
i != m_active_projectiles.end(); ++i)
|
||||
{
|
||||
#ifdef HAVE_IRRLICHT
|
||||
#else
|
||||
ssgTransform *m = (*i)->getModelTransform();
|
||||
m->removeAllKids();
|
||||
#endif
|
||||
delete *i;
|
||||
}
|
||||
m_active_projectiles.clear();
|
||||
for(Explosions::iterator i = m_active_explosions.begin();
|
||||
i != m_active_explosions.end(); ++i)
|
||||
{
|
||||
#ifndef HAVE_IRRLICHT
|
||||
stk_scene->remove((ssgTransform*)*i);
|
||||
#endif
|
||||
//ssgDeRefDelete(*i);
|
||||
// FIXME: still to do
|
||||
}
|
||||
|
||||
m_active_explosions.clear();
|
||||
} // cleanup
|
||||
|
||||
|
@ -22,9 +22,7 @@
|
||||
|
||||
#include <string>
|
||||
#include <vector>
|
||||
#ifdef HAVE_IRRLICHT
|
||||
#include "irrlicht.h"
|
||||
#endif
|
||||
#include "utils/vec3.hpp"
|
||||
|
||||
namespace lisp
|
||||
@ -154,7 +152,6 @@ namespace lisp
|
||||
}
|
||||
*/
|
||||
|
||||
#ifdef HAVE_IRRLICHT
|
||||
bool get(const char* name, core::vector3df& val) const
|
||||
{
|
||||
const Lisp* lisp = getLisp(name);
|
||||
@ -179,7 +176,7 @@ namespace lisp
|
||||
|
||||
return true;
|
||||
}
|
||||
#endif
|
||||
|
||||
bool get(const char* name, Vec3& val) const
|
||||
{
|
||||
const Lisp* lisp = getLisp(name);
|
||||
|
Loading…
Reference in New Issue
Block a user