Removed many warnings, mostly caused by texture that were not found.

git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/branches/irrlicht@3255 178a84e3-b1eb-0310-8ba1-8eac791a3b58
This commit is contained in:
hikerstk 2009-03-13 08:32:19 +00:00
parent dba91ef34e
commit 4a85118dbd
8 changed files with 17 additions and 9 deletions

View File

@ -4,7 +4,7 @@
(name "Bowling")
(model "bowling.ac")
(mesh "bowling.b3d")
(icon "bowling-icon.rgb")
(icon "bowling-icon.png")
(speed 4.0)
(min-height 0.2) ; height above terrain below which a ball is
; started to be pulled up

View File

@ -3,7 +3,7 @@
(tuxkart-collectable
(name "Bubble Gum")
(model "../items/bubblegum.ac")
(icon "bubblegum-icon.rgb")
(icon "bubblegum-icon.png")
(speed 50.0)
(min-height 0.3)
(max-height 1.0)

View File

@ -3,7 +3,7 @@
(tuxkart-collectable
(name "cake")
(mesh "cake.b3d")
(icon "cake-icon.rgb")
(icon "cake-icon.png")
(speed 50.0)
(min-height 0.2)
(max-height 1.0)

View File

@ -4,7 +4,7 @@
(name "Plunger")
(model "plunger.ac")
(mesh "plunger.b3d")
(icon "plunger-icon.rgb")
(icon "plunger-icon.png")
(speed 35.0)
(min-height 0.2) ; height above terrain below which a plunger is
; started to be pulled up

View File

@ -233,6 +233,10 @@ bool FileManager::findFile(std::string& full_path,
std::string FileManager::getTextureFile(const std::string& FNAME) const
{
std::string path;
// FIXME: work around when loading and converting tracks: FNAME
// (which is based on an irrlicht return value) contains the
// full path
//if(m_file_system->existFile(FNAME.c_str())) return FNAME;
findFile(path, FNAME, m_texture_search_path);
return path;
} // makeTexturePath

View File

@ -136,8 +136,7 @@ void ItemManager::loadDefaultItems()
for(std::set<std::string>::iterator i = files.begin();
i != files.end(); ++i)
{
// FIXME: We should try to check the extension,
// i.e. load only .3ds files
if(StringUtils::extension(*i)!="b3d") continue;
scene::IMesh *mesh = irr_driver->getAnimatedMesh(*i);
if(!mesh) continue;
std::string shortName = StringUtils::basename(StringUtils::without_extension(*i));

View File

@ -113,7 +113,11 @@ void Material::init(unsigned int index)
void Material::install(bool is_full_path)
{
#ifdef HAVE_IRRLICHT
m_texture = irr_driver->getTexture(file_manager->getTextureFile(m_texname));
if(m_texname!="")
{
// Avoid irrlicht warning about not being able to load texture.
m_texture = irr_driver->getTexture(file_manager->getTextureFile(m_texname));
}
#else
if ( isSphereMap () )
{

View File

@ -1127,11 +1127,12 @@ void Track::convertTrackToBullet(const scene::IMesh *mesh)
}
video::SMaterial irrMaterial=mb->getMaterial();
video::ITexture* t=irrMaterial.getTexture(0);
// FIXME: if no material is given, perhaps define a default?
const Material* material=0;
TriangleMesh *tmesh = m_track_mesh;
if(t) {
material=material_manager->getMaterial(std::string(t->getName().c_str()));
std::string image = std::string(t->getName().c_str());
material=material_manager->getMaterial(StringUtils::basename(image));
if(material->isZipper()) tmesh = m_non_collision_mesh;
}