Browse Source

LOGERROR -> URHO3D_LOGERROR

Ivan K 10 years ago
parent
commit
ad2eb74d83
97 changed files with 654 additions and 654 deletions
  1. 2 2
      Source/Samples/34_DynamicGeometry/DynamicGeometry.cpp
  2. 2 2
      Source/Urho3D/AngelScript/Script.cpp
  3. 8 8
      Source/Urho3D/AngelScript/ScriptFile.cpp
  4. 6 6
      Source/Urho3D/AngelScript/ScriptInstance.cpp
  5. 4 4
      Source/Urho3D/Audio/Audio.cpp
  6. 5 5
      Source/Urho3D/Audio/Sound.cpp
  7. 1 1
      Source/Urho3D/Core/Object.cpp
  8. 1 1
      Source/Urho3D/Core/Spline.cpp
  9. 2 2
      Source/Urho3D/Core/WorkQueue.cpp
  10. 1 1
      Source/Urho3D/Database/SQLite/SQLiteConnection.cpp
  11. 2 2
      Source/Urho3D/Graphics/AnimatedModel.cpp
  12. 1 1
      Source/Urho3D/Graphics/Animation.cpp
  13. 1 1
      Source/Urho3D/Graphics/AnimationController.cpp
  14. 4 4
      Source/Urho3D/Graphics/CustomGeometry.cpp
  15. 1 1
      Source/Urho3D/Graphics/DecalSet.cpp
  16. 2 2
      Source/Urho3D/Graphics/Direct3D11/D3D11ConstantBuffer.cpp
  17. 15 15
      Source/Urho3D/Graphics/Direct3D11/D3D11Graphics.cpp
  18. 12 12
      Source/Urho3D/Graphics/Direct3D11/D3D11IndexBuffer.cpp
  19. 3 3
      Source/Urho3D/Graphics/Direct3D11/D3D11ShaderVariation.cpp
  20. 1 1
      Source/Urho3D/Graphics/Direct3D11/D3D11Texture.cpp
  21. 15 15
      Source/Urho3D/Graphics/Direct3D11/D3D11Texture2D.cpp
  22. 14 14
      Source/Urho3D/Graphics/Direct3D11/D3D11Texture3D.cpp
  23. 22 22
      Source/Urho3D/Graphics/Direct3D11/D3D11TextureCube.cpp
  24. 10 10
      Source/Urho3D/Graphics/Direct3D11/D3D11VertexBuffer.cpp
  25. 13 13
      Source/Urho3D/Graphics/Direct3D9/D3D9Graphics.cpp
  26. 12 12
      Source/Urho3D/Graphics/Direct3D9/D3D9IndexBuffer.cpp
  27. 2 2
      Source/Urho3D/Graphics/Direct3D9/D3D9ShaderVariation.cpp
  28. 15 15
      Source/Urho3D/Graphics/Direct3D9/D3D9Texture2D.cpp
  29. 12 12
      Source/Urho3D/Graphics/Direct3D9/D3D9Texture3D.cpp
  30. 22 22
      Source/Urho3D/Graphics/Direct3D9/D3D9TextureCube.cpp
  31. 10 10
      Source/Urho3D/Graphics/Direct3D9/D3D9VertexBuffer.cpp
  32. 2 2
      Source/Urho3D/Graphics/Drawable.cpp
  33. 5 5
      Source/Urho3D/Graphics/Geometry.cpp
  34. 5 5
      Source/Urho3D/Graphics/Material.cpp
  35. 14 14
      Source/Urho3D/Graphics/Model.cpp
  36. 1 1
      Source/Urho3D/Graphics/OcclusionBuffer.cpp
  37. 1 1
      Source/Urho3D/Graphics/Octree.cpp
  38. 1 1
      Source/Urho3D/Graphics/OpenGL/OGLConstantBuffer.cpp
  39. 9 9
      Source/Urho3D/Graphics/OpenGL/OGLGraphics.cpp
  40. 11 11
      Source/Urho3D/Graphics/OpenGL/OGLIndexBuffer.cpp
  41. 10 10
      Source/Urho3D/Graphics/OpenGL/OGLTexture2D.cpp
  42. 12 12
      Source/Urho3D/Graphics/OpenGL/OGLTexture3D.cpp
  43. 18 18
      Source/Urho3D/Graphics/OpenGL/OGLTextureCube.cpp
  44. 9 9
      Source/Urho3D/Graphics/OpenGL/OGLVertexBuffer.cpp
  45. 6 6
      Source/Urho3D/Graphics/ParticleEffect.cpp
  46. 2 2
      Source/Urho3D/Graphics/Renderer.cpp
  47. 1 1
      Source/Urho3D/Graphics/Skeleton.cpp
  48. 1 1
      Source/Urho3D/Graphics/StaticModel.cpp
  49. 1 1
      Source/Urho3D/Graphics/Technique.cpp
  50. 1 1
      Source/Urho3D/Graphics/Terrain.cpp
  51. 8 8
      Source/Urho3D/IO/File.cpp
  52. 19 19
      Source/Urho3D/IO/FileSystem.cpp
  53. 7 7
      Source/Urho3D/IO/FileWatcher.cpp
  54. 2 2
      Source/Urho3D/IO/Log.h
  55. 3 3
      Source/Urho3D/IO/PackageFile.cpp
  56. 2 2
      Source/Urho3D/Input/Input.cpp
  57. 2 2
      Source/Urho3D/LuaScript/LuaScript.cpp
  58. 3 3
      Source/Urho3D/LuaScript/LuaScriptInstance.cpp
  59. 1 1
      Source/Urho3D/Navigation/CrowdAgent.cpp
  60. 2 2
      Source/Urho3D/Navigation/CrowdManager.cpp
  61. 23 23
      Source/Urho3D/Navigation/DynamicNavigationMesh.cpp
  62. 25 25
      Source/Urho3D/Navigation/NavigationMesh.cpp
  63. 17 17
      Source/Urho3D/Network/Connection.cpp
  64. 1 1
      Source/Urho3D/Network/HttpRequest.cpp
  65. 10 10
      Source/Urho3D/Network/Network.cpp
  66. 7 7
      Source/Urho3D/Physics/CollisionShape.cpp
  67. 3 3
      Source/Urho3D/Physics/PhysicsWorld.cpp
  68. 1 1
      Source/Urho3D/Resource/BackgroundLoader.cpp
  69. 54 54
      Source/Urho3D/Resource/Image.cpp
  70. 2 2
      Source/Urho3D/Resource/JSONFile.cpp
  71. 4 4
      Source/Urho3D/Resource/JSONValue.cpp
  72. 3 3
      Source/Urho3D/Resource/PListFile.cpp
  73. 1 1
      Source/Urho3D/Resource/Resource.cpp
  74. 9 9
      Source/Urho3D/Resource/ResourceCache.cpp
  75. 4 4
      Source/Urho3D/Resource/XMLFile.cpp
  76. 3 3
      Source/Urho3D/Scene/Animatable.cpp
  77. 10 10
      Source/Urho3D/Scene/Node.cpp
  78. 5 5
      Source/Urho3D/Scene/Scene.cpp
  79. 23 23
      Source/Urho3D/Scene/Serializable.cpp
  80. 1 1
      Source/Urho3D/Scene/UnknownComponent.cpp
  81. 3 3
      Source/Urho3D/Scene/ValueAnimation.cpp
  82. 1 1
      Source/Urho3D/Scene/ValueAnimationInfo.cpp
  83. 3 3
      Source/Urho3D/UI/Cursor.cpp
  84. 1 1
      Source/Urho3D/UI/FontFace.cpp
  85. 6 6
      Source/Urho3D/UI/FontFaceBitmap.cpp
  86. 7 7
      Source/Urho3D/UI/FontFaceFreeType.cpp
  87. 3 3
      Source/Urho3D/UI/Menu.cpp
  88. 1 1
      Source/Urho3D/UI/Text.cpp
  89. 3 3
      Source/Urho3D/UI/UI.cpp
  90. 6 6
      Source/Urho3D/UI/UIElement.cpp
  91. 4 4
      Source/Urho3D/Urho2D/AnimatedSprite2D.cpp
  92. 11 11
      Source/Urho3D/Urho2D/AnimationSet2D.cpp
  93. 1 1
      Source/Urho3D/Urho2D/Constraint2D.cpp
  94. 1 1
      Source/Urho3D/Urho2D/ParticleEffect2D.cpp
  95. 2 2
      Source/Urho3D/Urho2D/Renderer2D.cpp
  96. 6 6
      Source/Urho3D/Urho2D/SpriteSheet2D.cpp
  97. 9 9
      Source/Urho3D/Urho2D/TmxFile2D.cpp

+ 2 - 2
Source/Samples/34_DynamicGeometry/DynamicGeometry.cpp

@@ -103,7 +103,7 @@ void DynamicGeometry::CreateScene()
     Model* originalModel = cache->GetResource<Model>("Models/Box.mdl");
     Model* originalModel = cache->GetResource<Model>("Models/Box.mdl");
     if (!originalModel)
     if (!originalModel)
     {
     {
-        LOGERROR("Model not found, cannot initialize example scene");
+        URHO3D_LOGERROR("Model not found, cannot initialize example scene");
         return;
         return;
     }
     }
     // Get the vertex buffer from the first geometry's first LOD level
     // Get the vertex buffer from the first geometry's first LOD level
@@ -138,7 +138,7 @@ void DynamicGeometry::CreateScene()
     }
     }
     else
     else
     {
     {
-        LOGERROR("Failed to lock the model vertex buffer to get original vertices");
+        URHO3D_LOGERROR("Failed to lock the model vertex buffer to get original vertices");
         return;
         return;
     }
     }
 
 

+ 2 - 2
Source/Urho3D/AngelScript/Script.cpp

@@ -77,7 +77,7 @@ Script::Script(Context* context) :
     scriptEngine_ = asCreateScriptEngine(ANGELSCRIPT_VERSION);
     scriptEngine_ = asCreateScriptEngine(ANGELSCRIPT_VERSION);
     if (!scriptEngine_)
     if (!scriptEngine_)
     {
     {
-        LOGERROR("Could not create AngelScript engine");
+        URHO3D_LOGERROR("Could not create AngelScript engine");
         return;
         return;
     }
     }
 
 
@@ -228,7 +228,7 @@ void Script::MessageCallback(const asSMessageInfo* msg)
     switch (msg->type)
     switch (msg->type)
     {
     {
     case asMSGTYPE_ERROR:
     case asMSGTYPE_ERROR:
-        LOGERROR(message);
+        URHO3D_LOGERROR(message);
         break;
         break;
 
 
     case asMSGTYPE_WARNING:
     case asMSGTYPE_WARNING:

+ 8 - 8
Source/Urho3D/AngelScript/ScriptFile.cpp

@@ -126,7 +126,7 @@ bool ScriptFile::BeginLoad(Deserializer& source)
         scriptModule_ = engine->GetModule(GetName().CString(), asGM_ALWAYS_CREATE);
         scriptModule_ = engine->GetModule(GetName().CString(), asGM_ALWAYS_CREATE);
         if (!scriptModule_)
         if (!scriptModule_)
         {
         {
-            LOGERROR("Failed to create script module " + GetName());
+            URHO3D_LOGERROR("Failed to create script module " + GetName());
             return false;
             return false;
         }
         }
     }
     }
@@ -174,7 +174,7 @@ bool ScriptFile::EndLoad()
             success = true;
             success = true;
         }
         }
         else
         else
-            LOGERROR("Failed to compile script module " + GetName());
+            URHO3D_LOGERROR("Failed to compile script module " + GetName());
     }
     }
 
 
     if (success)
     if (success)
@@ -203,7 +203,7 @@ void ScriptFile::AddEventHandler(Object* sender, StringHash eventType, const Str
 
 
     if (!sender)
     if (!sender)
     {
     {
-        LOGERROR("Null event sender for event " + String(eventType) + ", handler " + handlerName);
+        URHO3D_LOGERROR("Null event sender for event " + String(eventType) + ", handler " + handlerName);
         return;
         return;
     }
     }
 
 
@@ -276,7 +276,7 @@ bool ScriptFile::Execute(const String& declaration, const VariantVector& paramet
     asIScriptFunction* function = GetFunction(declaration);
     asIScriptFunction* function = GetFunction(declaration);
     if (!function)
     if (!function)
     {
     {
-        LOGERROR("Function " + declaration + " not found in " + GetName());
+        URHO3D_LOGERROR("Function " + declaration + " not found in " + GetName());
         return false;
         return false;
     }
     }
 
 
@@ -317,7 +317,7 @@ bool ScriptFile::Execute(asIScriptObject* object, const String& declaration, con
     asIScriptFunction* method = GetMethod(object, declaration);
     asIScriptFunction* method = GetMethod(object, declaration);
     if (!method)
     if (!method)
     {
     {
-        LOGERROR("Method " + declaration + " not found in class " + String(object->GetObjectType()->GetName()));
+        URHO3D_LOGERROR("Method " + declaration + " not found in class " + String(object->GetObjectType()->GetName()));
         return false;
         return false;
     }
     }
 
 
@@ -534,7 +534,7 @@ void ScriptFile::AddEventHandlerInternal(Object* sender, StringHash eventType, c
 
 
         if (!function)
         if (!function)
         {
         {
-            LOGERROR("Event handler function " + handlerName + " not found in " + GetName());
+            URHO3D_LOGERROR("Event handler function " + handlerName + " not found in " + GetName());
             return;
             return;
         }
         }
     }
     }
@@ -675,7 +675,7 @@ bool ScriptFile::AddScriptSection(asIScriptEngine* engine, Deserializer& source)
         }
         }
         else
         else
         {
         {
-            LOGERROR("Could not process all the include directives in " + GetName() + ": missing " + includeFiles[i]);
+            URHO3D_LOGERROR("Could not process all the include directives in " + GetName() + ": missing " + includeFiles[i]);
             return false;
             return false;
         }
         }
     }
     }
@@ -683,7 +683,7 @@ bool ScriptFile::AddScriptSection(asIScriptEngine* engine, Deserializer& source)
     // Then add this section
     // Then add this section
     if (scriptModule_->AddScriptSection(source.GetName().CString(), (const char*)buffer.Get(), dataSize) < 0)
     if (scriptModule_->AddScriptSection(source.GetName().CString(), (const char*)buffer.Get(), dataSize) < 0)
     {
     {
-        LOGERROR("Failed to add script section " + source.GetName());
+        URHO3D_LOGERROR("Failed to add script section " + source.GetName());
         return false;
         return false;
     }
     }
 
 

+ 6 - 6
Source/Urho3D/AngelScript/ScriptInstance.cpp

@@ -242,7 +242,7 @@ bool ScriptInstance::Execute(const String& declaration, const VariantVector& par
     asIScriptFunction* method = scriptFile_->GetMethod(scriptObject_, declaration);
     asIScriptFunction* method = scriptFile_->GetMethod(scriptObject_, declaration);
     if (!method)
     if (!method)
     {
     {
-        LOGERROR("Method " + declaration + " not found in class " + className_);
+        URHO3D_LOGERROR("Method " + declaration + " not found in class " + className_);
         return false;
         return false;
     }
     }
 
 
@@ -303,7 +303,7 @@ void ScriptInstance::AddEventHandler(StringHash eventType, const String& handler
         method = scriptFile_->GetMethod(scriptObject_, handlerName);
         method = scriptFile_->GetMethod(scriptObject_, handlerName);
         if (!method)
         if (!method)
         {
         {
-            LOGERROR("Event handler method " + handlerName + " not found in " + scriptFile_->GetName());
+            URHO3D_LOGERROR("Event handler method " + handlerName + " not found in " + scriptFile_->GetName());
             return;
             return;
         }
         }
     }
     }
@@ -318,7 +318,7 @@ void ScriptInstance::AddEventHandler(Object* sender, StringHash eventType, const
 
 
     if (!sender)
     if (!sender)
     {
     {
-        LOGERROR("Null event sender for event " + String(eventType) + ", handler " + handlerName);
+        URHO3D_LOGERROR("Null event sender for event " + String(eventType) + ", handler " + handlerName);
         return;
         return;
     }
     }
 
 
@@ -330,7 +330,7 @@ void ScriptInstance::AddEventHandler(Object* sender, StringHash eventType, const
         method = scriptFile_->GetMethod(scriptObject_, handlerName);
         method = scriptFile_->GetMethod(scriptObject_, handlerName);
         if (!method)
         if (!method)
         {
         {
-            LOGERROR("Event handler method " + handlerName + " not found in " + scriptFile_->GetName());
+            URHO3D_LOGERROR("Event handler method " + handlerName + " not found in " + scriptFile_->GetName());
             return;
             return;
         }
         }
     }
     }
@@ -535,7 +535,7 @@ void ScriptInstance::CreateObject()
             scriptFile_->Execute(scriptObject_, methods_[METHOD_START]);
             scriptFile_->Execute(scriptObject_, methods_[METHOD_START]);
     }
     }
     else
     else
-        LOGERROR("Failed to create object of class " + className_ + " from " + scriptFile_->GetName());
+        URHO3D_LOGERROR("Failed to create object of class " + className_ + " from " + scriptFile_->GetName());
 }
 }
 
 
 void ScriptInstance::ReleaseObject()
 void ScriptInstance::ReleaseObject()
@@ -702,7 +702,7 @@ void ScriptInstance::UpdateEventSubscription()
                         SubscribeToEvent(world, E_PHYSICSPOSTSTEP, URHO3D_HANDLER(ScriptInstance, HandlePhysicsPostStep));
                         SubscribeToEvent(world, E_PHYSICSPOSTSTEP, URHO3D_HANDLER(ScriptInstance, HandlePhysicsPostStep));
                 }
                 }
                 else
                 else
-                    LOGERROR("No physics world, can not subscribe script object to fixed update events");
+                    URHO3D_LOGERROR("No physics world, can not subscribe script object to fixed update events");
             }
             }
 #endif
 #endif
             subscribedPostFixed_ = true;
             subscribedPostFixed_ = true;

+ 4 - 4
Source/Urho3D/Audio/Audio.cpp

@@ -103,14 +103,14 @@ bool Audio::SetMode(int bufferLengthMSec, int mixRate, bool stereo, bool interpo
     deviceID_ = SDL_OpenAudioDevice(0, SDL_FALSE, &desired, &obtained, SDL_AUDIO_ALLOW_ANY_CHANGE);
     deviceID_ = SDL_OpenAudioDevice(0, SDL_FALSE, &desired, &obtained, SDL_AUDIO_ALLOW_ANY_CHANGE);
     if (!deviceID_)
     if (!deviceID_)
     {
     {
-        LOGERROR("Could not initialize audio output");
+        URHO3D_LOGERROR("Could not initialize audio output");
         return false;
         return false;
     }
     }
 
 
 #ifdef __EMSCRIPTEN__
 #ifdef __EMSCRIPTEN__
     if (obtained.format != AUDIO_F32LSB && obtained.format != AUDIO_F32MSB && obtained.format != AUDIO_F32SYS)
     if (obtained.format != AUDIO_F32LSB && obtained.format != AUDIO_F32MSB && obtained.format != AUDIO_F32SYS)
     {
     {
-        LOGERROR("Could not initialize audio output, 32-bit float buffer format not supported");
+        URHO3D_LOGERROR("Could not initialize audio output, 32-bit float buffer format not supported");
         SDL_CloseAudioDevice(deviceID_);
         SDL_CloseAudioDevice(deviceID_);
         deviceID_ = 0;
         deviceID_ = 0;
         return false;
         return false;
@@ -118,7 +118,7 @@ bool Audio::SetMode(int bufferLengthMSec, int mixRate, bool stereo, bool interpo
 #else
 #else
     if (obtained.format != AUDIO_S16SYS && obtained.format != AUDIO_S16LSB && obtained.format != AUDIO_S16MSB)
     if (obtained.format != AUDIO_S16SYS && obtained.format != AUDIO_S16LSB && obtained.format != AUDIO_S16MSB)
     {
     {
-        LOGERROR("Could not initialize audio output, 16-bit buffer format not supported");
+        URHO3D_LOGERROR("Could not initialize audio output, 16-bit buffer format not supported");
         SDL_CloseAudioDevice(deviceID_);
         SDL_CloseAudioDevice(deviceID_);
         deviceID_ = 0;
         deviceID_ = 0;
         return false;
         return false;
@@ -155,7 +155,7 @@ bool Audio::Play()
 
 
     if (!deviceID_)
     if (!deviceID_)
     {
     {
-        LOGERROR("No audio mode set, can not start playback");
+        URHO3D_LOGERROR("No audio mode set, can not start playback");
         return false;
         return false;
     }
     }
 
 

+ 5 - 5
Source/Urho3D/Audio/Sound.cpp

@@ -111,7 +111,7 @@ bool Sound::LoadOggVorbis(Deserializer& source)
     stb_vorbis* vorbis = stb_vorbis_open_memory((unsigned char*)data.Get(), dataSize, &error, 0);
     stb_vorbis* vorbis = stb_vorbis_open_memory((unsigned char*)data.Get(), dataSize, &error, 0);
     if (!vorbis)
     if (!vorbis)
     {
     {
-        LOGERROR("Could not read Ogg Vorbis data from " + source.GetName());
+        URHO3D_LOGERROR("Could not read Ogg Vorbis data from " + source.GetName());
         return false;
         return false;
     }
     }
 
 
@@ -143,7 +143,7 @@ bool Sound::LoadWav(Deserializer& source)
 
 
     if (memcmp("RIFF", header.riffText_, 4) || memcmp("WAVE", header.waveText_, 4))
     if (memcmp("RIFF", header.riffText_, 4) || memcmp("WAVE", header.waveText_, 4))
     {
     {
-        LOGERROR("Could not read WAV data from " + source.GetName());
+        URHO3D_LOGERROR("Could not read WAV data from " + source.GetName());
         return false;
         return false;
     }
     }
 
 
@@ -158,7 +158,7 @@ bool Sound::LoadWav(Deserializer& source)
         source.Seek(source.GetPosition() + header.formatLength_);
         source.Seek(source.GetPosition() + header.formatLength_);
         if (!header.formatLength_ || source.GetPosition() >= source.GetSize())
         if (!header.formatLength_ || source.GetPosition() >= source.GetSize())
         {
         {
-            LOGERROR("Could not read WAV data from " + source.GetName());
+            URHO3D_LOGERROR("Could not read WAV data from " + source.GetName());
             return false;
             return false;
         }
         }
     }
     }
@@ -177,7 +177,7 @@ bool Sound::LoadWav(Deserializer& source)
     // Check for correct format
     // Check for correct format
     if (header.format_ != 1)
     if (header.format_ != 1)
     {
     {
-        LOGERROR("Could not read WAV data from " + source.GetName());
+        URHO3D_LOGERROR("Could not read WAV data from " + source.GetName());
         return false;
         return false;
     }
     }
 
 
@@ -192,7 +192,7 @@ bool Sound::LoadWav(Deserializer& source)
         source.Seek(source.GetPosition() + header.dataLength_);
         source.Seek(source.GetPosition() + header.dataLength_);
         if (!header.dataLength_ || source.GetPosition() >= source.GetSize())
         if (!header.dataLength_ || source.GetPosition() >= source.GetSize())
         {
         {
-            LOGERROR("Could not read WAV data from " + source.GetName());
+            URHO3D_LOGERROR("Could not read WAV data from " + source.GetName());
             return false;
             return false;
         }
         }
     }
     }

+ 1 - 1
Source/Urho3D/Core/Object.cpp

@@ -287,7 +287,7 @@ void Object::SendEvent(StringHash eventType, VariantMap& eventData)
 {
 {
     if (!Thread::IsMainThread())
     if (!Thread::IsMainThread())
     {
     {
-        LOGERROR("Sending events is only supported from the main thread");
+        URHO3D_LOGERROR("Sending events is only supported from the main thread");
         return;
         return;
     }
     }
 
 

+ 1 - 1
Source/Urho3D/Core/Spline.cpp

@@ -102,7 +102,7 @@ Variant Spline::GetPoint(float f) const
         }
         }
 
 
     default:
     default:
-        LOGERROR("Unsupported interpolation mode");
+        URHO3D_LOGERROR("Unsupported interpolation mode");
         return Variant::EMPTY;
         return Variant::EMPTY;
     }
     }
 }
 }

+ 2 - 2
Source/Urho3D/Core/WorkQueue.cpp

@@ -101,7 +101,7 @@ void WorkQueue::CreateThreads(unsigned numThreads)
         threads_.Push(thread);
         threads_.Push(thread);
     }
     }
 #else
 #else
-    LOGERROR("Can not create worker threads as threading is disabled");
+    URHO3D_LOGERROR("Can not create worker threads as threading is disabled");
 #endif
 #endif
 }
 }
 
 
@@ -126,7 +126,7 @@ void WorkQueue::AddWorkItem(SharedPtr<WorkItem> item)
 {
 {
     if (!item)
     if (!item)
     {
     {
-        LOGERROR("Null work item submitted to the work queue");
+        URHO3D_LOGERROR("Null work item submitted to the work queue");
         return;
         return;
     }
     }
 
 

+ 1 - 1
Source/Urho3D/Database/SQLite/SQLiteConnection.cpp

@@ -73,7 +73,7 @@ DbResult DbConnection::Execute(const String& sql, bool useCursorEvent)
     }
     }
     if (*zLeftover)
     if (*zLeftover)
     {
     {
-        LOGERROR("Could not execute: only one SQL statement is allowed");
+        URHO3D_LOGERROR("Could not execute: only one SQL statement is allowed");
         sqlite3_finalize(pStmt);
         sqlite3_finalize(pStmt);
         return result;
         return result;
     }
     }

+ 2 - 2
Source/Urho3D/Graphics/AnimatedModel.cpp

@@ -413,7 +413,7 @@ AnimationState* AnimatedModel::AddAnimationState(Animation* animation)
 {
 {
     if (!isMaster_)
     if (!isMaster_)
     {
     {
-        LOGERROR("Can not add animation state to non-master model");
+        URHO3D_LOGERROR("Can not add animation state to non-master model");
         return 0;
         return 0;
     }
     }
 
 
@@ -666,7 +666,7 @@ void AnimatedModel::SetSkeleton(const Skeleton& skeleton, bool createBones)
 {
 {
     if (!node_ && createBones)
     if (!node_ && createBones)
     {
     {
-        LOGERROR("AnimatedModel not attached to a scene node, can not create bone nodes");
+        URHO3D_LOGERROR("AnimatedModel not attached to a scene node, can not create bone nodes");
         return;
         return;
     }
     }
 
 

+ 1 - 1
Source/Urho3D/Graphics/Animation.cpp

@@ -127,7 +127,7 @@ bool Animation::BeginLoad(Deserializer& source)
     // Check ID
     // Check ID
     if (source.ReadFileID() != "UANI")
     if (source.ReadFileID() != "UANI")
     {
     {
-        LOGERROR(source.GetName() + " is not a valid animation file");
+        URHO3D_LOGERROR(source.GetName() + " is not a valid animation file");
         return false;
         return false;
     }
     }
 
 

+ 1 - 1
Source/Urho3D/Graphics/AnimationController.cpp

@@ -595,7 +595,7 @@ void AnimationController::SetNetAnimationsAttr(const PODVector<unsigned char>& v
             state = AddAnimationState(newAnimation);
             state = AddAnimationState(newAnimation);
             if (!state)
             if (!state)
             {
             {
-                LOGERROR("Animation update applying aborted due to unknown animation");
+                URHO3D_LOGERROR("Animation update applying aborted due to unknown animation");
                 return;
                 return;
             }
             }
         }
         }

+ 4 - 4
Source/Urho3D/Graphics/CustomGeometry.cpp

@@ -242,7 +242,7 @@ void CustomGeometry::BeginGeometry(unsigned index, PrimitiveType type)
 {
 {
     if (index > geometries_.Size())
     if (index > geometries_.Size())
     {
     {
-        LOGERROR("Geometry index out of bounds");
+        URHO3D_LOGERROR("Geometry index out of bounds");
         return;
         return;
     }
     }
 
 
@@ -305,7 +305,7 @@ void CustomGeometry::DefineGeometry(unsigned index, PrimitiveType type, unsigned
 {
 {
     if (index > geometries_.Size())
     if (index > geometries_.Size())
     {
     {
-        LOGERROR("Geometry index out of bounds");
+        URHO3D_LOGERROR("Geometry index out of bounds");
         return;
         return;
     }
     }
 
 
@@ -394,7 +394,7 @@ void CustomGeometry::Commit()
             vertexBuffer_->Unlock();
             vertexBuffer_->Unlock();
         }
         }
         else
         else
-            LOGERROR("Failed to lock custom geometry vertex buffer");
+            URHO3D_LOGERROR("Failed to lock custom geometry vertex buffer");
     }
     }
     else
     else
     {
     {
@@ -420,7 +420,7 @@ bool CustomGeometry::SetMaterial(unsigned index, Material* material)
 {
 {
     if (index >= batches_.Size())
     if (index >= batches_.Size())
     {
     {
-        LOGERROR("Material index out of bounds");
+        URHO3D_LOGERROR("Material index out of bounds");
         return false;
         return false;
     }
     }
 
 

+ 1 - 1
Source/Urho3D/Graphics/DecalSet.cpp

@@ -301,7 +301,7 @@ bool DecalSet::AddDecal(Drawable* target, const Vector3& worldPosition, const Qu
 
 
     if (!target || !target->GetNode())
     if (!target || !target->GetNode())
     {
     {
-        LOGERROR("Null target drawable for decal");
+        URHO3D_LOGERROR("Null target drawable for decal");
         return false;
         return false;
     }
     }
 
 

+ 2 - 2
Source/Urho3D/Graphics/Direct3D11/D3D11ConstantBuffer.cpp

@@ -64,7 +64,7 @@ bool ConstantBuffer::SetSize(unsigned size)
 
 
     if (!size)
     if (!size)
     {
     {
-        LOGERROR("Can not create zero-sized constant buffer");
+        URHO3D_LOGERROR("Can not create zero-sized constant buffer");
         return false;
         return false;
     }
     }
 
 
@@ -91,7 +91,7 @@ bool ConstantBuffer::SetSize(unsigned size)
 
 
         if (!object_)
         if (!object_)
         {
         {
-            LOGERROR("Failed to create constant buffer");
+            URHO3D_LOGERROR("Failed to create constant buffer");
             return false;
             return false;
         }
         }
     }
     }

+ 15 - 15
Source/Urho3D/Graphics/Direct3D11/D3D11Graphics.cpp

@@ -355,7 +355,7 @@ void Graphics::SetExternalWindow(void* window)
     if (!impl_->window_)
     if (!impl_->window_)
         externalWindow_ = window;
         externalWindow_ = window;
     else
     else
-        LOGERROR("Window already opened, can not set external window");
+        URHO3D_LOGERROR("Window already opened, can not set external window");
 }
 }
 
 
 void Graphics::SetWindowTitle(const String& windowTitle)
 void Graphics::SetWindowTitle(const String& windowTitle)
@@ -585,7 +585,7 @@ bool Graphics::TakeScreenShot(Image& destImage)
     impl_->device_->CreateTexture2D(&textureDesc, 0, &stagingTexture);
     impl_->device_->CreateTexture2D(&textureDesc, 0, &stagingTexture);
     if (!stagingTexture)
     if (!stagingTexture)
     {
     {
-        LOGERROR("Could not create staging texture for screenshot");
+        URHO3D_LOGERROR("Could not create staging texture for screenshot");
         return false;
         return false;
     }
     }
 
 
@@ -599,7 +599,7 @@ bool Graphics::TakeScreenShot(Image& destImage)
 
 
         if (!impl_->resolveTexture_)
         if (!impl_->resolveTexture_)
         {
         {
-            LOGERROR("Could not create intermediate texture for multisampled screenshot");
+            URHO3D_LOGERROR("Could not create intermediate texture for multisampled screenshot");
             stagingTexture->Release();
             stagingTexture->Release();
             source->Release();
             source->Release();
             return false;
             return false;
@@ -638,7 +638,7 @@ bool Graphics::TakeScreenShot(Image& destImage)
     }
     }
     else
     else
     {
     {
-        LOGERROR("Could not map staging texture for screenshot");
+        URHO3D_LOGERROR("Could not map staging texture for screenshot");
         stagingTexture->Release();
         stagingTexture->Release();
         return false;
         return false;
     }
     }
@@ -893,12 +893,12 @@ bool Graphics::SetVertexBuffers(const PODVector<VertexBuffer*>& buffers, const P
 {
 {
     if (buffers.Size() > MAX_VERTEX_STREAMS)
     if (buffers.Size() > MAX_VERTEX_STREAMS)
     {
     {
-        LOGERROR("Too many vertex buffers");
+        URHO3D_LOGERROR("Too many vertex buffers");
         return false;
         return false;
     }
     }
     if (buffers.Size() != elementMasks.Size())
     if (buffers.Size() != elementMasks.Size())
     {
     {
-        LOGERROR("Amount of element masks and vertex buffers does not match");
+        URHO3D_LOGERROR("Amount of element masks and vertex buffers does not match");
         return false;
         return false;
     }
     }
 
 
@@ -999,7 +999,7 @@ void Graphics::SetShaders(ShaderVariation* vs, ShaderVariation* ps)
                 bool success = vs->Create();
                 bool success = vs->Create();
                 if (!success)
                 if (!success)
                 {
                 {
-                    LOGERROR("Failed to compile vertex shader " + vs->GetFullName() + ":\n" + vs->GetCompilerOutput());
+                    URHO3D_LOGERROR("Failed to compile vertex shader " + vs->GetFullName() + ":\n" + vs->GetCompilerOutput());
                     vs = 0;
                     vs = 0;
                 }
                 }
             }
             }
@@ -1023,7 +1023,7 @@ void Graphics::SetShaders(ShaderVariation* vs, ShaderVariation* ps)
                 bool success = ps->Create();
                 bool success = ps->Create();
                 if (!success)
                 if (!success)
                 {
                 {
-                    LOGERROR("Failed to compile pixel shader " + ps->GetFullName() + ":\n" + ps->GetCompilerOutput());
+                    URHO3D_LOGERROR("Failed to compile pixel shader " + ps->GetFullName() + ":\n" + ps->GetCompilerOutput());
                     ps = 0;
                     ps = 0;
                 }
                 }
             }
             }
@@ -2248,7 +2248,7 @@ bool Graphics::CreateDevice(int width, int height, int multiSample)
 
 
         if (!impl_->device_ || !impl_->deviceContext_)
         if (!impl_->device_ || !impl_->deviceContext_)
         {
         {
-            LOGERROR("Failed to create D3D11 device");
+            URHO3D_LOGERROR("Failed to create D3D11 device");
             return false;
             return false;
         }
         }
 
 
@@ -2304,7 +2304,7 @@ bool Graphics::CreateDevice(int width, int height, int multiSample)
     }
     }
     else
     else
     {
     {
-        LOGERROR("Failed to create D3D11 swap chain");
+        URHO3D_LOGERROR("Failed to create D3D11 swap chain");
         return false;
         return false;
     }
     }
 }
 }
@@ -2353,7 +2353,7 @@ bool Graphics::UpdateSwapChain(int width, int height)
     }
     }
     else
     else
     {
     {
-        LOGERROR("Failed to get backbuffer texture");
+        URHO3D_LOGERROR("Failed to get backbuffer texture");
         success = false;
         success = false;
     }
     }
 
 
@@ -2376,7 +2376,7 @@ bool Graphics::UpdateSwapChain(int width, int height)
         impl_->device_->CreateDepthStencilView(impl_->defaultDepthTexture_, 0, &impl_->defaultDepthStencilView_);
         impl_->device_->CreateDepthStencilView(impl_->defaultDepthTexture_, 0, &impl_->defaultDepthStencilView_);
     else
     else
     {
     {
-        LOGERROR("Failed to create backbuffer depth-stencil texture");
+        URHO3D_LOGERROR("Failed to create backbuffer depth-stencil texture");
         success = false;
         success = false;
     }
     }
 
 
@@ -2577,7 +2577,7 @@ void Graphics::PrepareDraw()
                 ID3D11BlendState* newBlendState = 0;
                 ID3D11BlendState* newBlendState = 0;
                 impl_->device_->CreateBlendState(&stateDesc, &newBlendState);
                 impl_->device_->CreateBlendState(&stateDesc, &newBlendState);
                 if (!newBlendState)
                 if (!newBlendState)
-                    LOGERROR("Failed to create blend state");
+                    URHO3D_LOGERROR("Failed to create blend state");
 
 
                 i = impl_->blendStates_.Insert(MakePair(newBlendStateHash, newBlendState));
                 i = impl_->blendStates_.Insert(MakePair(newBlendStateHash, newBlendState));
             }
             }
@@ -2622,7 +2622,7 @@ void Graphics::PrepareDraw()
                 ID3D11DepthStencilState* newDepthState = 0;
                 ID3D11DepthStencilState* newDepthState = 0;
                 impl_->device_->CreateDepthStencilState(&stateDesc, &newDepthState);
                 impl_->device_->CreateDepthStencilState(&stateDesc, &newDepthState);
                 if (!newDepthState)
                 if (!newDepthState)
-                    LOGERROR("Failed to create depth state");
+                    URHO3D_LOGERROR("Failed to create depth state");
 
 
                 i = impl_->depthStates_.Insert(MakePair(newDepthStateHash, newDepthState));
                 i = impl_->depthStates_.Insert(MakePair(newDepthStateHash, newDepthState));
             }
             }
