1
0
Fork 0
mirror of https://github.com/luanti-org/luanti.git synced 2025-06-27 16:36:03 +00:00

Bunch of small fixes (coding style, very unlikely errors, warning messages)

This commit is contained in:
sapier 2014-04-06 15:12:04 +02:00
parent a230e1e736
commit eda9214f81
9 changed files with 51 additions and 34 deletions

View file

@ -730,9 +730,6 @@ u32 TextureSource::getTextureIdDirect(const std::string &name)
m_textureinfo_cache.push_back(ti);
m_name_to_id[name] = id;
/*infostream<<"getTextureIdDirect(): "
<<"Returning id="<<id<<" for name \""<<name<<"\""<<std::endl;*/
return id;
}
@ -962,6 +959,20 @@ bool TextureSource::generateImage(std::string part_of_name, video::IImage *& bas
{
video::IImage *image = m_sourcecache.getOrLoad(part_of_name, m_device);
if (image != NULL) {
if (!driver->queryFeature(irr::video::EVDF_TEXTURE_NPOT)) {
core::dimension2d<u32> dim = image->getDimension();
if ((dim.Height %2 != 0) ||
(dim.Width %2 != 0)) {
errorstream << "TextureSource::generateImage "
<< part_of_name << " size npot2 x=" << dim.Width
<< " y=" << dim.Height << std::endl;
}
}
}
if(image == NULL)
{
if(part_of_name != ""){