diff --git a/contrib/ufoaiplug/ufoai_filters.cpp b/contrib/ufoaiplug/ufoai_filters.cpp index 84a96652..00903076 100644 --- a/contrib/ufoaiplug/ufoai_filters.cpp +++ b/contrib/ufoaiplug/ufoai_filters.cpp @@ -78,7 +78,7 @@ bool pre( const scene::Path& path, scene::Instance& instance ) const { } else { - globalOutputStream() << "UFO:AI: Warning: no spawnflags for " << m_name << ".\n"; + globalWarningStream() << "UFO:AI: Warning: no spawnflags for " << m_name << ".\n"; } } } diff --git a/libs/stringio.h b/libs/stringio.h index 022706bb..c7a99d25 100644 --- a/libs/stringio.h +++ b/libs/stringio.h @@ -232,9 +232,9 @@ inline bool Tokeniser_getFloat( Tokeniser& tokeniser, float& f ){ if ( token != 0 && string_parse_float( token, f ) ) { return true; } - //fallback for 1.#IND 1.#INF 1.#QNAN cases, happening sometimes after rotating & often scaling with tex lock in BP mode + //fallback for 1.#IND 1.#INF 1.#QNAN cases, happening sometimes after texture locking algorithms else if ( token != 0 && strstr( token, ".#" ) ) { - globalErrorStream() << "Warning: " << Unsigned( tokeniser.getLine() ) << ":" << Unsigned( tokeniser.getColumn() ) << ": expected parse problem at '" << token << "': wanted '#number'\nProcessing anyway\n"; + globalWarningStream() << "Warning: " << Unsigned( tokeniser.getLine() ) << ":" << Unsigned( tokeniser.getColumn() ) << ": expected parse problem at '" << token << "': wanted '#number'\nProcessing anyway\n"; // *strstr( token, ".#" ) = '\0'; return true; } diff --git a/libs/xml/xmlparser.h b/libs/xml/xmlparser.h index 1c1bdb01..c30d0a26 100644 --- a/libs/xml/xmlparser.h +++ b/libs/xml/xmlparser.h @@ -129,7 +129,7 @@ static void characters( void *user_data, const xmlChar *ch, int len ){ static void warning( void *user_data, const char *msg, ... ){ va_list args; va_start( args, msg ); - globalErrorStream() << "XML WARNING: " << FormattedVA( msg, args ); + globalWarningStream() << "XML WARNING: " << FormattedVA( msg, args ); va_end( args ); } static void error( void *user_data, const char *msg, ... ){ diff --git a/plugins/archivepak/archive.cpp b/plugins/archivepak/archive.cpp index 785c2dda..60ea4247 100644 --- a/plugins/archivepak/archive.cpp +++ b/plugins/archivepak/archive.cpp @@ -92,7 +92,7 @@ PakArchive( const char* name ) PakFileSystem::entry_type& file = m_filesystem[entry.filename]; if ( !file.is_directory() ) { - globalOutputStream() << "Warning: pak archive " << makeQuoted( m_name.c_str() ) << " contains duplicated file: " << makeQuoted( entry.filename ) << "\n"; + globalWarningStream() << "Warning: pak archive " << makeQuoted( m_name.c_str() ) << " contains duplicated file: " << makeQuoted( entry.filename ) << "\n"; } else { diff --git a/plugins/archivezip/archive.cpp b/plugins/archivezip/archive.cpp index a8616e62..8b6fc07e 100644 --- a/plugins/archivezip/archive.cpp +++ b/plugins/archivezip/archive.cpp @@ -161,7 +161,7 @@ bool read_record(){ { ZipFileSystem::entry_type& file = m_filesystem[filename.data()]; if ( !file.is_directory() ) { - globalOutputStream() << "Warning: zip archive " << makeQuoted( m_name.c_str() ) << " contains duplicated file: " << makeQuoted( filename.data() ) << "\n"; + globalWarningStream() << "Warning: zip archive " << makeQuoted( m_name.c_str() ) << " contains duplicated file: " << makeQuoted( filename.data() ) << "\n"; } else { diff --git a/plugins/image/jpeg.cpp b/plugins/image/jpeg.cpp index 138151a2..2ca5a380 100644 --- a/plugins/image/jpeg.cpp +++ b/plugins/image/jpeg.cpp @@ -356,7 +356,7 @@ static Image* LoadJPGBuff_( const void *src_buffer, int src_size ){ jerr.pub.error_exit = my_jpeg_error_exit; if ( setjmp( jerr.setjmp_buffer ) ) { //< TODO: use c++ exceptions instead of setjmp/longjmp to handle errors - globalErrorStream() << "WARNING: JPEG library error: " << errormsg << "\n"; + globalWarningStream() << "WARNING: JPEG library error: " << errormsg << "\n"; jpeg_destroy_decompress( &cinfo ); return 0; } diff --git a/plugins/imagehl/sprite.cpp b/plugins/imagehl/sprite.cpp index 6e469562..b5fba04e 100644 --- a/plugins/imagehl/sprite.cpp +++ b/plugins/imagehl/sprite.cpp @@ -120,13 +120,13 @@ Image* LoadIDSPBuff( byte *buffer ){ header = (dspriteheader_t *)buffer; if ( header->ident != IDSPRITEHEADER ) { - globalErrorStream() << "WARNING: IDSP file has wrong header\n"; + globalWarningStream() << "WARNING: IDSP file has wrong header\n"; return 0; } version = header->version; if ( version != 1 && version != 2 ) { - globalErrorStream() << "WARNING: IDSP file has wrong version number " + globalWarningStream() << "WARNING: IDSP file has wrong version number " "(" << version << " should be 1 or 2)\n"; return 0; } @@ -149,11 +149,11 @@ Image* LoadIDSPBuff( byte *buffer ){ pframetype = (dspriteframetype_t *)( pinv2 + 1 ); break; default: - globalErrorStream() << "WARNING: IDSP file has unsupported version\n"; + globalWarningStream() << "WARNING: IDSP file has unsupported version\n"; return 0; } if ( numframes > 1 ) { - globalErrorStream() << "WARNING: IDSP file has multiple frames, only the first frame will be used.\n"; + globalWarningStream() << "WARNING: IDSP file has multiple frames, only the first frame will be used.\n"; } // palette = buffer+mipdatasize+2; diff --git a/plugins/imagepng/plugin.cpp b/plugins/imagepng/plugin.cpp index bf087416..2a529ae9 100644 --- a/plugins/imagepng/plugin.cpp +++ b/plugins/imagepng/plugin.cpp @@ -34,7 +34,7 @@ #include void user_warning_fn( png_structp png_ptr, png_const_charp warning_msg ){ - globalErrorStream() << "libpng warning: " << warning_msg << "\n"; + globalWarningStream() << "libpng warning: " << warning_msg << "\n"; } void user_error_fn( png_structp png_ptr, png_const_charp error_msg ){ diff --git a/plugins/mapq3/plugin.cpp b/plugins/mapq3/plugin.cpp index c7cc6911..e585fbdf 100644 --- a/plugins/mapq3/plugin.cpp +++ b/plugins/mapq3/plugin.cpp @@ -252,15 +252,15 @@ scene::Node& parsePrimitive( Tokeniser& tokeniser ) const { EBrushType detectedFormat; if ( string_equal( primitive, "brushDef" ) ) { detectedFormat = eBrushTypeQuake3BP; - globalErrorStream() << "detectedFormat = eBrushTypeQuake3BP\n"; + globalWarningStream() << "detectedFormat = eBrushTypeQuake3BP\n"; } else if ( string_equal( primitive, "(" ) && tokeniser.bufferContains( " [ " ) && tokeniser.bufferContains( " ] " ) ) { detectedFormat = eBrushTypeQuake3Valve220; - globalErrorStream() << "detectedFormat = eBrushTypeQuake3Valve220\n"; + globalWarningStream() << "detectedFormat = eBrushTypeQuake3Valve220\n"; } else if ( string_equal( primitive, "(" ) ) { detectedFormat = eBrushTypeQuake3; - globalErrorStream() << "detectedFormat = eBrushTypeQuake3\n"; + globalWarningStream() << "detectedFormat = eBrushTypeQuake3\n"; } else{ globalErrorStream() << "Format is not detected\n"; @@ -329,15 +329,15 @@ scene::Node& parsePrimitive( Tokeniser& tokeniser ) const { EBrushType detectedFormat; if ( string_equal( primitive, "brushDef" ) ) { detectedFormat = eBrushTypeQuake3BP; - globalErrorStream() << "detectedFormat = eBrushTypeQuake3BP\n"; + globalWarningStream() << "detectedFormat = eBrushTypeQuake3BP\n"; } else if ( string_equal( primitive, "(" ) && tokeniser.bufferContains( " [ " ) && tokeniser.bufferContains( " ] " ) ) { detectedFormat = eBrushTypeValve220; - globalErrorStream() << "detectedFormat = eBrushTypeValve220\n"; + globalWarningStream() << "detectedFormat = eBrushTypeValve220\n"; } else if ( string_equal( primitive, "(" ) ) { detectedFormat = eBrushTypeQuake; - globalErrorStream() << "detectedFormat = eBrushTypeQuake\n"; + globalWarningStream() << "detectedFormat = eBrushTypeQuake\n"; } else{ globalErrorStream() << "Format is not detected\n"; @@ -447,15 +447,15 @@ scene::Node& parsePrimitive( Tokeniser& tokeniser ) const { EBrushType detectedFormat; if ( string_equal( primitive, "brushDef" ) ) { detectedFormat = eBrushTypeQuake3BP; - globalErrorStream() << "detectedFormat = eBrushTypeQuake3BP\n"; + globalWarningStream() << "detectedFormat = eBrushTypeQuake3BP\n"; } else if ( string_equal( primitive, "(" ) && tokeniser.bufferContains( " [ " ) && tokeniser.bufferContains( " ] " ) ) { detectedFormat = eBrushTypeQuake3Valve220; - globalErrorStream() << "detectedFormat = eBrushTypeQuake3Valve220\n"; + globalWarningStream() << "detectedFormat = eBrushTypeQuake3Valve220\n"; } else if ( string_equal( primitive, "(" ) ) { detectedFormat = eBrushTypeQuake2; - globalErrorStream() << "detectedFormat = eBrushTypeQuake2\n"; + globalWarningStream() << "detectedFormat = eBrushTypeQuake2\n"; } else{ globalErrorStream() << "Format is not detected\n"; diff --git a/plugins/model/model.cpp b/plugins/model/model.cpp index 6b6820a0..4cf53124 100644 --- a/plugins/model/model.cpp +++ b/plugins/model/model.cpp @@ -779,7 +779,7 @@ void add_remap( const char *remap ){ if ( *ch == '\0' ) { // bad remap - globalErrorStream() << "WARNING: Shader _remap key found in a model entity without a ; character\n"; + globalWarningStream() << "WARNING: Shader _remap key found in a model entity without a ; character\n"; } else { pRemap = new remap_t; diff --git a/plugins/model/plugin.cpp b/plugins/model/plugin.cpp index 61e77628..504428eb 100644 --- a/plugins/model/plugin.cpp +++ b/plugins/model/plugin.cpp @@ -61,7 +61,7 @@ void PicoPrintFunc( int level, const char *str ){ break; case PICO_WARNING: - globalErrorStream() << "PICO_WARNING: " << str << "\n"; + globalWarningStream() << "PICO_WARNING: " << str << "\n"; break; case PICO_ERROR: diff --git a/plugins/shaders/shaders.cpp b/plugins/shaders/shaders.cpp index cb7292ff..c9f56c7e 100644 --- a/plugins/shaders/shaders.cpp +++ b/plugins/shaders/shaders.cpp @@ -1371,7 +1371,7 @@ void ParseShaderFile( Tokeniser& tokeniser, const char* filename ){ // do we already have this shader? if ( !g_shaderDefinitions.insert( ShaderDefinitionMap::value_type( shaderTemplate->getName(), ShaderDefinition( shaderTemplate.get(), ShaderArguments(), filename ) ) ).second ) { #ifdef _DEBUG - globalOutputStream() << "WARNING: shader " << shaderTemplate->getName() << " is already in memory, definition in " << filename << " ignored.\n"; + globalWarningStream() << "WARNING: shader " << shaderTemplate->getName() << " is already in memory, definition in " << filename << " ignored.\n"; #endif } } diff --git a/plugins/vfspk3/vfs.cpp b/plugins/vfspk3/vfs.cpp index e738e218..e7fb0369 100644 --- a/plugins/vfspk3/vfs.cpp +++ b/plugins/vfspk3/vfs.cpp @@ -103,7 +103,7 @@ static void AddSlash( char *str ){ std::size_t n = strlen( str ); if ( n > 0 ) { if ( str[n - 1] != '\\' && str[n - 1] != '/' ) { - globalErrorStream() << "WARNING: directory path does not end with separator: " << str << "\n"; + globalWarningStream() << "WARNING: directory path does not end with separator: " << str << "\n"; strcat( str, "/" ); } } @@ -114,7 +114,7 @@ static void FixDOSName( char *src ){ return; } - globalErrorStream() << "WARNING: invalid path separator '\\': " << src << "\n"; + globalWarningStream() << "WARNING: invalid path separator '\\': " << src << "\n"; while ( *src ) { diff --git a/radiant/brush.h b/radiant/brush.h index 16fcdd5a..3ff3fb26 100644 --- a/radiant/brush.h +++ b/radiant/brush.h @@ -1177,7 +1177,7 @@ void snapto( float snap ){ #endif SceneChangeNotify(); if ( !plane3_valid( m_plane.plane3() ) ) { - globalErrorStream() << "WARNING: invalid plane after snap to grid\n"; + globalWarningStream() << "WARNING: invalid plane after snap to grid\n"; } } } diff --git a/radiant/brush_primit.cpp b/radiant/brush_primit.cpp index 57bf0e21..2ba73ed2 100644 --- a/radiant/brush_primit.cpp +++ b/radiant/brush_primit.cpp @@ -567,11 +567,11 @@ void FaceToBrushPrimitFace( face_t *f ){ strcpy(f->brushprimit_texdef.name,f->texdef.name); */ #ifdef DBG_BP if ( f->plane.normal[0] == 0.0f && f->plane.normal[1] == 0.0f && f->plane.normal[2] == 0.0f ) { - globalOutputStream() << "Warning : f->plane.normal is (0,0,0) in FaceToBrushPrimitFace\n"; + globalWarningStream() << "Warning : f->plane.normal is (0,0,0) in FaceToBrushPrimitFace\n"; } // check d_texture if ( !f->d_texture ) { - globalOutputStream() << "Warning : f.d_texture is 0 in FaceToBrushPrimitFace\n"; + globalWarningStream() << "Warning : f.d_texture is 0 in FaceToBrushPrimitFace\n"; return; } #endif @@ -626,10 +626,10 @@ void EmitBrushPrimitTextureCoordinates( face_t * f, Winding * w ){ float T = f->brushprimit_texdef.coords[1][0] * x + f->brushprimit_texdef.coords[1][1] * y + f->brushprimit_texdef.coords[1][2]; if ( fabs( S - w.point_at( i )[3] ) > 1e-2 || fabs( T - w.point_at( i )[4] ) > 1e-2 ) { if ( fabs( S - w.point_at( i )[3] ) > 1e-4 || fabs( T - w.point_at( i )[4] ) > 1e-4 ) { - globalOutputStream() << "Warning : precision loss in brush -> brush primitive texture computation\n"; + globalWarningStream() << "Warning : precision loss in brush -> brush primitive texture computation\n"; } else{ - globalOutputStream() << "Warning : brush -> brush primitive texture computation bug detected\n"; + globalWarningStream() << "Warning : brush -> brush primitive texture computation bug detected\n"; } } } @@ -1059,7 +1059,7 @@ void ShiftTextureRelative_Camera( face_t *f, int x, int y ){ // for which the solution is easy (the other one being unknown) // so this warning could be removed if ( axis[0] == axis[1] ) { - globalOutputStream() << "Warning: degenerate in ShiftTextureRelative_Camera\n"; + globalWarningStream() << "Warning: degenerate in ShiftTextureRelative_Camera\n"; } // compute the X Y geometric increments diff --git a/radiant/commands.cpp b/radiant/commands.cpp index c5e1a432..b77b2d7e 100644 --- a/radiant/commands.cpp +++ b/radiant/commands.cpp @@ -583,7 +583,7 @@ void visit( const char* name, Accelerator& accelerator ){ } else { - globalOutputStream() << "WARNING: failed to parse user command " << makeQuoted( name ) << ": unknown key " << makeQuoted( value ) << "\n"; + globalWarningStream() << "WARNING: failed to parse user command " << makeQuoted( name ) << ": unknown key " << makeQuoted( value ) << "\n"; } } } diff --git a/radiant/entity.cpp b/radiant/entity.cpp index 6b1a7d1b..297ab4b9 100644 --- a/radiant/entity.cpp +++ b/radiant/entity.cpp @@ -618,7 +618,7 @@ const char* misc_model_dialog( GtkWidget* parent ){ // use VFS to get the correct relative path const char* relative = path_make_relative( filename, GlobalFileSystem().findRoot( filename ) ); if ( relative == filename ) { - globalOutputStream() << "WARNING: could not extract the relative path, using full path instead\n"; + globalWarningStream() << "WARNING: could not extract the relative path, using full path instead\n"; } return relative; } diff --git a/radiant/entityinspector.cpp b/radiant/entityinspector.cpp index c1a849dd..376a4dde 100644 --- a/radiant/entityinspector.cpp +++ b/radiant/entityinspector.cpp @@ -336,7 +336,7 @@ const char* browse_sound( GtkWidget* parent ){ if ( filename != 0 ) { const char* relative = path_make_relative( filename, GlobalFileSystem().findRoot( filename ) ); if ( relative == filename ) { - globalOutputStream() << "WARNING: could not extract the relative path, using full path instead\n"; + globalWarningStream() << "WARNING: could not extract the relative path, using full path instead\n"; } return relative; } diff --git a/radiant/feedback.cpp b/radiant/feedback.cpp index 1d2856f5..3b48beb5 100644 --- a/radiant/feedback.cpp +++ b/radiant/feedback.cpp @@ -61,7 +61,7 @@ void CSelectMsg::saxStartElement( message_info_t *ctx, const xmlChar *name, cons ASSERT_MESSAGE( string_equal( reinterpret_cast( name ), "brush" ), "FEEDBACK PARSE ERROR" ); ASSERT_MESSAGE( ESelectState == SELECT_MESSAGE, "FEEDBACK PARSE ERROR" ); ESelectState = SELECT_BRUSH; - globalOutputStream() << message.c_str() << '\n'; + globalWarningStream() << message.c_str() << '\n'; } } @@ -100,7 +100,7 @@ void CPointMsg::saxStartElement( message_info_t *ctx, const xmlChar *name, const ASSERT_MESSAGE( string_equal( reinterpret_cast( name ), "point" ), "FEEDBACK PARSE ERROR" ); ASSERT_MESSAGE( EPointState == POINT_MESSAGE, "FEEDBACK PARSE ERROR" ); EPointState = POINT_POINT; - globalOutputStream() << message.c_str() << '\n'; + globalWarningStream() << message.c_str() << '\n'; } } @@ -158,7 +158,7 @@ void CWindingMsg::saxStartElement( message_info_t *ctx, const xmlChar *name, con ASSERT_MESSAGE( string_equal( reinterpret_cast( name ), "winding" ), "FEEDBACK PARSE ERROR" ); ASSERT_MESSAGE( EPointState == WINDING_MESSAGE, "FEEDBACK PARSE ERROR" ); EPointState = WINDING_WINDING; - globalOutputStream() << message.c_str() << '\n'; + globalWarningStream() << message.c_str() << '\n'; } } diff --git a/radiant/patchdialog.cpp b/radiant/patchdialog.cpp index bbfaec7e..725829de 100644 --- a/radiant/patchdialog.cpp +++ b/radiant/patchdialog.cpp @@ -1109,7 +1109,7 @@ void PatchInspector::GetPatchInfo(){ } else { - //globalOutputStream() << "WARNING: no patch\n"; + //globalWarningStream() << "WARNING: no patch\n"; } // fill in our internal structs m_nRow = 0; m_nCol = 0; diff --git a/radiant/preferences.cpp b/radiant/preferences.cpp index 31eb532f..878f8dd6 100644 --- a/radiant/preferences.cpp +++ b/radiant/preferences.cpp @@ -136,7 +136,7 @@ CGameDescription::CGameDescription( xmlDocPtr pDoc, const CopiedString& gameFile { GameDescription::iterator i = m_gameDescription.find( "type" ); if ( i == m_gameDescription.end() ) { - globalErrorStream() << "Warning, 'type' attribute not found in '" << reinterpret_cast( pDoc->URL ) << "'\n"; + globalWarningStream() << "Warning, 'type' attribute not found in '" << reinterpret_cast( pDoc->URL ) << "'\n"; // default mGameType = "q3"; } diff --git a/radiant/qgl.cpp b/radiant/qgl.cpp index 7f030a81..b6c79993 100644 --- a/radiant/qgl.cpp +++ b/radiant/qgl.cpp @@ -574,7 +574,7 @@ void QGL_InitVersion(){ inline void extension_not_implemented( const char* extension ){ - globalErrorStream() << "WARNING: OpenGL driver reports support for " << extension << " but does not implement it\n"; + globalWarningStream() << "WARNING: OpenGL driver reports support for " << extension << " but does not implement it\n"; } float g_maxTextureAnisotropy; diff --git a/radiant/watchbsp.cpp b/radiant/watchbsp.cpp index 8a639b10..16afd5b9 100644 --- a/radiant/watchbsp.cpp +++ b/radiant/watchbsp.cpp @@ -308,7 +308,7 @@ static void saxStartElement( message_info_t *data, const xmlChar *name, const xm } else { - globalErrorStream() << "Warning: ignoring unrecognized node in XML stream (" << reinterpret_cast( name ) << ")\n"; + globalWarningStream() << "Warning: ignoring unrecognized node in XML stream (" << reinterpret_cast( name ) << ")\n"; // we don't recognize this node, jump over it // (NOTE: the ignore mechanism is a bit screwed, only works when starting an ignore at the highest level) data->ignore_depth = data->recurse; @@ -401,7 +401,7 @@ static void saxWarning( void *ctx, const char *msg, ... ){ va_start( args, msg ); vsprintf( saxMsgBuffer, msg, args ); va_end( args ); - globalOutputStream() << "XML warning: " << saxMsgBuffer << "\n"; + globalWarningStream() << "XML warning: " << saxMsgBuffer << "\n"; } static void saxError( void *ctx, const char *msg, ... ){ @@ -648,8 +648,8 @@ void CWatchBSP::RoutineProcessing(){ int ret = Net_Wait( m_pInSocket, 0, 0 ); if ( ret == -1 ) { - globalOutputStream() << "WARNING: SOCKET_ERROR in CWatchBSP::RoutineProcessing\n"; - globalOutputStream() << "Terminating the connection.\n"; + globalErrorStream() << "SOCKET_ERROR in CWatchBSP::RoutineProcessing\n"; + globalErrorStream() << "Terminating the connection.\n"; EndMonitoringLoop(); return; } diff --git a/radiant/xywindow.cpp b/radiant/xywindow.cpp index 1126602a..e5ff579b 100644 --- a/radiant/xywindow.cpp +++ b/radiant/xywindow.cpp @@ -1719,7 +1719,7 @@ void XYWnd::XY_SnapToGrid( Vector3& point ){ void XYWnd::XY_LoadBackgroundImage( const char *name ){ const char* relative = path_make_relative( name, GlobalFileSystem().findRoot( name ) ); if ( relative == name ) { - globalOutputStream() << "WARNING: could not extract the relative path, using full path instead\n"; + globalWarningStream() << "WARNING: could not extract the relative path, using full path instead\n"; } char fileNameWithoutExt[512]; @@ -1729,7 +1729,7 @@ void XYWnd::XY_LoadBackgroundImage( const char *name ){ Image *image = QERApp_LoadImage( 0, fileNameWithoutExt ); if ( !image ) { - globalOutputStream() << "Could not load texture " << fileNameWithoutExt << "\n"; + globalErrorStream() << "Could not load texture " << fileNameWithoutExt << "\n"; return; } g_pParentWnd->ActiveXY()->m_tex = (qtexture_t*)malloc( sizeof( qtexture_t ) );