@@ -2668,7 +2668,7 @@ void Graphics::PrepareDraw()
                 ID3D11RasterizerState* newRasterizerState = 0;
                 ID3D11RasterizerState* newRasterizerState = 0;
                 impl_->device_->CreateRasterizerState(&stateDesc, &newRasterizerState);
                 impl_->device_->CreateRasterizerState(&stateDesc, &newRasterizerState);
                 if (!newRasterizerState)
                 if (!newRasterizerState)
-                    LOGERROR("Failed to create rasterizer state");
+                    URHO3D_LOGERROR("Failed to create rasterizer state");
 
 
                 i = impl_->rasterizerStates_.Insert(MakePair(newRasterizerStateHash, newRasterizerState));
                 i = impl_->rasterizerStates_.Insert(MakePair(newRasterizerStateHash, newRasterizerState));
             }
             }

+ 12 - 12
Source/Urho3D/Graphics/Direct3D11/D3D11IndexBuffer.cpp

@@ -109,13 +109,13 @@ bool IndexBuffer::SetData(const void* data)
 {
 {
     if (!data)
     if (!data)
     {
     {
-        LOGERROR("Null pointer for index buffer data");
+        URHO3D_LOGERROR("Null pointer for index buffer data");
         return false;
         return false;
     }
     }
 
 
     if (!indexSize_)
     if (!indexSize_)
     {
     {
-        LOGERROR("Index size not defined, can not set index buffer data");
+        URHO3D_LOGERROR("Index size not defined, can not set index buffer data");
         return false;
         return false;
     }
     }
 
 
@@ -159,19 +159,19 @@ bool IndexBuffer::SetDataRange(const void* data, unsigned start, unsigned count,
 
 
     if (!data)
     if (!data)
     {
     {
-        LOGERROR("Null pointer for index buffer data");
+        URHO3D_LOGERROR("Null pointer for index buffer data");
         return false;
         return false;
     }
     }
 
 
     if (!indexSize_)
     if (!indexSize_)
     {
     {
-        LOGERROR("Index size not defined, can not set index buffer data");
+        URHO3D_LOGERROR("Index size not defined, can not set index buffer data");
         return false;
         return false;
     }
     }
 
 
     if (start + count > indexCount_)
     if (start + count > indexCount_)
     {
     {
-        LOGERROR("Illegal range for setting new index buffer data");
+        URHO3D_LOGERROR("Illegal range for setting new index buffer data");
         return false;
         return false;
     }
     }
 
 
@@ -215,19 +215,19 @@ void* IndexBuffer::Lock(unsigned start, unsigned count, bool discard)
 {
 {
     if (lockState_ != LOCK_NONE)
     if (lockState_ != LOCK_NONE)
     {
     {
-        LOGERROR("Index buffer already locked");
+        URHO3D_LOGERROR("Index buffer already locked");
         return 0;
         return 0;
     }
     }
 
 
     if (!indexSize_)
     if (!indexSize_)
     {
     {
-        LOGERROR("Index size not defined, can not lock index buffer");
+        URHO3D_LOGERROR("Index size not defined, can not lock index buffer");
         return 0;
         return 0;
     }
     }
 
 
     if (start + count > indexCount_)
     if (start + count > indexCount_)
     {
     {
-        LOGERROR("Illegal range for locking index buffer");
+        URHO3D_LOGERROR("Illegal range for locking index buffer");
         return 0;
         return 0;
     }
     }
 
 
@@ -284,13 +284,13 @@ bool IndexBuffer::GetUsedVertexRange(unsigned start, unsigned count, unsigned& m
 {
 {
     if (!shadowData_)
     if (!shadowData_)
     {
     {
-        LOGERROR("Used vertex range can only be queried from an index buffer with shadow data");
+        URHO3D_LOGERROR("Used vertex range can only be queried from an index buffer with shadow data");
         return false;
         return false;
     }
     }
 
 
     if (start + count > indexCount_)
     if (start + count > indexCount_)
     {
     {
-        LOGERROR("Illegal index range for querying used vertices");
+        URHO3D_LOGERROR("Illegal index range for querying used vertices");
         return false;
         return false;
     }
     }
 
 
@@ -346,7 +346,7 @@ bool IndexBuffer::Create()
 
 
         if (!object_)
         if (!object_)
         {
         {
-            LOGERROR("Failed to create index buffer");
+            URHO3D_LOGERROR("Failed to create index buffer");
             return false;
             return false;
         }
         }
     }
     }
@@ -375,7 +375,7 @@ void* IndexBuffer::MapBuffer(unsigned start, unsigned count, bool discard)
             D3D11_MAP_WRITE, 0, &mappedData);
             D3D11_MAP_WRITE, 0, &mappedData);
         hwData = mappedData.pData;
         hwData = mappedData.pData;
         if (!hwData)
         if (!hwData)
-            LOGERROR("Failed to map index buffer");
+            URHO3D_LOGERROR("Failed to map index buffer");
         else
         else
             lockState_ = LOCK_HARDWARE;
             lockState_ = LOCK_HARDWARE;
     }
     }

+ 3 - 3
Source/Urho3D/Graphics/Direct3D11/D3D11ShaderVariation.cpp

@@ -174,7 +174,7 @@ bool ShaderVariation::LoadByteCode(const String& binaryShaderName)
     SharedPtr<File> file = cache->GetFile(binaryShaderName);
     SharedPtr<File> file = cache->GetFile(binaryShaderName);
     if (!file || file->ReadFileID() != "USHD")
     if (!file || file->ReadFileID() != "USHD")
     {
     {
-        LOGERROR(binaryShaderName + " is not a valid shader bytecode file");
+        URHO3D_LOGERROR(binaryShaderName + " is not a valid shader bytecode file");
         return false;
         return false;
     }
     }
 
 
@@ -221,7 +221,7 @@ bool ShaderVariation::LoadByteCode(const String& binaryShaderName)
     }
     }
     else
     else
     {
     {
-        LOGERROR(binaryShaderName + " has zero length bytecode");
+        URHO3D_LOGERROR(binaryShaderName + " has zero length bytecode");
         return false;
         return false;
     }
     }
 }
 }
@@ -333,7 +333,7 @@ void ShaderVariation::ParseParameters(unsigned char* bufData, unsigned bufSize)
     D3DReflect(bufData, bufSize, IID_ID3D11ShaderReflection, (void**)&reflection);
     D3DReflect(bufData, bufSize, IID_ID3D11ShaderReflection, (void**)&reflection);
     if (!reflection)
     if (!reflection)
     {
     {
-        LOGERROR("Failed to reflect vertex shader's input signature");
+        URHO3D_LOGERROR("Failed to reflect vertex shader's input signature");
         return;
         return;
     }
     }
 
 

+ 1 - 1
Source/Urho3D/Graphics/Direct3D11/D3D11Texture.cpp

@@ -349,7 +349,7 @@ void Texture::UpdateParameters()
     graphics_->GetImpl()->GetDevice()->CreateSamplerState(&samplerDesc, (ID3D11SamplerState**)&sampler_);
     graphics_->GetImpl()->GetDevice()->CreateSamplerState(&samplerDesc, (ID3D11SamplerState**)&sampler_);
 
 
     if (!sampler_)
     if (!sampler_)
-        LOGERROR("Failed to create sampler state");
+        URHO3D_LOGERROR("Failed to create sampler state");
 
 
     parametersDirty_ = false;
     parametersDirty_ = false;
 }
 }

+ 15 - 15
Source/Urho3D/Graphics/Direct3D11/D3D11Texture2D.cpp

@@ -170,19 +170,19 @@ bool Texture2D::SetData(unsigned level, int x, int y, int width, int height, con
 
 
     if (!object_)
     if (!object_)
     {
     {
-        LOGERROR("No texture created, can not set data");
+        URHO3D_LOGERROR("No texture created, can not set data");
         return false;
         return false;
     }
     }
 
 
     if (!data)
     if (!data)
     {
     {
-        LOGERROR("Null source for setting data");
+        URHO3D_LOGERROR("Null source for setting data");
         return false;
         return false;
     }
     }
 
 
     if (level >= levels_)
     if (level >= levels_)
     {
     {
-        LOGERROR("Illegal mip level for setting data");
+        URHO3D_LOGERROR("Illegal mip level for setting data");
         return false;
         return false;
     }
     }
 
 
@@ -190,7 +190,7 @@ bool Texture2D::SetData(unsigned level, int x, int y, int width, int height, con
     int levelHeight = GetLevelHeight(level);
     int levelHeight = GetLevelHeight(level);
     if (x < 0 || x + width > levelWidth || y < 0 || y + height > levelHeight || width <= 0 || height <= 0)
     if (x < 0 || x + width > levelWidth || y < 0 || y + height > levelHeight || width <= 0 || height <= 0)
     {
     {
-        LOGERROR("Illegal dimensions for setting data");
+        URHO3D_LOGERROR("Illegal dimensions for setting data");
         return false;
         return false;
     }
     }
 
 
@@ -231,7 +231,7 @@ bool Texture2D::SetData(unsigned level, int x, int y, int width, int height, con
         }
         }
         else
         else
         {
         {
-            LOGERROR("Failed to map texture for update");
+            URHO3D_LOGERROR("Failed to map texture for update");
             return false;
             return false;
         }
         }
     }
     }
@@ -256,7 +256,7 @@ bool Texture2D::SetData(SharedPtr<Image> image, bool useAlpha)
 {
 {
     if (!image)
     if (!image)
     {
     {
-        LOGERROR("Null image, can not load texture");
+        URHO3D_LOGERROR("Null image, can not load texture");
         return false;
         return false;
     }
     }
 
 
@@ -377,19 +377,19 @@ bool Texture2D::GetData(unsigned level, void* dest) const
 {
 {
     if (!object_)
     if (!object_)
     {
     {
-        LOGERROR("No texture created, can not get data");
+        URHO3D_LOGERROR("No texture created, can not get data");
         return false;
         return false;
     }
     }
 
 
     if (!dest)
     if (!dest)
     {
     {
-        LOGERROR("Null destination for getting data");
+        URHO3D_LOGERROR("Null destination for getting data");
         return false;
         return false;
     }
     }
 
 
     if (level >= levels_)
     if (level >= levels_)
     {
     {
-        LOGERROR("Illegal mip level for getting data");
+        URHO3D_LOGERROR("Illegal mip level for getting data");
         return false;
         return false;
     }
     }
 
 
@@ -412,7 +412,7 @@ bool Texture2D::GetData(unsigned level, void* dest) const
     graphics_->GetImpl()->GetDevice()->CreateTexture2D(&textureDesc, 0, &stagingTexture);
     graphics_->GetImpl()->GetDevice()->CreateTexture2D(&textureDesc, 0, &stagingTexture);
     if (!stagingTexture)
     if (!stagingTexture)
     {
     {
-        LOGERROR("Failed to create staging texture for GetData");
+        URHO3D_LOGERROR("Failed to create staging texture for GetData");
         return false;
         return false;
     }
     }
 
 
@@ -443,7 +443,7 @@ bool Texture2D::GetData(unsigned level, void* dest) const
     }
     }
     else
     else
     {
     {
-        LOGERROR("Failed to map staging texture for GetData");
+        URHO3D_LOGERROR("Failed to map staging texture for GetData");
         stagingTexture->Release();
         stagingTexture->Release();
         return false;
         return false;
     }
     }
@@ -478,7 +478,7 @@ bool Texture2D::Create()
     graphics_->GetImpl()->GetDevice()->CreateTexture2D(&textureDesc, 0, (ID3D11Texture2D**)&object_);
     graphics_->GetImpl()->GetDevice()->CreateTexture2D(&textureDesc, 0, (ID3D11Texture2D**)&object_);
     if (!object_)
     if (!object_)
     {
     {
-        LOGERROR("Failed to create texture");
+        URHO3D_LOGERROR("Failed to create texture");
         return false;
         return false;
     }
     }
 
 
@@ -492,7 +492,7 @@ bool Texture2D::Create()
         (ID3D11ShaderResourceView**)&shaderResourceView_);
         (ID3D11ShaderResourceView**)&shaderResourceView_);
     if (!shaderResourceView_)
     if (!shaderResourceView_)
     {
     {
-        LOGERROR("Failed to create shader resource view for texture");
+        URHO3D_LOGERROR("Failed to create shader resource view for texture");
         return false;
         return false;
     }
     }
 
 
@@ -510,7 +510,7 @@ bool Texture2D::Create()
 
 
         if (!renderSurface_->renderTargetView_)
         if (!renderSurface_->renderTargetView_)
         {
         {
-            LOGERROR("Failed to create rendertarget view for texture");
+            URHO3D_LOGERROR("Failed to create rendertarget view for texture");
             return false;
             return false;
         }
         }
     }
     }
@@ -528,7 +528,7 @@ bool Texture2D::Create()
 
 
         if (!renderSurface_->renderTargetView_)
         if (!renderSurface_->renderTargetView_)
         {
         {
-            LOGERROR("Failed to create depth-stencil view for texture");
+            URHO3D_LOGERROR("Failed to create depth-stencil view for texture");
             return false;
             return false;
         }
         }
     }
     }

+ 14 - 14
Source/Urho3D/Graphics/Direct3D11/D3D11Texture3D.cpp

@@ -120,7 +120,7 @@ bool Texture3D::BeginLoad(Deserializer& source)
         return true;
         return true;
     }
     }
 
 
-    LOGERROR("Texture3D XML data for " + GetName() + " did not contain either volume or colorlut element");
+    URHO3D_LOGERROR("Texture3D XML data for " + GetName() + " did not contain either volume or colorlut element");
     return false;
     return false;
 }
 }
 
 
@@ -216,19 +216,19 @@ bool Texture3D::SetData(unsigned level, int x, int y, int z, int width, int heig
 
 
     if (!object_)
     if (!object_)
     {
     {
-        LOGERROR("No texture created, can not set data");
+        URHO3D_LOGERROR("No texture created, can not set data");
         return false;
         return false;
     }
     }
 
 
     if (!data)
     if (!data)
     {
     {
-        LOGERROR("Null source for setting data");
+        URHO3D_LOGERROR("Null source for setting data");
         return false;
         return false;
     }
     }
 
 
     if (level >= levels_)
     if (level >= levels_)
     {
     {
-        LOGERROR("Illegal mip level for setting data");
+        URHO3D_LOGERROR("Illegal mip level for setting data");
         return false;
         return false;
     }
     }
 
 
@@ -238,7 +238,7 @@ bool Texture3D::SetData(unsigned level, int x, int y, int z, int width, int heig
     if (x < 0 || x + width > levelWidth || y < 0 || y + height > levelHeight || z < 0 || z + depth > levelDepth || width <= 0 ||
     if (x < 0 || x + width > levelWidth || y < 0 || y + height > levelHeight || z < 0 || z + depth > levelDepth || width <= 0 ||
         height <= 0 || depth <= 0)
         height <= 0 || depth <= 0)
     {
     {
-        LOGERROR("Illegal dimensions for setting data");
+        URHO3D_LOGERROR("Illegal dimensions for setting data");
         return false;
         return false;
     }
     }
 
 
@@ -286,7 +286,7 @@ bool Texture3D::SetData(unsigned level, int x, int y, int z, int width, int heig
         }
         }
         else
         else
         {
         {
-            LOGERROR("Failed to map texture for update");
+            URHO3D_LOGERROR("Failed to map texture for update");
             return false;
             return false;
         }
         }
     }
     }
@@ -314,7 +314,7 @@ bool Texture3D::SetData(SharedPtr<Image> image, bool useAlpha)
 {
 {
     if (!image)
     if (!image)
     {
     {
-        LOGERROR("Null image, can not load texture");
+        URHO3D_LOGERROR("Null image, can not load texture");
         return false;
         return false;
     }
     }
 
 
@@ -440,19 +440,19 @@ bool Texture3D::GetData(unsigned level, void* dest) const
 {
 {
     if (!object_)
     if (!object_)
     {
     {
-        LOGERROR("No texture created, can not get data");
+        URHO3D_LOGERROR("No texture created, can not get data");
         return false;
         return false;
     }
     }
 
 
     if (!dest)
     if (!dest)
     {
     {
-        LOGERROR("Null destination for getting data");
+        URHO3D_LOGERROR("Null destination for getting data");
         return false;
         return false;
     }
     }
 
 
     if (level >= levels_)
     if (level >= levels_)
     {
     {
-        LOGERROR("Illegal mip level for getting data");
+        URHO3D_LOGERROR("Illegal mip level for getting data");
         return false;
         return false;
     }
     }
 
 
@@ -474,7 +474,7 @@ bool Texture3D::GetData(unsigned level, void* dest) const
     graphics_->GetImpl()->GetDevice()->CreateTexture3D(&textureDesc, 0, &stagingTexture);
     graphics_->GetImpl()->GetDevice()->CreateTexture3D(&textureDesc, 0, &stagingTexture);
     if (!stagingTexture)
     if (!stagingTexture)
     {
     {
-        LOGERROR("Failed to create staging texture for GetData");
+        URHO3D_LOGERROR("Failed to create staging texture for GetData");
         return false;
         return false;
     }
     }
 
 
@@ -511,7 +511,7 @@ bool Texture3D::GetData(unsigned level, void* dest) const
     }
     }
     else
     else
     {
     {
-        LOGERROR("Failed to map staging texture for GetData");
+        URHO3D_LOGERROR("Failed to map staging texture for GetData");
         stagingTexture->Release();
         stagingTexture->Release();
         return false;
         return false;
     }
     }
@@ -540,7 +540,7 @@ bool Texture3D::Create()
     graphics_->GetImpl()->GetDevice()->CreateTexture3D(&textureDesc, 0, (ID3D11Texture3D**)&object_);
     graphics_->GetImpl()->GetDevice()->CreateTexture3D(&textureDesc, 0, (ID3D11Texture3D**)&object_);
     if (!object_)
     if (!object_)
     {
     {
-        LOGERROR("Failed to create texture");
+        URHO3D_LOGERROR("Failed to create texture");
         return false;
         return false;
     }
     }
 
 
@@ -554,7 +554,7 @@ bool Texture3D::Create()
         (ID3D11ShaderResourceView**)&shaderResourceView_);
         (ID3D11ShaderResourceView**)&shaderResourceView_);
     if (!shaderResourceView_)
     if (!shaderResourceView_)
     {
     {
-        LOGERROR("Failed to create shader resource view for texture");
+        URHO3D_LOGERROR("Failed to create shader resource view for texture");
         return false;
         return false;
     }
     }
 
 

+ 22 - 22
Source/Urho3D/Graphics/Direct3D11/D3D11TextureCube.cpp

@@ -287,12 +287,12 @@ bool TextureCube::SetSize(int size, unsigned format, TextureUsage usage)
 {
 {
     if (size <= 0)
     if (size <= 0)
     {
     {
-        LOGERROR("Zero or negative cube texture size");
+        URHO3D_LOGERROR("Zero or negative cube texture size");
         return false;
         return false;
     }
     }
     if (usage == TEXTURE_DEPTHSTENCIL)
     if (usage == TEXTURE_DEPTHSTENCIL)
     {
     {
-        LOGERROR("Depth-stencil usage not supported for cube maps");
+        URHO3D_LOGERROR("Depth-stencil usage not supported for cube maps");
         return false;
         return false;
     }
     }
 
 
@@ -332,19 +332,19 @@ bool TextureCube::SetData(CubeMapFace face, unsigned level, int x, int y, int wi
 
 
     if (!object_)
     if (!object_)
     {
     {
-        LOGERROR("No texture created, can not set data");
+        URHO3D_LOGERROR("No texture created, can not set data");
         return false;
         return false;
     }
     }
 
 
     if (!data)
     if (!data)
     {
     {
-        LOGERROR("Null source for setting data");
+        URHO3D_LOGERROR("Null source for setting data");
         return false;
         return false;
     }
     }
 
 
     if (level >= levels_)
     if (level >= levels_)
     {
     {
-        LOGERROR("Illegal mip level for setting data");
+        URHO3D_LOGERROR("Illegal mip level for setting data");
         return false;
         return false;
     }
     }
 
 
@@ -352,7 +352,7 @@ bool TextureCube::SetData(CubeMapFace face, unsigned level, int x, int y, int wi
     int levelHeight = GetLevelHeight(level);
     int levelHeight = GetLevelHeight(level);
     if (x < 0 || x + width > levelWidth || y < 0 || y + height > levelHeight || width <= 0 || height <= 0)
     if (x < 0 || x + width > levelWidth || y < 0 || y + height > levelHeight || width <= 0 || height <= 0)
     {
     {
-        LOGERROR("Illegal dimensions for setting data");
+        URHO3D_LOGERROR("Illegal dimensions for setting data");
         return false;
         return false;
     }
     }
 
 
@@ -393,7 +393,7 @@ bool TextureCube::SetData(CubeMapFace face, unsigned level, int x, int y, int wi
         }
         }
         else
         else
         {
         {
-            LOGERROR("Failed to map texture for update");
+            URHO3D_LOGERROR("Failed to map texture for update");
             return false;
             return false;
         }
         }
     }
     }
@@ -427,7 +427,7 @@ bool TextureCube::SetData(CubeMapFace face, SharedPtr<Image> image, bool useAlph
 {
 {
     if (!image)
     if (!image)
     {
     {
-        LOGERROR("Null image, can not load texture");
+        URHO3D_LOGERROR("Null image, can not load texture");
         return false;
         return false;
     }
     }
 
 
@@ -457,7 +457,7 @@ bool TextureCube::SetData(CubeMapFace face, SharedPtr<Image> image, bool useAlph
 
 
         if (levelWidth != levelHeight)
         if (levelWidth != levelHeight)
         {
         {
-            LOGERROR("Cube texture width not equal to height");
+            URHO3D_LOGERROR("Cube texture width not equal to height");
             return false;
             return false;
         }
         }
 
 
@@ -495,12 +495,12 @@ bool TextureCube::SetData(CubeMapFace face, SharedPtr<Image> image, bool useAlph
         {
         {
             if (!object_)
             if (!object_)
             {
             {
-                LOGERROR("Cube texture face 0 must be loaded first");
+                URHO3D_LOGERROR("Cube texture face 0 must be loaded first");
                 return false;
                 return false;
             }
             }
             if (levelWidth != width_ || format != format_)
             if (levelWidth != width_ || format != format_)
             {
             {
-                LOGERROR("Cube texture face does not match size or format of face 0");
+                URHO3D_LOGERROR("Cube texture face does not match size or format of face 0");
                 return false;
                 return false;
             }
             }
         }
         }
@@ -529,7 +529,7 @@ bool TextureCube::SetData(CubeMapFace face, SharedPtr<Image> image, bool useAlph
 
 
         if (width != height)
         if (width != height)
         {
         {
-            LOGERROR("Cube texture width not equal to height");
+            URHO3D_LOGERROR("Cube texture width not equal to height");
             return false;
             return false;
         }
         }
 
 
@@ -557,12 +557,12 @@ bool TextureCube::SetData(CubeMapFace face, SharedPtr<Image> image, bool useAlph
         {
         {
             if (!object_)
             if (!object_)
             {
             {
-                LOGERROR("Cube texture face 0 must be loaded first");
+                URHO3D_LOGERROR("Cube texture face 0 must be loaded first");
                 return false;
                 return false;
             }
             }
             if (width != width_ || format != format_)
             if (width != width_ || format != format_)
             {
             {
-                LOGERROR("Cube texture face does not match size or format of face 0");
+                URHO3D_LOGERROR("Cube texture face does not match size or format of face 0");
                 return false;
                 return false;
             }
             }
         }
         }
@@ -599,19 +599,19 @@ bool TextureCube::GetData(CubeMapFace face, unsigned level, void* dest) const
 {
 {
     if (!object_)
     if (!object_)
     {
     {
-        LOGERROR("No texture created, can not get data");
+        URHO3D_LOGERROR("No texture created, can not get data");
         return false;
         return false;
     }
     }
 
 
     if (!dest)
     if (!dest)
     {
     {
-        LOGERROR("Null destination for getting data");
+        URHO3D_LOGERROR("Null destination for getting data");
         return false;
         return false;
     }
     }
 
 
     if (level >= levels_)
     if (level >= levels_)
     {
     {
-        LOGERROR("Illegal mip level for getting data");
+        URHO3D_LOGERROR("Illegal mip level for getting data");
         return false;
         return false;
     }
     }
 
 
@@ -634,7 +634,7 @@ bool TextureCube::GetData(CubeMapFace face, unsigned level, void* dest) const
     graphics_->GetImpl()->GetDevice()->CreateTexture2D(&textureDesc, 0, &stagingTexture);
     graphics_->GetImpl()->GetDevice()->CreateTexture2D(&textureDesc, 0, &stagingTexture);
     if (!stagingTexture)
     if (!stagingTexture)
     {
     {
-        LOGERROR("Failed to create staging texture for GetData");
+        URHO3D_LOGERROR("Failed to create staging texture for GetData");
         return false;
         return false;
     }
     }
 
 
@@ -665,7 +665,7 @@ bool TextureCube::GetData(CubeMapFace face, unsigned level, void* dest) const
     }
     }
     else
     else
     {
     {
-        LOGERROR("Failed to map staging texture for GetData");
+        URHO3D_LOGERROR("Failed to map staging texture for GetData");
         stagingTexture->Release();
         stagingTexture->Release();
         return false;
         return false;
     }
     }
@@ -701,7 +701,7 @@ bool TextureCube::Create()
     graphics_->GetImpl()->GetDevice()->CreateTexture2D(&textureDesc, 0, (ID3D11Texture2D**)&object_);
     graphics_->GetImpl()->GetDevice()->CreateTexture2D(&textureDesc, 0, (ID3D11Texture2D**)&object_);
     if (!object_)
     if (!object_)
     {
     {
-        LOGERROR("Failed to create texture");
+        URHO3D_LOGERROR("Failed to create texture");
         return false;
         return false;
     }
     }
 
 
@@ -715,7 +715,7 @@ bool TextureCube::Create()
         (ID3D11ShaderResourceView**)&shaderResourceView_);
         (ID3D11ShaderResourceView**)&shaderResourceView_);
     if (!shaderResourceView_)
     if (!shaderResourceView_)
     {
     {
-        LOGERROR("Failed to create shader resource view for texture");
+        URHO3D_LOGERROR("Failed to create shader resource view for texture");
         return false;
         return false;
     }
     }
 
 
@@ -738,7 +738,7 @@ bool TextureCube::Create()
 
 
             if (!renderSurfaces_[i]->renderTargetView_)
             if (!renderSurfaces_[i]->renderTargetView_)
             {
             {
-                LOGERROR("Failed to create rendertarget view for texture");
+                URHO3D_LOGERROR("Failed to create rendertarget view for texture");
                 return false;
                 return false;
             }
             }
         }
         }

+ 10 - 10
Source/Urho3D/Graphics/Direct3D11/D3D11VertexBuffer.cpp

@@ -183,13 +183,13 @@ bool VertexBuffer::SetData(const void* data)
 {
 {
     if (!data)
     if (!data)
     {
     {
-        LOGERROR("Null pointer for vertex buffer data");
+        URHO3D_LOGERROR("Null pointer for vertex buffer data");
         return false;
         return false;
     }
     }
 
 
     if (!vertexSize_)
     if (!vertexSize_)
     {
     {
-        LOGERROR("Vertex elements not defined, can not set vertex buffer data");
+        URHO3D_LOGERROR("Vertex elements not defined, can not set vertex buffer data");
         return false;
         return false;
     }
     }
 
 
@@ -233,19 +233,19 @@ bool VertexBuffer::SetDataRange(const void* data, unsigned start, unsigned count
 
 
     if (!data)
     if (!data)
     {
     {
-        LOGERROR("Null pointer for vertex buffer data");
+        URHO3D_LOGERROR("Null pointer for vertex buffer data");
         return false;
         return false;
     }
     }
 
 
     if (!vertexSize_)
     if (!vertexSize_)
     {
     {
-        LOGERROR("Vertex elements not defined, can not set vertex buffer data");
+        URHO3D_LOGERROR("Vertex elements not defined, can not set vertex buffer data");
         return false;
         return false;
     }
     }
 
 
     if (start + count > vertexCount_)
     if (start + count > vertexCount_)
     {
     {
-        LOGERROR("Illegal range for setting new vertex buffer data");
+        URHO3D_LOGERROR("Illegal range for setting new vertex buffer data");
         return false;
         return false;
     }
     }
 
 
@@ -289,19 +289,19 @@ void* VertexBuffer::Lock(unsigned start, unsigned count, bool discard)
 {
 {
     if (lockState_ != LOCK_NONE)
     if (lockState_ != LOCK_NONE)
     {
     {
-        LOGERROR("Vertex buffer already locked");
+        URHO3D_LOGERROR("Vertex buffer already locked");
         return 0;
         return 0;
     }
     }
 
 
     if (!vertexSize_)
     if (!vertexSize_)
     {
     {
-        LOGERROR("Vertex elements not defined, can not lock vertex buffer");
+        URHO3D_LOGERROR("Vertex elements not defined, can not lock vertex buffer");
         return 0;
         return 0;
     }
     }
 
 
     if (start + count > vertexCount_)
     if (start + count > vertexCount_)
     {
     {
-        LOGERROR("Illegal range for locking vertex buffer");
+        URHO3D_LOGERROR("Illegal range for locking vertex buffer");
         return 0;
         return 0;
     }
     }
 
 
@@ -434,7 +434,7 @@ bool VertexBuffer::Create()
 
 
         if (!object_)
         if (!object_)
         {
         {
-            LOGERROR("Failed to create vertex buffer");
+            URHO3D_LOGERROR("Failed to create vertex buffer");
             return false;
             return false;
         }
         }
     }
     }
@@ -463,7 +463,7 @@ void* VertexBuffer::MapBuffer(unsigned start, unsigned count, bool discard)
             D3D11_MAP_WRITE, 0, &mappedData);
             D3D11_MAP_WRITE, 0, &mappedData);
         hwData = mappedData.pData;
         hwData = mappedData.pData;
         if (!hwData)
         if (!hwData)
-            LOGERROR("Failed to map vertex buffer");
+            URHO3D_LOGERROR("Failed to map vertex buffer");
         else
         else
             lockState_ = LOCK_HARDWARE;
             lockState_ = LOCK_HARDWARE;
     }
     }

+ 13 - 13
Source/Urho3D/Graphics/Direct3D9/D3D9Graphics.cpp

@@ -354,7 +354,7 @@ void Graphics::SetExternalWindow(void* window)
     if (!impl_->window_)
     if (!impl_->window_)
         externalWindow_ = window;
         externalWindow_ = window;
     else
     else
-        LOGERROR("Window already opened, can not set external window");
+        URHO3D_LOGERROR("Window already opened, can not set external window");
 }
 }
 
 
 void Graphics::SetWindowTitle(const String& windowTitle)
 void Graphics::SetWindowTitle(const String& windowTitle)
@@ -647,7 +647,7 @@ bool Graphics::TakeScreenShot(Image& destImage)
     impl_->device_->CreateOffscreenPlainSurface(surfaceWidth, surfaceHeight, surfaceDesc.Format, D3DPOOL_SYSTEMMEM, &surface, 0);
     impl_->device_->CreateOffscreenPlainSurface(surfaceWidth, surfaceHeight, surfaceDesc.Format, D3DPOOL_SYSTEMMEM, &surface, 0);
     if (!surface)
     if (!surface)
     {
     {
-        LOGERROR("Could not create surface for taking a screenshot");
+        URHO3D_LOGERROR("Could not create surface for taking a screenshot");
         return false;
         return false;
     }
     }
 
 
@@ -677,7 +677,7 @@ bool Graphics::TakeScreenShot(Image& destImage)
     surface->LockRect(&lockedRect, &sourceRect, D3DLOCK_NOSYSLOCK | D3DLOCK_READONLY);
     surface->LockRect(&lockedRect, &sourceRect, D3DLOCK_NOSYSLOCK | D3DLOCK_READONLY);
     if (!lockedRect.pBits)
     if (!lockedRect.pBits)
     {
     {
-        LOGERROR("Could not lock surface for taking a screenshot");
+        URHO3D_LOGERROR("Could not lock surface for taking a screenshot");
         surface->Release();
         surface->Release();
         return false;
         return false;
     }
     }
@@ -950,12 +950,12 @@ bool Graphics::SetVertexBuffers(const PODVector<VertexBuffer*>& buffers, const P
 {
 {
     if (buffers.Size() > MAX_VERTEX_STREAMS)
     if (buffers.Size() > MAX_VERTEX_STREAMS)
     {
     {
-        LOGERROR("Too many vertex buffers");
+        URHO3D_LOGERROR("Too many vertex buffers");
         return false;
         return false;
     }
     }
     if (buffers.Size() != elementMasks.Size())
     if (buffers.Size() != elementMasks.Size())
     {
     {
-        LOGERROR("Amount of element masks and vertex buffers does not match");
+        URHO3D_LOGERROR("Amount of element masks and vertex buffers does not match");
         return false;
         return false;
     }
     }
 
 
@@ -977,7 +977,7 @@ bool Graphics::SetVertexBuffers(const PODVector<VertexBuffer*>& buffers, const P
             SharedPtr<VertexDeclaration> newDeclaration(new VertexDeclaration(this, buffers, elementMasks));
             SharedPtr<VertexDeclaration> newDeclaration(new VertexDeclaration(this, buffers, elementMasks));
             if (!newDeclaration->GetDeclaration())
             if (!newDeclaration->GetDeclaration())
             {
             {
-                LOGERROR("Failed to create vertex declaration");
+                URHO3D_LOGERROR("Failed to create vertex declaration");
                 return false;
                 return false;
             }
             }
 
 
@@ -1058,7 +1058,7 @@ void Graphics::SetShaders(ShaderVariation* vs, ShaderVariation* ps)
                 bool success = vs->Create();
                 bool success = vs->Create();
                 if (!success)
                 if (!success)
                 {
                 {
-                    LOGERROR("Failed to compile vertex shader " + vs->GetFullName() + ":\n" + vs->GetCompilerOutput());
+                    URHO3D_LOGERROR("Failed to compile vertex shader " + vs->GetFullName() + ":\n" + vs->GetCompilerOutput());
                     vs = 0;
                     vs = 0;
                 }
                 }
             }
             }
@@ -1088,7 +1088,7 @@ void Graphics::SetShaders(ShaderVariation* vs, ShaderVariation* ps)
                 bool success = ps->Create();
                 bool success = ps->Create();
                 if (!success)
                 if (!success)
                 {
                 {
-                    LOGERROR("Failed to compile pixel shader " + ps->GetFullName() + ":\n" + ps->GetCompilerOutput());
+                    URHO3D_LOGERROR("Failed to compile pixel shader " + ps->GetFullName() + ":\n" + ps->GetCompilerOutput());
                     ps = 0;
                     ps = 0;
                 }
                 }
             }
             }
@@ -2430,25 +2430,25 @@ bool Graphics::CreateInterface()
     impl_->interface_ = Direct3DCreate9(D3D_SDK_VERSION);
     impl_->interface_ = Direct3DCreate9(D3D_SDK_VERSION);
     if (!impl_->interface_)
     if (!impl_->interface_)
     {
     {
-        LOGERROR("Could not create Direct3D9 interface");
+        URHO3D_LOGERROR("Could not create Direct3D9 interface");
         return false;
         return false;
     }
     }
 
 
     if (FAILED(impl_->interface_->GetDeviceCaps(impl_->adapter_, impl_->deviceType_, &impl_->deviceCaps_)))
     if (FAILED(impl_->interface_->GetDeviceCaps(impl_->adapter_, impl_->deviceType_, &impl_->deviceCaps_)))
     {
     {
-        LOGERROR("Could not get Direct3D capabilities");
+        URHO3D_LOGERROR("Could not get Direct3D capabilities");
         return false;
         return false;
     }
     }
 
 
     if (FAILED(impl_->interface_->GetAdapterIdentifier(impl_->adapter_, 0, &impl_->adapterIdentifier_)))
     if (FAILED(impl_->interface_->GetAdapterIdentifier(impl_->adapter_, 0, &impl_->adapterIdentifier_)))
     {
     {
-        LOGERROR("Could not get Direct3D adapter identifier");
+        URHO3D_LOGERROR("Could not get Direct3D adapter identifier");
         return false;
         return false;
     }
     }
 
 
     if (impl_->deviceCaps_.PixelShaderVersion < D3DPS_VERSION(3, 0))
     if (impl_->deviceCaps_.PixelShaderVersion < D3DPS_VERSION(3, 0))
     {
     {
-        LOGERROR("Shader model 3.0 display adapter is required");
+        URHO3D_LOGERROR("Shader model 3.0 display adapter is required");
         return false;
         return false;
     }
     }
 
 
@@ -2479,7 +2479,7 @@ bool Graphics::CreateDevice(unsigned adapter, unsigned deviceType)
         &impl_->presentParams_,
         &impl_->presentParams_,
         &impl_->device_)))
         &impl_->device_)))
     {
     {
-        LOGERROR("Could not create Direct3D9 device");
+        URHO3D_LOGERROR("Could not create Direct3D9 device");
         return false;
         return false;
     }
     }
 
 

+ 12 - 12
Source/Urho3D/Graphics/Direct3D9/D3D9IndexBuffer.cpp

