mirror of
https://github.com/minetest/irrlicht.git
synced 2024-11-05 18:00:41 +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 )
|
||||
{
|
||||
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;
|
||||
}
|
||||
|
||||
|
|
|
@ -3000,7 +3000,7 @@ bool CD3D9Driver::reset()
|
|||
}
|
||||
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;
|
||||
}
|
||||
|
|
|
@ -810,7 +810,7 @@ bool CGUIEnvironment::loadGUI(const io::path& filename, IGUIElement* parent)
|
|||
io::IReadFile* read = FileSystem->createAndOpenFile(filename);
|
||||
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;
|
||||
}
|
||||
|
||||
|
|
|
@ -137,7 +137,7 @@ bool CImageLoaderJPG::isALoadableFileFormat(io::IReadFile* file) const
|
|||
IImage* CImageLoaderJPG::loadImage(io::IReadFile* file) const
|
||||
{
|
||||
#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;
|
||||
#else
|
||||
|
||||
|
|
|
@ -99,14 +99,14 @@ IImage* CImageLoaderPng::loadImage(io::IReadFile* file) const
|
|||
// Read the first few bytes of the PNG file
|
||||
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;
|
||||
}
|
||||
|
||||
// Check if it really is a PNG file
|
||||
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;
|
||||
}
|
||||
|
||||
|
@ -115,7 +115,7 @@ IImage* CImageLoaderPng::loadImage(io::IReadFile* file) const
|
|||
NULL, (png_error_ptr)png_cpexcept_error, (png_error_ptr)png_cpexcept_warn);
|
||||
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;
|
||||
}
|
||||
|
||||
|
@ -123,7 +123,7 @@ IImage* CImageLoaderPng::loadImage(io::IReadFile* file) const
|
|||
png_infop info_ptr = png_create_info_struct(png_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);
|
||||
return 0;
|
||||
}
|
||||
|
@ -229,7 +229,7 @@ IImage* CImageLoaderPng::loadImage(io::IReadFile* file) const
|
|||
video::IImage* image = new CImage(colorFormat, core::dimension2du(Width, Height));
|
||||
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);
|
||||
return 0;
|
||||
}
|
||||
|
@ -238,7 +238,7 @@ IImage* CImageLoaderPng::loadImage(io::IReadFile* file) const
|
|||
RowPointers = new png_bytep[Height];
|
||||
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);
|
||||
delete image;
|
||||
return 0;
|
||||
|
|
|
@ -80,7 +80,7 @@ IImage* CImageLoaderPSD::loadImage(io::IReadFile* file) const
|
|||
|
||||
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;
|
||||
}
|
||||
|
||||
|
@ -93,7 +93,7 @@ IImage* CImageLoaderPSD::loadImage(io::IReadFile* file) const
|
|||
#endif
|
||||
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;
|
||||
}
|
||||
|
||||
|
@ -105,7 +105,7 @@ IImage* CImageLoaderPSD::loadImage(io::IReadFile* file) const
|
|||
#endif
|
||||
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;
|
||||
}
|
||||
|
||||
|
@ -117,7 +117,7 @@ IImage* CImageLoaderPSD::loadImage(io::IReadFile* file) const
|
|||
#endif
|
||||
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;
|
||||
}
|
||||
|
||||
|
@ -131,7 +131,7 @@ IImage* CImageLoaderPSD::loadImage(io::IReadFile* file) const
|
|||
|
||||
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;
|
||||
}
|
||||
|
||||
|
@ -171,7 +171,7 @@ bool CImageLoaderPSD::readRawImageData(io::IReadFile* file, const PsdHeader& hea
|
|||
{
|
||||
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;
|
||||
}
|
||||
|
||||
|
@ -247,7 +247,7 @@ bool CImageLoaderPSD::readRLEImageData(io::IReadFile* file, const PsdHeader& hea
|
|||
{
|
||||
delete [] tmpData;
|
||||
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;
|
||||
}
|
||||
|
||||
|
@ -263,7 +263,7 @@ bool CImageLoaderPSD::readRLEImageData(io::IReadFile* file, const PsdHeader& hea
|
|||
delete [] rleCount;
|
||||
delete [] buf;
|
||||
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;
|
||||
}
|
||||
|
||||
|
|
|
@ -108,7 +108,7 @@ IImage* CImageLoaderTGA::loadImage(io::IReadFile* file) const
|
|||
|
||||
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;
|
||||
}
|
||||
|
||||
|
|
|
@ -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);
|
||||
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;
|
||||
}
|
||||
|
||||
|
@ -92,7 +92,7 @@ bool CImageWriterPNG::writeImage(io::IWriteFile* file, IImage* image,u32 param)
|
|||
png_infop info_ptr = png_create_info_struct(png_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);
|
||||
return false;
|
||||
}
|
||||
|
@ -141,7 +141,7 @@ bool CImageWriterPNG::writeImage(io::IWriteFile* file, IImage* image,u32 param)
|
|||
u8* tmpImage = new u8[image->getDimension().Height*lineWidth];
|
||||
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);
|
||||
return false;
|
||||
}
|
||||
|
@ -175,7 +175,7 @@ bool CImageWriterPNG::writeImage(io::IWriteFile* file, IImage* image,u32 param)
|
|||
u8** RowPointers = new png_bytep[image->getDimension().Height];
|
||||
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);
|
||||
delete [] tmpImage;
|
||||
return false;
|
||||
|
|
|
@ -306,8 +306,8 @@ bool CIrrDeviceLinux::switchToFullscreen(bool reset)
|
|||
if (bestMode != -1)
|
||||
{
|
||||
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("vdisplay: ", core::stringc(modes[bestMode]->vdisplay).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);
|
||||
|
||||
XF86VidModeSwitchToMode(XDisplay, Screennr, modes[bestMode]);
|
||||
XF86VidModeSetViewPort(XDisplay, Screennr, 0, 0);
|
||||
|
@ -343,8 +343,8 @@ bool CIrrDeviceLinux::switchToFullscreen(bool reset)
|
|||
if (bestMode != -1)
|
||||
{
|
||||
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("height: ", core::stringc(modes[bestMode].height).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);
|
||||
|
||||
XRRSetScreenConfig(XDisplay,config,DefaultRootWindow(XDisplay),bestMode,OldRandrRotation,CurrentTime);
|
||||
UseXRandR=true;
|
||||
|
@ -367,26 +367,26 @@ void IrrPrintXGrabError(int grabResult, const c8 * grabCommand )
|
|||
{
|
||||
if ( grabResult == GrabSuccess )
|
||||
{
|
||||
// os::Printer::log(grabCommand, ": GrabSuccess", ELL_INFORMATION);
|
||||
// os::Printer::log(grabCommand, "GrabSuccess", ELL_INFORMATION);
|
||||
return;
|
||||
}
|
||||
|
||||
switch ( grabResult )
|
||||
{
|
||||
case AlreadyGrabbed:
|
||||
os::Printer::log(grabCommand, ": AlreadyGrabbed", ELL_WARNING);
|
||||
os::Printer::log(grabCommand, "AlreadyGrabbed", ELL_WARNING);
|
||||
break;
|
||||
case GrabNotViewable:
|
||||
os::Printer::log(grabCommand, ": GrabNotViewable", ELL_WARNING);
|
||||
os::Printer::log(grabCommand, "GrabNotViewable", ELL_WARNING);
|
||||
break;
|
||||
case GrabFrozen:
|
||||
os::Printer::log(grabCommand, ": GrabFrozen", ELL_WARNING);
|
||||
os::Printer::log(grabCommand, "GrabFrozen", ELL_WARNING);
|
||||
break;
|
||||
case GrabInvalidTime:
|
||||
os::Printer::log(grabCommand, ": GrabInvalidTime", ELL_WARNING);
|
||||
os::Printer::log(grabCommand, "GrabInvalidTime", ELL_WARNING);
|
||||
break;
|
||||
default:
|
||||
os::Printer::log(grabCommand, ": grab failed with unknown problem", ELL_WARNING);
|
||||
os::Printer::log(grabCommand, "grab failed with unknown problem", ELL_WARNING);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
@ -455,7 +455,7 @@ bool CIrrDeviceLinux::createWindow()
|
|||
}
|
||||
#ifdef _DEBUG
|
||||
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
|
||||
|
||||
// create color map
|
||||
|
@ -1945,7 +1945,7 @@ Bool PredicateIsEventType(Display *display, XEvent *event, XPointer 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 False;
|
||||
|
|
|
@ -69,7 +69,7 @@ CIrrDeviceSDL::CIrrDeviceSDL(const SIrrlichtCreationParameters& param)
|
|||
#endif
|
||||
SDL_INIT_NOPARACHUTE ) < 0)
|
||||
{
|
||||
os::Printer::log( "Unable to initialize SDL!", SDL_GetError());
|
||||
os::Printer::log("Unable to initialize SDL!", SDL_GetError());
|
||||
Close = true;
|
||||
}
|
||||
else
|
||||
|
@ -219,7 +219,7 @@ bool CIrrDeviceSDL::createWindow()
|
|||
}
|
||||
if ( !Screen )
|
||||
{
|
||||
os::Printer::log( "Could not initialize display!" );
|
||||
os::Printer::log("Could not initialize display!" );
|
||||
return false;
|
||||
}
|
||||
|
||||
|
|
|
@ -458,7 +458,7 @@ void CIrrMeshFileLoader::skipSection(io::IXMLReader* reader, bool reportSkipping
|
|||
{
|
||||
#ifdef _DEBUG
|
||||
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
|
||||
|
||||
++tagCounter;
|
||||
|
|
|
@ -1945,7 +1945,7 @@ void CLWOMeshFileLoader::readMat(u32 size)
|
|||
default:
|
||||
{
|
||||
#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
|
||||
File->seek(subsize, true);
|
||||
size -= subsize;
|
||||
|
|
|
@ -199,7 +199,7 @@ bool CMD2MeshFileLoader::loadFile(io::IReadFile* file, CAnimatedMeshMD2* mesh)
|
|||
if (!file->read(textureCoords, sizeof(SMD2TextureCoordinate)*header.numTexcoords))
|
||||
{
|
||||
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;
|
||||
}
|
||||
|
||||
|
@ -221,7 +221,7 @@ bool CMD2MeshFileLoader::loadFile(io::IReadFile* file, CAnimatedMeshMD2* mesh)
|
|||
delete[] triangles;
|
||||
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;
|
||||
}
|
||||
|
||||
|
|
|
@ -242,7 +242,7 @@ bool CMS3DMeshFileLoader::load(io::IReadFile* file)
|
|||
if (pPtr + ((sizeof(MS3DVertex) - MS3DVERTEX_NUM_PAD_BYTES) * numVertices) > buffer+fileSize)
|
||||
{
|
||||
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;
|
||||
}
|
||||
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)
|
||||
{
|
||||
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;
|
||||
}
|
||||
for (u16 tmp=0; tmp<numTriangles; ++tmp)
|
||||
|
@ -349,7 +349,7 @@ bool CMS3DMeshFileLoader::load(io::IReadFile* file)
|
|||
if (pPtr > buffer+fileSize)
|
||||
{
|
||||
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;
|
||||
}
|
||||
}
|
||||
|
@ -390,7 +390,7 @@ bool CMS3DMeshFileLoader::load(io::IReadFile* file)
|
|||
if (pPtr > buffer+fileSize)
|
||||
{
|
||||
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;
|
||||
}
|
||||
|
||||
|
@ -452,7 +452,7 @@ bool CMS3DMeshFileLoader::load(io::IReadFile* file)
|
|||
if (pPtr > buffer+fileSize)
|
||||
{
|
||||
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;
|
||||
}
|
||||
|
||||
|
@ -479,7 +479,7 @@ bool CMS3DMeshFileLoader::load(io::IReadFile* file)
|
|||
if (pPtr > buffer+fileSize)
|
||||
{
|
||||
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;
|
||||
}
|
||||
|
||||
|
@ -529,7 +529,7 @@ bool CMS3DMeshFileLoader::load(io::IReadFile* file)
|
|||
if (pPtr > buffer+fileSize)
|
||||
{
|
||||
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;
|
||||
}
|
||||
|
||||
|
@ -569,7 +569,7 @@ bool CMS3DMeshFileLoader::load(io::IReadFile* file)
|
|||
if (pPtr > buffer+fileSize)
|
||||
{
|
||||
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;
|
||||
}
|
||||
|
||||
|
@ -625,7 +625,7 @@ bool CMS3DMeshFileLoader::load(io::IReadFile* file)
|
|||
if (pPtr > buffer+fileSize)
|
||||
{
|
||||
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;
|
||||
}
|
||||
}
|
||||
|
@ -657,7 +657,7 @@ bool CMS3DMeshFileLoader::load(io::IReadFile* file)
|
|||
if (pPtr > buffer+fileSize)
|
||||
{
|
||||
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;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -250,7 +250,7 @@ IAnimatedMesh* COBJMeshFileLoader::createMesh(io::IReadFile* file)
|
|||
v.Pos = vertexBuffer[Idx[0]];
|
||||
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;
|
||||
return 0;
|
||||
}
|
||||
|
|
|
@ -112,7 +112,7 @@ bool CQ3LevelMesh::loadFile(io::IReadFile* file)
|
|||
( 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;
|
||||
}
|
||||
|
||||
|
|
|
@ -438,7 +438,7 @@ IAnimatedMesh* CSceneManager::getMesh(const io::path& filename, const io::path&
|
|||
io::IReadFile* file = FileSystem->createAndOpenFile(filename);
|
||||
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;
|
||||
}
|
||||
|
||||
|
@ -2377,7 +2377,7 @@ bool CSceneManager::loadScene(io::IReadFile* file, ISceneUserDataSerializer* use
|
|||
ret = SceneLoaderList[i]->loadScene(file, userDataSerializer, rootNode);
|
||||
|
||||
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;
|
||||
}
|
||||
|
|
|
@ -1104,27 +1104,27 @@ void CSkinnedMesh::finalize()
|
|||
|
||||
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 )
|
||||
{
|
||||
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 )
|
||||
{
|
||||
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 )
|
||||
{
|
||||
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 )
|
||||
{
|
||||
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 )
|
||||
{
|
||||
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))
|
||||
{
|
||||
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;
|
||||
}
|
||||
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))
|
||||
{
|
||||
os::Printer::log("Render Context switch failed.");
|
||||
os::Printer::log("Render Context switch (back to main) failed.");
|
||||
return false;
|
||||
}
|
||||
CurrentContext=PrimaryContext;
|
||||
|
|
|
@ -491,7 +491,7 @@ bool CXMeshFileLoader::parseDataObject()
|
|||
|
||||
// parse specific object
|
||||
#ifdef _XREADER_DEBUG
|
||||
os::Printer::log("debug DataObject:", objectName.c_str(), ELL_DEBUG);
|
||||
os::Printer::log("debug DataObject", objectName.c_str(), ELL_DEBUG);
|
||||
#endif
|
||||
|
||||
if (objectName == "template")
|
||||
|
@ -848,7 +848,7 @@ bool CXMeshFileLoader::parseDataObjectMesh(SXMesh &mesh)
|
|||
}
|
||||
|
||||
#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
|
||||
|
||||
if (objectName == "MeshNormals")
|
||||
|
|
|
@ -37,6 +37,8 @@ namespace os
|
|||
static void print(const c8* message);
|
||||
static void log(const c8* 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 io::path& hint, ELOG_LEVEL ll = ELL_INFORMATION);
|
||||
static ILogger* Logger;
|
||||
|
|
Loading…
Reference in New Issue
Block a user