diff --git a/source/Irrlicht/CColladaMeshWriter.cpp b/source/Irrlicht/CColladaMeshWriter.cpp index c9805d5..496b15a 100644 --- a/source/Irrlicht/CColladaMeshWriter.cpp +++ b/source/Irrlicht/CColladaMeshWriter.cpp @@ -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; } diff --git a/source/Irrlicht/CD3D9Driver.cpp b/source/Irrlicht/CD3D9Driver.cpp index cf8769b..97596ee 100644 --- a/source/Irrlicht/CD3D9Driver.cpp +++ b/source/Irrlicht/CD3D9Driver.cpp @@ -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; } diff --git a/source/Irrlicht/CGUIEnvironment.cpp b/source/Irrlicht/CGUIEnvironment.cpp index 5d2a5f0..2ab30e7 100644 --- a/source/Irrlicht/CGUIEnvironment.cpp +++ b/source/Irrlicht/CGUIEnvironment.cpp @@ -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; } diff --git a/source/Irrlicht/CImageLoaderJPG.cpp b/source/Irrlicht/CImageLoaderJPG.cpp index 0cd6a35..48c8997 100644 --- a/source/Irrlicht/CImageLoaderJPG.cpp +++ b/source/Irrlicht/CImageLoaderJPG.cpp @@ -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 diff --git a/source/Irrlicht/CImageLoaderPNG.cpp b/source/Irrlicht/CImageLoaderPNG.cpp index 02beb80..076871f 100644 --- a/source/Irrlicht/CImageLoaderPNG.cpp +++ b/source/Irrlicht/CImageLoaderPNG.cpp @@ -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; diff --git a/source/Irrlicht/CImageLoaderPSD.cpp b/source/Irrlicht/CImageLoaderPSD.cpp index 3eb5c3b..00aadd6 100644 --- a/source/Irrlicht/CImageLoaderPSD.cpp +++ b/source/Irrlicht/CImageLoaderPSD.cpp @@ -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; } diff --git a/source/Irrlicht/CImageLoaderTGA.cpp b/source/Irrlicht/CImageLoaderTGA.cpp index 667f40d..8d91bd0 100644 --- a/source/Irrlicht/CImageLoaderTGA.cpp +++ b/source/Irrlicht/CImageLoaderTGA.cpp @@ -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; } diff --git a/source/Irrlicht/CImageWriterPNG.cpp b/source/Irrlicht/CImageWriterPNG.cpp index 3da4345..c08100f 100644 --- a/source/Irrlicht/CImageWriterPNG.cpp +++ b/source/Irrlicht/CImageWriterPNG.cpp @@ -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; diff --git a/source/Irrlicht/CIrrDeviceLinux.cpp b/source/Irrlicht/CIrrDeviceLinux.cpp index 1abd32c..4605793 100644 --- a/source/Irrlicht/CIrrDeviceLinux.cpp +++ b/source/Irrlicht/CIrrDeviceLinux.cpp @@ -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(VisualInfo->visualid)).c_str(), ELL_DEBUG); + os::Printer::log("Visual chosen", core::stringc(static_cast(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; diff --git a/source/Irrlicht/CIrrDeviceSDL.cpp b/source/Irrlicht/CIrrDeviceSDL.cpp index f883bc2..0a0f371 100644 --- a/source/Irrlicht/CIrrDeviceSDL.cpp +++ b/source/Irrlicht/CIrrDeviceSDL.cpp @@ -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; } diff --git a/source/Irrlicht/CIrrMeshFileLoader.cpp b/source/Irrlicht/CIrrMeshFileLoader.cpp index e24d7a5..84754ea 100644 --- a/source/Irrlicht/CIrrMeshFileLoader.cpp +++ b/source/Irrlicht/CIrrMeshFileLoader.cpp @@ -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; diff --git a/source/Irrlicht/CLWOMeshFileLoader.cpp b/source/Irrlicht/CLWOMeshFileLoader.cpp index ce15844..d30a6eb 100644 --- a/source/Irrlicht/CLWOMeshFileLoader.cpp +++ b/source/Irrlicht/CLWOMeshFileLoader.cpp @@ -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; diff --git a/source/Irrlicht/CMD2MeshFileLoader.cpp b/source/Irrlicht/CMD2MeshFileLoader.cpp index 5aa16c8..78136e7 100644 --- a/source/Irrlicht/CMD2MeshFileLoader.cpp +++ b/source/Irrlicht/CMD2MeshFileLoader.cpp @@ -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; } diff --git a/source/Irrlicht/CMS3DMeshFileLoader.cpp b/source/Irrlicht/CMS3DMeshFileLoader.cpp index 4ad18aa..77ef21c 100644 --- a/source/Irrlicht/CMS3DMeshFileLoader.cpp +++ b/source/Irrlicht/CMS3DMeshFileLoader.cpp @@ -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 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 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; } } diff --git a/source/Irrlicht/COBJMeshFileLoader.cpp b/source/Irrlicht/COBJMeshFileLoader.cpp index 9fe99b0..dfca89a 100644 --- a/source/Irrlicht/COBJMeshFileLoader.cpp +++ b/source/Irrlicht/COBJMeshFileLoader.cpp @@ -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; } diff --git a/source/Irrlicht/CQ3LevelMesh.cpp b/source/Irrlicht/CQ3LevelMesh.cpp index b2f9060..53b1dff 100644 --- a/source/Irrlicht/CQ3LevelMesh.cpp +++ b/source/Irrlicht/CQ3LevelMesh.cpp @@ -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; } diff --git a/source/Irrlicht/CSceneManager.cpp b/source/Irrlicht/CSceneManager.cpp index 4302cfa..42bf9b5 100644 --- a/source/Irrlicht/CSceneManager.cpp +++ b/source/Irrlicht/CSceneManager.cpp @@ -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; } diff --git a/source/Irrlicht/CSkinnedMesh.cpp b/source/Irrlicht/CSkinnedMesh.cpp index bc94759..d53bf1b 100644 --- a/source/Irrlicht/CSkinnedMesh.cpp +++ b/source/Irrlicht/CSkinnedMesh.cpp @@ -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); } } diff --git a/source/Irrlicht/CTerrainSceneNode.cpp b/source/Irrlicht/CTerrainSceneNode.cpp index 395a45d..0dbb96a 100644 --- a/source/Irrlicht/CTerrainSceneNode.cpp +++ b/source/Irrlicht/CTerrainSceneNode.cpp @@ -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; diff --git a/source/Irrlicht/CWGLManager.cpp b/source/Irrlicht/CWGLManager.cpp index da9fb1a..1368c3d 100644 --- a/source/Irrlicht/CWGLManager.cpp +++ b/source/Irrlicht/CWGLManager.cpp @@ -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; diff --git a/source/Irrlicht/CXMeshFileLoader.cpp b/source/Irrlicht/CXMeshFileLoader.cpp index 4678c85..db72b21 100644 --- a/source/Irrlicht/CXMeshFileLoader.cpp +++ b/source/Irrlicht/CXMeshFileLoader.cpp @@ -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") diff --git a/source/Irrlicht/os.h b/source/Irrlicht/os.h index 8d1c9ec..a8d3ab2 100644 --- a/source/Irrlicht/os.h +++ b/source/Irrlicht/os.h @@ -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;