@@ -139,13 +139,13 @@ bool IndexBuffer::SetData(const void* data)
 {
 {
     if (!data)
     if (!data)
     {
     {
-        LOGERROR("Null pointer for index buffer data");
+        URHO3D_LOGERROR("Null pointer for index buffer data");
         return false;
         return false;
     }
     }
 
 
     if (!indexSize_)
     if (!indexSize_)
     {
     {
-        LOGERROR("Index size not defined, can not set index buffer data");
+        URHO3D_LOGERROR("Index size not defined, can not set index buffer data");
         return false;
         return false;
     }
     }
 
 
@@ -182,19 +182,19 @@ bool IndexBuffer::SetDataRange(const void* data, unsigned start, unsigned count,
 
 
     if (!data)
     if (!data)
     {
     {
-        LOGERROR("Null pointer for index buffer data");
+        URHO3D_LOGERROR("Null pointer for index buffer data");
         return false;
         return false;
     }
     }
 
 
     if (!indexSize_)
     if (!indexSize_)
     {
     {
-        LOGERROR("Index size not defined, can not set index buffer data");
+        URHO3D_LOGERROR("Index size not defined, can not set index buffer data");
         return false;
         return false;
     }
     }
 
 
     if (start + count > indexCount_)
     if (start + count > indexCount_)
     {
     {
-        LOGERROR("Illegal range for setting new index buffer data");
+        URHO3D_LOGERROR("Illegal range for setting new index buffer data");
         return false;
         return false;
     }
     }
 
 
@@ -230,19 +230,19 @@ void* IndexBuffer::Lock(unsigned start, unsigned count, bool discard)
 {
 {
     if (lockState_ != LOCK_NONE)
     if (lockState_ != LOCK_NONE)
     {
     {
-        LOGERROR("Index buffer already locked");
+        URHO3D_LOGERROR("Index buffer already locked");
         return 0;
         return 0;
     }
     }
 
 
     if (!indexSize_)
     if (!indexSize_)
     {
     {
-        LOGERROR("Index size not defined, can not lock index buffer");
+        URHO3D_LOGERROR("Index size not defined, can not lock index buffer");
         return 0;
         return 0;
     }
     }
 
 
     if (start + count > indexCount_)
     if (start + count > indexCount_)
     {
     {
-        LOGERROR("Illegal range for locking index buffer");
+        URHO3D_LOGERROR("Illegal range for locking index buffer");
         return 0;
         return 0;
     }
     }
 
 
@@ -304,13 +304,13 @@ bool IndexBuffer::GetUsedVertexRange(unsigned start, unsigned count, unsigned& m
 {
 {
     if (!shadowData_)
     if (!shadowData_)
     {
     {
-        LOGERROR("Used vertex range can only be queried from an index buffer with shadow data");
+        URHO3D_LOGERROR("Used vertex range can only be queried from an index buffer with shadow data");
         return false;
         return false;
     }
     }
 
 
     if (start + count > indexCount_)
     if (start + count > indexCount_)
     {
     {
-        LOGERROR("Illegal index range for querying used vertices");
+        URHO3D_LOGERROR("Illegal index range for querying used vertices");
         return false;
         return false;
     }
     }
 
 
@@ -370,7 +370,7 @@ bool IndexBuffer::Create()
             (IDirect3DIndexBuffer9**)&object_,
             (IDirect3DIndexBuffer9**)&object_,
             0)))
             0)))
         {
         {
-            LOGERROR("Could not create index buffer");
+            URHO3D_LOGERROR("Could not create index buffer");
             return false;
             return false;
         }
         }
     }
     }
@@ -398,7 +398,7 @@ void* IndexBuffer::MapBuffer(unsigned start, unsigned count, bool discard)
             flags = D3DLOCK_DISCARD;
             flags = D3DLOCK_DISCARD;
 
 
         if (FAILED(((IDirect3DIndexBuffer9*)object_)->Lock(start * indexSize_, count * indexSize_, &hwData, flags)))
         if (FAILED(((IDirect3DIndexBuffer9*)object_)->Lock(start * indexSize_, count * indexSize_, &hwData, flags)))
-            LOGERROR("Could not lock index buffer");
+            URHO3D_LOGERROR("Could not lock index buffer");
         else
         else
             lockState_ = LOCK_HARDWARE;
             lockState_ = LOCK_HARDWARE;
     }
     }

+ 2 - 2
Source/Urho3D/Graphics/Direct3D9/D3D9ShaderVariation.cpp

@@ -169,7 +169,7 @@ bool ShaderVariation::LoadByteCode(PODVector<unsigned>& byteCode, const String&
     SharedPtr<File> file = cache->GetFile(binaryShaderName);
     SharedPtr<File> file = cache->GetFile(binaryShaderName);
     if (!file || file->ReadFileID() != "USHD")
     if (!file || file->ReadFileID() != "USHD")
     {
     {
-        LOGERROR(binaryShaderName + " is not a valid shader bytecode file");
+        URHO3D_LOGERROR(binaryShaderName + " is not a valid shader bytecode file");
         return false;
         return false;
     }
     }
 
 
@@ -213,7 +213,7 @@ bool ShaderVariation::LoadByteCode(PODVector<unsigned>& byteCode, const String&
     }
     }
     else
     else
     {
     {
-        LOGERROR(binaryShaderName + " has zero length bytecode");
+        URHO3D_LOGERROR(binaryShaderName + " has zero length bytecode");
         return false;
         return false;
     }
     }
 }
 }

+ 15 - 15
Source/Urho3D/Graphics/Direct3D9/D3D9Texture2D.cpp

@@ -203,19 +203,19 @@ bool Texture2D::SetData(unsigned level, int x, int y, int width, int height, con
 
 
     if (!object_)
     if (!object_)
     {
     {
-        LOGERROR("No texture created, can not set data");
+        URHO3D_LOGERROR("No texture created, can not set data");
         return false;
         return false;
     }
     }
 
 
     if (!data)
     if (!data)
     {
     {
-        LOGERROR("Null source for setting data");
+        URHO3D_LOGERROR("Null source for setting data");
         return false;
         return false;
     }
     }
 
 
     if (level >= levels_)
     if (level >= levels_)
     {
     {
-        LOGERROR("Illegal mip level for setting data");
+        URHO3D_LOGERROR("Illegal mip level for setting data");
         return false;
         return false;
     }
     }
 
 
@@ -236,7 +236,7 @@ bool Texture2D::SetData(unsigned level, int x, int y, int width, int height, con
     int levelHeight = GetLevelHeight(level);
     int levelHeight = GetLevelHeight(level);
     if (x < 0 || x + width > levelWidth || y < 0 || y + height > levelHeight || width <= 0 || height <= 0)
     if (x < 0 || x + width > levelWidth || y < 0 || y + height > levelHeight || width <= 0 || height <= 0)
     {
     {
-        LOGERROR("Illegal dimensions for setting data");
+        URHO3D_LOGERROR("Illegal dimensions for setting data");
         return false;
         return false;
     }
     }
 
 
@@ -253,7 +253,7 @@ bool Texture2D::SetData(unsigned level, int x, int y, int width, int height, con
 
 
     if (FAILED(((IDirect3DTexture9*)object_)->LockRect(level, &d3dLockedRect, (flags & D3DLOCK_DISCARD) ? 0 : &d3dRect, flags)))
     if (FAILED(((IDirect3DTexture9*)object_)->LockRect(level, &d3dLockedRect, (flags & D3DLOCK_DISCARD) ? 0 : &d3dRect, flags)))
     {
     {
-        LOGERROR("Could not lock texture");
+        URHO3D_LOGERROR("Could not lock texture");
         return false;
         return false;
     }
     }
 
 
@@ -321,7 +321,7 @@ bool Texture2D::SetData(SharedPtr<Image> image, bool useAlpha)
 {
 {
     if (!image)
     if (!image)
     {
     {
-        LOGERROR("Null image, can not load texture");
+        URHO3D_LOGERROR("Null image, can not load texture");
         return false;
         return false;
     }
     }
 
 
@@ -443,19 +443,19 @@ bool Texture2D::GetData(unsigned level, void* dest) const
 {
 {
     if (!object_)
     if (!object_)
     {
     {
-        LOGERROR("No texture created, can not get data");
+        URHO3D_LOGERROR("No texture created, can not get data");
         return false;
         return false;
     }
     }
 
 
     if (!dest)
     if (!dest)
     {
     {
-        LOGERROR("Null destination for getting data");
+        URHO3D_LOGERROR("Null destination for getting data");
         return false;
         return false;
     }
     }
 
 
     if (level >= levels_)
     if (level >= levels_)
     {
     {
-        LOGERROR("Illegal mip level for getting data");
+        URHO3D_LOGERROR("Illegal mip level for getting data");
         return false;
         return false;
     }
     }
 
 
@@ -481,7 +481,7 @@ bool Texture2D::GetData(unsigned level, void* dest) const
     {
     {
         if (level != 0)
         if (level != 0)
         {
         {
-            LOGERROR("Can only get mip level 0 data from a rendertarget");
+            URHO3D_LOGERROR("Can only get mip level 0 data from a rendertarget");
             return false;
             return false;
         }
         }
 
 
@@ -490,13 +490,13 @@ bool Texture2D::GetData(unsigned level, void* dest) const
             D3DPOOL_SYSTEMMEM, &offscreenSurface, 0);
             D3DPOOL_SYSTEMMEM, &offscreenSurface, 0);
         if (!offscreenSurface)
         if (!offscreenSurface)
         {
         {
-            LOGERROR("Could not create surface for getting rendertarget data");
+            URHO3D_LOGERROR("Could not create surface for getting rendertarget data");
             return false;
             return false;
         }
         }
         device->GetRenderTargetData((IDirect3DSurface9*)renderSurface_->GetSurface(), offscreenSurface);
         device->GetRenderTargetData((IDirect3DSurface9*)renderSurface_->GetSurface(), offscreenSurface);
         if (FAILED(offscreenSurface->LockRect(&d3dLockedRect, &d3dRect, D3DLOCK_READONLY)))
         if (FAILED(offscreenSurface->LockRect(&d3dLockedRect, &d3dRect, D3DLOCK_READONLY)))
         {
         {
-            LOGERROR("Could not lock surface for getting rendertarget data");
+            URHO3D_LOGERROR("Could not lock surface for getting rendertarget data");
             offscreenSurface->Release();
             offscreenSurface->Release();
             return false;
             return false;
         }
         }
@@ -505,7 +505,7 @@ bool Texture2D::GetData(unsigned level, void* dest) const
     {
     {
         if (FAILED(((IDirect3DTexture9*)object_)->LockRect(level, &d3dLockedRect, &d3dRect, D3DLOCK_READONLY)))
         if (FAILED(((IDirect3DTexture9*)object_)->LockRect(level, &d3dLockedRect, &d3dRect, D3DLOCK_READONLY)))
         {
         {
-            LOGERROR("Could not lock texture");
+            URHO3D_LOGERROR("Could not lock texture");
             return false;
             return false;
         }
         }
     }
     }
@@ -601,7 +601,7 @@ bool Texture2D::Create()
             (IDirect3DSurface9**)&renderSurface_->surface_,
             (IDirect3DSurface9**)&renderSurface_->surface_,
             0)))
             0)))
         {
         {
-            LOGERROR("Could not create depth-stencil surface");
+            URHO3D_LOGERROR("Could not create depth-stencil surface");
             return false;
             return false;
         }
         }
 
 
@@ -619,7 +619,7 @@ bool Texture2D::Create()
             (IDirect3DTexture9**)&object_,
             (IDirect3DTexture9**)&object_,
             0)))
             0)))
         {
         {
-            LOGERROR("Could not create texture");
+            URHO3D_LOGERROR("Could not create texture");
             return false;
             return false;
         }
         }
 
 

+ 12 - 12
Source/Urho3D/Graphics/Direct3D9/D3D9Texture3D.cpp

@@ -128,7 +128,7 @@ bool Texture3D::BeginLoad(Deserializer& source)
         return true;
         return true;
     }
     }
 
 
-    LOGERROR("Texture3D XML data for " + GetName() + " did not contain either volume or colorlut element");
+    URHO3D_LOGERROR("Texture3D XML data for " + GetName() + " did not contain either volume or colorlut element");
     return false;
     return false;
 }
 }
 
 
@@ -245,19 +245,19 @@ bool Texture3D::SetData(unsigned level, int x, int y, int z, int width, int heig
 
 
     if (!object_)
     if (!object_)
     {
     {
-        LOGERROR("No texture created, can not set data");
+        URHO3D_LOGERROR("No texture created, can not set data");
         return false;
         return false;
     }
     }
 
 
     if (!data)
     if (!data)
     {
     {
-        LOGERROR("Null source for setting data");
+        URHO3D_LOGERROR("Null source for setting data");
         return false;
         return false;
     }
     }
 
 
     if (level >= levels_)
     if (level >= levels_)
     {
     {
-        LOGERROR("Illegal mip level for setting data");
+        URHO3D_LOGERROR("Illegal mip level for setting data");
         return false;
         return false;
     }
     }
 
 
@@ -280,7 +280,7 @@ bool Texture3D::SetData(unsigned level, int x, int y, int z, int width, int heig
     if (x < 0 || x + width > levelWidth || y < 0 || y + height > levelHeight || z < 0 || z + depth > levelDepth || width <= 0 ||
     if (x < 0 || x + width > levelWidth || y < 0 || y + height > levelHeight || z < 0 || z + depth > levelDepth || width <= 0 ||
         height <= 0 || depth <= 0)
         height <= 0 || depth <= 0)
     {
     {
-        LOGERROR("Illegal dimensions for setting data");
+        URHO3D_LOGERROR("Illegal dimensions for setting data");
         return false;
         return false;
     }
     }
 
 
@@ -300,7 +300,7 @@ bool Texture3D::SetData(unsigned level, int x, int y, int z, int width, int heig
 
 
     if (FAILED(((IDirect3DVolumeTexture9*)object_)->LockBox(level, &d3dLockedBox, (flags & D3DLOCK_DISCARD) ? 0 : &d3dBox, flags)))
     if (FAILED(((IDirect3DVolumeTexture9*)object_)->LockBox(level, &d3dLockedBox, (flags & D3DLOCK_DISCARD) ? 0 : &d3dBox, flags)))
     {
     {
-        LOGERROR("Could not lock texture");
+        URHO3D_LOGERROR("Could not lock texture");
         return false;
         return false;
     }
     }
 
 
@@ -380,7 +380,7 @@ bool Texture3D::SetData(SharedPtr<Image> image, bool useAlpha)
 {
 {
     if (!image)
     if (!image)
     {
     {
-        LOGERROR("Null image, can not load texture");
+        URHO3D_LOGERROR("Null image, can not load texture");
         return false;
         return false;
     }
     }
 
 
@@ -507,19 +507,19 @@ bool Texture3D::GetData(unsigned level, void* dest) const
 {
 {
     if (!object_)
     if (!object_)
     {
     {
-        LOGERROR("No texture created, can not get data");
+        URHO3D_LOGERROR("No texture created, can not get data");
         return false;
         return false;
     }
     }
 
 
     if (!dest)
     if (!dest)
     {
     {
-        LOGERROR("Null destination for getting data");
+        URHO3D_LOGERROR("Null destination for getting data");
         return false;
         return false;
     }
     }
 
 
     if (level >= levels_)
     if (level >= levels_)
     {
     {
-        LOGERROR("Illegal mip level for getting data");
+        URHO3D_LOGERROR("Illegal mip level for getting data");
         return false;
         return false;
     }
     }
 
 
@@ -544,7 +544,7 @@ bool Texture3D::GetData(unsigned level, void* dest) const
 
 
     if (FAILED(((IDirect3DVolumeTexture9*)object_)->LockBox(level, &d3dLockedBox, &d3dBox, D3DLOCK_READONLY)))
     if (FAILED(((IDirect3DVolumeTexture9*)object_)->LockBox(level, &d3dLockedBox, &d3dBox, D3DLOCK_READONLY)))
     {
     {
-        LOGERROR("Could not lock texture");
+        URHO3D_LOGERROR("Could not lock texture");
         return false;
         return false;
     }
     }
 
 
@@ -640,7 +640,7 @@ bool Texture3D::Create()
         (IDirect3DVolumeTexture9**)&object_,
         (IDirect3DVolumeTexture9**)&object_,
         0)))
         0)))
     {
     {
-        LOGERROR("Could not create texture");
+        URHO3D_LOGERROR("Could not create texture");
         return false;
         return false;
     }
     }
 
 

+ 22 - 22
Source/Urho3D/Graphics/Direct3D9/D3D9TextureCube.cpp

@@ -305,12 +305,12 @@ bool TextureCube::SetSize(int size, unsigned format, TextureUsage usage)
 {
 {
     if (size <= 0)
     if (size <= 0)
     {
     {
-        LOGERROR("Zero or negative cube texture size");
+        URHO3D_LOGERROR("Zero or negative cube texture size");
         return false;
         return false;
     }
     }
     if (usage == TEXTURE_DEPTHSTENCIL)
     if (usage == TEXTURE_DEPTHSTENCIL)
     {
     {
-        LOGERROR("Depth-stencil usage not supported for cube maps");
+        URHO3D_LOGERROR("Depth-stencil usage not supported for cube maps");
         return false;
         return false;
     }
     }
 
 
@@ -360,19 +360,19 @@ bool TextureCube::SetData(CubeMapFace face, unsigned level, int x, int y, int wi
 
 
     if (!object_)
     if (!object_)
     {
     {
-        LOGERROR("No texture created, can not set data");
+        URHO3D_LOGERROR("No texture created, can not set data");
         return false;
         return false;
     }
     }
 
 
     if (!data)
     if (!data)
     {
     {
-        LOGERROR("Null source for setting data");
+        URHO3D_LOGERROR("Null source for setting data");
         return false;
         return false;
     }
     }
 
 
     if (level >= levels_)
     if (level >= levels_)
     {
     {
-        LOGERROR("Illegal mip level for setting data");
+        URHO3D_LOGERROR("Illegal mip level for setting data");
         return false;
         return false;
     }
     }
 
 
@@ -393,7 +393,7 @@ bool TextureCube::SetData(CubeMapFace face, unsigned level, int x, int y, int wi
     int levelHeight = GetLevelHeight(level);
     int levelHeight = GetLevelHeight(level);
     if (x < 0 || x + width > levelWidth || y < 0 || y + height > levelHeight || width <= 0 || height <= 0)
     if (x < 0 || x + width > levelWidth || y < 0 || y + height > levelHeight || width <= 0 || height <= 0)
     {
     {
-        LOGERROR("Illegal dimensions for setting data");
+        URHO3D_LOGERROR("Illegal dimensions for setting data");
         return false;
         return false;
     }
     }
 
 
@@ -411,7 +411,7 @@ bool TextureCube::SetData(CubeMapFace face, unsigned level, int x, int y, int wi
     if (FAILED(((IDirect3DCubeTexture9*)object_)->LockRect((D3DCUBEMAP_FACES)face, level, &d3dLockedRect,
     if (FAILED(((IDirect3DCubeTexture9*)object_)->LockRect((D3DCUBEMAP_FACES)face, level, &d3dLockedRect,
         (flags & D3DLOCK_DISCARD) ? 0 : &d3dRect, flags)))
         (flags & D3DLOCK_DISCARD) ? 0 : &d3dRect, flags)))
     {
     {
-        LOGERROR("Could not lock texture");
+        URHO3D_LOGERROR("Could not lock texture");
         return false;
         return false;
     }
     }
 
 
@@ -488,7 +488,7 @@ bool TextureCube::SetData(CubeMapFace face, SharedPtr<Image> image, bool useAlph
 {
 {
     if (!image)
     if (!image)
     {
     {
-        LOGERROR("Null image, can not load texture");
+        URHO3D_LOGERROR("Null image, can not load texture");
         return false;
         return false;
     }
     }
 
 
@@ -509,7 +509,7 @@ bool TextureCube::SetData(CubeMapFace face, SharedPtr<Image> image, bool useAlph
 
 
         if (levelWidth != levelHeight)
         if (levelWidth != levelHeight)
         {
         {
-            LOGERROR("Cube texture width not equal to height");
+            URHO3D_LOGERROR("Cube texture width not equal to height");
             return false;
             return false;
         }
         }
 
 
@@ -557,12 +557,12 @@ bool TextureCube::SetData(CubeMapFace face, SharedPtr<Image> image, bool useAlph
         {
         {
             if (!object_)
             if (!object_)
             {
             {
-                LOGERROR("Cube texture face 0 must be loaded first");
+                URHO3D_LOGERROR("Cube texture face 0 must be loaded first");
                 return false;
                 return false;
             }
             }
             if (levelWidth != width_ || format != format_)
             if (levelWidth != width_ || format != format_)
             {
             {
-                LOGERROR("Cube texture face does not match size or format of face 0");
+                URHO3D_LOGERROR("Cube texture face does not match size or format of face 0");
                 return false;
                 return false;
             }
             }
         }
         }
@@ -591,7 +591,7 @@ bool TextureCube::SetData(CubeMapFace face, SharedPtr<Image> image, bool useAlph
 
 
         if (width != height)
         if (width != height)
         {
         {
-            LOGERROR("Cube texture width not equal to height");
+            URHO3D_LOGERROR("Cube texture width not equal to height");
             return false;
             return false;
         }
         }
 
 
@@ -619,12 +619,12 @@ bool TextureCube::SetData(CubeMapFace face, SharedPtr<Image> image, bool useAlph
         {
         {
             if (!object_)
             if (!object_)
             {
             {
-                LOGERROR("Cube texture face 0 must be loaded first");
+                URHO3D_LOGERROR("Cube texture face 0 must be loaded first");
                 return false;
                 return false;
             }
             }
             if (width != width_ || format != format_)
             if (width != width_ || format != format_)
             {
             {
-                LOGERROR("Cube texture face does not match size or format of face 0");
+                URHO3D_LOGERROR("Cube texture face does not match size or format of face 0");
                 return false;
                 return false;
             }
             }
         }
         }
@@ -661,19 +661,19 @@ bool TextureCube::GetData(CubeMapFace face, unsigned level, void* dest) const
 {
 {
     if (!object_)
     if (!object_)
     {
     {
-        LOGERROR("No texture created, can not get data");
+        URHO3D_LOGERROR("No texture created, can not get data");
         return false;
         return false;
     }
     }
 
 
     if (!dest)
     if (!dest)
     {
     {
-        LOGERROR("Null destination for getting data");
+        URHO3D_LOGERROR("Null destination for getting data");
         return false;
         return false;
     }
     }
 
 
     if (level >= levels_)
     if (level >= levels_)
     {
     {
-        LOGERROR("Illegal mip level for getting data");
+        URHO3D_LOGERROR("Illegal mip level for getting data");
         return false;
         return false;
     }
     }
 
 
@@ -699,7 +699,7 @@ bool TextureCube::GetData(CubeMapFace face, unsigned level, void* dest) const
     {
     {
         if (level != 0)
         if (level != 0)
         {
         {
-            LOGERROR("Can only get mip level 0 data from a rendertarget");
+            URHO3D_LOGERROR("Can only get mip level 0 data from a rendertarget");
             return false;
             return false;
         }
         }
 
 
@@ -707,13 +707,13 @@ bool TextureCube::GetData(CubeMapFace face, unsigned level, void* dest) const
         device->CreateOffscreenPlainSurface((UINT)width_, (UINT)height_, (D3DFORMAT)format_, D3DPOOL_SYSTEMMEM, &offscreenSurface, 0);
         device->CreateOffscreenPlainSurface((UINT)width_, (UINT)height_, (D3DFORMAT)format_, D3DPOOL_SYSTEMMEM, &offscreenSurface, 0);
         if (!offscreenSurface)
         if (!offscreenSurface)
         {
         {
-            LOGERROR("Could not create surface for getting rendertarget data");
+            URHO3D_LOGERROR("Could not create surface for getting rendertarget data");
             return false;
             return false;
         }
         }
         device->GetRenderTargetData((IDirect3DSurface9*)renderSurfaces_[face]->GetSurface(), offscreenSurface);
         device->GetRenderTargetData((IDirect3DSurface9*)renderSurfaces_[face]->GetSurface(), offscreenSurface);
         if (FAILED(offscreenSurface->LockRect(&d3dLockedRect, &d3dRect, D3DLOCK_READONLY)))
         if (FAILED(offscreenSurface->LockRect(&d3dLockedRect, &d3dRect, D3DLOCK_READONLY)))
         {
         {
-            LOGERROR("Could not lock surface for getting rendertarget data");
+            URHO3D_LOGERROR("Could not lock surface for getting rendertarget data");
             offscreenSurface->Release();
             offscreenSurface->Release();
             return false;
             return false;
         }
         }
@@ -723,7 +723,7 @@ bool TextureCube::GetData(CubeMapFace face, unsigned level, void* dest) const
         if (FAILED(
         if (FAILED(
             ((IDirect3DCubeTexture9*)object_)->LockRect((D3DCUBEMAP_FACES)face, level, &d3dLockedRect, &d3dRect, D3DLOCK_READONLY)))
             ((IDirect3DCubeTexture9*)object_)->LockRect((D3DCUBEMAP_FACES)face, level, &d3dLockedRect, &d3dRect, D3DLOCK_READONLY)))
         {
         {
-            LOGERROR("Could not lock texture");
+            URHO3D_LOGERROR("Could not lock texture");
             return false;
             return false;
         }
         }
     }
     }
@@ -815,7 +815,7 @@ bool TextureCube::Create()
         (IDirect3DCubeTexture9**)&object_,
         (IDirect3DCubeTexture9**)&object_,
         0)))
         0)))
     {
     {
-        LOGERROR("Could not create cube texture");
+        URHO3D_LOGERROR("Could not create cube texture");
         return false;
         return false;
     }
     }
 
 

+ 10 - 10
Source/Urho3D/Graphics/Direct3D9/D3D9VertexBuffer.cpp

@@ -162,13 +162,13 @@ bool VertexBuffer::SetData(const void* data)
 {
 {
     if (!data)
     if (!data)
     {
     {
-        LOGERROR("Null pointer for vertex buffer data");
+        URHO3D_LOGERROR("Null pointer for vertex buffer data");
         return false;
         return false;
     }
     }
 
 
     if (!vertexSize_)
     if (!vertexSize_)
     {
     {
-        LOGERROR("Vertex elements not defined, can not set vertex buffer data");
+        URHO3D_LOGERROR("Vertex elements not defined, can not set vertex buffer data");
         return false;
         return false;
     }
     }
 
 
@@ -205,19 +205,19 @@ bool VertexBuffer::SetDataRange(const void* data, unsigned start, unsigned count
 
 
     if (!data)
     if (!data)
     {
     {
-        LOGERROR("Null pointer for vertex buffer data");
+        URHO3D_LOGERROR("Null pointer for vertex buffer data");
         return false;
         return false;
     }
     }
 
 
     if (!vertexSize_)
     if (!vertexSize_)
     {
     {
-        LOGERROR("Vertex elements not defined, can not set vertex buffer data");
+        URHO3D_LOGERROR("Vertex elements not defined, can not set vertex buffer data");
         return false;
         return false;
     }
     }
 
 
     if (start + count > vertexCount_)
     if (start + count > vertexCount_)
     {
     {
-        LOGERROR("Illegal range for setting new vertex buffer data");
+        URHO3D_LOGERROR("Illegal range for setting new vertex buffer data");
         return false;
         return false;
     }
     }
 
 
@@ -253,19 +253,19 @@ void* VertexBuffer::Lock(unsigned start, unsigned count, bool discard)
 {
 {
     if (lockState_ != LOCK_NONE)
     if (lockState_ != LOCK_NONE)
     {
     {
-        LOGERROR("Vertex buffer already locked");
+        URHO3D_LOGERROR("Vertex buffer already locked");
         return 0;
         return 0;
     }
     }
 
 
     if (!vertexSize_)
     if (!vertexSize_)
     {
     {
-        LOGERROR("Vertex elements not defined, can not lock vertex buffer");
+        URHO3D_LOGERROR("Vertex elements not defined, can not lock vertex buffer");
         return 0;
         return 0;
     }
     }
 
 
     if (start + count > vertexCount_)
     if (start + count > vertexCount_)
     {
     {
-        LOGERROR("Illegal range for locking vertex buffer");
+        URHO3D_LOGERROR("Illegal range for locking vertex buffer");
         return 0;
         return 0;
     }
     }
 
 
@@ -407,7 +407,7 @@ bool VertexBuffer::Create()
             (IDirect3DVertexBuffer9**)&object_,
             (IDirect3DVertexBuffer9**)&object_,
             0)))
             0)))
         {
         {
-            LOGERROR("Could not create vertex buffer");
+            URHO3D_LOGERROR("Could not create vertex buffer");
             return false;
             return false;
         }
         }
     }
     }
@@ -435,7 +435,7 @@ void* VertexBuffer::MapBuffer(unsigned start, unsigned count, bool discard)
             flags = D3DLOCK_DISCARD;
             flags = D3DLOCK_DISCARD;
 
 
         if (FAILED(((IDirect3DVertexBuffer9*)object_)->Lock(start * vertexSize_, count * vertexSize_, &hwData, flags)))
         if (FAILED(((IDirect3DVertexBuffer9*)object_)->Lock(start * vertexSize_, count * vertexSize_, &hwData, flags)))
-            LOGERROR("Could not lock vertex buffer");
+            URHO3D_LOGERROR("Could not lock vertex buffer");
         else
         else
             lockState_ = LOCK_HARDWARE;
             lockState_ = LOCK_HARDWARE;
     }
     }

+ 2 - 2
Source/Urho3D/Graphics/Drawable.cpp

@@ -420,12 +420,12 @@ void Drawable::AddToOctree()
         if (octree)
         if (octree)
             octree->InsertDrawable(this);
             octree->InsertDrawable(this);
         else
         else
-            LOGERROR("No Octree component in scene, drawable will not render");
+            URHO3D_LOGERROR("No Octree component in scene, drawable will not render");
     }
     }
     else
     else
     {
     {
         // We have a mechanism for adding detached nodes to an octree manually, so do not log this error
         // We have a mechanism for adding detached nodes to an octree manually, so do not log this error
-        //LOGERROR("Node is detached from scene, drawable will not render");
+        //URHO3D_LOGERROR("Node is detached from scene, drawable will not render");
     }
     }
 }
 }
 
 

+ 5 - 5
Source/Urho3D/Graphics/Geometry.cpp

