mirror of
https://github.com/minetest/irrlicht.git
synced 2024-11-16 15:30:25 +01:00
Unify & improve log messages
Lots of places where coders did not realize our Printer::log with hint adds a ": " string between message and hint Which caused uglier messages in a few places (added documentation for that, maybe helps?) Some added info in a few places Some whitespace unification Some spelling unification git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@6414 dfc29bdd-3216-0410-991c-e03cc46cb475
This commit is contained in:
parent
30834665ff
commit
7d2dbdd0c8
|
@ -1827,7 +1827,7 @@ void CColladaMeshWriter::writeMeshGeometry(const irr::core::stringc& meshname, s
|
||||||
|
|
||||||
if ( buffer->getPrimitiveType() != EPT_TRIANGLES )
|
if ( buffer->getPrimitiveType() != EPT_TRIANGLES )
|
||||||
{
|
{
|
||||||
os::Printer::log("Collada writer does not support non-triangle meshbuffers. Mesh: ", meshname.c_str(), ELL_WARNING);
|
os::Printer::log("Collada writer does not support non-triangle meshbuffers. Mesh", meshname.c_str(), ELL_WARNING);
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -3000,7 +3000,7 @@ bool CD3D9Driver::reset()
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
os::Printer::log("Resetting failed due to unknown reason.", core::stringc((int)hr).c_str(), ELL_WARNING);
|
os::Printer::log("Resetting failed due to unknown reason", core::stringc((int)hr).c_str(), ELL_WARNING);
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
|
@ -810,7 +810,7 @@ bool CGUIEnvironment::loadGUI(const io::path& filename, IGUIElement* parent)
|
||||||
io::IReadFile* read = FileSystem->createAndOpenFile(filename);
|
io::IReadFile* read = FileSystem->createAndOpenFile(filename);
|
||||||
if (!read)
|
if (!read)
|
||||||
{
|
{
|
||||||
os::Printer::log("Unable to open gui file", filename, ELL_ERROR);
|
os::Printer::log("Unable to open GUI file", filename, ELL_ERROR);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -137,7 +137,7 @@ bool CImageLoaderJPG::isALoadableFileFormat(io::IReadFile* file) const
|
||||||
IImage* CImageLoaderJPG::loadImage(io::IReadFile* file) const
|
IImage* CImageLoaderJPG::loadImage(io::IReadFile* file) const
|
||||||
{
|
{
|
||||||
#ifndef _IRR_COMPILE_WITH_LIBJPEG_
|
#ifndef _IRR_COMPILE_WITH_LIBJPEG_
|
||||||
os::Printer::log("Can't load as not compiled with _IRR_COMPILE_WITH_LIBJPEG_:", file->getFileName(), ELL_DEBUG);
|
os::Printer::log("Can't load as not compiled with _IRR_COMPILE_WITH_LIBJPEG_", file->getFileName(), ELL_DEBUG);
|
||||||
return 0;
|
return 0;
|
||||||
#else
|
#else
|
||||||
|
|
||||||
|
|
|
@ -99,14 +99,14 @@ IImage* CImageLoaderPng::loadImage(io::IReadFile* file) const
|
||||||
// Read the first few bytes of the PNG file
|
// Read the first few bytes of the PNG file
|
||||||
if( file->read(buffer, 8) != 8 )
|
if( file->read(buffer, 8) != 8 )
|
||||||
{
|
{
|
||||||
os::Printer::log("LOAD PNG: can't read file\n", file->getFileName(), ELL_ERROR);
|
os::Printer::log("LOAD PNG: can't read file (filesize < 8)", file->getFileName(), ELL_ERROR);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Check if it really is a PNG file
|
// Check if it really is a PNG file
|
||||||
if( png_sig_cmp(buffer, 0, 8) )
|
if( png_sig_cmp(buffer, 0, 8) )
|
||||||
{
|
{
|
||||||
os::Printer::log("LOAD PNG: not really a png\n", file->getFileName(), ELL_ERROR);
|
os::Printer::log("LOAD PNG: not really a png (wrong signature)", file->getFileName(), ELL_ERROR);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -115,7 +115,7 @@ IImage* CImageLoaderPng::loadImage(io::IReadFile* file) const
|
||||||
NULL, (png_error_ptr)png_cpexcept_error, (png_error_ptr)png_cpexcept_warn);
|
NULL, (png_error_ptr)png_cpexcept_error, (png_error_ptr)png_cpexcept_warn);
|
||||||
if (!png_ptr)
|
if (!png_ptr)
|
||||||
{
|
{
|
||||||
os::Printer::log("LOAD PNG: Internal PNG create read struct failure\n", file->getFileName(), ELL_ERROR);
|
os::Printer::log("LOAD PNG: Internal PNG create read struct failure", file->getFileName(), ELL_ERROR);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -123,7 +123,7 @@ IImage* CImageLoaderPng::loadImage(io::IReadFile* file) const
|
||||||
png_infop info_ptr = png_create_info_struct(png_ptr);
|
png_infop info_ptr = png_create_info_struct(png_ptr);
|
||||||
if (!info_ptr)
|
if (!info_ptr)
|
||||||
{
|
{
|
||||||
os::Printer::log("LOAD PNG: Internal PNG create info struct failure\n", file->getFileName(), ELL_ERROR);
|
os::Printer::log("LOAD PNG: Internal PNG create info struct failure", file->getFileName(), ELL_ERROR);
|
||||||
png_destroy_read_struct(&png_ptr, NULL, NULL);
|
png_destroy_read_struct(&png_ptr, NULL, NULL);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
@ -229,7 +229,7 @@ IImage* CImageLoaderPng::loadImage(io::IReadFile* file) const
|
||||||
video::IImage* image = new CImage(colorFormat, core::dimension2du(Width, Height));
|
video::IImage* image = new CImage(colorFormat, core::dimension2du(Width, Height));
|
||||||
if (!image)
|
if (!image)
|
||||||
{
|
{
|
||||||
os::Printer::log("LOAD PNG: Internal PNG create image struct failure\n", file->getFileName(), ELL_ERROR);
|
os::Printer::log("LOAD PNG: Internal PNG create image struct failure", file->getFileName(), ELL_ERROR);
|
||||||
png_destroy_read_struct(&png_ptr, NULL, NULL);
|
png_destroy_read_struct(&png_ptr, NULL, NULL);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
@ -238,7 +238,7 @@ IImage* CImageLoaderPng::loadImage(io::IReadFile* file) const
|
||||||
RowPointers = new png_bytep[Height];
|
RowPointers = new png_bytep[Height];
|
||||||
if (!RowPointers)
|
if (!RowPointers)
|
||||||
{
|
{
|
||||||
os::Printer::log("LOAD PNG: Internal PNG create row pointers failure\n", file->getFileName(), ELL_ERROR);
|
os::Printer::log("LOAD PNG: Internal PNG create row pointers failure", file->getFileName(), ELL_ERROR);
|
||||||
png_destroy_read_struct(&png_ptr, NULL, NULL);
|
png_destroy_read_struct(&png_ptr, NULL, NULL);
|
||||||
delete image;
|
delete image;
|
||||||
return 0;
|
return 0;
|
||||||
|
|
|
@ -80,7 +80,7 @@ IImage* CImageLoaderPSD::loadImage(io::IReadFile* file) const
|
||||||
|
|
||||||
if (header.mode != 3 || header.depth != 8)
|
if (header.mode != 3 || header.depth != 8)
|
||||||
{
|
{
|
||||||
os::Printer::log("Unsupported PSD color mode or depth.\n", file->getFileName(), ELL_ERROR);
|
os::Printer::log("Unsupported PSD color mode or depth", file->getFileName(), ELL_ERROR);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -93,7 +93,7 @@ IImage* CImageLoaderPSD::loadImage(io::IReadFile* file) const
|
||||||
#endif
|
#endif
|
||||||
if (!file->seek(l, true))
|
if (!file->seek(l, true))
|
||||||
{
|
{
|
||||||
os::Printer::log("Error seeking file pos to image resources.\n", file->getFileName(), ELL_ERROR);
|
os::Printer::log("Error seeking file pos to image resources", file->getFileName(), ELL_ERROR);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -105,7 +105,7 @@ IImage* CImageLoaderPSD::loadImage(io::IReadFile* file) const
|
||||||
#endif
|
#endif
|
||||||
if (!file->seek(l, true))
|
if (!file->seek(l, true))
|
||||||
{
|
{
|
||||||
os::Printer::log("Error seeking file pos to layer and mask.\n", file->getFileName(), ELL_ERROR);
|
os::Printer::log("Error seeking file pos to layer and mask", file->getFileName(), ELL_ERROR);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -117,7 +117,7 @@ IImage* CImageLoaderPSD::loadImage(io::IReadFile* file) const
|
||||||
#endif
|
#endif
|
||||||
if (!file->seek(l, true))
|
if (!file->seek(l, true))
|
||||||
{
|
{
|
||||||
os::Printer::log("Error seeking file pos to image data section.\n", file->getFileName(), ELL_ERROR);
|
os::Printer::log("Error seeking file pos to image data section", file->getFileName(), ELL_ERROR);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -131,7 +131,7 @@ IImage* CImageLoaderPSD::loadImage(io::IReadFile* file) const
|
||||||
|
|
||||||
if (compressionType != 1 && compressionType != 0)
|
if (compressionType != 1 && compressionType != 0)
|
||||||
{
|
{
|
||||||
os::Printer::log("Unsupported psd compression mode.\n", file->getFileName(), ELL_ERROR);
|
os::Printer::log("Unsupported psd compression mode", file->getFileName(), ELL_ERROR);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -171,7 +171,7 @@ bool CImageLoaderPSD::readRawImageData(io::IReadFile* file, const PsdHeader& hea
|
||||||
{
|
{
|
||||||
if (!file->read(tmpData, sizeof(c8) * header.width * header.height))
|
if (!file->read(tmpData, sizeof(c8) * header.width * header.height))
|
||||||
{
|
{
|
||||||
os::Printer::log("Error reading color channel\n", file->getFileName(), ELL_ERROR);
|
os::Printer::log("Error reading color channel", file->getFileName(), ELL_ERROR);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -247,7 +247,7 @@ bool CImageLoaderPSD::readRLEImageData(io::IReadFile* file, const PsdHeader& hea
|
||||||
{
|
{
|
||||||
delete [] tmpData;
|
delete [] tmpData;
|
||||||
delete [] rleCount;
|
delete [] rleCount;
|
||||||
os::Printer::log("Error reading rle rows\n", file->getFileName(), ELL_ERROR);
|
os::Printer::log("Error reading rle rows", file->getFileName(), ELL_ERROR);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -263,7 +263,7 @@ bool CImageLoaderPSD::readRLEImageData(io::IReadFile* file, const PsdHeader& hea
|
||||||
delete [] rleCount;
|
delete [] rleCount;
|
||||||
delete [] buf;
|
delete [] buf;
|
||||||
delete [] tmpData;
|
delete [] tmpData;
|
||||||
os::Printer::log("Error reading rle rows\n", file->getFileName(), ELL_ERROR);
|
os::Printer::log("Error reading rle rows", file->getFileName(), ELL_ERROR);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -108,7 +108,7 @@ IImage* CImageLoaderTGA::loadImage(io::IReadFile* file) const
|
||||||
|
|
||||||
if (!IImage::checkDataSizeLimit((size_t)header.ImageWidth* header.ImageHeight * (header.PixelDepth/8)))
|
if (!IImage::checkDataSizeLimit((size_t)header.ImageWidth* header.ImageHeight * (header.PixelDepth/8)))
|
||||||
{
|
{
|
||||||
os::Printer::log("Image dimensions too large in file.", file->getFileName(), ELL_ERROR);
|
os::Printer::log("Image dimensions too large in file", file->getFileName(), ELL_ERROR);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -84,7 +84,7 @@ bool CImageWriterPNG::writeImage(io::IWriteFile* file, IImage* image,u32 param)
|
||||||
NULL, (png_error_ptr)png_cpexcept_error, (png_error_ptr)png_cpexcept_warning);
|
NULL, (png_error_ptr)png_cpexcept_error, (png_error_ptr)png_cpexcept_warning);
|
||||||
if (!png_ptr)
|
if (!png_ptr)
|
||||||
{
|
{
|
||||||
os::Printer::log("PNGWriter: Internal PNG create write struct failure\n", file->getFileName(), ELL_ERROR);
|
os::Printer::log("PNGWriter: Internal PNG create write struct failure", file->getFileName(), ELL_ERROR);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -92,7 +92,7 @@ bool CImageWriterPNG::writeImage(io::IWriteFile* file, IImage* image,u32 param)
|
||||||
png_infop info_ptr = png_create_info_struct(png_ptr);
|
png_infop info_ptr = png_create_info_struct(png_ptr);
|
||||||
if (!info_ptr)
|
if (!info_ptr)
|
||||||
{
|
{
|
||||||
os::Printer::log("PNGWriter: Internal PNG create info struct failure\n", file->getFileName(), ELL_ERROR);
|
os::Printer::log("PNGWriter: Internal PNG create info struct failure", file->getFileName(), ELL_ERROR);
|
||||||
png_destroy_write_struct(&png_ptr, NULL);
|
png_destroy_write_struct(&png_ptr, NULL);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
@ -141,7 +141,7 @@ bool CImageWriterPNG::writeImage(io::IWriteFile* file, IImage* image,u32 param)
|
||||||
u8* tmpImage = new u8[image->getDimension().Height*lineWidth];
|
u8* tmpImage = new u8[image->getDimension().Height*lineWidth];
|
||||||
if (!tmpImage)
|
if (!tmpImage)
|
||||||
{
|
{
|
||||||
os::Printer::log("PNGWriter: Internal PNG create image failure\n", file->getFileName(), ELL_ERROR);
|
os::Printer::log("PNGWriter: Internal PNG create image failure", file->getFileName(), ELL_ERROR);
|
||||||
png_destroy_write_struct(&png_ptr, &info_ptr);
|
png_destroy_write_struct(&png_ptr, &info_ptr);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
@ -175,7 +175,7 @@ bool CImageWriterPNG::writeImage(io::IWriteFile* file, IImage* image,u32 param)
|
||||||
u8** RowPointers = new png_bytep[image->getDimension().Height];
|
u8** RowPointers = new png_bytep[image->getDimension().Height];
|
||||||
if (!RowPointers)
|
if (!RowPointers)
|
||||||
{
|
{
|
||||||
os::Printer::log("PNGWriter: Internal PNG create row pointers failure\n", file->getFileName(), ELL_ERROR);
|
os::Printer::log("PNGWriter: Internal PNG create row pointers failure", file->getFileName(), ELL_ERROR);
|
||||||
png_destroy_write_struct(&png_ptr, &info_ptr);
|
png_destroy_write_struct(&png_ptr, &info_ptr);
|
||||||
delete [] tmpImage;
|
delete [] tmpImage;
|
||||||
return false;
|
return false;
|
||||||
|
|
|
@ -306,8 +306,8 @@ bool CIrrDeviceLinux::switchToFullscreen(bool reset)
|
||||||
if (bestMode != -1)
|
if (bestMode != -1)
|
||||||
{
|
{
|
||||||
os::Printer::log("Starting vidmode fullscreen mode...", ELL_INFORMATION);
|
os::Printer::log("Starting vidmode fullscreen mode...", ELL_INFORMATION);
|
||||||
os::Printer::log("hdisplay: ", core::stringc(modes[bestMode]->hdisplay).c_str(), ELL_INFORMATION);
|
os::Printer::log("hdisplay", core::stringc(modes[bestMode]->hdisplay).c_str(), ELL_INFORMATION);
|
||||||
os::Printer::log("vdisplay: ", core::stringc(modes[bestMode]->vdisplay).c_str(), ELL_INFORMATION);
|
os::Printer::log("vdisplay", core::stringc(modes[bestMode]->vdisplay).c_str(), ELL_INFORMATION);
|
||||||
|
|
||||||
XF86VidModeSwitchToMode(XDisplay, Screennr, modes[bestMode]);
|
XF86VidModeSwitchToMode(XDisplay, Screennr, modes[bestMode]);
|
||||||
XF86VidModeSetViewPort(XDisplay, Screennr, 0, 0);
|
XF86VidModeSetViewPort(XDisplay, Screennr, 0, 0);
|
||||||
|
@ -343,8 +343,8 @@ bool CIrrDeviceLinux::switchToFullscreen(bool reset)
|
||||||
if (bestMode != -1)
|
if (bestMode != -1)
|
||||||
{
|
{
|
||||||
os::Printer::log("Starting randr fullscreen mode...", ELL_INFORMATION);
|
os::Printer::log("Starting randr fullscreen mode...", ELL_INFORMATION);
|
||||||
os::Printer::log("width: ", core::stringc(modes[bestMode].width).c_str(), ELL_INFORMATION);
|
os::Printer::log("width", core::stringc(modes[bestMode].width).c_str(), ELL_INFORMATION);
|
||||||
os::Printer::log("height: ", core::stringc(modes[bestMode].height).c_str(), ELL_INFORMATION);
|
os::Printer::log("height", core::stringc(modes[bestMode].height).c_str(), ELL_INFORMATION);
|
||||||
|
|
||||||
XRRSetScreenConfig(XDisplay,config,DefaultRootWindow(XDisplay),bestMode,OldRandrRotation,CurrentTime);
|
XRRSetScreenConfig(XDisplay,config,DefaultRootWindow(XDisplay),bestMode,OldRandrRotation,CurrentTime);
|
||||||
UseXRandR=true;
|
UseXRandR=true;
|
||||||
|
@ -367,26 +367,26 @@ void IrrPrintXGrabError(int grabResult, const c8 * grabCommand )
|
||||||
{
|
{
|
||||||
if ( grabResult == GrabSuccess )
|
if ( grabResult == GrabSuccess )
|
||||||
{
|
{
|
||||||
// os::Printer::log(grabCommand, ": GrabSuccess", ELL_INFORMATION);
|
// os::Printer::log(grabCommand, "GrabSuccess", ELL_INFORMATION);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
switch ( grabResult )
|
switch ( grabResult )
|
||||||
{
|
{
|
||||||
case AlreadyGrabbed:
|
case AlreadyGrabbed:
|
||||||
os::Printer::log(grabCommand, ": AlreadyGrabbed", ELL_WARNING);
|
os::Printer::log(grabCommand, "AlreadyGrabbed", ELL_WARNING);
|
||||||
break;
|
break;
|
||||||
case GrabNotViewable:
|
case GrabNotViewable:
|
||||||
os::Printer::log(grabCommand, ": GrabNotViewable", ELL_WARNING);
|
os::Printer::log(grabCommand, "GrabNotViewable", ELL_WARNING);
|
||||||
break;
|
break;
|
||||||
case GrabFrozen:
|
case GrabFrozen:
|
||||||
os::Printer::log(grabCommand, ": GrabFrozen", ELL_WARNING);
|
os::Printer::log(grabCommand, "GrabFrozen", ELL_WARNING);
|
||||||
break;
|
break;
|
||||||
case GrabInvalidTime:
|
case GrabInvalidTime:
|
||||||
os::Printer::log(grabCommand, ": GrabInvalidTime", ELL_WARNING);
|
os::Printer::log(grabCommand, "GrabInvalidTime", ELL_WARNING);
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
os::Printer::log(grabCommand, ": grab failed with unknown problem", ELL_WARNING);
|
os::Printer::log(grabCommand, "grab failed with unknown problem", ELL_WARNING);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -455,7 +455,7 @@ bool CIrrDeviceLinux::createWindow()
|
||||||
}
|
}
|
||||||
#ifdef _DEBUG
|
#ifdef _DEBUG
|
||||||
else
|
else
|
||||||
os::Printer::log("Visual chosen: ", core::stringc(static_cast<u32>(VisualInfo->visualid)).c_str(), ELL_DEBUG);
|
os::Printer::log("Visual chosen", core::stringc(static_cast<u32>(VisualInfo->visualid)).c_str(), ELL_DEBUG);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// create color map
|
// create color map
|
||||||
|
@ -1945,7 +1945,7 @@ Bool PredicateIsEventType(Display *display, XEvent *event, XPointer arg)
|
||||||
{
|
{
|
||||||
if ( event && event->type == *(int*)arg )
|
if ( event && event->type == *(int*)arg )
|
||||||
{
|
{
|
||||||
// os::Printer::log("remove event:", core::stringc((int)arg).c_str(), ELL_INFORMATION);
|
// os::Printer::log("remove event", core::stringc((int)arg).c_str(), ELL_INFORMATION);
|
||||||
return True;
|
return True;
|
||||||
}
|
}
|
||||||
return False;
|
return False;
|
||||||
|
|
|
@ -69,7 +69,7 @@ CIrrDeviceSDL::CIrrDeviceSDL(const SIrrlichtCreationParameters& param)
|
||||||
#endif
|
#endif
|
||||||
SDL_INIT_NOPARACHUTE ) < 0)
|
SDL_INIT_NOPARACHUTE ) < 0)
|
||||||
{
|
{
|
||||||
os::Printer::log( "Unable to initialize SDL!", SDL_GetError());
|
os::Printer::log("Unable to initialize SDL!", SDL_GetError());
|
||||||
Close = true;
|
Close = true;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
@ -219,7 +219,7 @@ bool CIrrDeviceSDL::createWindow()
|
||||||
}
|
}
|
||||||
if ( !Screen )
|
if ( !Screen )
|
||||||
{
|
{
|
||||||
os::Printer::log( "Could not initialize display!" );
|
os::Printer::log("Could not initialize display!" );
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -458,7 +458,7 @@ void CIrrMeshFileLoader::skipSection(io::IXMLReader* reader, bool reportSkipping
|
||||||
{
|
{
|
||||||
#ifdef _DEBUG
|
#ifdef _DEBUG
|
||||||
if (reportSkipping)
|
if (reportSkipping)
|
||||||
os::Printer::log("irrMesh unknown element:", core::stringc(reader->getNodeName()).c_str());
|
os::Printer::log("irrMesh unknown element", core::stringc(reader->getNodeName()).c_str());
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
++tagCounter;
|
++tagCounter;
|
||||||
|
|
|
@ -1945,7 +1945,7 @@ void CLWOMeshFileLoader::readMat(u32 size)
|
||||||
default:
|
default:
|
||||||
{
|
{
|
||||||
#ifdef LWO_READER_DEBUG
|
#ifdef LWO_READER_DEBUG
|
||||||
os::Printer::log("LWO loader: skipping ", core::stringc((char*)&uiType, 4));
|
os::Printer::log("LWO loader: skipping", core::stringc((char*)&uiType, 4));
|
||||||
#endif
|
#endif
|
||||||
File->seek(subsize, true);
|
File->seek(subsize, true);
|
||||||
size -= subsize;
|
size -= subsize;
|
||||||
|
|
|
@ -199,7 +199,7 @@ bool CMD2MeshFileLoader::loadFile(io::IReadFile* file, CAnimatedMeshMD2* mesh)
|
||||||
if (!file->read(textureCoords, sizeof(SMD2TextureCoordinate)*header.numTexcoords))
|
if (!file->read(textureCoords, sizeof(SMD2TextureCoordinate)*header.numTexcoords))
|
||||||
{
|
{
|
||||||
delete[] textureCoords;
|
delete[] textureCoords;
|
||||||
os::Printer::log("MD2 Loader: Error reading TextureCoords.", file->getFileName(), ELL_ERROR);
|
os::Printer::log("MD2 Loader: Error reading TextureCoords", file->getFileName(), ELL_ERROR);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -221,7 +221,7 @@ bool CMD2MeshFileLoader::loadFile(io::IReadFile* file, CAnimatedMeshMD2* mesh)
|
||||||
delete[] triangles;
|
delete[] triangles;
|
||||||
delete[] textureCoords;
|
delete[] textureCoords;
|
||||||
|
|
||||||
os::Printer::log("MD2 Loader: Error reading triangles.", file->getFileName(), ELL_ERROR);
|
os::Printer::log("MD2 Loader: Error reading triangles", file->getFileName(), ELL_ERROR);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -242,7 +242,7 @@ bool CMS3DMeshFileLoader::load(io::IReadFile* file)
|
||||||
if (pPtr + ((sizeof(MS3DVertex) - MS3DVERTEX_NUM_PAD_BYTES) * numVertices) > buffer+fileSize)
|
if (pPtr + ((sizeof(MS3DVertex) - MS3DVERTEX_NUM_PAD_BYTES) * numVertices) > buffer+fileSize)
|
||||||
{
|
{
|
||||||
delete [] buffer;
|
delete [] buffer;
|
||||||
os::Printer::log("Loading failed. Corrupted data found.", file->getFileName(), ELL_ERROR);
|
os::Printer::log("Loading failed. Corrupted data found", file->getFileName(), ELL_ERROR);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
for (u16 tmp=0; tmp<numVertices; ++tmp)
|
for (u16 tmp=0; tmp<numVertices; ++tmp)
|
||||||
|
@ -273,7 +273,7 @@ bool CMS3DMeshFileLoader::load(io::IReadFile* file)
|
||||||
if (pPtr + ((sizeof(MS3DTriangle) - MS3DTRIANGLE_NUM_PAD_BYTES) * numTriangles) > buffer+fileSize)
|
if (pPtr + ((sizeof(MS3DTriangle) - MS3DTRIANGLE_NUM_PAD_BYTES) * numTriangles) > buffer+fileSize)
|
||||||
{
|
{
|
||||||
delete [] buffer;
|
delete [] buffer;
|
||||||
os::Printer::log("Loading failed. Corrupted data found.", file->getFileName(), ELL_ERROR);
|
os::Printer::log("Loading failed. Corrupted data found", file->getFileName(), ELL_ERROR);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
for (u16 tmp=0; tmp<numTriangles; ++tmp)
|
for (u16 tmp=0; tmp<numTriangles; ++tmp)
|
||||||
|
@ -349,7 +349,7 @@ bool CMS3DMeshFileLoader::load(io::IReadFile* file)
|
||||||
if (pPtr > buffer+fileSize)
|
if (pPtr > buffer+fileSize)
|
||||||
{
|
{
|
||||||
delete [] buffer;
|
delete [] buffer;
|
||||||
os::Printer::log("Loading failed. Corrupted data found.", file->getFileName(), ELL_ERROR);
|
os::Printer::log("Loading failed. Corrupted data found", file->getFileName(), ELL_ERROR);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -390,7 +390,7 @@ bool CMS3DMeshFileLoader::load(io::IReadFile* file)
|
||||||
if (pPtr > buffer+fileSize)
|
if (pPtr > buffer+fileSize)
|
||||||
{
|
{
|
||||||
delete [] buffer;
|
delete [] buffer;
|
||||||
os::Printer::log("Loading failed. Corrupted data found.", file->getFileName(), ELL_ERROR);
|
os::Printer::log("Loading failed. Corrupted data found", file->getFileName(), ELL_ERROR);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -452,7 +452,7 @@ bool CMS3DMeshFileLoader::load(io::IReadFile* file)
|
||||||
if (pPtr > buffer+fileSize)
|
if (pPtr > buffer+fileSize)
|
||||||
{
|
{
|
||||||
delete [] buffer;
|
delete [] buffer;
|
||||||
os::Printer::log("Loading failed. Corrupted data found.", file->getFileName(), ELL_ERROR);
|
os::Printer::log("Loading failed. Corrupted data found", file->getFileName(), ELL_ERROR);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -479,7 +479,7 @@ bool CMS3DMeshFileLoader::load(io::IReadFile* file)
|
||||||
if (pPtr > buffer+fileSize)
|
if (pPtr > buffer+fileSize)
|
||||||
{
|
{
|
||||||
delete [] buffer;
|
delete [] buffer;
|
||||||
os::Printer::log("Loading failed. Corrupted data found.", file->getFileName(), ELL_ERROR);
|
os::Printer::log("Loading failed. Corrupted data found", file->getFileName(), ELL_ERROR);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -529,7 +529,7 @@ bool CMS3DMeshFileLoader::load(io::IReadFile* file)
|
||||||
if (pPtr > buffer+fileSize)
|
if (pPtr > buffer+fileSize)
|
||||||
{
|
{
|
||||||
delete [] buffer;
|
delete [] buffer;
|
||||||
os::Printer::log("Loading failed. Corrupted data found.", file->getFileName(), ELL_ERROR);
|
os::Printer::log("Loading failed. Corrupted data found", file->getFileName(), ELL_ERROR);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -569,7 +569,7 @@ bool CMS3DMeshFileLoader::load(io::IReadFile* file)
|
||||||
if (pPtr > buffer+fileSize)
|
if (pPtr > buffer+fileSize)
|
||||||
{
|
{
|
||||||
delete [] buffer;
|
delete [] buffer;
|
||||||
os::Printer::log("Loading failed. Corrupted data found.", file->getFileName(), ELL_ERROR);
|
os::Printer::log("Loading failed. Corrupted data found", file->getFileName(), ELL_ERROR);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -625,7 +625,7 @@ bool CMS3DMeshFileLoader::load(io::IReadFile* file)
|
||||||
if (pPtr > buffer+fileSize)
|
if (pPtr > buffer+fileSize)
|
||||||
{
|
{
|
||||||
delete [] buffer;
|
delete [] buffer;
|
||||||
os::Printer::log("Loading failed. Corrupted data found.", file->getFileName(), ELL_ERROR);
|
os::Printer::log("Loading failed. Corrupted data found", file->getFileName(), ELL_ERROR);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -657,7 +657,7 @@ bool CMS3DMeshFileLoader::load(io::IReadFile* file)
|
||||||
if (pPtr > buffer+fileSize)
|
if (pPtr > buffer+fileSize)
|
||||||
{
|
{
|
||||||
delete [] buffer;
|
delete [] buffer;
|
||||||
os::Printer::log("Loading failed. Corrupted data found.", file->getFileName(), ELL_ERROR);
|
os::Printer::log("Loading failed. Corrupted data found", file->getFileName(), ELL_ERROR);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -250,7 +250,7 @@ IAnimatedMesh* COBJMeshFileLoader::createMesh(io::IReadFile* file)
|
||||||
v.Pos = vertexBuffer[Idx[0]];
|
v.Pos = vertexBuffer[Idx[0]];
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
os::Printer::log("Invalid vertex index in this line:", wordBuffer.c_str(), ELL_ERROR);
|
os::Printer::log("Invalid vertex index in this line", wordBuffer.c_str(), ELL_ERROR);
|
||||||
delete [] buf;
|
delete [] buf;
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
|
@ -112,7 +112,7 @@ bool CQ3LevelMesh::loadFile(io::IReadFile* file)
|
||||||
( header.strID != 0x50534252 || header.version != 1 ) // RBSP, starwars jedi, sof
|
( header.strID != 0x50534252 || header.version != 1 ) // RBSP, starwars jedi, sof
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
os::Printer::log("Could not load .bsp file, unknown header.", file->getFileName(), ELL_ERROR);
|
os::Printer::log("Could not load .bsp file, unknown header", file->getFileName(), ELL_ERROR);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -438,7 +438,7 @@ IAnimatedMesh* CSceneManager::getMesh(const io::path& filename, const io::path&
|
||||||
io::IReadFile* file = FileSystem->createAndOpenFile(filename);
|
io::IReadFile* file = FileSystem->createAndOpenFile(filename);
|
||||||
if (!file)
|
if (!file)
|
||||||
{
|
{
|
||||||
os::Printer::log("Could not load mesh, because file could not be opened: ", filename, ELL_ERROR);
|
os::Printer::log("Could not load mesh, because file could not be opened", filename, ELL_ERROR);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2377,7 +2377,7 @@ bool CSceneManager::loadScene(io::IReadFile* file, ISceneUserDataSerializer* use
|
||||||
ret = SceneLoaderList[i]->loadScene(file, userDataSerializer, rootNode);
|
ret = SceneLoaderList[i]->loadScene(file, userDataSerializer, rootNode);
|
||||||
|
|
||||||
if (!ret)
|
if (!ret)
|
||||||
os::Printer::log("Could not load scene file, perhaps the format is unsupported: ", file->getFileName().c_str(), ELL_ERROR);
|
os::Printer::log("Could not load scene file, perhaps the format is unsupported", file->getFileName().c_str(), ELL_ERROR);
|
||||||
|
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
|
@ -1104,27 +1104,27 @@ void CSkinnedMesh::finalize()
|
||||||
|
|
||||||
if ( redundantPosKeys > 0 )
|
if ( redundantPosKeys > 0 )
|
||||||
{
|
{
|
||||||
os::Printer::log("Skinned Mesh - redundant position frames kicked:", core::stringc(redundantPosKeys).c_str(), ELL_DEBUG);
|
os::Printer::log("Skinned Mesh - redundant position frames kicked", core::stringc(redundantPosKeys).c_str(), ELL_DEBUG);
|
||||||
}
|
}
|
||||||
if ( unorderedPosKeys > 0 )
|
if ( unorderedPosKeys > 0 )
|
||||||
{
|
{
|
||||||
irr::os::Printer::log("Skinned Mesh - unsorted position frames kicked:", irr::core::stringc(unorderedPosKeys).c_str(), irr::ELL_DEBUG);
|
irr::os::Printer::log("Skinned Mesh - unsorted position frames kicked", irr::core::stringc(unorderedPosKeys).c_str(), irr::ELL_DEBUG);
|
||||||
}
|
}
|
||||||
if ( redundantScaleKeys > 0 )
|
if ( redundantScaleKeys > 0 )
|
||||||
{
|
{
|
||||||
os::Printer::log("Skinned Mesh - redundant scale frames kicked:", core::stringc(redundantScaleKeys).c_str(), ELL_DEBUG);
|
os::Printer::log("Skinned Mesh - redundant scale frames kicked", core::stringc(redundantScaleKeys).c_str(), ELL_DEBUG);
|
||||||
}
|
}
|
||||||
if ( unorderedScaleKeys > 0 )
|
if ( unorderedScaleKeys > 0 )
|
||||||
{
|
{
|
||||||
irr::os::Printer::log("Skinned Mesh - unsorted scale frames kicked:", irr::core::stringc(unorderedScaleKeys).c_str(), irr::ELL_DEBUG);
|
irr::os::Printer::log("Skinned Mesh - unsorted scale frames kicked", irr::core::stringc(unorderedScaleKeys).c_str(), irr::ELL_DEBUG);
|
||||||
}
|
}
|
||||||
if ( redundantRotationKeys > 0 )
|
if ( redundantRotationKeys > 0 )
|
||||||
{
|
{
|
||||||
os::Printer::log("Skinned Mesh - redundant rotation frames kicked:", core::stringc(redundantRotationKeys).c_str(), ELL_DEBUG);
|
os::Printer::log("Skinned Mesh - redundant rotation frames kicked", core::stringc(redundantRotationKeys).c_str(), ELL_DEBUG);
|
||||||
}
|
}
|
||||||
if ( unorderedRotationKeys > 0 )
|
if ( unorderedRotationKeys > 0 )
|
||||||
{
|
{
|
||||||
irr::os::Printer::log("Skinned Mesh - unsorted rotation frames kicked:", irr::core::stringc(unorderedRotationKeys).c_str(), irr::ELL_DEBUG);
|
irr::os::Printer::log("Skinned Mesh - unsorted rotation frames kicked", irr::core::stringc(unorderedRotationKeys).c_str(), irr::ELL_DEBUG);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -265,7 +265,7 @@ namespace scene
|
||||||
{
|
{
|
||||||
if ((filesize-file->getPos())/bytesPerPixel>(size_t)(width*width))
|
if ((filesize-file->getPos())/bytesPerPixel>(size_t)(width*width))
|
||||||
{
|
{
|
||||||
os::Printer::log("Error reading heightmap RAW file", "File is too small.");
|
os::Printer::log("Error reading heightmap RAW file: File is too small.");
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
TerrainData.Size = width;
|
TerrainData.Size = width;
|
||||||
|
|
|
@ -463,7 +463,7 @@ bool CWGLManager::activateContext(const SExposedVideoData& videoData, bool resto
|
||||||
{
|
{
|
||||||
if (!wglMakeCurrent((HDC)PrimaryContext.OpenGLWin32.HDc, (HGLRC)PrimaryContext.OpenGLWin32.HRc))
|
if (!wglMakeCurrent((HDC)PrimaryContext.OpenGLWin32.HDc, (HGLRC)PrimaryContext.OpenGLWin32.HRc))
|
||||||
{
|
{
|
||||||
os::Printer::log("Render Context switch failed.");
|
os::Printer::log("Render Context switch (back to main) failed.");
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
CurrentContext=PrimaryContext;
|
CurrentContext=PrimaryContext;
|
||||||
|
|
|
@ -491,7 +491,7 @@ bool CXMeshFileLoader::parseDataObject()
|
||||||
|
|
||||||
// parse specific object
|
// parse specific object
|
||||||
#ifdef _XREADER_DEBUG
|
#ifdef _XREADER_DEBUG
|
||||||
os::Printer::log("debug DataObject:", objectName.c_str(), ELL_DEBUG);
|
os::Printer::log("debug DataObject", objectName.c_str(), ELL_DEBUG);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
if (objectName == "template")
|
if (objectName == "template")
|
||||||
|
@ -848,7 +848,7 @@ bool CXMeshFileLoader::parseDataObjectMesh(SXMesh &mesh)
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef _XREADER_DEBUG
|
#ifdef _XREADER_DEBUG
|
||||||
os::Printer::log("debug DataObject in mesh:", objectName.c_str(), ELL_DEBUG);
|
os::Printer::log("debug DataObject in mesh", objectName.c_str(), ELL_DEBUG);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
if (objectName == "MeshNormals")
|
if (objectName == "MeshNormals")
|
||||||
|
|
|
@ -37,6 +37,8 @@ namespace os
|
||||||
static void print(const c8* message);
|
static void print(const c8* message);
|
||||||
static void log(const c8* message, ELOG_LEVEL ll = ELL_INFORMATION);
|
static void log(const c8* message, ELOG_LEVEL ll = ELL_INFORMATION);
|
||||||
static void log(const wchar_t* message, ELOG_LEVEL ll = ELL_INFORMATION);
|
static void log(const wchar_t* message, ELOG_LEVEL ll = ELL_INFORMATION);
|
||||||
|
|
||||||
|
// The string ": " is added between message and hint
|
||||||
static void log(const c8* message, const c8* hint, ELOG_LEVEL ll = ELL_INFORMATION);
|
static void log(const c8* message, const c8* hint, ELOG_LEVEL ll = ELL_INFORMATION);
|
||||||
static void log(const c8* message, const io::path& hint, ELOG_LEVEL ll = ELL_INFORMATION);
|
static void log(const c8* message, const io::path& hint, ELOG_LEVEL ll = ELL_INFORMATION);
|
||||||
static ILogger* Logger;
|
static ILogger* Logger;
|
||||||
|
|
Loading…
Reference in New Issue
Block a user