@@ -58,7 +58,7 @@ bool Geometry::SetNumVertexBuffers(unsigned num)
 {
 {
     if (num >= MAX_VERTEX_STREAMS)
     if (num >= MAX_VERTEX_STREAMS)
     {
     {
-        LOGERROR("Too many vertex streams");
+        URHO3D_LOGERROR("Too many vertex streams");
         return false;
         return false;
     }
     }
 
 
@@ -77,7 +77,7 @@ bool Geometry::SetVertexBuffer(unsigned index, VertexBuffer* buffer, unsigned el
 {
 {
     if (index >= vertexBuffers_.Size())
     if (index >= vertexBuffers_.Size())
     {
     {
-        LOGERROR("Stream index out of bounds");
+        URHO3D_LOGERROR("Stream index out of bounds");
         return false;
         return false;
     }
     }
 
 
@@ -104,12 +104,12 @@ bool Geometry::SetDrawRange(PrimitiveType type, unsigned indexStart, unsigned in
 {
 {
     if (!indexBuffer_ && !rawIndexData_)
     if (!indexBuffer_ && !rawIndexData_)
     {
     {
-        LOGERROR("Null index buffer and no raw index data, can not define indexed draw range");
+        URHO3D_LOGERROR("Null index buffer and no raw index data, can not define indexed draw range");
         return false;
         return false;
     }
     }
     if (indexBuffer_ && indexStart + indexCount > indexBuffer_->GetIndexCount())
     if (indexBuffer_ && indexStart + indexCount > indexBuffer_->GetIndexCount())
     {
     {
-        LOGERROR("Illegal draw range " + String(indexStart) + " to " + String(indexStart + indexCount - 1) + ", index buffer has " +
+        URHO3D_LOGERROR("Illegal draw range " + String(indexStart) + " to " + String(indexStart + indexCount - 1) + ", index buffer has " +
                  String(indexBuffer_->GetIndexCount()) + " indices");
                  String(indexBuffer_->GetIndexCount()) + " indices");
         return false;
         return false;
     }
     }
@@ -144,7 +144,7 @@ bool Geometry::SetDrawRange(PrimitiveType type, unsigned indexStart, unsigned in
         // We can allow setting an illegal draw range now if the caller guarantees to resize / fill the buffer later
         // We can allow setting an illegal draw range now if the caller guarantees to resize / fill the buffer later
         if (checkIllegal && indexStart + indexCount > indexBuffer_->GetIndexCount())
         if (checkIllegal && indexStart + indexCount > indexBuffer_->GetIndexCount())
         {
         {
-            LOGERROR("Illegal draw range " + String(indexStart) + " to " + String(indexStart + indexCount - 1) +
+            URHO3D_LOGERROR("Illegal draw range " + String(indexStart) + " to " + String(indexStart + indexCount - 1) +
                      ", index buffer has " + String(indexBuffer_->GetIndexCount()) + " indices");
                      ", index buffer has " + String(indexBuffer_->GetIndexCount()) + " indices");
             return false;
             return false;
         }
         }

+ 5 - 5
Source/Urho3D/Graphics/Material.cpp

@@ -115,7 +115,7 @@ TextureUnit ParseTextureUnitName(String name)
     }
     }
 
 
     if (unit == MAX_TEXTURE_UNITS)
     if (unit == MAX_TEXTURE_UNITS)
-        LOGERROR("Unknown texture unit name " + name);
+        URHO3D_LOGERROR("Unknown texture unit name " + name);
 
 
     return unit;
     return unit;
 }
 }
@@ -282,7 +282,7 @@ bool Material::Load(const XMLElement& source)
 
 
     if (source.IsNull())
     if (source.IsNull())
     {
     {
-        LOGERROR("Can not load material from null XML element");
+        URHO3D_LOGERROR("Can not load material from null XML element");
         return false;
         return false;
     }
     }
 
 
@@ -353,7 +353,7 @@ bool Material::Load(const XMLElement& source)
         SharedPtr<ValueAnimation> animation(new ValueAnimation(context_));
         SharedPtr<ValueAnimation> animation(new ValueAnimation(context_));
         if (!animation->LoadXML(parameterAnimationElem))
         if (!animation->LoadXML(parameterAnimationElem))
         {
         {
-            LOGERROR("Could not load parameter animation");
+            URHO3D_LOGERROR("Could not load parameter animation");
             return false;
             return false;
         }
         }
 
 
@@ -404,7 +404,7 @@ bool Material::Save(XMLElement& dest) const
 {
 {
     if (dest.IsNull())
     if (dest.IsNull())
     {
     {
-        LOGERROR("Can not save material to null XML element");
+        URHO3D_LOGERROR("Can not save material to null XML element");
         return false;
         return false;
     }
     }
 
 
@@ -542,7 +542,7 @@ void Material::SetShaderParameterAnimation(const String& name, ValueAnimation* a
 
 
         if (shaderParameters_.Find(name) == shaderParameters_.End())
         if (shaderParameters_.Find(name) == shaderParameters_.End())
         {
         {
-            LOGERROR(GetName() + " has no shader parameter: " + name);
+            URHO3D_LOGERROR(GetName() + " has no shader parameter: " + name);
             return;
             return;
         }
         }
 
 

+ 14 - 14
Source/Urho3D/Graphics/Model.cpp

@@ -75,7 +75,7 @@ bool Model::BeginLoad(Deserializer& source)
     // Check ID
     // Check ID
     if (source.ReadFileID() != "UMDL")
     if (source.ReadFileID() != "UMDL")
     {
     {
-        LOGERROR(source.GetName() + " is not a valid model file");
+        URHO3D_LOGERROR(source.GetName() + " is not a valid model file");
         return false;
         return false;
     }
     }
 
 
@@ -196,7 +196,7 @@ bool Model::BeginLoad(Deserializer& source)
 
 
             if (vbRef >= vertexBuffers_.Size())
             if (vbRef >= vertexBuffers_.Size())
             {
             {
-                LOGERROR("Vertex buffer index out of bounds");
+                URHO3D_LOGERROR("Vertex buffer index out of bounds");
                 loadVBData_.Clear();
                 loadVBData_.Clear();
                 loadIBData_.Clear();
                 loadIBData_.Clear();
                 loadGeometries_.Clear();
                 loadGeometries_.Clear();
@@ -204,7 +204,7 @@ bool Model::BeginLoad(Deserializer& source)
             }
             }
             if (ibRef >= indexBuffers_.Size())
             if (ibRef >= indexBuffers_.Size())
             {
             {
-                LOGERROR("Index buffer index out of bounds");
+                URHO3D_LOGERROR("Index buffer index out of bounds");
                 loadVBData_.Clear();
                 loadVBData_.Clear();
                 loadIBData_.Clear();
                 loadIBData_.Clear();
                 loadGeometries_.Clear();
                 loadGeometries_.Clear();
@@ -438,12 +438,12 @@ bool Model::SetVertexBuffers(const Vector<SharedPtr<VertexBuffer> >& buffers, co
     {
     {
         if (!buffers[i])
         if (!buffers[i])
         {
         {
-            LOGERROR("Null model vertex buffers specified");
+            URHO3D_LOGERROR("Null model vertex buffers specified");
             return false;
             return false;
         }
         }
         if (!buffers[i]->IsShadowed())
         if (!buffers[i]->IsShadowed())
         {
         {
-            LOGERROR("Model vertex buffers must be shadowed");
+            URHO3D_LOGERROR("Model vertex buffers must be shadowed");
             return false;
             return false;
         }
         }
     }
     }
@@ -468,12 +468,12 @@ bool Model::SetIndexBuffers(const Vector<SharedPtr<IndexBuffer> >& buffers)
     {
     {
         if (!buffers[i])
         if (!buffers[i])
         {
         {
-            LOGERROR("Null model index buffers specified");
+            URHO3D_LOGERROR("Null model index buffers specified");
             return false;
             return false;
         }
         }
         if (!buffers[i]->IsShadowed())
         if (!buffers[i]->IsShadowed())
         {
         {
-            LOGERROR("Model index buffers must be shadowed");
+            URHO3D_LOGERROR("Model index buffers must be shadowed");
             return false;
             return false;
         }
         }
     }
     }
@@ -500,12 +500,12 @@ bool Model::SetNumGeometryLodLevels(unsigned index, unsigned num)
 {
 {
     if (index >= geometries_.Size())
     if (index >= geometries_.Size())
     {
     {
-        LOGERROR("Geometry index out of bounds");
+        URHO3D_LOGERROR("Geometry index out of bounds");
         return false;
         return false;
     }
     }
     if (!num)
     if (!num)
     {
     {
-        LOGERROR("Zero LOD levels not allowed");
+        URHO3D_LOGERROR("Zero LOD levels not allowed");
         return false;
         return false;
     }
     }
 
 
@@ -517,12 +517,12 @@ bool Model::SetGeometry(unsigned index, unsigned lodLevel, Geometry* geometry)
 {
 {
     if (index >= geometries_.Size())
     if (index >= geometries_.Size())
     {
     {
-        LOGERROR("Geometry index out of bounds");
+        URHO3D_LOGERROR("Geometry index out of bounds");
         return false;
         return false;
     }
     }
     if (lodLevel >= geometries_[index].Size())
     if (lodLevel >= geometries_[index].Size())
     {
     {
-        LOGERROR("LOD level index out of bounds");
+        URHO3D_LOGERROR("LOD level index out of bounds");
         return false;
         return false;
     }
     }
 
 
@@ -534,7 +534,7 @@ bool Model::SetGeometryCenter(unsigned index, const Vector3& center)
 {
 {
     if (index >= geometryCenters_.Size())
     if (index >= geometryCenters_.Size())
     {
     {
-        LOGERROR("Geometry index out of bounds");
+        URHO3D_LOGERROR("Geometry index out of bounds");
         return false;
         return false;
     }
     }
 
 
@@ -590,7 +590,7 @@ SharedPtr<Model> Model::Clone(const String& cloneName) const
                 if (origData)
                 if (origData)
                     cloneBuffer->SetData(origData);
                     cloneBuffer->SetData(origData);
                 else
                 else
-                    LOGERROR("Failed to lock original vertex buffer for copying");
+                    URHO3D_LOGERROR("Failed to lock original vertex buffer for copying");
             }
             }
             vbMapping[origBuffer] = cloneBuffer;
             vbMapping[origBuffer] = cloneBuffer;
         }
         }
@@ -618,7 +618,7 @@ SharedPtr<Model> Model::Clone(const String& cloneName) const
                 if (origData)
                 if (origData)
                     cloneBuffer->SetData(origData);
                     cloneBuffer->SetData(origData);
                 else
                 else
-                    LOGERROR("Failed to lock original index buffer for copying");
+                    URHO3D_LOGERROR("Failed to lock original index buffer for copying");
             }
             }
             ibMapping[origBuffer] = cloneBuffer;
             ibMapping[origBuffer] = cloneBuffer;
         }
         }

+ 1 - 1
Source/Urho3D/Graphics/OcclusionBuffer.cpp

@@ -71,7 +71,7 @@ bool OcclusionBuffer::SetSize(int width, int height)
 
 
     if (!IsPowerOfTwo((unsigned)width))
     if (!IsPowerOfTwo((unsigned)width))
     {
     {
-        LOGERROR("Width is not a power of two");
+        URHO3D_LOGERROR("Width is not a power of two");
         return false;
         return false;
     }
     }
 
 

+ 1 - 1
Source/Urho3D/Graphics/Octree.cpp

@@ -473,7 +473,7 @@ void Octree::Update(const FrameInfo& frame)
             octant = drawable->GetOctant();
             octant = drawable->GetOctant();
             if (octant != this && octant->GetCullingBox().IsInside(box) != INSIDE)
             if (octant != this && octant->GetCullingBox().IsInside(box) != INSIDE)
             {
             {
-                LOGERROR("Drawable is not fully inside its octant's culling bounds: drawable box " + box.ToString() +
+                URHO3D_LOGERROR("Drawable is not fully inside its octant's culling bounds: drawable box " + box.ToString() +
                          " octant box " + octant->GetCullingBox().ToString());
                          " octant box " + octant->GetCullingBox().ToString());
             }
             }
 #endif
 #endif

+ 1 - 1
Source/Urho3D/Graphics/OpenGL/OGLConstantBuffer.cpp

@@ -72,7 +72,7 @@ bool ConstantBuffer::SetSize(unsigned size)
 {
 {
     if (!size)
     if (!size)
     {
     {
-        LOGERROR("Can not create zero-sized constant buffer");
+        URHO3D_LOGERROR("Can not create zero-sized constant buffer");
         return false;
         return false;
     }
     }
 
 

+ 9 - 9
Source/Urho3D/Graphics/OpenGL/OGLGraphics.cpp

@@ -289,7 +289,7 @@ void Graphics::SetExternalWindow(void* window)
     if (!impl_->window_)
     if (!impl_->window_)
         externalWindow_ = window;
         externalWindow_ = window;
     else
     else
-        LOGERROR("Window already opened, can not set external window");
+        URHO3D_LOGERROR("Window already opened, can not set external window");
 }
 }
 
 
 void Graphics::SetWindowTitle(const String& windowTitle)
 void Graphics::SetWindowTitle(const String& windowTitle)
@@ -586,7 +586,7 @@ void Graphics::SetForceGL2(bool enable)
 {
 {
     if (IsInitialized())
     if (IsInitialized())
     {
     {
-        LOGERROR("OpenGL 2 can only be forced before setting the initial screen mode");
+        URHO3D_LOGERROR("OpenGL 2 can only be forced before setting the initial screen mode");
         return;
         return;
     }
     }
 
 
@@ -843,12 +843,12 @@ bool Graphics::SetVertexBuffers(const PODVector<VertexBuffer*>& buffers, const P
 {
 {
     if (buffers.Size() > MAX_VERTEX_STREAMS)
     if (buffers.Size() > MAX_VERTEX_STREAMS)
     {
     {
-        LOGERROR("Too many vertex buffers");
+        URHO3D_LOGERROR("Too many vertex buffers");
         return false;
         return false;
     }
     }
     if (buffers.Size() != elementMasks.Size())
     if (buffers.Size() != elementMasks.Size())
     {
     {
-        LOGERROR("Amount of element masks and vertex buffers does not match");
+        URHO3D_LOGERROR("Amount of element masks and vertex buffers does not match");
         return false;
         return false;
     }
     }
 
 
@@ -968,7 +968,7 @@ void Graphics::SetShaders(ShaderVariation* vs, ShaderVariation* ps)
                 URHO3D_LOGDEBUG("Compiled vertex shader " + vs->GetFullName());
                 URHO3D_LOGDEBUG("Compiled vertex shader " + vs->GetFullName());
             else
             else
             {
             {
-                LOGERROR("Failed to compile vertex shader " + vs->GetFullName() + ":\n" + vs->GetCompilerOutput());
+                URHO3D_LOGERROR("Failed to compile vertex shader " + vs->GetFullName() + ":\n" + vs->GetCompilerOutput());
                 vs = 0;
                 vs = 0;
             }
             }
         }
         }
@@ -987,7 +987,7 @@ void Graphics::SetShaders(ShaderVariation* vs, ShaderVariation* ps)
                 URHO3D_LOGDEBUG("Compiled pixel shader " + ps->GetFullName());
                 URHO3D_LOGDEBUG("Compiled pixel shader " + ps->GetFullName());
             else
             else
             {
             {
-                LOGERROR("Failed to compile pixel shader " + ps->GetFullName() + ":\n" + ps->GetCompilerOutput());
+                URHO3D_LOGERROR("Failed to compile pixel shader " + ps->GetFullName() + ":\n" + ps->GetCompilerOutput());
                 ps = 0;
                 ps = 0;
             }
             }
         }
         }
@@ -1039,7 +1039,7 @@ void Graphics::SetShaders(ShaderVariation* vs, ShaderVariation* ps)
             }
             }
             else
             else
             {
             {
-                LOGERROR("Failed to link vertex shader " + vs->GetFullName() + " and pixel shader " + ps->GetFullName() + ":\n" +
+                URHO3D_LOGERROR("Failed to link vertex shader " + vs->GetFullName() + " and pixel shader " + ps->GetFullName() + ":\n" +
                          newProgram->GetLinkerOutput());
                          newProgram->GetLinkerOutput());
                 glUseProgram(0);
                 glUseProgram(0);
                 shaderProgram_ = 0;
                 shaderProgram_ = 0;
@@ -2470,7 +2470,7 @@ void Graphics::Restore()
         {
         {
             if (!GLEW_EXT_framebuffer_object || !GLEW_EXT_packed_depth_stencil)
             if (!GLEW_EXT_framebuffer_object || !GLEW_EXT_packed_depth_stencil)
             {
             {
-                LOGERROR("EXT_framebuffer_object and EXT_packed_depth_stencil OpenGL extensions are required");
+                URHO3D_LOGERROR("EXT_framebuffer_object and EXT_packed_depth_stencil OpenGL extensions are required");
                 return;
                 return;
             }
             }
 
 
@@ -2479,7 +2479,7 @@ void Graphics::Restore()
         }
         }
         else
         else
         {
         {
-            LOGERROR("OpenGL 2.0 is required");
+            URHO3D_LOGERROR("OpenGL 2.0 is required");
             return;
             return;
         }
         }
 #endif
 #endif

+ 11 - 11
Source/Urho3D/Graphics/OpenGL/OGLIndexBuffer.cpp

@@ -126,13 +126,13 @@ bool IndexBuffer::SetData(const void* data)
 {
 {
     if (!data)
     if (!data)
     {
     {
-        LOGERROR("Null pointer for index buffer data");
+        URHO3D_LOGERROR("Null pointer for index buffer data");
         return false;
         return false;
     }
     }
 
 
     if (!indexSize_)
     if (!indexSize_)
     {
     {
-        LOGERROR("Index size not defined, can not set index buffer data");
+        URHO3D_LOGERROR("Index size not defined, can not set index buffer data");
         return false;
         return false;
     }
     }
 
 
@@ -164,19 +164,19 @@ bool IndexBuffer::SetDataRange(const void* data, unsigned start, unsigned count,
 
 
     if (!data)
     if (!data)
     {
     {
-        LOGERROR("Null pointer for index buffer data");
+        URHO3D_LOGERROR("Null pointer for index buffer data");
         return false;
         return false;
     }
     }
 
 
     if (!indexSize_)
     if (!indexSize_)
     {
     {
-        LOGERROR("Index size not defined, can not set index buffer data");
+        URHO3D_LOGERROR("Index size not defined, can not set index buffer data");
         return false;
         return false;
     }
     }
 
 
     if (start + count > indexCount_)
     if (start + count > indexCount_)
     {
     {
-        LOGERROR("Illegal range for setting new index buffer data");
+        URHO3D_LOGERROR("Illegal range for setting new index buffer data");
         return false;
         return false;
     }
     }
 
 
@@ -210,19 +210,19 @@ void* IndexBuffer::Lock(unsigned start, unsigned count, bool discard)
 {
 {
     if (lockState_ != LOCK_NONE)
     if (lockState_ != LOCK_NONE)
     {
     {
-        LOGERROR("Index buffer already locked");
+        URHO3D_LOGERROR("Index buffer already locked");
         return 0;
         return 0;
     }
     }
 
 
     if (!indexSize_)
     if (!indexSize_)
     {
     {
-        LOGERROR("Index size not defined, can not lock index buffer");
+        URHO3D_LOGERROR("Index size not defined, can not lock index buffer");
         return 0;
         return 0;
     }
     }
 
 
     if (start + count > indexCount_)
     if (start + count > indexCount_)
     {
     {
-        LOGERROR("Illegal range for locking index buffer");
+        URHO3D_LOGERROR("Illegal range for locking index buffer");
         return 0;
         return 0;
     }
     }
 
 
@@ -273,13 +273,13 @@ bool IndexBuffer::GetUsedVertexRange(unsigned start, unsigned count, unsigned& m
 {
 {
     if (!shadowData_)
     if (!shadowData_)
     {
     {
-        LOGERROR("Used vertex range can only be queried from an index buffer with shadow data");
+        URHO3D_LOGERROR("Used vertex range can only be queried from an index buffer with shadow data");
         return false;
         return false;
     }
     }
 
 
     if (start + count > indexCount_)
     if (start + count > indexCount_)
     {
     {
-        LOGERROR("Illegal index range for querying used vertices");
+        URHO3D_LOGERROR("Illegal index range for querying used vertices");
         return false;
         return false;
     }
     }
 
 
@@ -335,7 +335,7 @@ bool IndexBuffer::Create()
             glGenBuffers(1, &object_);
             glGenBuffers(1, &object_);
         if (!object_)
         if (!object_)
         {
         {
-            LOGERROR("Failed to create index buffer");
+            URHO3D_LOGERROR("Failed to create index buffer");
             return false;
             return false;
         }
         }
 
 

+ 10 - 10
Source/Urho3D/Graphics/OpenGL/OGLTexture2D.cpp

@@ -200,19 +200,19 @@ bool Texture2D::SetData(unsigned level, int x, int y, int width, int height, con
 
 
     if (!object_ || !graphics_)
     if (!object_ || !graphics_)
     {
     {
-        LOGERROR("No texture created, can not set data");
+        URHO3D_LOGERROR("No texture created, can not set data");
         return false;
         return false;
     }
     }
 
 
     if (!data)
     if (!data)
     {
     {
-        LOGERROR("Null source for setting data");
+        URHO3D_LOGERROR("Null source for setting data");
         return false;
         return false;
     }
     }
 
 
     if (level >= levels_)
     if (level >= levels_)
     {
     {
-        LOGERROR("Illegal mip level for setting data");
+        URHO3D_LOGERROR("Illegal mip level for setting data");
         return false;
         return false;
     }
     }
 
 
@@ -233,7 +233,7 @@ bool Texture2D::SetData(unsigned level, int x, int y, int width, int height, con
     int levelHeight = GetLevelHeight(level);
     int levelHeight = GetLevelHeight(level);
     if (x < 0 || x + width > levelWidth || y < 0 || y + height > levelHeight || width <= 0 || height <= 0)
     if (x < 0 || x + width > levelWidth || y < 0 || y + height > levelHeight || width <= 0 || height <= 0)
     {
     {
-        LOGERROR("Illegal dimensions for setting data");
+        URHO3D_LOGERROR("Illegal dimensions for setting data");
         return false;
         return false;
     }
     }
 
 
@@ -265,7 +265,7 @@ bool Texture2D::SetData(SharedPtr<Image> image, bool useAlpha)
 {
 {
     if (!image)
     if (!image)
     {
     {
-        LOGERROR("Null image, can not set data");
+        URHO3D_LOGERROR("Null image, can not set data");
         return false;
         return false;
     }
     }
 
 
@@ -399,19 +399,19 @@ bool Texture2D::GetData(unsigned level, void* dest) const
 #ifndef GL_ES_VERSION_2_0
 #ifndef GL_ES_VERSION_2_0
     if (!object_ || !graphics_)
     if (!object_ || !graphics_)
     {
     {
-        LOGERROR("No texture created, can not get data");
+        URHO3D_LOGERROR("No texture created, can not get data");
         return false;
         return false;
     }
     }
 
 
     if (!dest)
     if (!dest)
     {
     {
-        LOGERROR("Null destination for getting data");
+        URHO3D_LOGERROR("Null destination for getting data");
         return false;
         return false;
     }
     }
 
 
     if (level >= levels_)
     if (level >= levels_)
     {
     {
-        LOGERROR("Illegal mip level for getting data");
+        URHO3D_LOGERROR("Illegal mip level for getting data");
         return false;
         return false;
     }
     }
 
 
@@ -431,7 +431,7 @@ bool Texture2D::GetData(unsigned level, void* dest) const
     graphics_->SetTexture(0, 0);
     graphics_->SetTexture(0, 0);
     return true;
     return true;
 #else
 #else
-    LOGERROR("Getting texture data not supported");
+    URHO3D_LOGERROR("Getting texture data not supported");
     return false;
     return false;
 #endif
 #endif
 }
 }
@@ -485,7 +485,7 @@ bool Texture2D::Create()
         glTexImage2D(target_, 0, format, width_, height_, 0, externalFormat, dataType, 0);
         glTexImage2D(target_, 0, format, width_, height_, 0, externalFormat, dataType, 0);
         if (glGetError())
         if (glGetError())
         {
         {
-            LOGERROR("Failed to create texture");
+            URHO3D_LOGERROR("Failed to create texture");
             success = false;
             success = false;
         }
         }
     }
     }

+ 12 - 12
Source/Urho3D/Graphics/OpenGL/OGLTexture3D.cpp

@@ -133,7 +133,7 @@ bool Texture3D::BeginLoad(Deserializer& source)
         return true;
         return true;
     }
     }
 
 
-    LOGERROR("Texture3D XML data for " + GetName() + " did not contain either volume or colorlut element");
+    URHO3D_LOGERROR("Texture3D XML data for " + GetName() + " did not contain either volume or colorlut element");
     return false;
     return false;
 }
 }
 
 
@@ -246,19 +246,19 @@ bool Texture3D::SetData(unsigned level, int x, int y, int z, int width, int heig
 
 
     if (!object_ || !graphics_)
     if (!object_ || !graphics_)
     {
     {
-        LOGERROR("No texture created, can not set data");
+        URHO3D_LOGERROR("No texture created, can not set data");
         return false;
         return false;
     }
     }
 
 
     if (!data)
     if (!data)
     {
     {
-        LOGERROR("Null source for setting data");
+        URHO3D_LOGERROR("Null source for setting data");
         return false;
         return false;
     }
     }
 
 
     if (level >= levels_)
     if (level >= levels_)
     {
     {
-        LOGERROR("Illegal mip level for setting data");
+        URHO3D_LOGERROR("Illegal mip level for setting data");
         return false;
         return false;
     }
     }
 
 
@@ -281,7 +281,7 @@ bool Texture3D::SetData(unsigned level, int x, int y, int z, int width, int heig
     if (x < 0 || x + width > levelWidth || y < 0 || y + height > levelHeight || z < 0 || z + depth > levelDepth || width <= 0 ||
     if (x < 0 || x + width > levelWidth || y < 0 || y + height > levelHeight || z < 0 || z + depth > levelDepth || width <= 0 ||
         height <= 0 || depth <= 0)
         height <= 0 || depth <= 0)
     {
     {
-        LOGERROR("Illegal dimensions for setting data");
+        URHO3D_LOGERROR("Illegal dimensions for setting data");
         return false;
         return false;
     }
     }
 
 
@@ -316,7 +316,7 @@ bool Texture3D::SetData(SharedPtr<Image> image, bool useAlpha)
 {
 {
     if (!image)
     if (!image)
     {
     {
-        LOGERROR("Null image, can not set data");
+        URHO3D_LOGERROR("Null image, can not set data");
         return false;
         return false;
     }
     }
 
 
@@ -455,19 +455,19 @@ bool Texture3D::GetData(unsigned level, void* dest) const
 #ifndef GL_ES_VERSION_2_0
 #ifndef GL_ES_VERSION_2_0
     if (!object_ || !graphics_)
     if (!object_ || !graphics_)
     {
     {
-        LOGERROR("No texture created, can not get data");
+        URHO3D_LOGERROR("No texture created, can not get data");
         return false;
         return false;
     }
     }
 
 
     if (!dest)
     if (!dest)
     {
     {
-        LOGERROR("Null destination for getting data");
+        URHO3D_LOGERROR("Null destination for getting data");
         return false;
         return false;
     }
     }
 
 
     if (level >= levels_)
     if (level >= levels_)
     {
     {
-        LOGERROR("Illegal mip level for getting data");
+        URHO3D_LOGERROR("Illegal mip level for getting data");
         return false;
         return false;
     }
     }
 
 
@@ -487,7 +487,7 @@ bool Texture3D::GetData(unsigned level, void* dest) const
     graphics_->SetTexture(0, 0);
     graphics_->SetTexture(0, 0);
     return true;
     return true;
 #else
 #else
-    LOGERROR("Getting texture data not supported");
+    URHO3D_LOGERROR("Getting texture data not supported");
     return false;
     return false;
 #endif
 #endif
 }
 }
@@ -497,7 +497,7 @@ bool Texture3D::Create()
     Release();
     Release();
 
 
 #ifdef GL_ES_VERSION_2_0
 #ifdef GL_ES_VERSION_2_0
-    LOGERROR("Failed to create 3D texture, currently unsupported on OpenGL ES 2");
+    URHO3D_LOGERROR("Failed to create 3D texture, currently unsupported on OpenGL ES 2");
     return false;
     return false;
 #else
 #else
     if (!graphics_ || !width_ || !height_ || !depth_)
     if (!graphics_ || !width_ || !height_ || !depth_)
@@ -527,7 +527,7 @@ bool Texture3D::Create()
         glTexImage3D(target_, 0, format, width_, height_, depth_, 0, externalFormat, dataType, 0);
         glTexImage3D(target_, 0, format, width_, height_, depth_, 0, externalFormat, dataType, 0);
         if (glGetError())
         if (glGetError())
         {
         {
-            LOGERROR("Failed to create texture");
+            URHO3D_LOGERROR("Failed to create texture");
             success = false;
             success = false;
         }
         }
     }
     }

+ 18 - 18
Source/Urho3D/Graphics/OpenGL/OGLTextureCube.cpp

@@ -318,12 +318,12 @@ bool TextureCube::SetSize(int size, unsigned format, TextureUsage usage)
 {
 {
     if (size <= 0)
     if (size <= 0)
     {
     {
-        LOGERROR("Zero or negative cube texture size");
+        URHO3D_LOGERROR("Zero or negative cube texture size");
         return false;
         return false;
     }
     }
     if (usage == TEXTURE_DEPTHSTENCIL)
     if (usage == TEXTURE_DEPTHSTENCIL)
     {
     {
-        LOGERROR("Depth-stencil usage not supported for cube maps");
+        URHO3D_LOGERROR("Depth-stencil usage not supported for cube maps");
         return false;
         return false;
     }
     }
 
 
@@ -367,19 +367,19 @@ bool TextureCube::SetData(CubeMapFace face, unsigned level, int x, int y, int wi
 
 
     if (!object_ || !graphics_)
     if (!object_ || !graphics_)
     {
     {
-        LOGERROR("No texture created, can not set data");
+        URHO3D_LOGERROR("No texture created, can not set data");
         return false;
         return false;
     }
     }
 
 
     if (!data)
     if (!data)
     {
     {
-        LOGERROR("Null source for setting data");
+        URHO3D_LOGERROR("Null source for setting data");
         return false;
         return false;
     }
     }
 
 
     if (level >= levels_)
     if (level >= levels_)
     {
     {
-        LOGERROR("Illegal mip level for setting data");
+        URHO3D_LOGERROR("Illegal mip level for setting data");
         return false;
         return false;
     }
     }
 
 
@@ -400,7 +400,7 @@ bool TextureCube::SetData(CubeMapFace face, unsigned level, int x, int y, int wi
     int levelHeight = GetLevelHeight(level);
     int levelHeight = GetLevelHeight(level);
     if (x < 0 || x + width > levelWidth || y < 0 || y + height > levelHeight || width <= 0 || height <= 0)
     if (x < 0 || x + width > levelWidth || y < 0 || y + height > levelHeight || width <= 0 || height <= 0)
     {
     {
-        LOGERROR("Illegal dimensions for setting data");
+        URHO3D_LOGERROR("Illegal dimensions for setting data");
         return false;
         return false;
     }
     }
 
 
@@ -445,7 +445,7 @@ bool TextureCube::SetData(CubeMapFace face, SharedPtr<Image> image, bool useAlph
 {
 {
     if (!image)
     if (!image)
     {
     {
-        LOGERROR("Null image, can not set face data");
+        URHO3D_LOGERROR("Null image, can not set face data");
         return false;
         return false;
     }
     }
 
 
@@ -475,7 +475,7 @@ bool TextureCube::SetData(CubeMapFace face, SharedPtr<Image> image, bool useAlph
 
 
         if (levelWidth != levelHeight)
         if (levelWidth != levelHeight)
         {
         {
-            LOGERROR("Cube texture width not equal to height");
+            URHO3D_LOGERROR("Cube texture width not equal to height");
             return false;
             return false;
         }
         }
 
 
@@ -523,12 +523,12 @@ bool TextureCube::SetData(CubeMapFace face, SharedPtr<Image> image, bool useAlph
         {
         {
             if (!object_)
             if (!object_)
             {
             {
-                LOGERROR("Cube texture face 0 must be loaded first");
+                URHO3D_LOGERROR("Cube texture face 0 must be loaded first");
                 return false;
                 return false;
             }
             }
             if (levelWidth != width_ || format != format_)
             if (levelWidth != width_ || format != format_)
             {
             {
-                LOGERROR("Cube texture face does not match size or format of face 0");
+                URHO3D_LOGERROR("Cube texture face does not match size or format of face 0");
                 return false;
                 return false;
             }
             }
         }
         }
@@ -557,7 +557,7 @@ bool TextureCube::SetData(CubeMapFace face, SharedPtr<Image> image, bool useAlph
 
 
         if (width != height)
         if (width != height)
         {
         {
-            LOGERROR("Cube texture width not equal to height");
+            URHO3D_LOGERROR("Cube texture width not equal to height");
             return false;
             return false;
         }
         }
 
 
@@ -585,12 +585,12 @@ bool TextureCube::SetData(CubeMapFace face, SharedPtr<Image> image, bool useAlph
         {
         {
             if (!object_)
             if (!object_)
             {
             {
-                LOGERROR("Cube texture face 0 must be loaded first");
+                URHO3D_LOGERROR("Cube texture face 0 must be loaded first");
                 return false;
                 return false;
             }
             }
             if (width != width_ || format != format_)
             if (width != width_ || format != format_)
             {
             {
-                LOGERROR("Cube texture face does not match size or format of face 0");
+                URHO3D_LOGERROR("Cube texture face does not match size or format of face 0");
                 return false;
                 return false;
             }
             }
         }
         }
@@ -627,19 +627,19 @@ bool TextureCube::GetData(CubeMapFace face, unsigned level, void* dest) const
 #ifndef GL_ES_VERSION_2_0
 #ifndef GL_ES_VERSION_2_0
     if (!object_ || !graphics_)
     if (!object_ || !graphics_)
     {
     {
-        LOGERROR("No texture created, can not get data");
+        URHO3D_LOGERROR("No texture created, can not get data");
         return false;
         return false;
     }
     }
 
 
     if (!dest)
     if (!dest)
     {
     {
-        LOGERROR("Null destination for getting data");
+        URHO3D_LOGERROR("Null destination for getting data");
         return false;
         return false;
     }
     }
 
 
     if (level >= levels_)
     if (level >= levels_)
     {
     {
-        LOGERROR("Illegal mip level for getting data");
+        URHO3D_LOGERROR("Illegal mip level for getting data");
         return false;
         return false;
     }
     }
 
 
@@ -659,7 +659,7 @@ bool TextureCube::GetData(CubeMapFace face, unsigned level, void* dest) const
     graphics_->SetTexture(0, 0);
     graphics_->SetTexture(0, 0);
     return true;
     return true;
 #else
 #else
-    LOGERROR("Getting texture data not supported");
+    URHO3D_LOGERROR("Getting texture data not supported");
     return false;
     return false;
 #endif
 #endif
 }
 }
@@ -699,7 +699,7 @@ bool TextureCube::Create()
         }
         }
     }
     }
     if (!success)
     if (!success)
-        LOGERROR("Failed to create texture");
+        URHO3D_LOGERROR("Failed to create texture");
 
 
     // Set mipmapping
     // Set mipmapping
     levels_ = requestedLevels_;
     levels_ = requestedLevels_;

+ 9 - 9
Source/Urho3D/Graphics/OpenGL/OGLVertexBuffer.cpp

@@ -201,13 +201,13 @@ bool VertexBuffer::SetData(const void* data)
 {
 {
     if (!data)
     if (!data)
     {
     {
-        LOGERROR("Null pointer for vertex buffer data");
+        URHO3D_LOGERROR("Null pointer for vertex buffer data");
         return false;
         return false;
     }
     }
 
 
     if (!vertexSize_)
     if (!vertexSize_)
     {
     {
-        LOGERROR("Vertex elements not defined, can not set vertex buffer data");
+        URHO3D_LOGERROR("Vertex elements not defined, can not set vertex buffer data");
         return false;
         return false;
     }
     }
 
 
@@ -239,19 +239,19 @@ bool VertexBuffer::SetDataRange(const void* data, unsigned start, unsigned count
 
 
     if (!data)
     if (!data)
     {
     {
-        LOGERROR("Null pointer for vertex buffer data");
+        URHO3D_LOGERROR("Null pointer for vertex buffer data");
         return false;
         return false;
     }
     }
 
 
     if (!vertexSize_)
     if (!vertexSize_)
     {
     {
-        LOGERROR("Vertex elements not defined, can not set vertex buffer data");
+        URHO3D_LOGERROR("Vertex elements not defined, can not set vertex buffer data");
         return false;
         return false;
     }
     }
 
 
     if (start + count > vertexCount_)
     if (start + count > vertexCount_)
     {
     {
-        LOGERROR("Illegal range for setting new vertex buffer data");
+        URHO3D_LOGERROR("Illegal range for setting new vertex buffer data");
         return false;
         return false;
     }
     }
 
 
@@ -285,19 +285,19 @@ void* VertexBuffer::Lock(unsigned start, unsigned count, bool discard)
 {
 {
     if (lockState_ != LOCK_NONE)
     if (lockState_ != LOCK_NONE)
     {
     {
-        LOGERROR("Vertex buffer already locked");
+        URHO3D_LOGERROR("Vertex buffer already locked");
         return 0;
         return 0;
     }
     }
 
 
     if (!vertexSize_)
     if (!vertexSize_)
     {
     {
-        LOGERROR("Vertex elements not defined, can not lock vertex buffer");
+        URHO3D_LOGERROR("Vertex elements not defined, can not lock vertex buffer");
         return 0;
         return 0;
     }
     }
 
 
     if (start + count > vertexCount_)
     if (start + count > vertexCount_)
     {
     {
-        LOGERROR("Illegal range for locking vertex buffer");
+        URHO3D_LOGERROR("Illegal range for locking vertex buffer");
         return 0;
         return 0;
     }
     }
 
 
@@ -406,7 +406,7 @@ bool VertexBuffer::Create()
             glGenBuffers(1, &object_);
             glGenBuffers(1, &object_);
         if (!object_)
         if (!object_)
         {
         {
-            LOGERROR("Failed to create vertex buffer");
+            URHO3D_LOGERROR("Failed to create vertex buffer");
             return false;
             return false;
         }
         }
 
 

+ 6 - 6
Source/Urho3D/Graphics/ParticleEffect.cpp

@@ -98,14 +98,14 @@ bool ParticleEffect::BeginLoad(Deserializer& source)
     XMLFile file(context_);
     XMLFile file(context_);
     if (!file.Load(source))
     if (!file.Load(source))
     {
     {
-        LOGERROR("Load particle effect file failed");
+        URHO3D_LOGERROR("Load particle effect file failed");
         return false;
         return false;
     }
     }
 
 
     XMLElement rootElem = file.GetRoot();
     XMLElement rootElem = file.GetRoot();
     if (!rootElem)
     if (!rootElem)
     {
     {
-        LOGERROR("Particle emitter parameter file does not have a valid root element");
+        URHO3D_LOGERROR("Particle emitter parameter file does not have a valid root element");
         return false;
         return false;
     }
     }
 
 
@@ -182,7 +182,7 @@ bool ParticleEffect::BeginLoad(Deserializer& source)
         else if (type == "sphere")
         else if (type == "sphere")
             emitterType_ = EMITTER_SPHERE;
             emitterType_ = EMITTER_SPHERE;
         else
         else
-            LOGERROR("Unknown particle emitter type " + type);
+            URHO3D_LOGERROR("Unknown particle emitter type " + type);
     }
     }
 
 
     if (rootElem.HasChild("emittersize"))
     if (rootElem.HasChild("emittersize"))
@@ -331,7 +331,7 @@ bool ParticleEffect::Load(const XMLElement& source)
 
 
     if (source.IsNull())
     if (source.IsNull())
     {
     {
-        LOGERROR("Can not load particle effect from null XML element");
+        URHO3D_LOGERROR("Can not load particle effect from null XML element");
         return false;
         return false;
     }
     }
 
 
@@ -372,7 +372,7 @@ bool ParticleEffect::Load(const XMLElement& source)
         else if (type == "sphere")
         else if (type == "sphere")
             emitterType_ = EMITTER_SPHERE;
             emitterType_ = EMITTER_SPHERE;
         else
         else
-            LOGERROR("Unknown particle emitter type " + type);
+            URHO3D_LOGERROR("Unknown particle emitter type " + type);
     }
     }
 
 
     if (source.HasChild("emittersize"))
     if (source.HasChild("emittersize"))
@@ -485,7 +485,7 @@ bool ParticleEffect::Save(XMLElement& dest) const
 {
 {
     if (dest.IsNull())
     if (dest.IsNull())
     {
     {
-        LOGERROR("Can not save particle effect to null XML element");
+        URHO3D_LOGERROR("Can not save particle effect to null XML element");
         return false;
         return false;
     }
     }
 
 

+ 2 - 2
Source/Urho3D/Graphics/Renderer.cpp

@@ -1198,7 +1198,7 @@ void Renderer::SetBatchShaders(Batch& batch, Technique* tech, bool allowShadows)
         if (!shaderErrorDisplayed_.Contains(tech))
         if (!shaderErrorDisplayed_.Contains(tech))
         {
         {
             shaderErrorDisplayed_.Insert(tech);
             shaderErrorDisplayed_.Insert(tech);
-            LOGERROR("Technique " + tech->GetName() + " has missing shaders");
+            URHO3D_LOGERROR("Technique " + tech->GetName() + " has missing shaders");
         }
         }
     }
     }
 }
 }
@@ -1282,7 +1282,7 @@ bool Renderer::ResizeInstancingBuffer(unsigned numInstances)
 
 
     if (!instancingBuffer_->SetSize(newSize, INSTANCING_BUFFER_MASK, true))
     if (!instancingBuffer_->SetSize(newSize, INSTANCING_BUFFER_MASK, true))
     {
     {
-        LOGERROR("Failed to resize instancing buffer to " + String(newSize));
+        URHO3D_LOGERROR("Failed to resize instancing buffer to " + String(newSize));
         // If failed, try to restore the old size
         // If failed, try to restore the old size
         instancingBuffer_->SetSize(oldSize, INSTANCING_BUFFER_MASK, true);
         instancingBuffer_->SetSize(oldSize, INSTANCING_BUFFER_MASK, true);
         return false;
         return false;

+ 1 - 1
Source/Urho3D/Graphics/Skeleton.cpp

@@ -119,7 +119,7 @@ void Skeleton::SetRootBoneIndex(unsigned index)
     if (index < bones_.Size())
     if (index < bones_.Size())
         rootBoneIndex_ = index;
         rootBoneIndex_ = index;
     else
     else
-        LOGERROR("Root bone index out of bounds");
+        URHO3D_LOGERROR("Root bone index out of bounds");
 }
 }
 
 
 void Skeleton::ClearBones()
 void Skeleton::ClearBones()

+ 1 - 1
Source/Urho3D/Graphics/StaticModel.cpp

@@ -288,7 +288,7 @@ bool StaticModel::SetMaterial(unsigned index, Material* material)
 {
 {
     if (index >= batches_.Size())
     if (index >= batches_.Size())
     {
     {
-        LOGERROR("Material index out of bounds");
+        URHO3D_LOGERROR("Material index out of bounds");
         return false;
         return false;
     }
     }
 
 

+ 1 - 1
Source/Urho3D/Graphics/Technique.cpp

@@ -280,7 +280,7 @@ bool Technique::BeginLoad(Deserializer& source)
                 newPass->SetAlphaMask(globalAlphaMask);
                 newPass->SetAlphaMask(globalAlphaMask);
         }
         }
         else
         else
-            LOGERROR("Missing pass name");
+            URHO3D_LOGERROR("Missing pass name");
 
 
         passElem = passElem.GetNext("pass");
         passElem = passElem.GetNext("pass");
     }
     }

+ 1 - 1
Source/Urho3D/Graphics/Terrain.cpp

@@ -1257,7 +1257,7 @@ bool Terrain::SetHeightMapInternal(Image* image, bool recreateNow)
 {
 {
     if (image && image->IsCompressed())
     if (image && image->IsCompressed())
     {
     {
-        LOGERROR("Can not use a compressed image as a terrain heightmap");
+        URHO3D_LOGERROR("Can not use a compressed image as a terrain heightmap");
         return false;
         return false;
     }
     }
 
 

+ 8 - 8
Source/Urho3D/IO/File.cpp

@@ -135,7 +135,7 @@ bool File::Open(const String& fileName, FileMode mode)
     {
     {
         if (mode != FILE_READ)
         if (mode != FILE_READ)
         {
         {
-            LOGERROR("Only read mode is supported for asset files");
+            URHO3D_LOGERROR("Only read mode is supported for asset files");
             return false;
             return false;
         }
         }
 
 
@@ -163,7 +163,7 @@ bool File::Open(const String& fileName, FileMode mode)
 
 
     if (fileName.Empty())
     if (fileName.Empty())
     {
     {
-        LOGERROR("Could not open file with empty name");
+        URHO3D_LOGERROR("Could not open file with empty name");
         return false;
         return false;
     }
     }
 
 
@@ -230,7 +230,7 @@ bool File::Open(PackageFile* package, const String& fileName)
 #endif
 #endif
     if (!handle_)
     if (!handle_)
     {
     {
-        LOGERROR("Could not open package file " + fileName);
+        URHO3D_LOGERROR("Could not open package file " + fileName);
         return false;
         return false;
     }
     }
 
 
@@ -262,7 +262,7 @@ unsigned File::Read(void* dest, unsigned size)
 
 
     if (mode_ == FILE_WRITE)
     if (mode_ == FILE_WRITE)
     {
     {
-        LOGERROR("File not opened for reading");
+        URHO3D_LOGERROR("File not opened for reading");
         return 0;
         return 0;
     }
     }
 
 
@@ -350,7 +350,7 @@ unsigned File::Read(void* dest, unsigned size)
     {
     {
         // Return to the position where the read began
         // Return to the position where the read began
         fseek((FILE*)handle_, position_ + offset_, SEEK_SET);
         fseek((FILE*)handle_, position_ + offset_, SEEK_SET);
-        LOGERROR("Error while reading from file " + GetName());
+        URHO3D_LOGERROR("Error while reading from file " + GetName());
         return 0;
         return 0;
     }
     }
 
 
@@ -403,7 +403,7 @@ unsigned File::Seek(unsigned position)
                 Read(skipBuffer, (unsigned)Min((int)position - position_, (int)SKIP_BUFFER_SIZE));
                 Read(skipBuffer, (unsigned)Min((int)position - position_, (int)SKIP_BUFFER_SIZE));
         }
         }
         else
         else
-            LOGERROR("Seeking backward in a compressed file is not supported");
+            URHO3D_LOGERROR("Seeking backward in a compressed file is not supported");
 
 
         return position_;
         return position_;
     }
     }
@@ -425,7 +425,7 @@ unsigned File::Write(const void* data, unsigned size)
 
 
     if (mode_ == FILE_READ)
     if (mode_ == FILE_READ)
     {
     {
-        LOGERROR("File not opened for writing");
+        URHO3D_LOGERROR("File not opened for writing");
         return 0;
         return 0;
     }
     }
 
 
@@ -443,7 +443,7 @@ unsigned File::Write(const void* data, unsigned size)
     {
     {
         // Return to the position where the write began
         // Return to the position where the write began
         fseek((FILE*)handle_, position_ + offset_, SEEK_SET);
         fseek((FILE*)handle_, position_ + offset_, SEEK_SET);
-        LOGERROR("Error while writing to file " + GetName());
+        URHO3D_LOGERROR("Error while writing to file " + GetName());
         return 0;
         return 0;
     }
     }
 
 

+ 19 - 19
Source/Urho3D/IO/FileSystem.cpp

@@ -296,19 +296,19 @@ bool FileSystem::SetCurrentDir(const String& pathName)
 {
 {
     if (!CheckAccess(pathName))
     if (!CheckAccess(pathName))
     {
     {
-        LOGERROR("Access denied to " + pathName);
+        URHO3D_LOGERROR("Access denied to " + pathName);
         return false;
         return false;
     }
     }
 #ifdef WIN32
 #ifdef WIN32
     if (SetCurrentDirectoryW(GetWideNativePath(pathName).CString()) == FALSE)
     if (SetCurrentDirectoryW(GetWideNativePath(pathName).CString()) == FALSE)
     {
     {
-        LOGERROR("Failed to change directory to " + pathName);
+        URHO3D_LOGERROR("Failed to change directory to " + pathName);
         return false;
         return false;
     }
     }
 #else
 #else
     if (chdir(GetNativePath(pathName).CString()) != 0)
     if (chdir(GetNativePath(pathName).CString()) != 0)
     {
     {
-        LOGERROR("Failed to change directory to " + pathName);
+        URHO3D_LOGERROR("Failed to change directory to " + pathName);
         return false;
         return false;
     }
     }
 #endif
 #endif
@@ -320,7 +320,7 @@ bool FileSystem::CreateDir(const String& pathName)
 {
 {
     if (!CheckAccess(pathName))
     if (!CheckAccess(pathName))
     {
     {
-        LOGERROR("Access denied to " + pathName);
+        URHO3D_LOGERROR("Access denied to " + pathName);
         return false;
         return false;
     }
     }
 
 
@@ -342,7 +342,7 @@ bool FileSystem::CreateDir(const String& pathName)
     if (success)
     if (success)
         URHO3D_LOGDEBUG("Created directory " + pathName);
         URHO3D_LOGDEBUG("Created directory " + pathName);
     else
     else
-        LOGERROR("Failed to create directory " + pathName);
+        URHO3D_LOGERROR("Failed to create directory " + pathName);
 
 
     return success;
     return success;
 }
 }
@@ -365,7 +365,7 @@ int FileSystem::SystemCommand(const String& commandLine, bool redirectStdOutToLo
         return DoSystemCommand(commandLine, redirectStdOutToLog, context_);
         return DoSystemCommand(commandLine, redirectStdOutToLog, context_);
     else
     else
     {
     {
-        LOGERROR("Executing an external command is not allowed");
+        URHO3D_LOGERROR("Executing an external command is not allowed");
         return -1;
         return -1;
     }
     }
 }
 }
@@ -376,7 +376,7 @@ int FileSystem::SystemRun(const String& fileName, const Vector<String>& argument
         return DoSystemRun(fileName, arguments);
         return DoSystemRun(fileName, arguments);
     else
     else
     {
     {
-        LOGERROR("Executing an external command is not allowed");
+        URHO3D_LOGERROR("Executing an external command is not allowed");
         return -1;
         return -1;
     }
     }
 }
 }
@@ -393,11 +393,11 @@ unsigned FileSystem::SystemCommandAsync(const String& commandLine)
     }
     }
     else
     else
     {
     {
-        LOGERROR("Executing an external command is not allowed");
+        URHO3D_LOGERROR("Executing an external command is not allowed");
         return M_MAX_UNSIGNED;
         return M_MAX_UNSIGNED;
     }
     }
 #else
 #else
-    LOGERROR("Can not execute an asynchronous command as threading is disabled");
+    URHO3D_LOGERROR("Can not execute an asynchronous command as threading is disabled");
     return M_MAX_UNSIGNED;
     return M_MAX_UNSIGNED;
 #endif
 #endif
 }
 }
@@ -414,11 +414,11 @@ unsigned FileSystem::SystemRunAsync(const String& fileName, const Vector<String>
     }
     }
     else
     else
     {
     {
-        LOGERROR("Executing an external command is not allowed");
+        URHO3D_LOGERROR("Executing an external command is not allowed");
         return M_MAX_UNSIGNED;
         return M_MAX_UNSIGNED;
     }
     }
 #else
 #else
-    LOGERROR("Can not run asynchronously as threading is disabled");
+    URHO3D_LOGERROR("Can not run asynchronously as threading is disabled");
     return M_MAX_UNSIGNED;
     return M_MAX_UNSIGNED;
 #endif
 #endif
 }
 }
@@ -429,7 +429,7 @@ bool FileSystem::SystemOpen(const String& fileName, const String& mode)
     {
     {
         if (!FileExists(fileName) && !DirExists(fileName))
         if (!FileExists(fileName) && !DirExists(fileName))
         {
         {
-            LOGERROR("File or directory " + fileName + " not found");
+            URHO3D_LOGERROR("File or directory " + fileName + " not found");
             return false;
             return false;
         }
         }
 
 
@@ -448,12 +448,12 @@ bool FileSystem::SystemOpen(const String& fileName, const String& mode)
             arguments) == 0;
             arguments) == 0;
 #endif
 #endif
         if (!success)
         if (!success)
-            LOGERROR("Failed to open " + fileName + " externally");
+            URHO3D_LOGERROR("Failed to open " + fileName + " externally");
         return success;
         return success;
     }
     }
     else
     else
     {
     {
-        LOGERROR("Opening a file externally is not allowed");
+        URHO3D_LOGERROR("Opening a file externally is not allowed");
         return false;
         return false;
     }
     }
 }
 }
@@ -462,12 +462,12 @@ bool FileSystem::Copy(const String& srcFileName, const String& destFileName)
 {
 {
     if (!CheckAccess(GetPath(srcFileName)))
     if (!CheckAccess(GetPath(srcFileName)))
     {
     {
-        LOGERROR("Access denied to " + srcFileName);
+        URHO3D_LOGERROR("Access denied to " + srcFileName);
         return false;
         return false;
     }
     }
     if (!CheckAccess(GetPath(destFileName)))
     if (!CheckAccess(GetPath(destFileName)))
     {
     {
-        LOGERROR("Access denied to " + destFileName);
+        URHO3D_LOGERROR("Access denied to " + destFileName);
         return false;
         return false;
     }
     }
 
 
@@ -490,12 +490,12 @@ bool FileSystem::Rename(const String& srcFileName, const String& destFileName)
 {
 {
     if (!CheckAccess(GetPath(srcFileName)))
     if (!CheckAccess(GetPath(srcFileName)))
     {
     {
-        LOGERROR("Access denied to " + srcFileName);
+        URHO3D_LOGERROR("Access denied to " + srcFileName);
         return false;
         return false;
     }
     }
     if (!CheckAccess(GetPath(destFileName)))
     if (!CheckAccess(GetPath(destFileName)))
     {
     {
-        LOGERROR("Access denied to " + destFileName);
+        URHO3D_LOGERROR("Access denied to " + destFileName);
         return false;
         return false;
     }
     }
 
 
@@ -510,7 +510,7 @@ bool FileSystem::Delete(const String& fileName)
 {
 {
     if (!CheckAccess(GetPath(fileName)))
     if (!CheckAccess(GetPath(fileName)))
     {
     {
-        LOGERROR("Access denied to " + fileName);
+        URHO3D_LOGERROR("Access denied to " + fileName);
         return false;
         return false;
     }
     }
 
 

+ 7 - 7
Source/Urho3D/IO/FileWatcher.cpp

@@ -78,7 +78,7 @@ bool FileWatcher::StartWatching(const String& pathName, bool watchSubDirs)
 {
 {
     if (!fileSystem_)
     if (!fileSystem_)
     {
     {
-        LOGERROR("No FileSystem, can not start watching");
+        URHO3D_LOGERROR("No FileSystem, can not start watching");
         return false;
         return false;
     }
     }
 
 
@@ -109,7 +109,7 @@ bool FileWatcher::StartWatching(const String& pathName, bool watchSubDirs)
     }
     }
     else
     else
     {
     {
-        LOGERROR("Failed to start watching path " + pathName);
+        URHO3D_LOGERROR("Failed to start watching path " + pathName);
         return false;
         return false;
     }
     }
 #elif defined(__linux__)
 #elif defined(__linux__)
@@ -118,7 +118,7 @@ bool FileWatcher::StartWatching(const String& pathName, bool watchSubDirs)
 
 
     if (handle < 0)
     if (handle < 0)
     {
     {
-        LOGERROR("Failed to start watching path " + pathName);
+        URHO3D_LOGERROR("Failed to start watching path " + pathName);
         return false;
         return false;
     }
     }
     else
     else
@@ -142,7 +142,7 @@ bool FileWatcher::StartWatching(const String& pathName, bool watchSubDirs)
                 {
                 {
                     handle = inotify_add_watch(watchHandle_, subDirFullPath.CString(), (uint32_t)flags);
                     handle = inotify_add_watch(watchHandle_, subDirFullPath.CString(), (uint32_t)flags);
                     if (handle < 0)
                     if (handle < 0)
-                        LOGERROR("Failed to start watching subdirectory path " + subDirFullPath);
+                        URHO3D_LOGERROR("Failed to start watching subdirectory path " + subDirFullPath);
                     else
                     else
                     {
                     {
                         // Store sub-directory to reconstruct later from inotify
                         // Store sub-directory to reconstruct later from inotify
@@ -159,7 +159,7 @@ bool FileWatcher::StartWatching(const String& pathName, bool watchSubDirs)
 #elif defined(__APPLE__) && !defined(IOS)
 #elif defined(__APPLE__) && !defined(IOS)
     if (!supported_)
     if (!supported_)
     {
     {
-        LOGERROR("Individual file watching not supported by this OS version, can not start watching path " + pathName);
+        URHO3D_LOGERROR("Individual file watching not supported by this OS version, can not start watching path " + pathName);
         return false;
         return false;
     }
     }
     
     
@@ -175,11 +175,11 @@ bool FileWatcher::StartWatching(const String& pathName, bool watchSubDirs)
     }
     }
     else
     else
     {
     {
-        LOGERROR("Failed to start watching path " + pathName);
+        URHO3D_LOGERROR("Failed to start watching path " + pathName);
         return false;
         return false;
     }
     }
 #else
 #else
-    LOGERROR("FileWatcher not implemented, can not start watching path " + pathName);
+    URHO3D_LOGERROR("FileWatcher not implemented, can not start watching path " + pathName);
     return false;
     return false;
 #endif
 #endif
 #else
 #else

+ 2 - 2
Source/Urho3D/IO/Log.h

@@ -134,7 +134,7 @@ private:
 #define URHO3D_LOGDEBUG(message) Urho3D::Log::Write(Urho3D::LOG_DEBUG, message)
 #define URHO3D_LOGDEBUG(message) Urho3D::Log::Write(Urho3D::LOG_DEBUG, message)
 #define URHO3D_LOGINFO(message) Urho3D::Log::Write(Urho3D::LOG_INFO, message)
 #define URHO3D_LOGINFO(message) Urho3D::Log::Write(Urho3D::LOG_INFO, message)
 #define URHO3D_LOGWARNING(message) Urho3D::Log::Write(Urho3D::LOG_WARNING, message)
 #define URHO3D_LOGWARNING(message) Urho3D::Log::Write(Urho3D::LOG_WARNING, message)
-#define LOGERROR(message) Urho3D::Log::Write(Urho3D::LOG_ERROR, message)
+#define URHO3D_LOGERROR(message) Urho3D::Log::Write(Urho3D::LOG_ERROR, message)
 #define LOGRAW(message) Urho3D::Log::WriteRaw(message)
 #define LOGRAW(message) Urho3D::Log::WriteRaw(message)
 #define LOGDEBUGF(format, ...) Urho3D::Log::Write(Urho3D::LOG_DEBUG, Urho3D::ToString(format, ##__VA_ARGS__))
 #define LOGDEBUGF(format, ...) Urho3D::Log::Write(Urho3D::LOG_DEBUG, Urho3D::ToString(format, ##__VA_ARGS__))
 #define LOGINFOF(format, ...) Urho3D::Log::Write(Urho3D::LOG_INFO, Urho3D::ToString(format, ##__VA_ARGS__))
 #define LOGINFOF(format, ...) Urho3D::Log::Write(Urho3D::LOG_INFO, Urho3D::ToString(format, ##__VA_ARGS__))
@@ -145,7 +145,7 @@ private:
 #define URHO3D_LOGDEBUG(message) ((void)0)
 #define URHO3D_LOGDEBUG(message) ((void)0)
 #define URHO3D_LOGINFO(message) ((void)0)
 #define URHO3D_LOGINFO(message) ((void)0)
 #define URHO3D_LOGWARNING(message) ((void)0)
 #define URHO3D_LOGWARNING(message) ((void)0)
-#define LOGERROR(message) ((void)0)
+#define URHO3D_LOGERROR(message) ((void)0)
 #define LOGRAW(message) ((void)0)
 #define LOGRAW(message) ((void)0)
 #define LOGDEBUGF(...) ((void)0)
 #define LOGDEBUGF(...) ((void)0)
 #define LOGINFOF(...) ((void)0)
 #define LOGINFOF(...) ((void)0)

+ 3 - 3
Source/Urho3D/IO/PackageFile.cpp

@@ -55,7 +55,7 @@ bool PackageFile::Open(const String& fileName, unsigned startOffset)
 #ifdef ANDROID
 #ifdef ANDROID
     if (URHO3D_IS_ASSET(fileName))
     if (URHO3D_IS_ASSET(fileName))
     {
     {
-        LOGERROR("Package files within the apk are not supported on Android");
+        URHO3D_LOGERROR("Package files within the apk are not supported on Android");
         return false;
         return false;
     }
     }
 #endif
 #endif
@@ -86,7 +86,7 @@ bool PackageFile::Open(const String& fileName, unsigned startOffset)
 
 
         if (id != "UPAK" && id != "ULZ4")
         if (id != "UPAK" && id != "ULZ4")
         {
         {
-            LOGERROR(fileName + " is not a valid package file");
+            URHO3D_LOGERROR(fileName + " is not a valid package file");
             return false;
             return false;
         }
         }
     }
     }
@@ -107,7 +107,7 @@ bool PackageFile::Open(const String& fileName, unsigned startOffset)
         newEntry.size_ = file->ReadUInt();
         newEntry.size_ = file->ReadUInt();
         newEntry.checksum_ = file->ReadUInt();
         newEntry.checksum_ = file->ReadUInt();
         if (!compressed_ && newEntry.offset_ + newEntry.size_ > totalSize_)
         if (!compressed_ && newEntry.offset_ + newEntry.size_ > totalSize_)
-            LOGERROR("File entry " + entryName + " outside package file");
+            URHO3D_LOGERROR("File entry " + entryName + " outside package file");
         else
         else
             entries_[entryName] = newEntry;
             entries_[entryName] = newEntry;
     }
     }

+ 2 - 2
Source/Urho3D/Input/Input.cpp

@@ -900,7 +900,7 @@ bool Input::RecordGesture()
     // If have no touch devices, fail
     // If have no touch devices, fail
     if (!SDL_GetNumTouchDevices())
     if (!SDL_GetNumTouchDevices())
     {
     {
-        LOGERROR("Can not record gesture: no touch devices");
+        URHO3D_LOGERROR("Can not record gesture: no touch devices");
         return false;
         return false;
     }
     }
 
 
@@ -924,7 +924,7 @@ unsigned Input::LoadGestures(Deserializer& source)
     // If have no touch devices, fail
     // If have no touch devices, fail
     if (!SDL_GetNumTouchDevices())
     if (!SDL_GetNumTouchDevices())
     {
     {
-        LOGERROR("Can not load gestures: no touch devices");
+        URHO3D_LOGERROR("Can not load gestures: no touch devices");
         return 0;
         return 0;
     }
     }
 
 

+ 2 - 2
Source/Urho3D/LuaScript/LuaScript.cpp

@@ -87,7 +87,7 @@ LuaScript::LuaScript(Context* context) :
     luaState_ = luaL_newstate();
     luaState_ = luaL_newstate();
     if (!luaState_)
     if (!luaState_)
     {
     {
-        LOGERROR("Could not create Lua state");
+        URHO3D_LOGERROR("Could not create Lua state");
         return;
         return;
     }
     }
 
 
@@ -331,7 +331,7 @@ void LuaScript::RegisterLoader()
 int LuaScript::AtPanic(lua_State* L)
 int LuaScript::AtPanic(lua_State* L)
 {
 {
     String errorMessage = luaL_checkstring(L, -1);
     String errorMessage = luaL_checkstring(L, -1);
-    LOGERROR("Lua error: Error message = '" + errorMessage + "'");
+    URHO3D_LOGERROR("Lua error: Error message = '" + errorMessage + "'");
     lua_pop(L, 1);
     lua_pop(L, 1);
     return 0;
     return 0;
 }
 }

+ 3 - 3
Source/Urho3D/LuaScript/LuaScriptInstance.cpp

@@ -191,7 +191,7 @@ void LuaScriptInstance::OnSetAttribute(const AttributeInfo& attr, const Variant&
             }
             }
             break;
             break;
         default:
         default:
-            LOGERROR("Unsupported data type");
+            URHO3D_LOGERROR("Unsupported data type");
             lua_settop(luaState_, top);
             lua_settop(luaState_, top);
             return;
             return;
         }
         }
@@ -268,7 +268,7 @@ void LuaScriptInstance::OnGetAttribute(const AttributeInfo& attr, Variant& dest)
         dest = *((IntVector2*)tolua_tousertype(luaState_, -1, 0));
         dest = *((IntVector2*)tolua_tousertype(luaState_, -1, 0));
         break;
         break;
     default:
     default:
-        LOGERROR("Unsupported data type");
+        URHO3D_LOGERROR("Unsupported data type");
         return;
         return;
     }
     }
 
 
@@ -386,7 +386,7 @@ void LuaScriptInstance::SetScriptFile(LuaFile* scriptFile)
         return;
         return;
 
 
     if (!scriptFile_->LoadAndExecute(luaState_))
     if (!scriptFile_->LoadAndExecute(luaState_))
-        LOGERROR("Execute Lua file failed: " + scriptFile_->GetName());
+        URHO3D_LOGERROR("Execute Lua file failed: " + scriptFile_->GetName());
 }
 }
 
 
 void LuaScriptInstance::SetScriptObjectType(const String& scriptObjectType)
 void LuaScriptInstance::SetScriptObjectType(const String& scriptObjectType)

+ 1 - 1
Source/Urho3D/Navigation/CrowdAgent.cpp

@@ -582,7 +582,7 @@ void CrowdAgent::OnSceneSet(Scene* scene)
     if (scene)
     if (scene)
     {
     {
         if (scene == node_)
         if (scene == node_)
-            LOGERROR(GetTypeName() + " should not be created to the root scene node");
+            URHO3D_LOGERROR(GetTypeName() + " should not be created to the root scene node");
         crowdManager_ = scene->GetOrCreateComponent<CrowdManager>();
         crowdManager_ = scene->GetOrCreateComponent<CrowdManager>();
         AddAgentToCrowd();
         AddAgentToCrowd();
     }
     }

+ 2 - 2
Source/Urho3D/Navigation/CrowdManager.cpp

@@ -553,7 +553,7 @@ bool CrowdManager::CreateCrowd()
         maxAgentRadius_ = navigationMesh_->GetAgentRadius();
         maxAgentRadius_ = navigationMesh_->GetAgentRadius();
     if (!crowd_->init(maxAgents_, maxAgentRadius_, navigationMesh_->navMesh_, CrowdAgentUpdateCallback))
     if (!crowd_->init(maxAgents_, maxAgentRadius_, navigationMesh_->navMesh_, CrowdAgentUpdateCallback))
     {
     {
-        LOGERROR("Could not initialize DetourCrowd");
+        URHO3D_LOGERROR("Could not initialize DetourCrowd");
         return false;
         return false;
     }
     }
 
 
@@ -610,7 +610,7 @@ void CrowdManager::OnSceneSet(Scene* scene)
     {
     {
         if (scene != node_)
         if (scene != node_)
         {
         {
-            LOGERROR("CrowdManager is a scene component and should only be attached to the scene node");
+            URHO3D_LOGERROR("CrowdManager is a scene component and should only be attached to the scene node");
             return;
             return;
         }
         }
 
 

+ 23 - 23
Source/Urho3D/Navigation/DynamicNavigationMesh.cpp

@@ -299,13 +299,13 @@ bool DynamicNavigationMesh::Build()
         navMesh_ = dtAllocNavMesh();
         navMesh_ = dtAllocNavMesh();
         if (!navMesh_)
         if (!navMesh_)
         {
         {
-            LOGERROR("Could not allocate navigation mesh");
+            URHO3D_LOGERROR("Could not allocate navigation mesh");
             return false;
             return false;
         }
         }
 
 
         if (dtStatusFailed(navMesh_->init(&params)))
         if (dtStatusFailed(navMesh_->init(&params)))
         {
         {
-            LOGERROR("Could not initialize navigation mesh");
+            URHO3D_LOGERROR("Could not initialize navigation mesh");
             ReleaseNavigationMesh();
             ReleaseNavigationMesh();
             return false;
             return false;
         }
         }
@@ -328,14 +328,14 @@ bool DynamicNavigationMesh::Build()
         tileCache_ = dtAllocTileCache();
         tileCache_ = dtAllocTileCache();
         if (!tileCache_)
         if (!tileCache_)
         {
         {
-            LOGERROR("Could not allocate tile cache");
+            URHO3D_LOGERROR("Could not allocate tile cache");
             ReleaseNavigationMesh();
             ReleaseNavigationMesh();
             return false;
             return false;
         }
         }
 
 
         if (dtStatusFailed(tileCache_->init(&tileCacheParams, allocator_, compressor_, meshProcessor_)))
         if (dtStatusFailed(tileCache_->init(&tileCacheParams, allocator_, compressor_, meshProcessor_)))
         {
         {
-            LOGERROR("Could not initialize tile cache");
+            URHO3D_LOGERROR("Could not initialize tile cache");
             ReleaseNavigationMesh();
             ReleaseNavigationMesh();
             return false;
             return false;
         }
         }
@@ -403,7 +403,7 @@ bool DynamicNavigationMesh::Build(const BoundingBox& boundingBox)
 
 
     if (!navMesh_)
     if (!navMesh_)
     {
     {
-        LOGERROR("Navigation mesh must first be built fully before it can be partially rebuilt");
+        URHO3D_LOGERROR("Navigation mesh must first be built fully before it can be partially rebuilt");
         return false;
         return false;
     }
     }
 
 
@@ -571,13 +571,13 @@ void DynamicNavigationMesh::SetNavigationDataAttr(const PODVector<unsigned char>
     navMesh_ = dtAllocNavMesh();
     navMesh_ = dtAllocNavMesh();
     if (!navMesh_)
     if (!navMesh_)
     {
     {
-        LOGERROR("Could not allocate navigation mesh");
+        URHO3D_LOGERROR("Could not allocate navigation mesh");
         return;
         return;
     }
     }
 
 
     if (dtStatusFailed(navMesh_->init(&params)))
     if (dtStatusFailed(navMesh_->init(&params)))
     {
     {
-        LOGERROR("Could not initialize navigation mesh");
+        URHO3D_LOGERROR("Could not initialize navigation mesh");
         ReleaseNavigationMesh();
         ReleaseNavigationMesh();
         return;
         return;
     }
     }
@@ -588,13 +588,13 @@ void DynamicNavigationMesh::SetNavigationDataAttr(const PODVector<unsigned char>
     tileCache_ = dtAllocTileCache();
     tileCache_ = dtAllocTileCache();
     if (!tileCache_)
     if (!tileCache_)
     {
     {
-        LOGERROR("Could not allocate tile cache");
+        URHO3D_LOGERROR("Could not allocate tile cache");
         ReleaseNavigationMesh();
         ReleaseNavigationMesh();
         return;
         return;
     }
     }
     if (dtStatusFailed(tileCache_->init(&tcParams, allocator_, compressor_, meshProcessor_)))
     if (dtStatusFailed(tileCache_->init(&tcParams, allocator_, compressor_, meshProcessor_)))
     {
     {
-        LOGERROR("Could not initialize tile cache");
+        URHO3D_LOGERROR("Could not initialize tile cache");
         ReleaseNavigationMesh();
         ReleaseNavigationMesh();
         return;
         return;
     }
     }
@@ -609,7 +609,7 @@ void DynamicNavigationMesh::SetNavigationDataAttr(const PODVector<unsigned char>
 
 
         if (dtStatusFailed(tileCache_->addTile(data, dataSize, DT_TILE_FREE_DATA, 0)))
         if (dtStatusFailed(tileCache_->addTile(data, dataSize, DT_TILE_FREE_DATA, 0)))
         {
         {
-            LOGERROR("Failed to add tile");
+            URHO3D_LOGERROR("Failed to add tile");
             dtFree(data);
             dtFree(data);
             return;
             return;
         }
         }
@@ -716,14 +716,14 @@ int DynamicNavigationMesh::BuildTile(Vector<NavigationGeometryInfo>& geometryLis
     build.heightField_ = rcAllocHeightfield();
     build.heightField_ = rcAllocHeightfield();
     if (!build.heightField_)
     if (!build.heightField_)
     {
     {
-        LOGERROR("Could not allocate heightfield");
+        URHO3D_LOGERROR("Could not allocate heightfield");
         return 0;
         return 0;
     }
     }
 
 
     if (!rcCreateHeightfield(build.ctx_, *build.heightField_, cfg.width, cfg.height, cfg.bmin, cfg.bmax, cfg.cs,
     if (!rcCreateHeightfield(build.ctx_, *build.heightField_, cfg.width, cfg.height, cfg.bmin, cfg.bmax, cfg.cs,
         cfg.ch))
         cfg.ch))
     {
     {
-        LOGERROR("Could not create heightfield");
+        URHO3D_LOGERROR("Could not create heightfield");
         return 0;
         return 0;
     }
     }
 
 
@@ -743,18 +743,18 @@ int DynamicNavigationMesh::BuildTile(Vector<NavigationGeometryInfo>& geometryLis
     build.compactHeightField_ = rcAllocCompactHeightfield();
     build.compactHeightField_ = rcAllocCompactHeightfield();
     if (!build.compactHeightField_)
     if (!build.compactHeightField_)
     {
     {
-        LOGERROR("Could not allocate create compact heightfield");
+        URHO3D_LOGERROR("Could not allocate create compact heightfield");
         return 0;
         return 0;
     }
     }
     if (!rcBuildCompactHeightfield(build.ctx_, cfg.walkableHeight, cfg.walkableClimb, *build.heightField_,
     if (!rcBuildCompactHeightfield(build.ctx_, cfg.walkableHeight, cfg.walkableClimb, *build.heightField_,
         *build.compactHeightField_))
         *build.compactHeightField_))
     {
     {
-        LOGERROR("Could not build compact heightfield");
+        URHO3D_LOGERROR("Could not build compact heightfield");
         return 0;
         return 0;
     }
     }
     if (!rcErodeWalkableArea(build.ctx_, cfg.walkableRadius, *build.compactHeightField_))
     if (!rcErodeWalkableArea(build.ctx_, cfg.walkableRadius, *build.compactHeightField_))
     {
     {
-        LOGERROR("Could not erode compact heightfield");
+        URHO3D_LOGERROR("Could not erode compact heightfield");
         return 0;
         return 0;
     }
     }
 
 
@@ -767,13 +767,13 @@ int DynamicNavigationMesh::BuildTile(Vector<NavigationGeometryInfo>& geometryLis
     {
     {
         if (!rcBuildDistanceField(build.ctx_, *build.compactHeightField_))
         if (!rcBuildDistanceField(build.ctx_, *build.compactHeightField_))
         {
         {
-            LOGERROR("Could not build distance field");
+            URHO3D_LOGERROR("Could not build distance field");
             return 0;
             return 0;
         }
         }
         if (!rcBuildRegions(build.ctx_, *build.compactHeightField_, cfg.borderSize, cfg.minRegionArea,
         if (!rcBuildRegions(build.ctx_, *build.compactHeightField_, cfg.borderSize, cfg.minRegionArea,
             cfg.mergeRegionArea))
             cfg.mergeRegionArea))
         {
         {
-            LOGERROR("Could not build regions");
+            URHO3D_LOGERROR("Could not build regions");
             return 0;
             return 0;
         }
         }
     }
     }
@@ -781,7 +781,7 @@ int DynamicNavigationMesh::BuildTile(Vector<NavigationGeometryInfo>& geometryLis
     {
     {
         if (!rcBuildRegionsMonotone(build.ctx_, *build.compactHeightField_, cfg.borderSize, cfg.minRegionArea, cfg.mergeRegionArea))
         if (!rcBuildRegionsMonotone(build.ctx_, *build.compactHeightField_, cfg.borderSize, cfg.minRegionArea, cfg.mergeRegionArea))
         {
         {
-            LOGERROR("Could not build monotone regions");
+            URHO3D_LOGERROR("Could not build monotone regions");
             return 0;
             return 0;
         }
         }
     }
     }
@@ -789,14 +789,14 @@ int DynamicNavigationMesh::BuildTile(Vector<NavigationGeometryInfo>& geometryLis
     build.heightFieldLayers_ = rcAllocHeightfieldLayerSet();
     build.heightFieldLayers_ = rcAllocHeightfieldLayerSet();
     if (!build.heightFieldLayers_)
     if (!build.heightFieldLayers_)
     {
     {
-        LOGERROR("Could not allocate height field layer set");
+        URHO3D_LOGERROR("Could not allocate height field layer set");
         return 0;
         return 0;
     }
     }
 
 
     if (!rcBuildHeightfieldLayers(build.ctx_, *build.compactHeightField_, cfg.borderSize, cfg.walkableHeight,
     if (!rcBuildHeightfieldLayers(build.ctx_, *build.compactHeightField_, cfg.borderSize, cfg.walkableHeight,
         *build.heightFieldLayers_))
         *build.heightFieldLayers_))
     {
     {
-        LOGERROR("Could not build height field layers");
+        URHO3D_LOGERROR("Could not build height field layers");
         return 0;
         return 0;
     }
     }
 
 
@@ -828,7 +828,7 @@ int DynamicNavigationMesh::BuildTile(Vector<NavigationGeometryInfo>& geometryLis
             dtBuildTileCacheLayer(compressor_/*compressor*/, &header, layer->heights, layer->areas/*areas*/, layer->cons,
             dtBuildTileCacheLayer(compressor_/*compressor*/, &header, layer->heights, layer->areas/*areas*/, layer->cons,
                 &(tiles[retCt].data), &tiles[retCt].dataSize)))
                 &(tiles[retCt].data), &tiles[retCt].dataSize)))
         {
         {
-            LOGERROR("Failed to build tile cache layers");
+            URHO3D_LOGERROR("Failed to build tile cache layers");
             return 0;
             return 0;
         }
         }
         else
         else
@@ -904,7 +904,7 @@ void DynamicNavigationMesh::AddObstacle(Obstacle* obstacle, bool silent)
 
 
         if (dtStatusFailed(tileCache_->addObstacle(pos, obstacle->GetRadius(), obstacle->GetHeight(), &refHolder)))
         if (dtStatusFailed(tileCache_->addObstacle(pos, obstacle->GetRadius(), obstacle->GetHeight(), &refHolder)))
         {
         {
-            LOGERROR("Failed to add obstacle");
+            URHO3D_LOGERROR("Failed to add obstacle");
             return;
             return;
         }
         }
         obstacle->obstacleId_ = refHolder;
         obstacle->obstacleId_ = refHolder;
@@ -944,7 +944,7 @@ void DynamicNavigationMesh::RemoveObstacle(Obstacle* obstacle, bool silent)
 
 
         if (dtStatusFailed(tileCache_->removeObstacle(obstacle->obstacleId_)))
         if (dtStatusFailed(tileCache_->removeObstacle(obstacle->obstacleId_)))
         {
         {
-            LOGERROR("Failed to remove obstacle");
+            URHO3D_LOGERROR("Failed to remove obstacle");
             return;
             return;
         }
         }
         obstacle->obstacleId_ = 0;
         obstacle->obstacleId_ = 0;

+ 25 - 25
Source/Urho3D/Navigation/NavigationMesh.cpp

@@ -395,13 +395,13 @@ bool NavigationMesh::Build()
         navMesh_ = dtAllocNavMesh();
         navMesh_ = dtAllocNavMesh();
         if (!navMesh_)
         if (!navMesh_)
         {
         {
-            LOGERROR("Could not allocate navigation mesh");
+            URHO3D_LOGERROR("Could not allocate navigation mesh");
             return false;
             return false;
         }
         }
 
 
         if (dtStatusFailed(navMesh_->init(&params)))
         if (dtStatusFailed(navMesh_->init(&params)))
         {
         {
-            LOGERROR("Could not initialize navigation mesh");
+            URHO3D_LOGERROR("Could not initialize navigation mesh");
             ReleaseNavigationMesh();
             ReleaseNavigationMesh();
             return false;
             return false;
         }
         }
@@ -442,7 +442,7 @@ bool NavigationMesh::Build(const BoundingBox& boundingBox)
 
 
     if (!navMesh_)
     if (!navMesh_)
     {
     {
-        LOGERROR("Navigation mesh must first be built fully before it can be partially rebuilt");
+        URHO3D_LOGERROR("Navigation mesh must first be built fully before it can be partially rebuilt");
         return false;
         return false;
     }
     }
 
 
@@ -732,13 +732,13 @@ void NavigationMesh::SetNavigationDataAttr(const PODVector<unsigned char>& value
     navMesh_ = dtAllocNavMesh();
     navMesh_ = dtAllocNavMesh();
     if (!navMesh_)
     if (!navMesh_)
     {
     {
-        LOGERROR("Could not allocate navigation mesh");
+        URHO3D_LOGERROR("Could not allocate navigation mesh");
         return;
         return;
     }
     }
 
 
     if (dtStatusFailed(navMesh_->init(&params)))
     if (dtStatusFailed(navMesh_->init(&params)))
     {
     {
-        LOGERROR("Could not initialize navigation mesh");
+        URHO3D_LOGERROR("Could not initialize navigation mesh");
         ReleaseNavigationMesh();
         ReleaseNavigationMesh();
         return;
         return;
     }
     }
@@ -755,14 +755,14 @@ void NavigationMesh::SetNavigationDataAttr(const PODVector<unsigned char>& value
         unsigned char* navData = (unsigned char*)dtAlloc(navDataSize, DT_ALLOC_PERM);
         unsigned char* navData = (unsigned char*)dtAlloc(navDataSize, DT_ALLOC_PERM);
         if (!navData)
         if (!navData)
         {
         {
-            LOGERROR("Could not allocate data for navigation mesh tile");
+            URHO3D_LOGERROR("Could not allocate data for navigation mesh tile");
             return;
             return;
         }
         }
 
 
         buffer.Read(navData, navDataSize);
         buffer.Read(navData, navDataSize);
         if (dtStatusFailed(navMesh_->addTile(navData, navDataSize, DT_TILE_FREE_DATA, 0, 0)))
         if (dtStatusFailed(navMesh_->addTile(navData, navDataSize, DT_TILE_FREE_DATA, 0, 0)))
         {
         {
-            LOGERROR("Failed to add navigation mesh tile");
+            URHO3D_LOGERROR("Failed to add navigation mesh tile");
             dtFree(navData);
             dtFree(navData);
             return;
             return;
         }
         }
@@ -1168,14 +1168,14 @@ bool NavigationMesh::BuildTile(Vector<NavigationGeometryInfo>& geometryList, int
     build.heightField_ = rcAllocHeightfield();
     build.heightField_ = rcAllocHeightfield();
     if (!build.heightField_)
     if (!build.heightField_)
     {
     {
-        LOGERROR("Could not allocate heightfield");
+        URHO3D_LOGERROR("Could not allocate heightfield");
         return false;
         return false;
     }
     }
 
 
     if (!rcCreateHeightfield(build.ctx_, *build.heightField_, cfg.width, cfg.height, cfg.bmin, cfg.bmax, cfg.cs,
     if (!rcCreateHeightfield(build.ctx_, *build.heightField_, cfg.width, cfg.height, cfg.bmin, cfg.bmax, cfg.cs,
         cfg.ch))
         cfg.ch))
     {
     {
-        LOGERROR("Could not create heightfield");
+        URHO3D_LOGERROR("Could not create heightfield");
         return false;
         return false;
     }
     }
 
 
@@ -1195,18 +1195,18 @@ bool NavigationMesh::BuildTile(Vector<NavigationGeometryInfo>& geometryList, int
     build.compactHeightField_ = rcAllocCompactHeightfield();
     build.compactHeightField_ = rcAllocCompactHeightfield();
     if (!build.compactHeightField_)
     if (!build.compactHeightField_)
     {
     {
-        LOGERROR("Could not allocate create compact heightfield");
+        URHO3D_LOGERROR("Could not allocate create compact heightfield");
         return false;
         return false;
     }
     }
     if (!rcBuildCompactHeightfield(build.ctx_, cfg.walkableHeight, cfg.walkableClimb, *build.heightField_,
     if (!rcBuildCompactHeightfield(build.ctx_, cfg.walkableHeight, cfg.walkableClimb, *build.heightField_,
         *build.compactHeightField_))
         *build.compactHeightField_))
     {
     {
-        LOGERROR("Could not build compact heightfield");
+        URHO3D_LOGERROR("Could not build compact heightfield");
         return false;
         return false;
     }
     }
     if (!rcErodeWalkableArea(build.ctx_, cfg.walkableRadius, *build.compactHeightField_))
     if (!rcErodeWalkableArea(build.ctx_, cfg.walkableRadius, *build.compactHeightField_))
     {
     {
-        LOGERROR("Could not erode compact heightfield");
+        URHO3D_LOGERROR("Could not erode compact heightfield");
         return false;
         return false;
     }
     }
 
 
@@ -1219,13 +1219,13 @@ bool NavigationMesh::BuildTile(Vector<NavigationGeometryInfo>& geometryList, int
     {
     {
         if (!rcBuildDistanceField(build.ctx_, *build.compactHeightField_))
         if (!rcBuildDistanceField(build.ctx_, *build.compactHeightField_))
         {
         {
-            LOGERROR("Could not build distance field");
+            URHO3D_LOGERROR("Could not build distance field");
             return false;
             return false;
         }
         }
         if (!rcBuildRegions(build.ctx_, *build.compactHeightField_, cfg.borderSize, cfg.minRegionArea,
         if (!rcBuildRegions(build.ctx_, *build.compactHeightField_, cfg.borderSize, cfg.minRegionArea,
             cfg.mergeRegionArea))
             cfg.mergeRegionArea))
         {
         {
-            LOGERROR("Could not build regions");
+            URHO3D_LOGERROR("Could not build regions");
             return false;
             return false;
         }
         }
     }
     }
@@ -1233,7 +1233,7 @@ bool NavigationMesh::BuildTile(Vector<NavigationGeometryInfo>& geometryList, int
     {
     {
         if (!rcBuildRegionsMonotone(build.ctx_, *build.compactHeightField_, cfg.borderSize, cfg.minRegionArea, cfg.mergeRegionArea))
         if (!rcBuildRegionsMonotone(build.ctx_, *build.compactHeightField_, cfg.borderSize, cfg.minRegionArea, cfg.mergeRegionArea))
         {
         {
-            LOGERROR("Could not build monotone regions");
+            URHO3D_LOGERROR("Could not build monotone regions");
             return false;
             return false;
         }
         }
     }
     }
@@ -1241,38 +1241,38 @@ bool NavigationMesh::BuildTile(Vector<NavigationGeometryInfo>& geometryList, int
     build.contourSet_ = rcAllocContourSet();
     build.contourSet_ = rcAllocContourSet();
     if (!build.contourSet_)
     if (!build.contourSet_)
     {
     {
-        LOGERROR("Could not allocate contour set");
+        URHO3D_LOGERROR("Could not allocate contour set");
         return false;
         return false;
     }
     }
     if (!rcBuildContours(build.ctx_, *build.compactHeightField_, cfg.maxSimplificationError, cfg.maxEdgeLen,
     if (!rcBuildContours(build.ctx_, *build.compactHeightField_, cfg.maxSimplificationError, cfg.maxEdgeLen,
         *build.contourSet_))
         *build.contourSet_))
     {
     {
-        LOGERROR("Could not create contours");
+        URHO3D_LOGERROR("Could not create contours");
         return false;
         return false;
     }
     }
 
 
     build.polyMesh_ = rcAllocPolyMesh();
     build.polyMesh_ = rcAllocPolyMesh();
     if (!build.polyMesh_)
     if (!build.polyMesh_)
     {
     {
-        LOGERROR("Could not allocate poly mesh");
+        URHO3D_LOGERROR("Could not allocate poly mesh");
         return false;
         return false;
     }
     }
     if (!rcBuildPolyMesh(build.ctx_, *build.contourSet_, cfg.maxVertsPerPoly, *build.polyMesh_))
     if (!rcBuildPolyMesh(build.ctx_, *build.contourSet_, cfg.maxVertsPerPoly, *build.polyMesh_))
     {
     {
-        LOGERROR("Could not triangulate contours");
+        URHO3D_LOGERROR("Could not triangulate contours");
         return false;
         return false;
     }
     }
 
 
     build.polyMeshDetail_ = rcAllocPolyMeshDetail();
     build.polyMeshDetail_ = rcAllocPolyMeshDetail();
     if (!build.polyMeshDetail_)
     if (!build.polyMeshDetail_)
     {
     {
-        LOGERROR("Could not allocate detail mesh");
+        URHO3D_LOGERROR("Could not allocate detail mesh");
         return false;
         return false;
     }
     }
     if (!rcBuildPolyMeshDetail(build.ctx_, *build.polyMesh_, *build.compactHeightField_, cfg.detailSampleDist,
     if (!rcBuildPolyMeshDetail(build.ctx_, *build.polyMesh_, *build.compactHeightField_, cfg.detailSampleDist,
         cfg.detailSampleMaxError, *build.polyMeshDetail_))
         cfg.detailSampleMaxError, *build.polyMeshDetail_))
     {
     {
-        LOGERROR("Could not build detail mesh");
+        URHO3D_LOGERROR("Could not build detail mesh");
         return false;
         return false;
     }
     }
 
 
@@ -1325,13 +1325,13 @@ bool NavigationMesh::BuildTile(Vector<NavigationGeometryInfo>& geometryList, int
 
 
     if (!dtCreateNavMeshData(&params, &navData, &navDataSize))
     if (!dtCreateNavMeshData(&params, &navData, &navDataSize))
     {
     {
-        LOGERROR("Could not build navigation mesh tile data");
+        URHO3D_LOGERROR("Could not build navigation mesh tile data");
         return false;
         return false;
     }
     }
 
 
     if (dtStatusFailed(navMesh_->addTile(navData, navDataSize, DT_TILE_FREE_DATA, 0, 0)))
     if (dtStatusFailed(navMesh_->addTile(navData, navDataSize, DT_TILE_FREE_DATA, 0, 0)))
     {
     {
-        LOGERROR("Failed to add navigation mesh tile");
+        URHO3D_LOGERROR("Failed to add navigation mesh tile");
         dtFree(navData);
         dtFree(navData);
         return false;
         return false;
     }
     }
@@ -1360,13 +1360,13 @@ bool NavigationMesh::InitializeQuery()
     navMeshQuery_ = dtAllocNavMeshQuery();
     navMeshQuery_ = dtAllocNavMeshQuery();
     if (!navMeshQuery_)
     if (!navMeshQuery_)
     {
     {
-        LOGERROR("Could not create navigation mesh query");
+        URHO3D_LOGERROR("Could not create navigation mesh query");
         return false;
         return false;
     }
     }
 
 
     if (dtStatusFailed(navMeshQuery_->init(navMesh_, MAX_POLYS)))
     if (dtStatusFailed(navMeshQuery_->init(navMesh_, MAX_POLYS)))
     {
     {
-        LOGERROR("Could not init navigation mesh query");
+        URHO3D_LOGERROR("Could not init navigation mesh query");
         return false;
         return false;
     }
     }
 
 

+ 17 - 17
Source/Urho3D/Network/Connection.cpp

@@ -97,20 +97,20 @@ void Connection::SendMessage(int msgID, bool reliable, bool inOrder, const unsig
     // Make sure not to use kNet internal message ID's
     // Make sure not to use kNet internal message ID's
     if (msgID <= 0x4 || msgID >= 0x3ffffffe)
     if (msgID <= 0x4 || msgID >= 0x3ffffffe)
     {
     {
-        LOGERROR("Can not send message with reserved ID");
+        URHO3D_LOGERROR("Can not send message with reserved ID");
         return;
         return;
     }
     }
 
 
     if (numBytes && !data)
     if (numBytes && !data)
     {
     {
-        LOGERROR("Null pointer supplied for network message data");
+        URHO3D_LOGERROR("Null pointer supplied for network message data");
         return;
         return;
     }
     }
 
 
     kNet::NetworkMessage* msg = connection_->StartNewMessage((unsigned long)msgID, numBytes);
     kNet::NetworkMessage* msg = connection_->StartNewMessage((unsigned long)msgID, numBytes);
     if (!msg)
     if (!msg)
     {
     {
-        LOGERROR("Can not start new network message");
+        URHO3D_LOGERROR("Can not start new network message");
         return;
         return;
     }
     }
 
 
@@ -138,17 +138,17 @@ void Connection::SendRemoteEvent(Node* node, StringHash eventType, bool inOrder,
 {
 {
     if (!node)
     if (!node)
     {
     {
-        LOGERROR("Null sender node for remote node event");
+        URHO3D_LOGERROR("Null sender node for remote node event");
         return;
         return;
     }
     }
     if (node->GetScene() != scene_)
     if (node->GetScene() != scene_)
     {
     {
-        LOGERROR("Sender node is not in the connection's scene, can not send remote node event");
+        URHO3D_LOGERROR("Sender node is not in the connection's scene, can not send remote node event");
         return;
         return;
     }
     }
     if (node->GetID() >= FIRST_LOCAL_ID)
     if (node->GetID() >= FIRST_LOCAL_ID)
     {
     {
-        LOGERROR("Sender node has a local ID, can not send remote node event");
+        URHO3D_LOGERROR("Sender node has a local ID, can not send remote node event");
         return;
         return;
     }
     }
 
 
@@ -456,7 +456,7 @@ void Connection::ProcessLoadScene(int msgID, MemoryBuffer& msg)
 
 
     if (!scene_)
     if (!scene_)
     {
     {
-        LOGERROR("Can not handle LoadScene message without an assigned scene");
+        URHO3D_LOGERROR("Can not handle LoadScene message without an assigned scene");
         return;
         return;
     }
     }
 
 
@@ -502,7 +502,7 @@ void Connection::ProcessSceneChecksumError(int msgID, MemoryBuffer& msg)
         return;
         return;
     }
     }
 
 
-    LOGERROR("Scene checksum error");
+    URHO3D_LOGERROR("Scene checksum error");
     OnSceneLoadFailed();
     OnSceneLoadFailed();
 }
 }
 
 
@@ -570,7 +570,7 @@ void Connection::ProcessSceneUpdate(int msgID, MemoryBuffer& msg)
                 // If was unable to create the component, would desync the message and therefore have to abort
                 // If was unable to create the component, would desync the message and therefore have to abort
                 if (!component)
                 if (!component)
                 {
                 {
-                    LOGERROR("CreateNode message parsing aborted due to unknown component");
+                    URHO3D_LOGERROR("CreateNode message parsing aborted due to unknown component");
                     return;
                     return;
                 }
                 }
 
 
@@ -654,7 +654,7 @@ void Connection::ProcessSceneUpdate(int msgID, MemoryBuffer& msg)
                 // If was unable to create the component, would desync the message and therefore have to abort
                 // If was unable to create the component, would desync the message and therefore have to abort
                 if (!component)
                 if (!component)
                 {
                 {
-                    LOGERROR("CreateComponent message parsing aborted due to unknown component");
+                    URHO3D_LOGERROR("CreateComponent message parsing aborted due to unknown component");
                     return;
                     return;
                 }
                 }
 
 
@@ -755,7 +755,7 @@ void Connection::ProcessPackageDownload(int msgID, MemoryBuffer& msg)
                     SharedPtr<File> file(new File(context_, packageFullName));
                     SharedPtr<File> file(new File(context_, packageFullName));
                     if (!file->IsOpen())
                     if (!file->IsOpen())
                     {
                     {
-                        LOGERROR("Failed to transmit package file " + name);
+                        URHO3D_LOGERROR("Failed to transmit package file " + name);
                         SendPackageError(name);
                         SendPackageError(name);
                         return;
                         return;
                     }
                     }
@@ -769,7 +769,7 @@ void Connection::ProcessPackageDownload(int msgID, MemoryBuffer& msg)
                 }
                 }
             }
             }
 
 
-            LOGERROR("Client requested an unexpected package file " + name);
+            URHO3D_LOGERROR("Client requested an unexpected package file " + name);
             // Send the name hash only to indicate a failed download
             // Send the name hash only to indicate a failed download
             SendPackageError(name);
             SendPackageError(name);
             return;
             return;
@@ -957,7 +957,7 @@ void Connection::ProcessRemoteEvent(int msgID, MemoryBuffer& msg)
     {
     {
         if (!scene_)
         if (!scene_)
         {
         {
-            LOGERROR("Can not receive remote node event without an assigned scene");
+            URHO3D_LOGERROR("Can not receive remote node event without an assigned scene");
             return;
             return;
         }
         }
 
 
@@ -1063,12 +1063,12 @@ void Connection::SendPackageToClient(PackageFile* package)
 
 
     if (!IsClient())
     if (!IsClient())
     {
     {
-        LOGERROR("SendPackageToClient can be called on the server only");
+        URHO3D_LOGERROR("SendPackageToClient can be called on the server only");
         return;
         return;
     }
     }
     if (!package)
     if (!package)
     {
     {
-        LOGERROR("Null package specified for SendPackageToClient");
+        URHO3D_LOGERROR("Null package specified for SendPackageToClient");
         return;
         return;
     }
     }
 
 
@@ -1412,7 +1412,7 @@ bool Connection::RequestNeededPackages(unsigned numPackages, MemoryBuffer& msg)
         {
         {
             if (packageCacheDir.Empty())
             if (packageCacheDir.Empty())
             {
             {
-                LOGERROR("Can not check/download required packages, as package cache directory is not set");
+                URHO3D_LOGERROR("Can not check/download required packages, as package cache directory is not set");
                 return false;
                 return false;
             }
             }
 
 
@@ -1489,7 +1489,7 @@ void Connection::OnSceneLoadFailed()
 
 
 void Connection::OnPackageDownloadFailed(const String& name)
 void Connection::OnPackageDownloadFailed(const String& name)
 {
 {
-    LOGERROR("Download of package " + name + " failed");
+    URHO3D_LOGERROR("Download of package " + name + " failed");
     // As one package failed, we can not join the scene in any case. Clear the downloads
     // As one package failed, we can not join the scene in any case. Clear the downloads
     downloads_.Clear();
     downloads_.Clear();
     OnSceneLoadFailed();
     OnSceneLoadFailed();

+ 1 - 1
Source/Urho3D/Network/HttpRequest.cpp

@@ -57,7 +57,7 @@ HttpRequest::HttpRequest(const String& url, const String& verb, const Vector<Str
     // Start the worker thread to actually create the connection and read the response data.
     // Start the worker thread to actually create the connection and read the response data.
     Run();
     Run();
 #else
 #else
-    LOGERROR("HTTP request will not execute as threading is disabled");
+    URHO3D_LOGERROR("HTTP request will not execute as threading is disabled");
 #endif
 #endif
 }
 }
 
 

+ 10 - 10
Source/Urho3D/Network/Network.cpp

@@ -228,7 +228,7 @@ bool Network::Connect(const String& address, unsigned short port, Scene* scene,
     }
     }
     else
     else
     {
     {
-        LOGERROR("Failed to connect to server " + address + ":" + String(port));
+        URHO3D_LOGERROR("Failed to connect to server " + address + ":" + String(port));
         SendEvent(E_CONNECTFAILED);
         SendEvent(E_CONNECTFAILED);
         return false;
         return false;
     }
     }
@@ -257,7 +257,7 @@ bool Network::StartServer(unsigned short port)
     }
     }
     else
     else
     {
     {
-        LOGERROR("Failed to start server on port " + String(port));
+        URHO3D_LOGERROR("Failed to start server on port " + String(port));
         return false;
         return false;
     }
     }
 }
 }
@@ -285,7 +285,7 @@ void Network::BroadcastMessage(int msgID, bool reliable, bool inOrder, const uns
     // Make sure not to use kNet internal message ID's
     // Make sure not to use kNet internal message ID's
     if (msgID <= 0x4 || msgID >= 0x3ffffffe)
     if (msgID <= 0x4 || msgID >= 0x3ffffffe)
     {
     {
-        LOGERROR("Can not send message with reserved ID");
+        URHO3D_LOGERROR("Can not send message with reserved ID");
         return;
         return;
     }
     }
 
 
@@ -293,7 +293,7 @@ void Network::BroadcastMessage(int msgID, bool reliable, bool inOrder, const uns
     if (server)
     if (server)
         server->BroadcastMessage((unsigned long)msgID, reliable, inOrder, 0, contentID, (const char*)data, numBytes);
         server->BroadcastMessage((unsigned long)msgID, reliable, inOrder, 0, contentID, (const char*)data, numBytes);
     else
     else
-        LOGERROR("Server not running, can not broadcast messages");
+        URHO3D_LOGERROR("Server not running, can not broadcast messages");
 }
 }
 
 
 void Network::BroadcastRemoteEvent(StringHash eventType, bool inOrder, const VariantMap& eventData)
 void Network::BroadcastRemoteEvent(StringHash eventType, bool inOrder, const VariantMap& eventData)
@@ -317,12 +317,12 @@ void Network::BroadcastRemoteEvent(Node* node, StringHash eventType, bool inOrde
 {
 {
     if (!node)
     if (!node)
     {
     {
-        LOGERROR("Null sender node for remote node event");
+        URHO3D_LOGERROR("Null sender node for remote node event");
         return;
         return;
     }
     }
     if (node->GetID() >= FIRST_LOCAL_ID)
     if (node->GetID() >= FIRST_LOCAL_ID)
     {
     {
-        LOGERROR("Sender node has a local ID, can not send remote node event");
+        URHO3D_LOGERROR("Sender node has a local ID, can not send remote node event");
         return;
         return;
     }
     }
 
 
@@ -358,7 +358,7 @@ void Network::RegisterRemoteEvent(StringHash eventType)
 {
 {
     if (blacklistedRemoteEvents_.Find(eventType) != blacklistedRemoteEvents_.End())
     if (blacklistedRemoteEvents_.Find(eventType) != blacklistedRemoteEvents_.End())
     {
     {
-        LOGERROR("Attempted to register blacklisted remote event type " + String(eventType));
+        URHO3D_LOGERROR("Attempted to register blacklisted remote event type " + String(eventType));
         return;
         return;
     }
     }
 
 
@@ -384,12 +384,12 @@ void Network::SendPackageToClients(Scene* scene, PackageFile* package)
 {
 {
     if (!scene)
     if (!scene)
     {
     {
-        LOGERROR("Null scene specified for SendPackageToClients");
+        URHO3D_LOGERROR("Null scene specified for SendPackageToClients");
         return;
         return;
     }
     }
     if (!package)
     if (!package)
     {
     {
-        LOGERROR("Null package specified for SendPackageToClients");
+        URHO3D_LOGERROR("Null package specified for SendPackageToClients");
         return;
         return;
     }
     }
 
 
@@ -581,7 +581,7 @@ void Network::OnServerDisconnected()
     }
     }
     else
     else
     {
     {
-        LOGERROR("Failed to connect to server");
+        URHO3D_LOGERROR("Failed to connect to server");
         SendEvent(E_CONNECTFAILED);
         SendEvent(E_CONNECTFAILED);
     }
     }
 }
 }

+ 7 - 7
Source/Urho3D/Physics/CollisionShape.cpp

@@ -614,7 +614,7 @@ void CollisionShape::SetTriangleMesh(Model* model, unsigned lodLevel, const Vect
 {
 {
     if (!model)
     if (!model)
     {
     {
-        LOGERROR("Null model, can not set triangle mesh");
+        URHO3D_LOGERROR("Null model, can not set triangle mesh");
         return;
         return;
     }
     }
 
 
@@ -639,12 +639,12 @@ void CollisionShape::SetCustomTriangleMesh(CustomGeometry* custom, const Vector3
 {
 {
     if (!custom)
     if (!custom)
     {
     {
-        LOGERROR("Null custom geometry, can not set triangle mesh");
+        URHO3D_LOGERROR("Null custom geometry, can not set triangle mesh");
         return;
         return;
     }
     }
     if (custom->GetScene() != GetScene())
     if (custom->GetScene() != GetScene())
     {
     {
-        LOGERROR("Custom geometry is not in the same scene as the collision shape, can not set triangle mesh");
+        URHO3D_LOGERROR("Custom geometry is not in the same scene as the collision shape, can not set triangle mesh");
         return;
         return;
     }
     }
 
 
@@ -669,7 +669,7 @@ void CollisionShape::SetConvexHull(Model* model, unsigned lodLevel, const Vector
 {
 {
     if (!model)
     if (!model)
     {
     {
-        LOGERROR("Null model, can not set convex hull");
+        URHO3D_LOGERROR("Null model, can not set convex hull");
         return;
         return;
     }
     }
 
 
@@ -694,12 +694,12 @@ void CollisionShape::SetCustomConvexHull(CustomGeometry* custom, const Vector3&
 {
 {
     if (!custom)
     if (!custom)
     {
     {
-        LOGERROR("Null custom geometry, can not set convex hull");
+        URHO3D_LOGERROR("Null custom geometry, can not set convex hull");
         return;
         return;
     }
     }
     if (custom->GetScene() != GetScene())
     if (custom->GetScene() != GetScene())
     {
     {
-        LOGERROR("Custom geometry is not in the same scene as the collision shape, can not set convex hull");
+        URHO3D_LOGERROR("Custom geometry is not in the same scene as the collision shape, can not set convex hull");
         return;
         return;
     }
     }
 
 
@@ -724,7 +724,7 @@ void CollisionShape::SetTerrain(unsigned lodLevel)
     Terrain* terrain = GetComponent<Terrain>();
     Terrain* terrain = GetComponent<Terrain>();
     if (!terrain)
     if (!terrain)
     {
     {
-        LOGERROR("No terrain component, can not set terrain shape");
+        URHO3D_LOGERROR("No terrain component, can not set terrain shape");
         return;
         return;
     }
     }
 
 

+ 3 - 3
Source/Urho3D/Physics/PhysicsWorld.cpp

@@ -434,7 +434,7 @@ void PhysicsWorld::ConvexCast(PhysicsRaycastResult& result, CollisionShape* shap
 {
 {
     if (!shape || !shape->GetCollisionShape())
     if (!shape || !shape->GetCollisionShape())
     {
     {
-        LOGERROR("Null collision shape for convex cast");
+        URHO3D_LOGERROR("Null collision shape for convex cast");
         result.body_ = 0;
         result.body_ = 0;
         result.position_ = Vector3::ZERO;
         result.position_ = Vector3::ZERO;
         result.normal_ = Vector3::ZERO;
         result.normal_ = Vector3::ZERO;
@@ -474,7 +474,7 @@ void PhysicsWorld::ConvexCast(PhysicsRaycastResult& result, btCollisionShape* sh
 {
 {
     if (!shape)
     if (!shape)
     {
     {
-        LOGERROR("Null collision shape for convex cast");
+        URHO3D_LOGERROR("Null collision shape for convex cast");
         result.body_ = 0;
         result.body_ = 0;
         result.position_ = Vector3::ZERO;
         result.position_ = Vector3::ZERO;
         result.normal_ = Vector3::ZERO;
         result.normal_ = Vector3::ZERO;
@@ -484,7 +484,7 @@ void PhysicsWorld::ConvexCast(PhysicsRaycastResult& result, btCollisionShape* sh
 
 
     if (!shape->isConvex())
     if (!shape->isConvex())
     {
     {
-        LOGERROR("Can not use non-convex collision shape for convex cast");
+        URHO3D_LOGERROR("Can not use non-convex collision shape for convex cast");
         result.body_ = 0;
         result.body_ = 0;
         result.position_ = Vector3::ZERO;
         result.position_ = Vector3::ZERO;
         result.normal_ = Vector3::ZERO;
         result.normal_ = Vector3::ZERO;

+ 1 - 1
Source/Urho3D/Resource/BackgroundLoader.cpp

@@ -120,7 +120,7 @@ bool BackgroundLoader::QueueResource(StringHash type, const String& name, bool s
     item.resource_ = DynamicCast<Resource>(owner_->GetContext()->CreateObject(type));
     item.resource_ = DynamicCast<Resource>(owner_->GetContext()->CreateObject(type));
     if (!item.resource_)
     if (!item.resource_)
     {
     {
-        LOGERROR("Could not load unknown resource type " + String(type));
+        URHO3D_LOGERROR("Could not load unknown resource type " + String(type));
 
 
         if (sendEventOnFailure && Thread::IsMainThread())
         if (sendEventOnFailure && Thread::IsMainThread())
         {
         {

+ 54 - 54
Source/Urho3D/Resource/Image.cpp

@@ -300,7 +300,7 @@ bool Image::BeginLoad(Deserializer& source)
                 fourCC = 0;
                 fourCC = 0;
                 break;
                 break;
             default:
             default:
-                LOGERROR("Unrecognized DDS DXGI image format");
+                URHO3D_LOGERROR("Unrecognized DDS DXGI image format");
                 return false;
                 return false;
             }
             }
 
 
@@ -334,7 +334,7 @@ bool Image::BeginLoad(Deserializer& source)
             if (ddsd.ddpfPixelFormat_.dwRGBBitCount_ != 32 && ddsd.ddpfPixelFormat_.dwRGBBitCount_ != 24 &&
             if (ddsd.ddpfPixelFormat_.dwRGBBitCount_ != 32 && ddsd.ddpfPixelFormat_.dwRGBBitCount_ != 24 &&
                 ddsd.ddpfPixelFormat_.dwRGBBitCount_ != 16)
                 ddsd.ddpfPixelFormat_.dwRGBBitCount_ != 16)
             {
             {
-                LOGERROR("Unsupported DDS pixel byte size");
+                URHO3D_LOGERROR("Unsupported DDS pixel byte size");
                 return false;
                 return false;
             }
             }
             compressedFormat_ = CF_RGBA;
             compressedFormat_ = CF_RGBA;
@@ -342,7 +342,7 @@ bool Image::BeginLoad(Deserializer& source)
             break;
             break;
 
 
         default:
         default:
-            LOGERROR("Unrecognized DDS image format");
+            URHO3D_LOGERROR("Unrecognized DDS image format");
             return false;
             return false;
         }
         }
 
 
@@ -538,25 +538,25 @@ bool Image::BeginLoad(Deserializer& source)
 
 
         if (endianness != 0x04030201)
         if (endianness != 0x04030201)
         {
         {
-            LOGERROR("Big-endian KTX files not supported");
+            URHO3D_LOGERROR("Big-endian KTX files not supported");
             return false;
             return false;
         }
         }
 
 
         if (type != 0 || format != 0)
         if (type != 0 || format != 0)
         {
         {
-            LOGERROR("Uncompressed KTX files not supported");
+            URHO3D_LOGERROR("Uncompressed KTX files not supported");
             return false;
             return false;
         }
         }
 
 
         if (faces > 1 || depth > 1)
         if (faces > 1 || depth > 1)
         {
         {
-            LOGERROR("3D or cube KTX files not supported");
+            URHO3D_LOGERROR("3D or cube KTX files not supported");
             return false;
             return false;
         }
         }
 
 
         if (mipmaps == 0)
         if (mipmaps == 0)
         {
         {
-            LOGERROR("KTX files without explicitly specified mipmap count not supported");
+            URHO3D_LOGERROR("KTX files without explicitly specified mipmap count not supported");
             return false;
             return false;
         }
         }
 
 
@@ -609,7 +609,7 @@ bool Image::BeginLoad(Deserializer& source)
 
 
         if (compressedFormat_ == CF_NONE)
         if (compressedFormat_ == CF_NONE)
         {
         {
-            LOGERROR("Unsupported texture format in KTX file");
+            URHO3D_LOGERROR("Unsupported texture format in KTX file");
             return false;
             return false;
         }
         }
 
 
@@ -627,7 +627,7 @@ bool Image::BeginLoad(Deserializer& source)
             unsigned levelSize = source.ReadUInt();
             unsigned levelSize = source.ReadUInt();
             if (levelSize + dataOffset > dataSize)
             if (levelSize + dataOffset > dataSize)
             {
             {
-                LOGERROR("KTX mipmap level data size exceeds file size");
+                URHO3D_LOGERROR("KTX mipmap level data size exceeds file size");
                 return false;
                 return false;
             }
             }
 
 
@@ -656,13 +656,13 @@ bool Image::BeginLoad(Deserializer& source)
 
 
         if (depth > 1 || numFaces > 1)
         if (depth > 1 || numFaces > 1)
         {
         {
-            LOGERROR("3D or cube PVR files not supported");
+            URHO3D_LOGERROR("3D or cube PVR files not supported");
             return false;
             return false;
         }
         }
 
 
         if (mipmapCount == 0)
         if (mipmapCount == 0)
         {
         {
-            LOGERROR("PVR files without explicitly specified mipmap count not supported");
+            URHO3D_LOGERROR("PVR files without explicitly specified mipmap count not supported");
             return false;
             return false;
         }
         }
 
 
@@ -715,7 +715,7 @@ bool Image::BeginLoad(Deserializer& source)
 
 
         if (compressedFormat_ == CF_NONE)
         if (compressedFormat_ == CF_NONE)
         {
         {
-            LOGERROR("Unsupported texture format in PVR file");
+            URHO3D_LOGERROR("Unsupported texture format in PVR file");
             return false;
             return false;
         }
         }
 
 
@@ -739,7 +739,7 @@ bool Image::BeginLoad(Deserializer& source)
         unsigned char* pixelData = GetImageData(source, width, height, components);
         unsigned char* pixelData = GetImageData(source, width, height, components);
         if (!pixelData)
         if (!pixelData)
         {
         {
-            LOGERROR("Could not load image " + source.GetName() + ": " + String(stbi_failure_reason()));
+            URHO3D_LOGERROR("Could not load image " + source.GetName() + ": " + String(stbi_failure_reason()));
             return false;
             return false;
         }
         }
         SetSize(width, height, components);
         SetSize(width, height, components);
@@ -756,13 +756,13 @@ bool Image::Save(Serializer& dest) const
 
 
     if (IsCompressed())
     if (IsCompressed())
     {
     {
-        LOGERROR("Can not save compressed image " + GetName());
+        URHO3D_LOGERROR("Can not save compressed image " + GetName());
         return false;
         return false;
     }
     }
 
 
     if (!data_)
     if (!data_)
     {
     {
-        LOGERROR("Can not save zero-sized image " + GetName());
+        URHO3D_LOGERROR("Can not save zero-sized image " + GetName());
         return false;
         return false;
     }
     }
 
 
@@ -789,7 +789,7 @@ bool Image::SetSize(int width, int height, int depth, unsigned components)
 
 
     if (components > 4)
     if (components > 4)
     {
     {
-        LOGERROR("More than 4 color components are not supported");
+        URHO3D_LOGERROR("More than 4 color components are not supported");
         return false;
         return false;
     }
     }
 
 
@@ -853,7 +853,7 @@ void Image::SetData(const unsigned char* pixelData)
 
 
     if (IsCompressed())
     if (IsCompressed())
     {
     {
-        LOGERROR("Can not set new pixel data for a compressed image");
+        URHO3D_LOGERROR("Can not set new pixel data for a compressed image");
         return;
         return;
     }
     }
 
 
@@ -867,7 +867,7 @@ bool Image::LoadColorLUT(Deserializer& source)
 
 
     if (fileID == "DDS " || fileID == "\253KTX" || fileID == "PVR\3")
     if (fileID == "DDS " || fileID == "\253KTX" || fileID == "PVR\3")
     {
     {
-        LOGERROR("Invalid image format, can not load image");
+        URHO3D_LOGERROR("Invalid image format, can not load image");
         return false;
         return false;
     }
     }
 
 
@@ -877,12 +877,12 @@ bool Image::LoadColorLUT(Deserializer& source)
     unsigned char* pixelDataIn = GetImageData(source, width, height, components);
     unsigned char* pixelDataIn = GetImageData(source, width, height, components);
     if (!pixelDataIn)
     if (!pixelDataIn)
     {
     {
-        LOGERROR("Could not load image " + source.GetName() + ": " + String(stbi_failure_reason()));
+        URHO3D_LOGERROR("Could not load image " + source.GetName() + ": " + String(stbi_failure_reason()));
         return false;
         return false;
     }
     }
     if (components != 3)
     if (components != 3)
     {
     {
-        LOGERROR("Invalid image format, can not load image");
+        URHO3D_LOGERROR("Invalid image format, can not load image");
         return false;
         return false;
     }
     }
 
 
@@ -919,7 +919,7 @@ bool Image::FlipHorizontal()
 
 
     if (depth_ > 1)
     if (depth_ > 1)
     {
     {
-        LOGERROR("FlipHorizontal not supported for 3D images");
+        URHO3D_LOGERROR("FlipHorizontal not supported for 3D images");
         return false;
         return false;
     }
     }
 
 
@@ -943,7 +943,7 @@ bool Image::FlipHorizontal()
     {
     {
         if (compressedFormat_ > CF_DXT5)
         if (compressedFormat_ > CF_DXT5)
         {
         {
-            LOGERROR("FlipHorizontal not yet implemented for other compressed formats than RGBA & DXT1,3,5");
+            URHO3D_LOGERROR("FlipHorizontal not yet implemented for other compressed formats than RGBA & DXT1,3,5");
             return false;
             return false;
         }
         }
 
 
@@ -956,7 +956,7 @@ bool Image::FlipHorizontal()
             CompressedLevel level = GetCompressedLevel(i);
             CompressedLevel level = GetCompressedLevel(i);
             if (!level.data_)
             if (!level.data_)
             {
             {
-                LOGERROR("Got compressed level with no data, aborting horizontal flip");
+                URHO3D_LOGERROR("Got compressed level with no data, aborting horizontal flip");
                 return false;
                 return false;
             }
             }
 
 
@@ -986,7 +986,7 @@ bool Image::FlipVertical()
 
 
     if (depth_ > 1)
     if (depth_ > 1)
     {
     {
-        LOGERROR("FlipVertical not supported for 3D images");
+        URHO3D_LOGERROR("FlipVertical not supported for 3D images");
         return false;
         return false;
     }
     }
 
 
@@ -1004,7 +1004,7 @@ bool Image::FlipVertical()
     {
     {
         if (compressedFormat_ > CF_DXT5)
         if (compressedFormat_ > CF_DXT5)
         {
         {
-            LOGERROR("FlipVertical not yet implemented for other compressed formats than DXT1,3,5");
+            URHO3D_LOGERROR("FlipVertical not yet implemented for other compressed formats than DXT1,3,5");
             return false;
             return false;
         }
         }
 
 
@@ -1017,7 +1017,7 @@ bool Image::FlipVertical()
             CompressedLevel level = GetCompressedLevel(i);
             CompressedLevel level = GetCompressedLevel(i);
             if (!level.data_)
             if (!level.data_)
             {
             {
-                LOGERROR("Got compressed level with no data, aborting vertical flip");
+                URHO3D_LOGERROR("Got compressed level with no data, aborting vertical flip");
                 return false;
                 return false;
             }
             }
 
 
@@ -1045,13 +1045,13 @@ bool Image::Resize(int width, int height)
 
 
     if (IsCompressed())
     if (IsCompressed())
     {
     {
-        LOGERROR("Resize not supported for compressed images");
+        URHO3D_LOGERROR("Resize not supported for compressed images");
         return false;
         return false;
     }
     }
 
 
     if (depth_ > 1)
     if (depth_ > 1)
     {
     {
-        LOGERROR("Resize not supported for 3D images");
+        URHO3D_LOGERROR("Resize not supported for 3D images");
         return false;
         return false;
     }
     }
 
 
@@ -1110,7 +1110,7 @@ void Image::ClearInt(unsigned uintColor)
 
 
     if (IsCompressed())
     if (IsCompressed())
     {
     {
-        LOGERROR("Clear not supported for compressed images");
+        URHO3D_LOGERROR("Clear not supported for compressed images");
         return;
         return;
     }
     }
 
 
@@ -1126,13 +1126,13 @@ bool Image::SaveBMP(const String& fileName) const
     FileSystem* fileSystem = GetSubsystem<FileSystem>();
     FileSystem* fileSystem = GetSubsystem<FileSystem>();
     if (fileSystem && !fileSystem->CheckAccess(GetPath(fileName)))
     if (fileSystem && !fileSystem->CheckAccess(GetPath(fileName)))
     {
     {
-        LOGERROR("Access denied to " + fileName);
+        URHO3D_LOGERROR("Access denied to " + fileName);
         return false;
         return false;
     }
     }
 
 
     if (IsCompressed())
     if (IsCompressed())
     {
     {
-        LOGERROR("Can not save compressed image to BMP");
+        URHO3D_LOGERROR("Can not save compressed image to BMP");
         return false;
         return false;
     }
     }
 
 
@@ -1149,13 +1149,13 @@ bool Image::SavePNG(const String& fileName) const
     FileSystem* fileSystem = GetSubsystem<FileSystem>();
     FileSystem* fileSystem = GetSubsystem<FileSystem>();
     if (fileSystem && !fileSystem->CheckAccess(GetPath(fileName)))
     if (fileSystem && !fileSystem->CheckAccess(GetPath(fileName)))
     {
     {
-        LOGERROR("Access denied to " + fileName);
+        URHO3D_LOGERROR("Access denied to " + fileName);
         return false;
         return false;
     }
     }
 
 
     if (IsCompressed())
     if (IsCompressed())
     {
     {
-        LOGERROR("Can not save compressed image to PNG");
+        URHO3D_LOGERROR("Can not save compressed image to PNG");
         return false;
         return false;
     }
     }
 
 
@@ -1172,13 +1172,13 @@ bool Image::SaveTGA(const String& fileName) const
     FileSystem* fileSystem = GetSubsystem<FileSystem>();
     FileSystem* fileSystem = GetSubsystem<FileSystem>();
     if (fileSystem && !fileSystem->CheckAccess(GetPath(fileName)))
     if (fileSystem && !fileSystem->CheckAccess(GetPath(fileName)))
     {
     {
-        LOGERROR("Access denied to " + fileName);
+        URHO3D_LOGERROR("Access denied to " + fileName);
         return false;
         return false;
     }
     }
 
 
     if (IsCompressed())
     if (IsCompressed())
     {
     {
-        LOGERROR("Can not save compressed image to TGA");
+        URHO3D_LOGERROR("Can not save compressed image to TGA");
         return false;
         return false;
     }
     }
 
 
@@ -1195,13 +1195,13 @@ bool Image::SaveJPG(const String& fileName, int quality) const
     FileSystem* fileSystem = GetSubsystem<FileSystem>();
     FileSystem* fileSystem = GetSubsystem<FileSystem>();
     if (fileSystem && !fileSystem->CheckAccess(GetPath(fileName)))
     if (fileSystem && !fileSystem->CheckAccess(GetPath(fileName)))
     {
     {
-        LOGERROR("Access denied to " + fileName);
+        URHO3D_LOGERROR("Access denied to " + fileName);
         return false;
         return false;
     }
     }
 
 
     if (IsCompressed())
     if (IsCompressed())
     {
     {
-        LOGERROR("Can not save compressed image to JPG");
+        URHO3D_LOGERROR("Can not save compressed image to JPG");
         return false;
         return false;
     }
     }
 
 
@@ -1331,12 +1331,12 @@ SharedPtr<Image> Image::GetNextLevel() const
 {
 {
     if (IsCompressed())
     if (IsCompressed())
     {
     {
-        LOGERROR("Can not generate mip level from compressed data");
+        URHO3D_LOGERROR("Can not generate mip level from compressed data");
         return SharedPtr<Image>();
         return SharedPtr<Image>();
     }
     }
     if (components_ < 1 || components_ > 4)
     if (components_ < 1 || components_ > 4)
     {
     {
-        LOGERROR("Illegal number of image components for mip level generation");
+        URHO3D_LOGERROR("Illegal number of image components for mip level generation");
         return SharedPtr<Image>();
         return SharedPtr<Image>();
     }
     }
 
 
@@ -1632,17 +1632,17 @@ SharedPtr<Image> Image::ConvertToRGBA() const
 {
 {
     if (IsCompressed())
     if (IsCompressed())
     {
     {
-        LOGERROR("Can not convert compressed image to RGBA");
+        URHO3D_LOGERROR("Can not convert compressed image to RGBA");
         return SharedPtr<Image>();
         return SharedPtr<Image>();
     }
     }
     if (components_ < 1 || components_ > 4)
     if (components_ < 1 || components_ > 4)
     {
     {
-        LOGERROR("Illegal number of image components for conversion to RGBA");
+        URHO3D_LOGERROR("Illegal number of image components for conversion to RGBA");
         return SharedPtr<Image>();
         return SharedPtr<Image>();
     }
     }
     if (!data_)
     if (!data_)
     {
     {
-        LOGERROR("Can not convert image without data to RGBA");
+        URHO3D_LOGERROR("Can not convert image without data to RGBA");
         return SharedPtr<Image>();
         return SharedPtr<Image>();
     }
     }
 
 
@@ -1704,12 +1704,12 @@ CompressedLevel Image::GetCompressedLevel(unsigned index) const
 
 
     if (compressedFormat_ == CF_NONE)
     if (compressedFormat_ == CF_NONE)
     {
     {
-        LOGERROR("Image is not compressed");
+        URHO3D_LOGERROR("Image is not compressed");
         return level;
         return level;
     }
     }
     if (index >= numCompressedLevels_)
     if (index >= numCompressedLevels_)
     {
     {
-        LOGERROR("Compressed image mip level out of bounds");
+        URHO3D_LOGERROR("Compressed image mip level out of bounds");
         return level;
         return level;
     }
     }
 
 
@@ -1740,7 +1740,7 @@ CompressedLevel Image::GetCompressedLevel(unsigned index) const
 
 
             if (offset + level.dataSize_ > GetMemoryUse())
             if (offset + level.dataSize_ > GetMemoryUse())
             {
             {
-                LOGERROR("Compressed level is outside image data. Offset: " + String(offset) + " Size: " + String(level.dataSize_) +
+                URHO3D_LOGERROR("Compressed level is outside image data. Offset: " + String(offset) + " Size: " + String(level.dataSize_) +
                          " Datasize: " + String(GetMemoryUse()));
                          " Datasize: " + String(GetMemoryUse()));
                 level.data_ = 0;
                 level.data_ = 0;
                 return level;
                 return level;
@@ -1778,7 +1778,7 @@ CompressedLevel Image::GetCompressedLevel(unsigned index) const
 
 
             if (offset + level.dataSize_ > GetMemoryUse())
             if (offset + level.dataSize_ > GetMemoryUse())
             {
             {
-                LOGERROR("Compressed level is outside image data. Offset: " + String(offset) + " Size: " + String(level.dataSize_) +
+                URHO3D_LOGERROR("Compressed level is outside image data. Offset: " + String(offset) + " Size: " + String(level.dataSize_) +
                          " Datasize: " + String(GetMemoryUse()));
                          " Datasize: " + String(GetMemoryUse()));
                 level.data_ = 0;
                 level.data_ = 0;
                 return level;
                 return level;
@@ -1816,7 +1816,7 @@ CompressedLevel Image::GetCompressedLevel(unsigned index) const
 
 
             if (offset + level.dataSize_ > GetMemoryUse())
             if (offset + level.dataSize_ > GetMemoryUse())
             {
             {
-                LOGERROR("Compressed level is outside image data. Offset: " + String(offset) + " Size: " + String(level.dataSize_) +
+                URHO3D_LOGERROR("Compressed level is outside image data. Offset: " + String(offset) + " Size: " + String(level.dataSize_) +
                          " Datasize: " + String(GetMemoryUse()));
                          " Datasize: " + String(GetMemoryUse()));
                 level.data_ = 0;
                 level.data_ = 0;
                 return level;
                 return level;
@@ -1840,13 +1840,13 @@ Image* Image::GetSubimage(const IntRect& rect) const
 
 
     if (depth_ > 1)
     if (depth_ > 1)
     {
     {
-        LOGERROR("Subimage not supported for 3D images");
+        URHO3D_LOGERROR("Subimage not supported for 3D images");
         return 0;
         return 0;
     }
     }
 
 
     if (rect.left_ < 0 || rect.top_ < 0 || rect.right_ > width_ || rect.bottom_ > height_ || !rect.Width() || !rect.Height())
     if (rect.left_ < 0 || rect.top_ < 0 || rect.right_ > width_ || rect.bottom_ > height_ || !rect.Width() || !rect.Height())
     {
     {
-        LOGERROR("Can not get subimage from image " + GetName() + " with invalid region");
+        URHO3D_LOGERROR("Can not get subimage from image " + GetName() + " with invalid region");
         return 0;
         return 0;
     }
     }
 
 
@@ -1922,7 +1922,7 @@ Image* Image::GetSubimage(const IntRect& rect) const
 
 
         if (!subimageLevels)
         if (!subimageLevels)
         {
         {
-            LOGERROR("Subimage region from compressed image " + GetName() + " did not produce any data");
+            URHO3D_LOGERROR("Subimage region from compressed image " + GetName() + " did not produce any data");
             return 0;
             return 0;
         }
         }
 
 
@@ -1948,19 +1948,19 @@ SDL_Surface* Image::GetSDLSurface(const IntRect& rect) const
 
 
     if (depth_ > 1)
     if (depth_ > 1)
     {
     {
-        LOGERROR("Can not get SDL surface from 3D image");
+        URHO3D_LOGERROR("Can not get SDL surface from 3D image");
         return 0;
         return 0;
     }
     }
 
 
     if (IsCompressed())
     if (IsCompressed())
     {
     {
-        LOGERROR("Can not get SDL surface from compressed image " + GetName());
+        URHO3D_LOGERROR("Can not get SDL surface from compressed image " + GetName());
         return 0;
         return 0;
     }
     }
 
 
     if (components_ < 3)
     if (components_ < 3)
     {
     {
-        LOGERROR("Can not get SDL surface from image " + GetName() + " with less than 3 components");
+        URHO3D_LOGERROR("Can not get SDL surface from image " + GetName() + " with less than 3 components");
         return 0;
         return 0;
     }
     }
 
 
@@ -2002,7 +2002,7 @@ SDL_Surface* Image::GetSDLSurface(const IntRect& rect) const
         SDL_UnlockSurface(surface);
         SDL_UnlockSurface(surface);
     }
     }
     else
     else
-        LOGERROR("Failed to create SDL surface from image " + GetName());
+        URHO3D_LOGERROR("Failed to create SDL surface from image " + GetName());
 
 
     return surface;
     return surface;
 }
 }

+ 2 - 2
Source/Urho3D/Resource/JSONFile.cpp

@@ -117,7 +117,7 @@ bool JSONFile::BeginLoad(Deserializer& source)
     unsigned dataSize = source.GetSize();
     unsigned dataSize = source.GetSize();
     if (!dataSize && !source.GetName().Empty())
     if (!dataSize && !source.GetName().Empty())
     {
     {
-        LOGERROR("Zero sized JSON data in " + source.GetName());
+        URHO3D_LOGERROR("Zero sized JSON data in " + source.GetName());
         return false;
         return false;
     }
     }
 
 
@@ -129,7 +129,7 @@ bool JSONFile::BeginLoad(Deserializer& source)
     rapidjson::Document document;
     rapidjson::Document document;
     if (document.Parse<0>(buffer).HasParseError())
     if (document.Parse<0>(buffer).HasParseError())
     {
     {
-        LOGERROR("Could not parse JSON data from " + source.GetName());
+        URHO3D_LOGERROR("Could not parse JSON data from " + source.GetName());
         return false;
         return false;
     }
     }
 
 

+ 4 - 4
Source/Urho3D/Resource/JSONValue.cpp

@@ -411,7 +411,7 @@ void JSONValue::SetVariantValue(const Variant& variant, Context* context)
         {
         {
             if (!context)
             if (!context)
             {
             {
-                LOGERROR("Context must not null for ResourceRef");
+                URHO3D_LOGERROR("Context must not null for ResourceRef");
                 return;
                 return;
             }
             }
 
 
@@ -424,7 +424,7 @@ void JSONValue::SetVariantValue(const Variant& variant, Context* context)
         {
         {
             if (!context)
             if (!context)
             {
             {
-                LOGERROR("Context must not null for ResourceRefList");
+                URHO3D_LOGERROR("Context must not null for ResourceRefList");
                 return;
                 return;
             }
             }
 
 
@@ -542,7 +542,7 @@ VariantMap JSONValue::GetVariantMap() const
     VariantMap variantMap;
     VariantMap variantMap;
     if (!IsObject())
     if (!IsObject())
     {
     {
-        LOGERROR("JSONValue is not a object");
+        URHO3D_LOGERROR("JSONValue is not a object");
         return variantMap;
         return variantMap;
     }
     }
 
 
@@ -568,7 +568,7 @@ VariantVector JSONValue::GetVariantVector() const
     VariantVector variantVector;
     VariantVector variantVector;
     if (!IsArray())
     if (!IsArray())
     {
     {
-        LOGERROR("JSONValue is not a array");
+        URHO3D_LOGERROR("JSONValue is not a array");
         return variantVector;
         return variantVector;
     }
     }
 
 

+ 3 - 3
Source/Urho3D/Resource/PListFile.cpp

@@ -308,14 +308,14 @@ bool PListFile::BeginLoad(Deserializer& source)
     XMLFile xmlFile(context_);
     XMLFile xmlFile(context_);
     if (!xmlFile.Load(source))
     if (!xmlFile.Load(source))
     {
     {
-        LOGERROR("Could not load property list");
+        URHO3D_LOGERROR("Could not load property list");
         return false;
         return false;
     }
     }
 
 
     XMLElement plistElem = xmlFile.GetRoot("plist");
     XMLElement plistElem = xmlFile.GetRoot("plist");
     if (!plistElem)
     if (!plistElem)
     {
     {
-        LOGERROR("Invalid property list file");
+        URHO3D_LOGERROR("Invalid property list file");
         return false;
         return false;
     }
     }
 
 
@@ -399,7 +399,7 @@ bool PListFile::LoadValue(PListValue& value, const XMLElement& valueElem)
     }
     }
     else
     else
     {
     {
-        LOGERROR("Supported value type");
+        URHO3D_LOGERROR("Supported value type");
         return false;
         return false;
     }
     }
 
 

+ 1 - 1
Source/Urho3D/Resource/Resource.cpp

@@ -78,7 +78,7 @@ bool Resource::EndLoad()
 
 
 bool Resource::Save(Serializer& dest) const
 bool Resource::Save(Serializer& dest) const
 {
 {
-    LOGERROR("Save not supported for " + GetTypeName());
+    URHO3D_LOGERROR("Save not supported for " + GetTypeName());
     return false;
     return false;
 }
 }
 
 

+ 9 - 9
Source/Urho3D/Resource/ResourceCache.cpp

@@ -100,7 +100,7 @@ bool ResourceCache::AddResourceDir(const String& pathName, unsigned priority)
     FileSystem* fileSystem = GetSubsystem<FileSystem>();
     FileSystem* fileSystem = GetSubsystem<FileSystem>();
     if (!fileSystem || !fileSystem->DirExists(pathName))
     if (!fileSystem || !fileSystem->DirExists(pathName))
     {
     {
-        LOGERROR("Could not open directory " + pathName);
+        URHO3D_LOGERROR("Could not open directory " + pathName);
         return false;
         return false;
     }
     }
 
 
@@ -158,14 +158,14 @@ bool ResourceCache::AddManualResource(Resource* resource)
 {
 {
     if (!resource)
     if (!resource)
     {
     {
-        LOGERROR("Null manual resource");
+        URHO3D_LOGERROR("Null manual resource");
         return false;
         return false;
     }
     }
 
 
     const String& name = resource->GetName();
     const String& name = resource->GetName();
     if (name.Empty())
     if (name.Empty())
     {
     {
-        LOGERROR("Manual resource with empty name, can not add");
+        URHO3D_LOGERROR("Manual resource with empty name, can not add");
         return false;
         return false;
     }
     }
 
 
@@ -517,9 +517,9 @@ SharedPtr<File> ResourceCache::GetFile(const String& nameIn, bool sendEventOnFai
     if (sendEventOnFailure)
     if (sendEventOnFailure)
     {
     {
         if (resourceRouters_.Size() && name.Empty() && !nameIn.Empty())
         if (resourceRouters_.Size() && name.Empty() && !nameIn.Empty())
-            LOGERROR("Resource request " + nameIn + " was blocked");
+            URHO3D_LOGERROR("Resource request " + nameIn + " was blocked");
         else
         else
-            LOGERROR("Could not find resource " + name);
+            URHO3D_LOGERROR("Could not find resource " + name);
 
 
         if (Thread::IsMainThread())
         if (Thread::IsMainThread())
         {
         {
@@ -540,7 +540,7 @@ Resource* ResourceCache::GetExistingResource(StringHash type, const String& name
 
 
     if (!Thread::IsMainThread())
     if (!Thread::IsMainThread())
     {
     {
-        LOGERROR("Attempted to get resource " + name + " from outside the main thread");
+        URHO3D_LOGERROR("Attempted to get resource " + name + " from outside the main thread");
         return 0;
         return 0;
     }
     }
 
 
@@ -560,7 +560,7 @@ Resource* ResourceCache::GetResource(StringHash type, const String& nameIn, bool
 
 
     if (!Thread::IsMainThread())
     if (!Thread::IsMainThread())
     {
     {
-        LOGERROR("Attempted to get resource " + name + " from outside the main thread");
+        URHO3D_LOGERROR("Attempted to get resource " + name + " from outside the main thread");
         return 0;
         return 0;
     }
     }
 
 
@@ -584,7 +584,7 @@ Resource* ResourceCache::GetResource(StringHash type, const String& nameIn, bool
     resource = DynamicCast<Resource>(context_->CreateObject(type));
     resource = DynamicCast<Resource>(context_->CreateObject(type));
     if (!resource)
     if (!resource)
     {
     {
-        LOGERROR("Could not load unknown resource type " + String(type));
+        URHO3D_LOGERROR("Could not load unknown resource type " + String(type));
 
 
         if (sendEventOnFailure)
         if (sendEventOnFailure)
         {
         {
@@ -663,7 +663,7 @@ SharedPtr<Resource> ResourceCache::GetTempResource(StringHash type, const String
     resource = DynamicCast<Resource>(context_->CreateObject(type));
     resource = DynamicCast<Resource>(context_->CreateObject(type));
     if (!resource)
     if (!resource)
     {
     {
-        LOGERROR("Could not load unknown resource type " + String(type));
+        URHO3D_LOGERROR("Could not load unknown resource type " + String(type));
 
 
         if (sendEventOnFailure)
         if (sendEventOnFailure)
         {
         {

+ 4 - 4
Source/Urho3D/Resource/XMLFile.cpp

@@ -85,7 +85,7 @@ bool XMLFile::BeginLoad(Deserializer& source)
     unsigned dataSize = source.GetSize();
     unsigned dataSize = source.GetSize();
     if (!dataSize && !source.GetName().Empty())
     if (!dataSize && !source.GetName().Empty())
     {
     {
-        LOGERROR("Zero sized XML data in " + source.GetName());
+        URHO3D_LOGERROR("Zero sized XML data in " + source.GetName());
         return false;
         return false;
     }
     }
 
 
@@ -95,7 +95,7 @@ bool XMLFile::BeginLoad(Deserializer& source)
 
 
     if (!document_->load_buffer(buffer.Get(), dataSize))
     if (!document_->load_buffer(buffer.Get(), dataSize))
     {
     {
-        LOGERROR("Could not parse XML data from " + source.GetName());
+        URHO3D_LOGERROR("Could not parse XML data from " + source.GetName());
         document_->reset();
         document_->reset();
         return false;
         return false;
     }
     }
@@ -196,7 +196,7 @@ void XMLFile::Patch(XMLElement patchElement)
         pugi::xml_attribute sel = patch->attribute("sel");
         pugi::xml_attribute sel = patch->attribute("sel");
         if (sel.empty())
         if (sel.empty())
         {
         {
-            LOGERROR("XML Patch failed due to node not having a sel attribute.");
+            URHO3D_LOGERROR("XML Patch failed due to node not having a sel attribute.");
             continue;
             continue;
         }
         }
 
 
@@ -215,7 +215,7 @@ void XMLFile::Patch(XMLElement patchElement)
         else if (strcmp(patch->name(), "remove") == 0)
         else if (strcmp(patch->name(), "remove") == 0)
             PatchRemove(original);
             PatchRemove(original);
         else
         else
-            LOGERROR("XMLFiles used for patching should only use 'add', 'replace' or 'remove' elements.");
+            URHO3D_LOGERROR("XMLFiles used for patching should only use 'add', 'replace' or 'remove' elements.");
     }
     }
 }
 }
 
 

+ 3 - 3
Source/Urho3D/Scene/Animatable.cpp

@@ -248,7 +248,7 @@ void Animatable::SetAttributeAnimation(const String& name, ValueAnimation* attri
             const Vector<AttributeInfo>* attributes = GetAttributes();
             const Vector<AttributeInfo>* attributes = GetAttributes();
             if (!attributes)
             if (!attributes)
             {
             {
-                LOGERROR(GetTypeName() + " has no attributes");
+                URHO3D_LOGERROR(GetTypeName() + " has no attributes");
                 return;
                 return;
             }
             }
 
 
@@ -264,14 +264,14 @@ void Animatable::SetAttributeAnimation(const String& name, ValueAnimation* attri
 
 
         if (!attributeInfo)
         if (!attributeInfo)
         {
         {
-            LOGERROR("Invalid name: " + name);
+            URHO3D_LOGERROR("Invalid name: " + name);
             return;
             return;
         }
         }
 
 
         // Check value type is same with attribute type
         // Check value type is same with attribute type
         if (attributeAnimation->GetValueType() != attributeInfo->type_)
         if (attributeAnimation->GetValueType() != attributeInfo->type_)
         {
         {
-            LOGERROR("Invalid value type");
+            URHO3D_LOGERROR("Invalid value type");
             return;
             return;
         }
         }
 
 

+ 10 - 10
Source/Urho3D/Scene/Node.cpp

@@ -735,7 +735,7 @@ Component* Node::CreateComponent(StringHash type, CreateMode mode, unsigned id)
     SharedPtr<Component> newComponent = DynamicCast<Component>(context_->CreateObject(type));
     SharedPtr<Component> newComponent = DynamicCast<Component>(context_->CreateObject(type));
     if (!newComponent)
     if (!newComponent)
     {
     {
-        LOGERROR("Could not create unknown component type " + type.ToString());
+        URHO3D_LOGERROR("Could not create unknown component type " + type.ToString());
         return 0;
         return 0;
     }
     }
 
 
@@ -756,7 +756,7 @@ Component* Node::CloneComponent(Component* component, unsigned id)
 {
 {
     if (!component)
     if (!component)
     {
     {
-        LOGERROR("Null source component given for CloneComponent");
+        URHO3D_LOGERROR("Null source component given for CloneComponent");
         return 0;
         return 0;
     }
     }
 
 
@@ -767,14 +767,14 @@ Component* Node::CloneComponent(Component* component, CreateMode mode, unsigned
 {
 {
     if (!component)
     if (!component)
     {
     {
-        LOGERROR("Null source component given for CloneComponent");
+        URHO3D_LOGERROR("Null source component given for CloneComponent");
         return 0;
         return 0;
     }
     }
 
 
     Component* cloneComponent = SafeCreateComponent(component->GetTypeName(), component->GetType(), mode, 0);
     Component* cloneComponent = SafeCreateComponent(component->GetTypeName(), component->GetType(), mode, 0);
     if (!cloneComponent)
     if (!cloneComponent)
     {
     {
-        LOGERROR("Could not clone component " + component->GetTypeName());
+        URHO3D_LOGERROR("Could not clone component " + component->GetTypeName());
         return 0;
         return 0;
     }
     }
 
 
@@ -886,7 +886,7 @@ Node* Node::Clone(CreateMode mode)
     // The scene itself can not be cloned
     // The scene itself can not be cloned
     if (this == scene_ || !parent_)
     if (this == scene_ || !parent_)
     {
     {
-        LOGERROR("Can not clone node without a parent");
+        URHO3D_LOGERROR("Can not clone node without a parent");
         return 0;
         return 0;
     }
     }
 
 
@@ -1614,7 +1614,7 @@ Animatable* Node::FindAttributeAnimationTarget(const String& name, String& outNa
             node = node->GetChild(index);
             node = node->GetChild(index);
             if (!node)
             if (!node)
             {
             {
-                LOGERROR("Could not find node by name " + name);
+                URHO3D_LOGERROR("Could not find node by name " + name);
                 return 0;
                 return 0;
             }
             }
         }
         }
@@ -1627,7 +1627,7 @@ Animatable* Node::FindAttributeAnimationTarget(const String& name, String& outNa
 
 
         if (i != names.Size() - 2 || names[i].Front() != '@')
         if (i != names.Size() - 2 || names[i].Front() != '@')
         {
         {
-            LOGERROR("Invalid name " + name);
+            URHO3D_LOGERROR("Invalid name " + name);
             return 0;
             return 0;
         }
         }
 
 
@@ -1638,7 +1638,7 @@ Animatable* Node::FindAttributeAnimationTarget(const String& name, String& outNa
             Component* component = node->GetComponent(StringHash(componentNames.Front()));
             Component* component = node->GetComponent(StringHash(componentNames.Front()));
             if (!component)
             if (!component)
             {
             {
-                LOGERROR("Could not find component by name " + name);
+                URHO3D_LOGERROR("Could not find component by name " + name);
                 return 0;
                 return 0;
             }
             }
 
 
@@ -1652,7 +1652,7 @@ Animatable* Node::FindAttributeAnimationTarget(const String& name, String& outNa
             node->GetComponents(components, StringHash(componentNames.Front()));
             node->GetComponents(components, StringHash(componentNames.Front()));
             if (index >= components.Size())
             if (index >= components.Size())
             {
             {
-                LOGERROR("Could not find component by name " + name);
+                URHO3D_LOGERROR("Could not find component by name " + name);
                 return 0;
                 return 0;
             }
             }
 
 
@@ -1667,7 +1667,7 @@ void Node::SetEnabled(bool enable, bool recursive, bool storeSelf)
     // The enabled state of the whole scene can not be changed. SetUpdateEnabled() is used instead to start/stop updates.
     // The enabled state of the whole scene can not be changed. SetUpdateEnabled() is used instead to start/stop updates.
     if (GetType() == Scene::GetTypeStatic())
     if (GetType() == Scene::GetTypeStatic())
     {
     {
-        LOGERROR("Can not change enabled state of the Scene");
+        URHO3D_LOGERROR("Can not change enabled state of the Scene");
         return;
         return;
     }
     }
 
 

+ 5 - 5
Source/Urho3D/Scene/Scene.cpp

@@ -119,7 +119,7 @@ bool Scene::Load(Deserializer& source, bool setInstanceDefault)
     // Check ID
     // Check ID
     if (source.ReadFileID() != "USCN")
     if (source.ReadFileID() != "USCN")
     {
     {
-        LOGERROR(source.GetName() + " is not a valid scene file");
+        URHO3D_LOGERROR(source.GetName() + " is not a valid scene file");
         return false;
         return false;
     }
     }
 
 
@@ -144,7 +144,7 @@ bool Scene::Save(Serializer& dest) const
     // Write ID first
     // Write ID first
     if (!dest.WriteFileID("USCN"))
     if (!dest.WriteFileID("USCN"))
     {
     {
-        LOGERROR("Could not save scene, writing to stream failed");
+        URHO3D_LOGERROR("Could not save scene, writing to stream failed");
         return false;
         return false;
     }
     }
 
 
@@ -245,7 +245,7 @@ bool Scene::LoadAsync(File* file, LoadMode mode)
 {
 {
     if (!file)
     if (!file)
     {
     {
-        LOGERROR("Null file for async loading");
+        URHO3D_LOGERROR("Null file for async loading");
         return false;
         return false;
     }
     }
 
 
@@ -258,7 +258,7 @@ bool Scene::LoadAsync(File* file, LoadMode mode)
         // In resource load mode can load also object prefabs, which have no identifier
         // In resource load mode can load also object prefabs, which have no identifier
         if (mode > LOAD_RESOURCES_ONLY)
         if (mode > LOAD_RESOURCES_ONLY)
         {
         {
-            LOGERROR(file->GetName() + " is not a valid scene file");
+            URHO3D_LOGERROR(file->GetName() + " is not a valid scene file");
             return false;
             return false;
         }
         }
         else
         else
@@ -318,7 +318,7 @@ bool Scene::LoadAsyncXML(File* file, LoadMode mode)
 {
 {
     if (!file)
     if (!file)
     {
     {
-        LOGERROR("Null file for async loading");
+        URHO3D_LOGERROR("Null file for async loading");
         return false;
         return false;
     }
     }
 
 

+ 23 - 23
Source/Urho3D/Scene/Serializable.cpp

@@ -161,7 +161,7 @@ void Serializable::OnSetAttribute(const AttributeInfo& attr, const Variant& src)
         break;
         break;
 
 
     default:
     default:
-        LOGERROR("Unsupported attribute type for OnSetAttribute()");
+        URHO3D_LOGERROR("Unsupported attribute type for OnSetAttribute()");
         return;
         return;
     }
     }
 
 
@@ -261,7 +261,7 @@ void Serializable::OnGetAttribute(const AttributeInfo& attr, Variant& dest) cons
         break;
         break;
 
 
     default:
     default:
-        LOGERROR("Unsupported attribute type for OnGetAttribute()");
+        URHO3D_LOGERROR("Unsupported attribute type for OnGetAttribute()");
         return;
         return;
     }
     }
 }
 }
@@ -290,7 +290,7 @@ bool Serializable::Load(Deserializer& source, bool setInstanceDefault)
 
 
         if (source.IsEof())
         if (source.IsEof())
         {
         {
-            LOGERROR("Could not load " + GetTypeName() + ", stream not open or at end");
+            URHO3D_LOGERROR("Could not load " + GetTypeName() + ", stream not open or at end");
             return false;
             return false;
         }
         }
 
 
@@ -322,7 +322,7 @@ bool Serializable::Save(Serializer& dest) const
 
 
         if (!dest.WriteVariantData(value))
         if (!dest.WriteVariantData(value))
         {
         {
-            LOGERROR("Could not save " + GetTypeName() + ", writing to stream failed");
+            URHO3D_LOGERROR("Could not save " + GetTypeName() + ", writing to stream failed");
             return false;
             return false;
         }
         }
     }
     }
@@ -334,7 +334,7 @@ bool Serializable::LoadXML(const XMLElement& source, bool setInstanceDefault)
 {
 {
     if (source.IsNull())
     if (source.IsNull())
     {
     {
-        LOGERROR("Could not load " + GetTypeName() + ", null source element");
+        URHO3D_LOGERROR("Could not load " + GetTypeName() + ", null source element");
         return false;
         return false;
     }
     }
 
 
@@ -414,7 +414,7 @@ bool Serializable::SaveXML(XMLElement& dest) const
 {
 {
     if (dest.IsNull())
     if (dest.IsNull())
     {
     {
-        LOGERROR("Could not save " + GetTypeName() + ", null destination element");
+        URHO3D_LOGERROR("Could not save " + GetTypeName() + ", null destination element");
         return false;
         return false;
     }
     }
 
 
@@ -457,12 +457,12 @@ bool Serializable::SetAttribute(unsigned index, const Variant& value)
     const Vector<AttributeInfo>* attributes = GetAttributes();
     const Vector<AttributeInfo>* attributes = GetAttributes();
     if (!attributes)
     if (!attributes)
     {
     {
-        LOGERROR(GetTypeName() + " has no attributes");
+        URHO3D_LOGERROR(GetTypeName() + " has no attributes");
         return false;
         return false;
     }
     }
     if (index >= attributes->Size())
     if (index >= attributes->Size())
     {
     {
-        LOGERROR("Attribute index out of bounds");
+        URHO3D_LOGERROR("Attribute index out of bounds");
         return false;
         return false;
     }
     }
 
 
@@ -476,7 +476,7 @@ bool Serializable::SetAttribute(unsigned index, const Variant& value)
     }
     }
     else
     else
     {
     {
-        LOGERROR("Could not set attribute " + attr.name_ + ": expected type " + Variant::GetTypeName(attr.type_) +
+        URHO3D_LOGERROR("Could not set attribute " + attr.name_ + ": expected type " + Variant::GetTypeName(attr.type_) +
                  " but got " + value.GetTypeName());
                  " but got " + value.GetTypeName());
         return false;
         return false;
     }
     }
@@ -487,7 +487,7 @@ bool Serializable::SetAttribute(const String& name, const Variant& value)
     const Vector<AttributeInfo>* attributes = GetAttributes();
     const Vector<AttributeInfo>* attributes = GetAttributes();
     if (!attributes)
     if (!attributes)
     {
     {
-        LOGERROR(GetTypeName() + " has no attributes");
+        URHO3D_LOGERROR(GetTypeName() + " has no attributes");
         return false;
         return false;
     }
     }
 
 
@@ -503,14 +503,14 @@ bool Serializable::SetAttribute(const String& name, const Variant& value)
             }
             }
             else
             else
             {
             {
-                LOGERROR("Could not set attribute " + i->name_ + ": expected type " + Variant::GetTypeName(i->type_)
+                URHO3D_LOGERROR("Could not set attribute " + i->name_ + ": expected type " + Variant::GetTypeName(i->type_)
                          + " but got " + value.GetTypeName());
                          + " but got " + value.GetTypeName());
                 return false;
                 return false;
             }
             }
         }
         }
     }
     }
 
 
-    LOGERROR("Could not find attribute " + name + " in " + GetTypeName());
+    URHO3D_LOGERROR("Could not find attribute " + name + " in " + GetTypeName());
     return false;
     return false;
 }
 }
 
 
@@ -591,7 +591,7 @@ void Serializable::WriteInitialDeltaUpdate(Serializer& dest, unsigned char timeS
 {
 {
     if (!networkState_)
     if (!networkState_)
     {
     {
-        LOGERROR("WriteInitialDeltaUpdate called without allocated NetworkState");
+        URHO3D_LOGERROR("WriteInitialDeltaUpdate called without allocated NetworkState");
         return;
         return;
     }
     }
 
 
@@ -625,7 +625,7 @@ void Serializable::WriteDeltaUpdate(Serializer& dest, const DirtyBits& attribute
 {
 {
     if (!networkState_)
     if (!networkState_)
     {
     {
-        LOGERROR("WriteDeltaUpdate called without allocated NetworkState");
+        URHO3D_LOGERROR("WriteDeltaUpdate called without allocated NetworkState");
         return;
         return;
     }
     }
 
 
@@ -651,7 +651,7 @@ void Serializable::WriteLatestDataUpdate(Serializer& dest, unsigned char timeSta
 {
 {
     if (!networkState_)
     if (!networkState_)
     {
     {
-        LOGERROR("WriteLatestDataUpdate called without allocated NetworkState");
+        URHO3D_LOGERROR("WriteLatestDataUpdate called without allocated NetworkState");
         return;
         return;
     }
     }
 
 
@@ -759,12 +759,12 @@ Variant Serializable::GetAttribute(unsigned index) const
     const Vector<AttributeInfo>* attributes = GetAttributes();
     const Vector<AttributeInfo>* attributes = GetAttributes();
     if (!attributes)
     if (!attributes)
     {
     {
-        LOGERROR(GetTypeName() + " has no attributes");
+        URHO3D_LOGERROR(GetTypeName() + " has no attributes");
         return ret;
         return ret;
     }
     }
     if (index >= attributes->Size())
     if (index >= attributes->Size())
     {
     {
-        LOGERROR("Attribute index out of bounds");
+        URHO3D_LOGERROR("Attribute index out of bounds");
         return ret;
         return ret;
     }
     }
 
 
@@ -779,7 +779,7 @@ Variant Serializable::GetAttribute(const String& name) const
     const Vector<AttributeInfo>* attributes = GetAttributes();
     const Vector<AttributeInfo>* attributes = GetAttributes();
     if (!attributes)
     if (!attributes)
     {
     {
-        LOGERROR(GetTypeName() + " has no attributes");
+        URHO3D_LOGERROR(GetTypeName() + " has no attributes");
         return ret;
         return ret;
     }
     }
 
 
@@ -792,7 +792,7 @@ Variant Serializable::GetAttribute(const String& name) const
         }
         }
     }
     }
 
 
-    LOGERROR("Could not find attribute " + name + " in " + GetTypeName());
+    URHO3D_LOGERROR("Could not find attribute " + name + " in " + GetTypeName());
     return ret;
     return ret;
 }
 }
 
 
@@ -801,12 +801,12 @@ Variant Serializable::GetAttributeDefault(unsigned index) const
     const Vector<AttributeInfo>* attributes = GetAttributes();
     const Vector<AttributeInfo>* attributes = GetAttributes();
     if (!attributes)
     if (!attributes)
     {
     {
-        LOGERROR(GetTypeName() + " has no attributes");
+        URHO3D_LOGERROR(GetTypeName() + " has no attributes");
         return Variant::EMPTY;
         return Variant::EMPTY;
     }
     }
     if (index >= attributes->Size())
     if (index >= attributes->Size())
     {
     {
-        LOGERROR("Attribute index out of bounds");
+        URHO3D_LOGERROR("Attribute index out of bounds");
         return Variant::EMPTY;
         return Variant::EMPTY;
     }
     }
 
 
@@ -824,7 +824,7 @@ Variant Serializable::GetAttributeDefault(const String& name) const
     const Vector<AttributeInfo>* attributes = GetAttributes();
     const Vector<AttributeInfo>* attributes = GetAttributes();
     if (!attributes)
     if (!attributes)
     {
     {
-        LOGERROR(GetTypeName() + " has no attributes");
+        URHO3D_LOGERROR(GetTypeName() + " has no attributes");
         return Variant::EMPTY;
         return Variant::EMPTY;
     }
     }
 
 
@@ -834,7 +834,7 @@ Variant Serializable::GetAttributeDefault(const String& name) const
             return i->defaultValue_;
             return i->defaultValue_;
     }
     }
 
 
-    LOGERROR("Could not find attribute " + name + " in " + GetTypeName());
+    URHO3D_LOGERROR("Could not find attribute " + name + " in " + GetTypeName());
     return Variant::EMPTY;
     return Variant::EMPTY;
 }
 }
 
 

+ 1 - 1
Source/Urho3D/Scene/UnknownComponent.cpp

@@ -157,7 +157,7 @@ bool UnknownComponent::SaveXML(XMLElement& dest) const
 {
 {
     if (dest.IsNull())
     if (dest.IsNull())
     {
     {
-        LOGERROR("Could not save " + GetTypeName() + ", null destination element");
+        URHO3D_LOGERROR("Could not save " + GetTypeName() + ", null destination element");
         return false;
         return false;
     }
     }
 
 

+ 3 - 3
Source/Urho3D/Scene/ValueAnimation.cpp

@@ -348,7 +348,7 @@ Variant ValueAnimation::LinearInterpolation(unsigned index1, unsigned index2, fl
         return value1.GetDouble() * (1.0f - t) + value2.GetDouble() * t;
         return value1.GetDouble() * (1.0f - t) + value2.GetDouble() * t;
 
 
     default:
     default:
-        LOGERROR("Invalid value type for linear interpolation");
+        URHO3D_LOGERROR("Invalid value type for linear interpolation");
         return Variant::EMPTY;
         return Variant::EMPTY;
     }
     }
 }
 }
@@ -400,7 +400,7 @@ Variant ValueAnimation::SplineInterpolation(unsigned index1, unsigned index2, fl
         return v1.GetDouble() * h1 + v2.GetDouble() * h2 + t1.GetDouble() * h3 + t2.GetDouble() * h4;
         return v1.GetDouble() * h1 + v2.GetDouble() * h2 + t1.GetDouble() * h3 + t2.GetDouble() * h4;
 
 
     default:
     default:
-        LOGERROR("Invalid value type for spline interpolation");
+        URHO3D_LOGERROR("Invalid value type for spline interpolation");
         return Variant::EMPTY;
         return Variant::EMPTY;
     }
     }
 }
 }
@@ -455,7 +455,7 @@ Variant ValueAnimation::SubstractAndMultiply(const Variant& value1, const Varian
         return (value1.GetDouble() - value2.GetDouble()) * t;
         return (value1.GetDouble() - value2.GetDouble()) * t;
 
 
     default:
     default:
-        LOGERROR("Invalid value type for spline interpolation's substract and multiply operation");
+        URHO3D_LOGERROR("Invalid value type for spline interpolation's substract and multiply operation");
         return Variant::EMPTY;
         return Variant::EMPTY;
     }
     }
 }
 }

+ 1 - 1
Source/Urho3D/Scene/ValueAnimationInfo.cpp

@@ -140,7 +140,7 @@ float ValueAnimationInfo::CalculateScaledTime(float currentTime, bool& finished)
         return Clamp(currentTime, beginTime, endTime);
         return Clamp(currentTime, beginTime, endTime);
 
 
     default:
     default:
-        LOGERROR("Unsupported attribute animation wrap mode");
+        URHO3D_LOGERROR("Unsupported attribute animation wrap mode");
         return beginTime;
         return beginTime;
     }
     }
 }
 }

+ 3 - 3
Source/Urho3D/UI/Cursor.cpp

@@ -125,7 +125,7 @@ void Cursor::DefineShape(CursorShape shape, Image* image, const IntRect& imageRe
 {
 {
     if (shape < CS_NORMAL || shape >= CS_MAX_SHAPES)
     if (shape < CS_NORMAL || shape >= CS_MAX_SHAPES)
     {
     {
-        LOGERROR("Shape index out of bounds, can not define cursor shape");
+        URHO3D_LOGERROR("Shape index out of bounds, can not define cursor shape");
         return;
         return;
     }
     }
 
 
@@ -276,7 +276,7 @@ void Cursor::ApplyOSCursorShape()
             info.osCursor_ = SDL_CreateSystemCursor((SDL_SystemCursor)osCursorLookup[info.systemCursor_]);
             info.osCursor_ = SDL_CreateSystemCursor((SDL_SystemCursor)osCursorLookup[info.systemCursor_]);
             info.systemDefined_ = true;
             info.systemDefined_ = true;
             if (!info.osCursor_)
             if (!info.osCursor_)
-                LOGERROR("Could not create system cursor");
+                URHO3D_LOGERROR("Could not create system cursor");
         }
         }
         // Create from image
         // Create from image
         else if (info.image_)
         else if (info.image_)
@@ -288,7 +288,7 @@ void Cursor::ApplyOSCursorShape()
                 info.osCursor_ = SDL_CreateColorCursor(surface, info.hotSpot_.x_, info.hotSpot_.y_);
                 info.osCursor_ = SDL_CreateColorCursor(surface, info.hotSpot_.x_, info.hotSpot_.y_);
                 info.systemDefined_ = false;
                 info.systemDefined_ = false;
                 if (!info.osCursor_)
                 if (!info.osCursor_)
-                    LOGERROR("Could not create cursor from image " + info.image_->GetName());
+                    URHO3D_LOGERROR("Could not create cursor from image " + info.image_->GetName());
                 SDL_FreeSurface(surface);
                 SDL_FreeSurface(surface);
             }
             }
         }
         }

+ 1 - 1
Source/Urho3D/UI/FontFace.cpp

@@ -117,7 +117,7 @@ SharedPtr<Texture2D> FontFace::LoadFaceTexture(SharedPtr<Image> image)
     SharedPtr<Texture2D> texture = CreateFaceTexture();
     SharedPtr<Texture2D> texture = CreateFaceTexture();
     if (!texture->SetData(image, true))
     if (!texture->SetData(image, true))
     {
     {
-        LOGERROR("Could not load texture from image resource");
+        URHO3D_LOGERROR("Could not load texture from image resource");
         return SharedPtr<Texture2D>();
         return SharedPtr<Texture2D>();
     }
     }
     return texture;
     return texture;

+ 6 - 6
Source/Urho3D/UI/FontFaceBitmap.cpp

@@ -56,21 +56,21 @@ bool FontFaceBitmap::Load(const unsigned char* fontData, unsigned fontDataSize,
     MemoryBuffer memoryBuffer(fontData, fontDataSize);
     MemoryBuffer memoryBuffer(fontData, fontDataSize);
     if (!xmlReader->Load(memoryBuffer))
     if (!xmlReader->Load(memoryBuffer))
     {
     {
-        LOGERROR("Could not load XML file");
+        URHO3D_LOGERROR("Could not load XML file");
         return false;
         return false;
     }
     }
 
 
     XMLElement root = xmlReader->GetRoot("font");
     XMLElement root = xmlReader->GetRoot("font");
     if (root.IsNull())
     if (root.IsNull())
     {
     {
-        LOGERROR("Could not find Font element");
+        URHO3D_LOGERROR("Could not find Font element");
         return false;
         return false;
     }
     }
 
 
     XMLElement pagesElem = root.GetChild("pages");
     XMLElement pagesElem = root.GetChild("pages");
     if (pagesElem.IsNull())
     if (pagesElem.IsNull())
     {
     {
-        LOGERROR("Could not find Pages element");
+        URHO3D_LOGERROR("Could not find Pages element");
         return false;
         return false;
     }
     }
 
 
@@ -92,7 +92,7 @@ bool FontFaceBitmap::Load(const unsigned char* fontData, unsigned fontDataSize,
     {
     {
         if (pageElem.IsNull())
         if (pageElem.IsNull())
         {
         {
-            LOGERROR("Could not find Page element for page: " + String(i));
+            URHO3D_LOGERROR("Could not find Page element for page: " + String(i));
             return 0;
             return 0;
         }
         }
 
 
@@ -104,7 +104,7 @@ bool FontFaceBitmap::Load(const unsigned char* fontData, unsigned fontDataSize,
         SharedPtr<Image> fontImage(new Image(context));
         SharedPtr<Image> fontImage(new Image(context));
         if (!fontFile || !fontImage->Load(*fontFile))
         if (!fontFile || !fontImage->Load(*fontFile))
         {
         {
-            LOGERROR("Failed to load font image file");
+            URHO3D_LOGERROR("Failed to load font image file");
             return 0;
             return 0;
         }
         }
         SharedPtr<Texture2D> texture = LoadFaceTexture(fontImage);
         SharedPtr<Texture2D> texture = LoadFaceTexture(fontImage);
@@ -360,7 +360,7 @@ SharedPtr<Image> FontFaceBitmap::SaveFaceTexture(Texture2D* texture)
     if (!texture->GetData(0, image->GetData()))
     if (!texture->GetData(0, image->GetData()))
     {
     {
         delete image;
         delete image;
-        LOGERROR("Could not save texture to image resource");
+        URHO3D_LOGERROR("Could not save texture to image resource");
         return SharedPtr<Image>();
         return SharedPtr<Image>();
     }
     }
     return SharedPtr<Image>(image);
     return SharedPtr<Image>(image);

+ 7 - 7
Source/Urho3D/UI/FontFaceFreeType.cpp

@@ -58,7 +58,7 @@ public:
     {
     {
         FT_Error error = FT_Init_FreeType(&library_);
         FT_Error error = FT_Init_FreeType(&library_);
         if (error)
         if (error)
-            LOGERROR("Could not initialize FreeType library");
+            URHO3D_LOGERROR("Could not initialize FreeType library");
     }
     }
 
 
     /// Destruct.
     /// Destruct.
@@ -111,27 +111,27 @@ bool FontFaceFreeType::Load(const unsigned char* fontData, unsigned fontDataSize
 
 
     if (pointSize <= 0)
     if (pointSize <= 0)
     {
     {
-        LOGERROR("Zero or negative point size");
+        URHO3D_LOGERROR("Zero or negative point size");
         return false;
         return false;
     }
     }
 
 
     if (!fontDataSize)
     if (!fontDataSize)
     {
     {
-        LOGERROR("Could not create font face from zero size data");
+        URHO3D_LOGERROR("Could not create font face from zero size data");
         return false;
         return false;
     }
     }
 
 
     error = FT_New_Memory_Face(library, fontData, fontDataSize, 0, &face);
     error = FT_New_Memory_Face(library, fontData, fontDataSize, 0, &face);
     if (error)
     if (error)
     {
     {
-        LOGERROR("Could not create font face");
+        URHO3D_LOGERROR("Could not create font face");
         return false;
         return false;
     }
     }
     error = FT_Set_Char_Size(face, 0, pointSize * 64, FONT_DPI, FONT_DPI);
     error = FT_Set_Char_Size(face, 0, pointSize * 64, FONT_DPI, FONT_DPI);
     if (error)
     if (error)
     {
     {
         FT_Done_Face(face);
         FT_Done_Face(face);
-        LOGERROR("Could not set font point size " + String(pointSize));
+        URHO3D_LOGERROR("Could not set font point size " + String(pointSize));
         return false;
         return false;
     }
     }
 
 
@@ -217,7 +217,7 @@ bool FontFaceFreeType::Load(const unsigned char* fontData, unsigned fontDataSize
         FT_Error error = FT_Load_Sfnt_Table(face, tagKern, 0, NULL, &kerningTableSize);
         FT_Error error = FT_Load_Sfnt_Table(face, tagKern, 0, NULL, &kerningTableSize);
         if (error)
         if (error)
         {
         {
-            LOGERROR("Could not get kerning table length");
+            URHO3D_LOGERROR("Could not get kerning table length");
             return false;
             return false;
         }
         }
 
 
@@ -225,7 +225,7 @@ bool FontFaceFreeType::Load(const unsigned char* fontData, unsigned fontDataSize
         error = FT_Load_Sfnt_Table(face, tagKern, 0, kerningTable, &kerningTableSize);
         error = FT_Load_Sfnt_Table(face, tagKern, 0, kerningTable, &kerningTableSize);
         if (error)
         if (error)
         {
         {
-            LOGERROR("Could not load kerning table");
+            URHO3D_LOGERROR("Could not load kerning table");
             return false;
             return false;
         }
         }
 
 

+ 3 - 3
Source/Urho3D/UI/Menu.cpp

@@ -179,7 +179,7 @@ bool Menu::LoadXML(const XMLElement& source, XMLFile* styleFile, bool setInstanc
                 // Do not add the popup element as a child even temporarily, as that can break layouts
                 // Do not add the popup element as a child even temporarily, as that can break layouts
                 SharedPtr<UIElement> popup = DynamicCast<UIElement>(context_->CreateObject(typeName));
                 SharedPtr<UIElement> popup = DynamicCast<UIElement>(context_->CreateObject(typeName));
                 if (!popup)
                 if (!popup)
-                    LOGERROR("Could not create popup element type " + typeName);
+                    URHO3D_LOGERROR("Could not create popup element type " + typeName);
                 else
                 else
                 {
                 {
                     child = popup;
                     child = popup;
@@ -247,7 +247,7 @@ bool Menu::SaveXML(XMLElement& dest) const
         // Filter popup implicit attributes
         // Filter popup implicit attributes
         if (!FilterPopupImplicitAttributes(childElem))
         if (!FilterPopupImplicitAttributes(childElem))
         {
         {
-            LOGERROR("Could not remove popup implicit attributes");
+            URHO3D_LOGERROR("Could not remove popup implicit attributes");
             return false;
             return false;
         }
         }
     }
     }
@@ -263,7 +263,7 @@ void Menu::SetPopup(UIElement* popup)
     // Currently only allow popup 'window'
     // Currently only allow popup 'window'
     if (popup->GetType() != Window::GetTypeStatic())
     if (popup->GetType() != Window::GetTypeStatic())
     {
     {
-        LOGERROR("Could not set popup element of type " + popup->GetTypeName() + ", only support popup window for now");
+        URHO3D_LOGERROR("Could not set popup element of type " + popup->GetTypeName() + ", only support popup window for now");
         return;
         return;
     }
     }
 
 

+ 1 - 1
Source/Urho3D/UI/Text.cpp

@@ -239,7 +239,7 @@ bool Text::SetFont(Font* font, int size)
 {
 {
     if (!font)
     if (!font)
     {
     {
-        LOGERROR("Null font for Text");
+        URHO3D_LOGERROR("Null font for Text");
         return false;
         return false;
     }
     }
 
 

+ 3 - 3
Source/Urho3D/UI/UI.cpp

@@ -479,7 +479,7 @@ SharedPtr<UIElement> UI::LoadLayout(XMLFile* file, XMLFile* styleFile)
 
 
     if (!file)
     if (!file)
     {
     {
-        LOGERROR("Null UI layout XML file");
+        URHO3D_LOGERROR("Null UI layout XML file");
         return root;
         return root;
     }
     }
 
 
@@ -488,7 +488,7 @@ SharedPtr<UIElement> UI::LoadLayout(XMLFile* file, XMLFile* styleFile)
     XMLElement rootElem = file->GetRoot("element");
     XMLElement rootElem = file->GetRoot("element");
     if (!rootElem)
     if (!rootElem)
     {
     {
-        LOGERROR("No root UI element in " + file->GetName());
+        URHO3D_LOGERROR("No root UI element in " + file->GetName());
         return root;
         return root;
     }
     }
 
 
@@ -499,7 +499,7 @@ SharedPtr<UIElement> UI::LoadLayout(XMLFile* file, XMLFile* styleFile)
     root = DynamicCast<UIElement>(context_->CreateObject(typeName));
     root = DynamicCast<UIElement>(context_->CreateObject(typeName));
     if (!root)
     if (!root)
     {
     {
-        LOGERROR("Could not create unknown UI element " + typeName);
+        URHO3D_LOGERROR("Could not create unknown UI element " + typeName);
         return root;
         return root;
     }
     }
 
 

+ 6 - 6
Source/Urho3D/UI/UIElement.cpp

@@ -296,7 +296,7 @@ bool UIElement::LoadChildXML(const XMLElement& childElem, XMLFile* styleFile, bo
     bool internalElem = childElem.GetBool("internal");
     bool internalElem = childElem.GetBool("internal");
     if (internalElem)
     if (internalElem)
     {
     {
-        LOGERROR("Loading internal child element is not supported");
+        URHO3D_LOGERROR("Loading internal child element is not supported");
         return false;
         return false;
     }
     }
 
 
@@ -573,7 +573,7 @@ bool UIElement::FilterAttributes(XMLElement& dest) const
     // Filter implicit attributes
     // Filter implicit attributes
     if (!FilterImplicitAttributes(dest))
     if (!FilterImplicitAttributes(dest))
     {
     {
-        LOGERROR("Could not remove implicit attributes");
+        URHO3D_LOGERROR("Could not remove implicit attributes");
         return false;
         return false;
     }
     }
 
 
@@ -1223,7 +1223,7 @@ UIElement* UIElement::CreateChild(StringHash type, const String& name, unsigned
     SharedPtr<UIElement> newElement = DynamicCast<UIElement>(context_->CreateObject(type));
     SharedPtr<UIElement> newElement = DynamicCast<UIElement>(context_->CreateObject(type));
     if (!newElement)
     if (!newElement)
     {
     {
-        LOGERROR("Could not create unknown UI element type " + type.ToString());
+        URHO3D_LOGERROR("Could not create unknown UI element type " + type.ToString());
         return 0;
         return 0;
     }
     }
 
 
@@ -1737,7 +1737,7 @@ Animatable* UIElement::FindAttributeAnimationTarget(const String& name, String&
         {
         {
             if (names[i].Front() != '#')
             if (names[i].Front() != '#')
             {
             {
-                LOGERROR("Invalid name " + name);
+                URHO3D_LOGERROR("Invalid name " + name);
                 return 0;
                 return 0;
             }
             }
 
 
@@ -1745,7 +1745,7 @@ Animatable* UIElement::FindAttributeAnimationTarget(const String& name, String&
             element = element->GetChild(index);
             element = element->GetChild(index);
             if (!element)
             if (!element)
             {
             {
-                LOGERROR("Could not find element by name " + name);
+                URHO3D_LOGERROR("Could not find element by name " + name);
                 return 0;
                 return 0;
             }
             }
         }
         }
@@ -1813,7 +1813,7 @@ bool UIElement::FilterUIStyleAttributes(XMLElement& dest, const XMLElement& styl
     {
     {
         if (!childElem.GetBool("internal"))
         if (!childElem.GetBool("internal"))
         {
         {
-            LOGERROR("Invalid style file, style element can only contain internal child elements");
+            URHO3D_LOGERROR("Invalid style file, style element can only contain internal child elements");
             return false;
             return false;
         }
         }
         if (!FilterUIStyleAttributes(childDest, childElem))
         if (!FilterUIStyleAttributes(childDest, childElem))

+ 4 - 4
Source/Urho3D/Urho2D/AnimatedSprite2D.cpp

@@ -268,7 +268,7 @@ void AnimatedSprite2D::SetSpineAnimation()
         animationStateData_ = spAnimationStateData_create(animationSet_->GetSkeletonData());
         animationStateData_ = spAnimationStateData_create(animationSet_->GetSkeletonData());
         if (!animationStateData_)
         if (!animationStateData_)
         {
         {
-            LOGERROR("Create animation state data failed");
+            URHO3D_LOGERROR("Create animation state data failed");
             return;
             return;
         }
         }
     }
     }
@@ -278,7 +278,7 @@ void AnimatedSprite2D::SetSpineAnimation()
         animationState_ = spAnimationState_create(animationStateData_);
         animationState_ = spAnimationState_create(animationStateData_);
         if (!animationState_)
         if (!animationState_)
         {
         {
-            LOGERROR("Create animation state failed");
+            URHO3D_LOGERROR("Create animation state failed");
             return;
             return;
         }
         }
     }
     }
@@ -414,13 +414,13 @@ void AnimatedSprite2D::SetSpriterAnimation()
 
 
     if (!spriterInstance_->SetEntity(entity_.CString()))
     if (!spriterInstance_->SetEntity(entity_.CString()))
     {
     {
-        LOGERROR("Set entity failed");
+        URHO3D_LOGERROR("Set entity failed");
         return;
         return;
     }
     }
 
 
     if (!spriterInstance_->SetAnimation(animationName_.CString(), (Spriter::LoopMode)loopMode_))
     if (!spriterInstance_->SetAnimation(animationName_.CString(), (Spriter::LoopMode)loopMode_))
     {
     {
-        LOGERROR("Set animation failed");
+        URHO3D_LOGERROR("Set animation failed");
         return;
         return;
     }
     }
 
 

+ 11 - 11
Source/Urho3D/Urho2D/AnimationSet2D.cpp

@@ -139,7 +139,7 @@ bool AnimationSet2D::BeginLoad(Deserializer& source)
     if (extension == ".scml")
     if (extension == ".scml")
         return BeginLoadSpriter(source);
         return BeginLoadSpriter(source);
 
 
-    LOGERROR("Unsupport animation set file: " + source.GetName());
+    URHO3D_LOGERROR("Unsupport animation set file: " + source.GetName());
 
 
     return false;
     return false;
 }
 }
@@ -244,7 +244,7 @@ bool AnimationSet2D::EndLoadSpine()
     atlas_ = spAtlas_createFromFile(atlasFileName.CString(), 0);
     atlas_ = spAtlas_createFromFile(atlasFileName.CString(), 0);
     if (!atlas_)
     if (!atlas_)
     {
     {
-        LOGERROR("Create spine atlas failed");
+        URHO3D_LOGERROR("Create spine atlas failed");
         return false;
         return false;
     }
     }
 
 
@@ -258,7 +258,7 @@ bool AnimationSet2D::EndLoadSpine()
 
 
     if (numAtlasPages > 1)
     if (numAtlasPages > 1)
     {
     {
-        LOGERROR("Only one page is supported in Urho3D");
+        URHO3D_LOGERROR("Only one page is supported in Urho3D");
         return false;
         return false;
     }
     }
 
 
@@ -267,7 +267,7 @@ bool AnimationSet2D::EndLoadSpine()
     spSkeletonJson* skeletonJson = spSkeletonJson_create(atlas_);
     spSkeletonJson* skeletonJson = spSkeletonJson_create(atlas_);
     if (!skeletonJson)
     if (!skeletonJson)
     {
     {
-        LOGERROR("Create skeleton Json failed");
+        URHO3D_LOGERROR("Create skeleton Json failed");
         return false;
         return false;
     }
     }
 
 
@@ -288,7 +288,7 @@ bool AnimationSet2D::BeginLoadSpriter(Deserializer& source)
     unsigned dataSize = source.GetSize();
     unsigned dataSize = source.GetSize();
     if (!dataSize && !source.GetName().Empty())
     if (!dataSize && !source.GetName().Empty())
     {
     {
-        LOGERROR("Zero sized XML data in " + source.GetName());
+        URHO3D_LOGERROR("Zero sized XML data in " + source.GetName());
         return false;
         return false;
     }
     }
 
 
@@ -299,7 +299,7 @@ bool AnimationSet2D::BeginLoadSpriter(Deserializer& source)
     spriterData_ = new Spriter::SpriterData();
     spriterData_ = new Spriter::SpriterData();
     if (!spriterData_->Load(buffer.Get(), dataSize))
     if (!spriterData_->Load(buffer.Get(), dataSize))
     {
     {
-        LOGERROR("Could not spriter data from " + source.GetName());
+        URHO3D_LOGERROR("Could not spriter data from " + source.GetName());
         return false;
         return false;
     }
     }
 
 
@@ -369,7 +369,7 @@ bool AnimationSet2D::EndLoadSpriter()
                 SharedPtr<Sprite2D> sprite(spriteSheet_->GetSprite(GetFileName(file->name_)));
                 SharedPtr<Sprite2D> sprite(spriteSheet_->GetSprite(GetFileName(file->name_)));
                 if (!sprite)
                 if (!sprite)
                 {
                 {
-                    LOGERROR("Could not load sprite " + file->name_);
+                    URHO3D_LOGERROR("Could not load sprite " + file->name_);
                     return false;                
                     return false;                
                 }
                 }
 
 
@@ -412,17 +412,17 @@ bool AnimationSet2D::EndLoadSpriter()
                 SharedPtr<Image> image(cache->GetResource<Image>(imagePath));
                 SharedPtr<Image> image(cache->GetResource<Image>(imagePath));
                 if (!image)
                 if (!image)
                 {
                 {
-                    LOGERROR("Could not load image");
+                    URHO3D_LOGERROR("Could not load image");
                     return false;
                     return false;
                 }
                 }
                 if (image->IsCompressed())
                 if (image->IsCompressed())
                 {
                 {
-                    LOGERROR("Compressed image is not support");
+                    URHO3D_LOGERROR("Compressed image is not support");
                     return false;
                     return false;
                 }
                 }
                 if (image->GetComponents() != 4)
                 if (image->GetComponents() != 4)
                 {
                 {
-                    LOGERROR("Only support image with 4 components");
+                    URHO3D_LOGERROR("Only support image with 4 components");
                     return false;
                     return false;
                 }
                 }
 
 
@@ -447,7 +447,7 @@ bool AnimationSet2D::EndLoadSpriter()
                 Image* image = info.image_;
                 Image* image = info.image_;
                 if (!allocator.Allocate(image->GetWidth(), image->GetHeight(), info.x, info.y))
                 if (!allocator.Allocate(image->GetWidth(), image->GetHeight(), info.x, info.y))
                 {
                 {
-                    LOGERROR("Could not allocate area");
+                    URHO3D_LOGERROR("Could not allocate area");
                     return false;
                     return false;
                 }
                 }
             }
             }

+ 1 - 1
Source/Urho3D/Urho2D/Constraint2D.cpp

@@ -130,7 +130,7 @@ void Constraint2D::OnNodeSet(Node* node)
         ownerBody_ = node->GetComponent<RigidBody2D>();
         ownerBody_ = node->GetComponent<RigidBody2D>();
         if (!ownerBody_)
         if (!ownerBody_)
         {
         {
-            LOGERROR("No right body component in node, can not create constraint");
+            URHO3D_LOGERROR("No right body component in node, can not create constraint");
             return;
             return;
         }
         }
     }
     }

+ 1 - 1
Source/Urho3D/Urho2D/ParticleEffect2D.cpp

@@ -208,7 +208,7 @@ bool ParticleEffect2D::EndLoad()
         ResourceCache* cache = GetSubsystem<ResourceCache>();
         ResourceCache* cache = GetSubsystem<ResourceCache>();
         sprite_ = cache->GetResource<Sprite2D>(loadSpriteName_);
         sprite_ = cache->GetResource<Sprite2D>(loadSpriteName_);
         if (!sprite_)
         if (!sprite_)
-            LOGERROR("Could not load sprite " + loadSpriteName_ + " for particle effect");
+            URHO3D_LOGERROR("Could not load sprite " + loadSpriteName_ + " for particle effect");
 
 
         loadSpriteName_.Clear();
         loadSpriteName_.Clear();
     }
     }

+ 2 - 2
Source/Urho3D/Urho2D/Renderer2D.cpp

@@ -183,7 +183,7 @@ void Renderer2D::UpdateGeometry(const FrameInfo& frame)
         }
         }
         else
         else
         {
         {
-            LOGERROR("Failed to lock index buffer");
+            URHO3D_LOGERROR("Failed to lock index buffer");
             return;
             return;
         }
         }
     }
     }
@@ -215,7 +215,7 @@ void Renderer2D::UpdateGeometry(const FrameInfo& frame)
                 vertexBuffer->Unlock();
                 vertexBuffer->Unlock();
             }
             }
             else
             else
-                LOGERROR("Failed to lock vertex buffer");
+                URHO3D_LOGERROR("Failed to lock vertex buffer");
         }
         }
 
 
         viewBatchInfo.vertexBufferUpdateFrameNumber_ = frame_.frameNumber_;
         viewBatchInfo.vertexBufferUpdateFrameNumber_ = frame_.frameNumber_;

+ 6 - 6
Source/Urho3D/Urho2D/SpriteSheet2D.cpp

@@ -67,7 +67,7 @@ bool SpriteSheet2D::BeginLoad(Deserializer& source)
     if (extension == ".xml")
     if (extension == ".xml")
         return BeginLoadFromXMLFile(source);
         return BeginLoadFromXMLFile(source);
 
 
-    LOGERROR("Unsupported file type");
+    URHO3D_LOGERROR("Unsupported file type");
     return false;
     return false;
 }
 }
 
 
@@ -115,7 +115,7 @@ bool SpriteSheet2D::BeginLoadFromPListFile(Deserializer& source)
     loadPListFile_ = new PListFile(context_);
     loadPListFile_ = new PListFile(context_);
     if (!loadPListFile_->Load(source))
     if (!loadPListFile_->Load(source))
     {
     {
-        LOGERROR("Could not load sprite sheet");
+        URHO3D_LOGERROR("Could not load sprite sheet");
         loadPListFile_.Reset();
         loadPListFile_.Reset();
         return false;
         return false;
     }
     }
@@ -140,7 +140,7 @@ bool SpriteSheet2D::EndLoadFromPListFile()
     texture_ = cache->GetResource<Texture2D>(loadTextureName_);
     texture_ = cache->GetResource<Texture2D>(loadTextureName_);
     if (!texture_)
     if (!texture_)
     {
     {
-        LOGERROR("Could not load texture " + loadTextureName_);
+        URHO3D_LOGERROR("Could not load texture " + loadTextureName_);
         loadXMLFile_.Reset();
         loadXMLFile_.Reset();
         loadTextureName_.Clear();
         loadTextureName_.Clear();
         return false;
         return false;
@@ -187,7 +187,7 @@ bool SpriteSheet2D::BeginLoadFromXMLFile(Deserializer& source)
     loadXMLFile_ = new XMLFile(context_);
     loadXMLFile_ = new XMLFile(context_);
     if (!loadXMLFile_->Load(source))
     if (!loadXMLFile_->Load(source))
     {
     {
-        LOGERROR("Could not load sprite sheet");
+        URHO3D_LOGERROR("Could not load sprite sheet");
         loadXMLFile_.Reset();
         loadXMLFile_.Reset();
         return false;
         return false;
     }
     }
@@ -197,7 +197,7 @@ bool SpriteSheet2D::BeginLoadFromXMLFile(Deserializer& source)
     XMLElement rootElem = loadXMLFile_->GetRoot("TextureAtlas");
     XMLElement rootElem = loadXMLFile_->GetRoot("TextureAtlas");
     if (!rootElem)
     if (!rootElem)
     {
     {
-        LOGERROR("Invalid sprite sheet");
+        URHO3D_LOGERROR("Invalid sprite sheet");
         loadXMLFile_.Reset();
         loadXMLFile_.Reset();
         return false;
         return false;
     }
     }
@@ -216,7 +216,7 @@ bool SpriteSheet2D::EndLoadFromXMLFile()
     texture_ = cache->GetResource<Texture2D>(loadTextureName_);
     texture_ = cache->GetResource<Texture2D>(loadTextureName_);
     if (!texture_)
     if (!texture_)
     {
     {
-        LOGERROR("Could not load texture " + loadTextureName_);
+        URHO3D_LOGERROR("Could not load texture " + loadTextureName_);
         loadXMLFile_.Reset();
         loadXMLFile_.Reset();
         loadTextureName_.Clear();
         loadTextureName_.Clear();
         return false;
         return false;

+ 9 - 9
Source/Urho3D/Urho2D/TmxFile2D.cpp

@@ -97,13 +97,13 @@ bool TmxTileLayer2D::Load(const XMLElement& element, const TileMapInfo2D& info)
     XMLElement dataElem = element.GetChild("data");
     XMLElement dataElem = element.GetChild("data");
     if (!dataElem)
     if (!dataElem)
     {
     {
-        LOGERROR("Could not find data in layer");
+        URHO3D_LOGERROR("Could not find data in layer");
         return false;
         return false;
     }
     }
 
 
     if (dataElem.HasAttribute("encoding") && dataElem.GetAttribute("encoding") != "xml")
     if (dataElem.HasAttribute("encoding") && dataElem.GetAttribute("encoding") != "xml")
     {
     {
-        LOGERROR("Encoding not support now");
+        URHO3D_LOGERROR("Encoding not support now");
         return false;
         return false;
     }
     }
 
 
@@ -270,7 +270,7 @@ bool TmxImageLayer2D::Load(const XMLElement& element, const TileMapInfo2D& info)
     SharedPtr<Texture2D> texture(cache->GetResource<Texture2D>(textureFilePath));
     SharedPtr<Texture2D> texture(cache->GetResource<Texture2D>(textureFilePath));
     if (!texture)
     if (!texture)
     {
     {
-        LOGERROR("Could not load texture " + textureFilePath);
+        URHO3D_LOGERROR("Could not load texture " + textureFilePath);
         return false;
         return false;
     }
     }
 
 
@@ -315,7 +315,7 @@ bool TmxFile2D::BeginLoad(Deserializer& source)
     loadXMLFile_ = new XMLFile(context_);
     loadXMLFile_ = new XMLFile(context_);
     if (!loadXMLFile_->Load(source))
     if (!loadXMLFile_->Load(source))
     {
     {
-        LOGERROR("Load XML failed " + source.GetName());
+        URHO3D_LOGERROR("Load XML failed " + source.GetName());
         loadXMLFile_.Reset();
         loadXMLFile_.Reset();
         return false;
         return false;
     }
     }
@@ -323,7 +323,7 @@ bool TmxFile2D::BeginLoad(Deserializer& source)
     XMLElement rootElem = loadXMLFile_->GetRoot("map");
     XMLElement rootElem = loadXMLFile_->GetRoot("map");
     if (!rootElem)
     if (!rootElem)
     {
     {
-        LOGERROR("Invalid tmx file " + source.GetName());
+        URHO3D_LOGERROR("Invalid tmx file " + source.GetName());
         loadXMLFile_.Reset();
         loadXMLFile_.Reset();
         return false;
         return false;
     }
     }
@@ -374,7 +374,7 @@ bool TmxFile2D::EndLoad()
     String version = rootElem.GetAttribute("version");
     String version = rootElem.GetAttribute("version");
     if (version != "1.0")
     if (version != "1.0")
     {
     {
-        LOGERROR("Invalid version");
+        URHO3D_LOGERROR("Invalid version");
         return false;
         return false;
     }
     }
 
 
@@ -387,7 +387,7 @@ bool TmxFile2D::EndLoad()
         info_.orientation_ = O_STAGGERED;
         info_.orientation_ = O_STAGGERED;
     else
     else
     {
     {
-        LOGERROR("Unsupported orientation type " + orientation);
+        URHO3D_LOGERROR("Unsupported orientation type " + orientation);
         return false;
         return false;
     }
     }
 
 
@@ -475,7 +475,7 @@ SharedPtr<XMLFile> TmxFile2D::LoadTSXFile(const String& source)
     SharedPtr<XMLFile> tsxXMLFile(new XMLFile(context_));
     SharedPtr<XMLFile> tsxXMLFile(new XMLFile(context_));
     if (!tsxFile || !tsxXMLFile->Load(*tsxFile))
     if (!tsxFile || !tsxXMLFile->Load(*tsxFile))
     {
     {
-        LOGERROR("Load TSX file failed " + tsxFilePath);
+        URHO3D_LOGERROR("Load TSX file failed " + tsxFilePath);
         return SharedPtr<XMLFile>();
         return SharedPtr<XMLFile>();
     }
     }
 
 
@@ -514,7 +514,7 @@ bool TmxFile2D::LoadTileSet(const XMLElement& element)
     SharedPtr<Texture2D> texture(cache->GetResource<Texture2D>(textureFilePath));
     SharedPtr<Texture2D> texture(cache->GetResource<Texture2D>(textureFilePath));
     if (!texture)
     if (!texture)
     {
     {
-        LOGERROR("Could not load texture " + textureFilePath);
+        URHO3D_LOGERROR("Could not load texture " + textureFilePath);
         return false;
         return false;
     }
     }