Ver Fonte

Merge remote-tracking branch '1vanK/master'

Conflicts:
	Source/Urho3D/Engine/DebugHud.cpp
	Source/Urho3D/Engine/Engine.cpp
Lasse Öörni há 10 anos atrás
pai
commit
b616aa6272
100 ficheiros alterados com 246 adições e 246 exclusões
  1. 6 6
      Docs/Reference.dox
  2. 2 2
      Source/Samples/01_HelloWorld/HelloWorld.cpp
  3. 1 1
      Source/Samples/01_HelloWorld/HelloWorld.h
  4. 6 6
      Source/Samples/02_HelloGUI/HelloGUI.cpp
  5. 1 1
      Source/Samples/02_HelloGUI/HelloGUI.h
  6. 2 2
      Source/Samples/03_Sprites/Sprites.cpp
  7. 1 1
      Source/Samples/03_Sprites/Sprites.h
  8. 2 2
      Source/Samples/04_StaticScene/StaticScene.cpp
  9. 1 1
      Source/Samples/04_StaticScene/StaticScene.h
  10. 2 2
      Source/Samples/05_AnimatingScene/AnimatingScene.cpp
  11. 1 1
      Source/Samples/05_AnimatingScene/AnimatingScene.h
  12. 1 1
      Source/Samples/05_AnimatingScene/Rotator.h
  13. 1 1
      Source/Samples/06_SkeletalAnimation/Mover.h
  14. 3 3
      Source/Samples/06_SkeletalAnimation/SkeletalAnimation.cpp
  15. 1 1
      Source/Samples/06_SkeletalAnimation/SkeletalAnimation.h
  16. 3 3
      Source/Samples/07_Billboards/Billboards.cpp
  17. 1 1
      Source/Samples/07_Billboards/Billboards.h
  18. 3 3
      Source/Samples/08_Decals/Decals.cpp
  19. 1 1
      Source/Samples/08_Decals/Decals.h
  20. 3 3
      Source/Samples/09_MultipleViewports/MultipleViewports.cpp
  21. 1 1
      Source/Samples/09_MultipleViewports/MultipleViewports.h
  22. 2 2
      Source/Samples/10_RenderToTexture/RenderToTexture.cpp
  23. 1 1
      Source/Samples/10_RenderToTexture/RenderToTexture.h
  24. 1 1
      Source/Samples/10_RenderToTexture/Rotator.h
  25. 3 3
      Source/Samples/11_Physics/Physics.cpp
  26. 1 1
      Source/Samples/11_Physics/Physics.h
  27. 3 3
      Source/Samples/12_PhysicsStressTest/PhysicsStressTest.cpp
  28. 1 1
      Source/Samples/12_PhysicsStressTest/PhysicsStressTest.h
  29. 4 4
      Source/Samples/13_Ragdolls/CreateRagdoll.cpp
  30. 1 1
      Source/Samples/13_Ragdolls/CreateRagdoll.h
  31. 3 3
      Source/Samples/13_Ragdolls/Ragdolls.cpp
  32. 1 1
      Source/Samples/13_Ragdolls/Ragdolls.h
  33. 6 6
      Source/Samples/14_SoundEffects/SoundEffects.cpp
  34. 1 1
      Source/Samples/14_SoundEffects/SoundEffects.h
  35. 3 3
      Source/Samples/15_Navigation/Navigation.cpp
  36. 1 1
      Source/Samples/15_Navigation/Navigation.h
  37. 11 11
      Source/Samples/16_Chat/Chat.cpp
  38. 1 1
      Source/Samples/16_Chat/Chat.h
  39. 12 12
      Source/Samples/17_SceneReplication/SceneReplication.cpp
  40. 1 1
      Source/Samples/17_SceneReplication/SceneReplication.h
  41. 6 6
      Source/Samples/18_CharacterDemo/Character.cpp
  42. 1 1
      Source/Samples/18_CharacterDemo/Character.h
  43. 3 3
      Source/Samples/18_CharacterDemo/CharacterDemo.cpp
  44. 1 1
      Source/Samples/18_CharacterDemo/CharacterDemo.h
  45. 1 1
      Source/Samples/18_CharacterDemo/Touch.h
  46. 7 7
      Source/Samples/19_VehicleDemo/Vehicle.cpp
  47. 1 1
      Source/Samples/19_VehicleDemo/Vehicle.h
  48. 3 3
      Source/Samples/19_VehicleDemo/VehicleDemo.cpp
  49. 1 1
      Source/Samples/19_VehicleDemo/VehicleDemo.h
  50. 3 3
      Source/Samples/20_HugeObjectCount/HugeObjectCount.cpp
  51. 1 1
      Source/Samples/20_HugeObjectCount/HugeObjectCount.h
  52. 2 2
      Source/Samples/21_AngelScriptIntegration/AngelScriptIntegration.cpp
  53. 1 1
      Source/Samples/21_AngelScriptIntegration/AngelScriptIntegration.h
  54. 2 2
      Source/Samples/22_LuaIntegration/LuaIntegration.cpp
  55. 1 1
      Source/Samples/22_LuaIntegration/LuaIntegration.h
  56. 2 2
      Source/Samples/23_Water/Water.cpp
  57. 1 1
      Source/Samples/23_Water/Water.h
  58. 2 2
      Source/Samples/24_Urho2DSprite/Urho2DSprite.cpp
  59. 1 1
      Source/Samples/24_Urho2DSprite/Urho2DSprite.h
  60. 3 3
      Source/Samples/25_Urho2DParticle/Urho2DParticle.cpp
  61. 1 1
      Source/Samples/25_Urho2DParticle/Urho2DParticle.h
  62. 5 5
      Source/Samples/26_ConsoleInput/ConsoleInput.cpp
  63. 1 1
      Source/Samples/26_ConsoleInput/ConsoleInput.h
  64. 2 2
      Source/Samples/27_Urho2DPhysics/Urho2DPhysics.cpp
  65. 1 1
      Source/Samples/27_Urho2DPhysics/Urho2DPhysics.h
  66. 2 2
      Source/Samples/28_Urho2DPhysicsRope/Urho2DPhysicsRope.cpp
  67. 1 1
      Source/Samples/28_Urho2DPhysicsRope/Urho2DPhysicsRope.h
  68. 2 2
      Source/Samples/29_SoundSynthesis/SoundSynthesis.cpp
  69. 1 1
      Source/Samples/29_SoundSynthesis/SoundSynthesis.h
  70. 2 2
      Source/Samples/30_LightAnimation/LightAnimation.cpp
  71. 1 1
      Source/Samples/30_LightAnimation/LightAnimation.h
  72. 2 2
      Source/Samples/31_MaterialAnimation/MaterialAnimation.cpp
  73. 1 1
      Source/Samples/31_MaterialAnimation/MaterialAnimation.h
  74. 9 9
      Source/Samples/32_Urho2DConstraints/Urho2DConstraints.cpp
  75. 1 1
      Source/Samples/32_Urho2DConstraints/Urho2DConstraints.h
  76. 3 3
      Source/Samples/33_Urho2DSpriterAnimation/Urho2DSpriterAnimation.cpp
  77. 1 1
      Source/Samples/33_Urho2DSpriterAnimation/Urho2DSpriterAnimation.h
  78. 5 5
      Source/Samples/34_DynamicGeometry/DynamicGeometry.cpp
  79. 1 1
      Source/Samples/34_DynamicGeometry/DynamicGeometry.h
  80. 2 2
      Source/Samples/35_SignedDistanceFieldText/SignedDistanceFieldText.cpp
  81. 1 1
      Source/Samples/35_SignedDistanceFieldText/SignedDistanceFieldText.h
  82. 2 2
      Source/Samples/36_Urho2DTileMap/Urho2DTileMap.cpp
  83. 1 1
      Source/Samples/36_Urho2DTileMap/Urho2DTileMap.h
  84. 6 6
      Source/Samples/37_UIDrag/UIDrag.cpp
  85. 1 1
      Source/Samples/37_UIDrag/UIDrag.h
  86. 4 4
      Source/Samples/38_SceneAndUILoad/SceneAndUILoad.cpp
  87. 1 1
      Source/Samples/38_SceneAndUILoad/SceneAndUILoad.h
  88. 6 6
      Source/Samples/39_CrowdNavigation/CrowdNavigation.cpp
  89. 1 1
      Source/Samples/39_CrowdNavigation/CrowdNavigation.h
  90. 5 5
      Source/Samples/40_Localization/L10n.cpp
  91. 1 1
      Source/Samples/40_Localization/L10n.h
  92. 6 6
      Source/Samples/41_DatabaseDemo/DatabaseDemo.cpp
  93. 1 1
      Source/Samples/41_DatabaseDemo/DatabaseDemo.h
  94. 1 1
      Source/Samples/Sample.h
  95. 3 3
      Source/Samples/Sample.inl
  96. 6 6
      Source/Tools/SpritePacker/SpritePacker.cpp
  97. 4 4
      Source/Tools/Urho3DPlayer/Urho3DPlayer.cpp
  98. 1 1
      Source/Tools/Urho3DPlayer/Urho3DPlayer.h
  99. 7 7
      Source/Urho3D/AngelScript/Script.cpp
  100. 1 1
      Source/Urho3D/AngelScript/Script.h

+ 6 - 6
Docs/Reference.dox

@@ -27,7 +27,7 @@ Classes that derive from Object contain type-identification, they can be created
 
 
 %Object factory registration and object creation through factories are directly accessible only in C++, not in script.
 %Object factory registration and object creation through factories are directly accessible only in C++, not in script.
 
 
-The definition of an Object subclass must contain the OBJECT(className) macro. Type identification is available both as text (GetTypeName() or GetTypeNameStatic()) and as a 32-bit hash of the type name (GetType() or GetTypeStatic()).
+The definition of an Object subclass must contain the URHO3D_OBJECT(className, baseTypeName) macro. Type identification is available both as text (GetTypeName() or GetTypeNameStatic()) and as a 32-bit hash of the type name (GetType() or GetTypeStatic()).
 
 
 To register an object factory for a specific type, call the \ref Context::RegisterFactory "RegisterFactory()" template function on Context. You can get its pointer from any Object either via the \ref Object::context_ "context_" member variable, or by calling \ref Object::GetContext "GetContext()". An example:
 To register an object factory for a specific type, call the \ref Context::RegisterFactory "RegisterFactory()" template function on Context. You can get its pointer from any Object either via the \ref Object::context_ "context_" member variable, or by calling \ref Object::GetContext "GetContext()". An example:
 
 
@@ -79,10 +79,10 @@ The Urho3D event system allows for data transport and function invocation withou
 
 
 Events themselves do not need to be registered. They are identified by 32-bit hashes of their names. Event parameters (the data payload) are optional and are contained inside a VariantMap, identified by 32-bit parameter name hashes. For the inbuilt Urho3D events, event type (E_UPDATE, E_KEYDOWN, E_MOUSEMOVE etc.) and parameter hashes (P_TIMESTEP, P_DX, P_DY etc.) are defined as constants inside include files such as CoreEvents.h or InputEvents.h.
 Events themselves do not need to be registered. They are identified by 32-bit hashes of their names. Event parameters (the data payload) are optional and are contained inside a VariantMap, identified by 32-bit parameter name hashes. For the inbuilt Urho3D events, event type (E_UPDATE, E_KEYDOWN, E_MOUSEMOVE etc.) and parameter hashes (P_TIMESTEP, P_DX, P_DY etc.) are defined as constants inside include files such as CoreEvents.h or InputEvents.h.
 
 
-When subscribing to an event, a handler function must be specified. In C++ these must have the signature void HandleEvent(StringHash eventType, VariantMap& eventData). The HANDLER(className, function) macro helps in defining the required class-specific function pointers. For example:
+When subscribing to an event, a handler function must be specified. In C++ these must have the signature void HandleEvent(StringHash eventType, VariantMap& eventData). The URHO3D_HANDLER(className, function) macro helps in defining the required class-specific function pointers. For example:
 
 
 \code
 \code
-SubscribeToEvent(E_UPDATE, HANDLER(MyClass, MyEventHandler));
+SubscribeToEvent(E_UPDATE, URHO3D_HANDLER(MyClass, MyEventHandler));
 \endcode
 \endcode
 
 
 In script events are identified by their string names instead of name hashes (though these are internally converted to hashes.) %Script event handlers can either have the same signature as in C++, or a simplified signature void HandleEvent() when event type and parameters are not required. The same event subscription would look like:
 In script events are identified by their string names instead of name hashes (though these are internally converted to hashes.) %Script event handlers can either have the same signature as in C++, or a simplified signature void HandleEvent() when event type and parameters are not required. The same event subscription would look like:
@@ -231,7 +231,7 @@ public:
     virtual void Start()
     virtual void Start()
     {
     {
         // Called after engine initialization. Setup application & subscribe to events here
         // Called after engine initialization. Setup application & subscribe to events here
-        SubscribeToEvent(E_KEYDOWN, HANDLER(MyApp, HandleKeyDown));
+        SubscribeToEvent(E_KEYDOWN, URHO3D_HANDLER(MyApp, HandleKeyDown));
     }
     }
 
 
     virtual void Stop()
     virtual void Stop()
@@ -250,7 +250,7 @@ public:
     }
     }
 };
 };
 
 
-DEFINE_APPLICATION_MAIN(MyApp)
+URHO3D_DEFINE_APPLICATION_MAIN(MyApp)
 \endcode
 \endcode
 
 
 \page SceneModel Scene model
 \page SceneModel Scene model
@@ -448,7 +448,7 @@ l10n->SetLanguage("language 2");
 When the language is changed, the E_CHANGELANGUAGE event will be sent. Subscribe to it to perform the necessary relocalization of your user interface (texts, sprites etc.)
 When the language is changed, the E_CHANGELANGUAGE event will be sent. Subscribe to it to perform the necessary relocalization of your user interface (texts, sprites etc.)
 
 
 \code
 \code
-SubscribeToEvent(E_CHANGELANGUAGE, HANDLER(Game, HandleChangeLanguage));
+SubscribeToEvent(E_CHANGELANGUAGE, URHO3D_HANDLER(Game, HandleChangeLanguage));
 
 
 void Game::HandleChangeLanguage(StringHash eventType, VariantMap& eventData)
 void Game::HandleChangeLanguage(StringHash eventType, VariantMap& eventData)
 {
 {

+ 2 - 2
Source/Samples/01_HelloWorld/HelloWorld.cpp

@@ -32,7 +32,7 @@
 #include <Urho3D/DebugNew.h>
 #include <Urho3D/DebugNew.h>
 
 
 // Expands to this example's entry-point
 // Expands to this example's entry-point
-DEFINE_APPLICATION_MAIN(HelloWorld)
+URHO3D_DEFINE_APPLICATION_MAIN(HelloWorld)
 
 
 HelloWorld::HelloWorld(Context* context) :
 HelloWorld::HelloWorld(Context* context) :
     Sample(context)
     Sample(context)
@@ -78,7 +78,7 @@ void HelloWorld::CreateText()
 void HelloWorld::SubscribeToEvents()
 void HelloWorld::SubscribeToEvents()
 {
 {
     // Subscribe HandleUpdate() function for processing update events
     // Subscribe HandleUpdate() function for processing update events
-    SubscribeToEvent(E_UPDATE, HANDLER(HelloWorld, HandleUpdate));
+    SubscribeToEvent(E_UPDATE, URHO3D_HANDLER(HelloWorld, HandleUpdate));
 }
 }
 
 
 void HelloWorld::HandleUpdate(StringHash eventType, VariantMap& eventData)
 void HelloWorld::HandleUpdate(StringHash eventType, VariantMap& eventData)

+ 1 - 1
Source/Samples/01_HelloWorld/HelloWorld.h

@@ -31,7 +31,7 @@
 ///     - Subscribing to and handling of update events
 ///     - Subscribing to and handling of update events
 class HelloWorld : public Sample
 class HelloWorld : public Sample
 {
 {
-    OBJECT(HelloWorld, Sample);
+    URHO3D_OBJECT(HelloWorld, Sample);
 
 
 public:
 public:
     /// Construct.
     /// Construct.

+ 6 - 6
Source/Samples/02_HelloGUI/HelloGUI.cpp

@@ -39,7 +39,7 @@
 
 
 #include <Urho3D/DebugNew.h>
 #include <Urho3D/DebugNew.h>
 
 
-DEFINE_APPLICATION_MAIN(HelloGUI)
+URHO3D_DEFINE_APPLICATION_MAIN(HelloGUI)
 
 
 HelloGUI::HelloGUI(Context* context) :
 HelloGUI::HelloGUI(Context* context) :
     Sample(context),
     Sample(context),
@@ -140,10 +140,10 @@ void HelloGUI::InitWindow()
     buttonClose->SetStyle("CloseButton");
     buttonClose->SetStyle("CloseButton");
 
 
     // Subscribe to buttonClose release (following a 'press') events
     // Subscribe to buttonClose release (following a 'press') events
-    SubscribeToEvent(buttonClose, E_RELEASED, HANDLER(HelloGUI, HandleClosePressed));
+    SubscribeToEvent(buttonClose, E_RELEASED, URHO3D_HANDLER(HelloGUI, HandleClosePressed));
 
 
     // Subscribe also to all UI mouse clicks just to see where we have clicked
     // Subscribe also to all UI mouse clicks just to see where we have clicked
-    SubscribeToEvent(E_UIMOUSECLICK, HANDLER(HelloGUI, HandleControlClicked));
+    SubscribeToEvent(E_UIMOUSECLICK, URHO3D_HANDLER(HelloGUI, HandleControlClicked));
 }
 }
 
 
 void HelloGUI::CreateDraggableFish()
 void HelloGUI::CreateDraggableFish()
@@ -174,9 +174,9 @@ void HelloGUI::CreateDraggableFish()
 
 
     // Subscribe draggableFish to Drag Events (in order to make it draggable)
     // Subscribe draggableFish to Drag Events (in order to make it draggable)
     // See "Event list" in documentation's Main Page for reference on available Events and their eventData
     // See "Event list" in documentation's Main Page for reference on available Events and their eventData
-    SubscribeToEvent(draggableFish, E_DRAGBEGIN, HANDLER(HelloGUI, HandleDragBegin));
-    SubscribeToEvent(draggableFish, E_DRAGMOVE, HANDLER(HelloGUI, HandleDragMove));
-    SubscribeToEvent(draggableFish, E_DRAGEND, HANDLER(HelloGUI, HandleDragEnd));
+    SubscribeToEvent(draggableFish, E_DRAGBEGIN, URHO3D_HANDLER(HelloGUI, HandleDragBegin));
+    SubscribeToEvent(draggableFish, E_DRAGMOVE, URHO3D_HANDLER(HelloGUI, HandleDragMove));
+    SubscribeToEvent(draggableFish, E_DRAGEND, URHO3D_HANDLER(HelloGUI, HandleDragEnd));
 }
 }
 
 
 void HelloGUI::HandleDragBegin(StringHash eventType, VariantMap& eventData)
 void HelloGUI::HandleDragBegin(StringHash eventType, VariantMap& eventData)

+ 1 - 1
Source/Samples/02_HelloGUI/HelloGUI.h

@@ -42,7 +42,7 @@ class Window;
 ///     - Accessing available Events data (eventData)
 ///     - Accessing available Events data (eventData)
 class HelloGUI : public Sample
 class HelloGUI : public Sample
 {
 {
-    OBJECT(HelloGUI, Sample);
+    URHO3D_OBJECT(HelloGUI, Sample);
 
 
 public:
 public:
     /// Construct.
     /// Construct.

+ 2 - 2
Source/Samples/03_Sprites/Sprites.cpp

@@ -37,7 +37,7 @@ static const unsigned NUM_SPRITES = 100;
 // Custom variable identifier for storing sprite velocity within the UI element
 // Custom variable identifier for storing sprite velocity within the UI element
 static const StringHash VAR_VELOCITY("Velocity");
 static const StringHash VAR_VELOCITY("Velocity");
 
 
-DEFINE_APPLICATION_MAIN(Sprites)
+URHO3D_DEFINE_APPLICATION_MAIN(Sprites)
 
 
 Sprites::Sprites(Context* context) :
 Sprites::Sprites(Context* context) :
     Sample(context)
     Sample(context)
@@ -133,7 +133,7 @@ void Sprites::MoveSprites(float timeStep)
 void Sprites::SubscribeToEvents()
 void Sprites::SubscribeToEvents()
 {
 {
     // Subscribe HandleUpdate() function for processing update events
     // Subscribe HandleUpdate() function for processing update events
-    SubscribeToEvent(E_UPDATE, HANDLER(Sprites, HandleUpdate));
+    SubscribeToEvent(E_UPDATE, URHO3D_HANDLER(Sprites, HandleUpdate));
 }
 }
 
 
 void Sprites::HandleUpdate(StringHash eventType, VariantMap& eventData)
 void Sprites::HandleUpdate(StringHash eventType, VariantMap& eventData)

+ 1 - 1
Source/Samples/03_Sprites/Sprites.h

@@ -32,7 +32,7 @@
 class Sprites : public Sample
 class Sprites : public Sample
 {
 {
     // Enable type information.
     // Enable type information.
-    OBJECT(Sprites, Sample);
+    URHO3D_OBJECT(Sprites, Sample);
 
 
 public:
 public:
     /// Construct.
     /// Construct.

+ 2 - 2
Source/Samples/04_StaticScene/StaticScene.cpp

@@ -40,7 +40,7 @@
 
 
 #include <Urho3D/DebugNew.h>
 #include <Urho3D/DebugNew.h>
 
 
-DEFINE_APPLICATION_MAIN(StaticScene)
+URHO3D_DEFINE_APPLICATION_MAIN(StaticScene)
 
 
 StaticScene::StaticScene(Context* context) :
 StaticScene::StaticScene(Context* context) :
     Sample(context)
     Sample(context)
@@ -185,7 +185,7 @@ void StaticScene::MoveCamera(float timeStep)
 void StaticScene::SubscribeToEvents()
 void StaticScene::SubscribeToEvents()
 {
 {
     // Subscribe HandleUpdate() function for processing update events
     // Subscribe HandleUpdate() function for processing update events
-    SubscribeToEvent(E_UPDATE, HANDLER(StaticScene, HandleUpdate));
+    SubscribeToEvent(E_UPDATE, URHO3D_HANDLER(StaticScene, HandleUpdate));
 }
 }
 
 
 void StaticScene::HandleUpdate(StringHash eventType, VariantMap& eventData)
 void StaticScene::HandleUpdate(StringHash eventType, VariantMap& eventData)

+ 1 - 1
Source/Samples/04_StaticScene/StaticScene.h

@@ -39,7 +39,7 @@ class Scene;
 ///     - Handling keyboard and mouse input to move a freelook camera
 ///     - Handling keyboard and mouse input to move a freelook camera
 class StaticScene : public Sample
 class StaticScene : public Sample
 {
 {
-    OBJECT(StaticScene, Sample);
+    URHO3D_OBJECT(StaticScene, Sample);
 
 
 public:
 public:
     /// Construct.
     /// Construct.

+ 2 - 2
Source/Samples/05_AnimatingScene/AnimatingScene.cpp

@@ -42,7 +42,7 @@
 
 
 #include <Urho3D/DebugNew.h>
 #include <Urho3D/DebugNew.h>
 
 
-DEFINE_APPLICATION_MAIN(AnimatingScene)
+URHO3D_DEFINE_APPLICATION_MAIN(AnimatingScene)
 
 
 AnimatingScene::AnimatingScene(Context* context) :
 AnimatingScene::AnimatingScene(Context* context) :
     Sample(context)
     Sample(context)
@@ -152,7 +152,7 @@ void AnimatingScene::SetupViewport()
 void AnimatingScene::SubscribeToEvents()
 void AnimatingScene::SubscribeToEvents()
 {
 {
     // Subscribe HandleUpdate() function for processing update events
     // Subscribe HandleUpdate() function for processing update events
-    SubscribeToEvent(E_UPDATE, HANDLER(AnimatingScene, HandleUpdate));
+    SubscribeToEvent(E_UPDATE, URHO3D_HANDLER(AnimatingScene, HandleUpdate));
 }
 }
 
 
 void AnimatingScene::MoveCamera(float timeStep)
 void AnimatingScene::MoveCamera(float timeStep)

+ 1 - 1
Source/Samples/05_AnimatingScene/AnimatingScene.h

@@ -39,7 +39,7 @@ class Scene;
 ///     - Attaching a light to an object (the camera)
 ///     - Attaching a light to an object (the camera)
 class AnimatingScene : public Sample
 class AnimatingScene : public Sample
 {
 {
-    OBJECT(AnimatingScene, Sample);
+    URHO3D_OBJECT(AnimatingScene, Sample);
 
 
 public:
 public:
     /// Construct.
     /// Construct.

+ 1 - 1
Source/Samples/05_AnimatingScene/Rotator.h

@@ -30,7 +30,7 @@ using namespace Urho3D;
 /// Custom logic component for rotating a scene node.
 /// Custom logic component for rotating a scene node.
 class Rotator : public LogicComponent
 class Rotator : public LogicComponent
 {
 {
-    OBJECT(Rotator, LogicComponent);
+    URHO3D_OBJECT(Rotator, LogicComponent);
     
     
 public:
 public:
     /// Construct.
     /// Construct.

+ 1 - 1
Source/Samples/06_SkeletalAnimation/Mover.h

@@ -29,7 +29,7 @@ using namespace Urho3D;
 /// Custom logic component for moving the animated model and rotating at area edges.
 /// Custom logic component for moving the animated model and rotating at area edges.
 class Mover : public LogicComponent
 class Mover : public LogicComponent
 {
 {
-    OBJECT(Mover, LogicComponent);
+    URHO3D_OBJECT(Mover, LogicComponent);
     
     
 public:
 public:
     /// Construct.
     /// Construct.

+ 3 - 3
Source/Samples/06_SkeletalAnimation/SkeletalAnimation.cpp

@@ -45,7 +45,7 @@
 
 
 #include <Urho3D/DebugNew.h>
 #include <Urho3D/DebugNew.h>
 
 
-DEFINE_APPLICATION_MAIN(SkeletalAnimation)
+URHO3D_DEFINE_APPLICATION_MAIN(SkeletalAnimation)
 
 
 SkeletalAnimation::SkeletalAnimation(Context* context) :
 SkeletalAnimation::SkeletalAnimation(Context* context) :
     Sample(context),
     Sample(context),
@@ -187,12 +187,12 @@ void SkeletalAnimation::SetupViewport()
 void SkeletalAnimation::SubscribeToEvents()
 void SkeletalAnimation::SubscribeToEvents()
 {
 {
     // Subscribe HandleUpdate() function for processing update events
     // Subscribe HandleUpdate() function for processing update events
-    SubscribeToEvent(E_UPDATE, HANDLER(SkeletalAnimation, HandleUpdate));
+    SubscribeToEvent(E_UPDATE, URHO3D_HANDLER(SkeletalAnimation, HandleUpdate));
 
 
     // Subscribe HandlePostRenderUpdate() function for processing the post-render update event, sent after Renderer subsystem is
     // Subscribe HandlePostRenderUpdate() function for processing the post-render update event, sent after Renderer subsystem is
     // done with defining the draw calls for the viewports (but before actually executing them.) We will request debug geometry
     // done with defining the draw calls for the viewports (but before actually executing them.) We will request debug geometry
     // rendering during that event
     // rendering during that event
-    SubscribeToEvent(E_POSTRENDERUPDATE, HANDLER(SkeletalAnimation, HandlePostRenderUpdate));
+    SubscribeToEvent(E_POSTRENDERUPDATE, URHO3D_HANDLER(SkeletalAnimation, HandlePostRenderUpdate));
 }
 }
 
 
 void SkeletalAnimation::MoveCamera(float timeStep)
 void SkeletalAnimation::MoveCamera(float timeStep)

+ 1 - 1
Source/Samples/06_SkeletalAnimation/SkeletalAnimation.h

@@ -41,7 +41,7 @@ class Scene;
 ///     - Displaying renderer debug geometry
 ///     - Displaying renderer debug geometry
 class SkeletalAnimation : public Sample
 class SkeletalAnimation : public Sample
 {
 {
-    OBJECT(SkeletalAnimation, Sample);
+    URHO3D_OBJECT(SkeletalAnimation, Sample);
 
 
 public:
 public:
     /// Construct.
     /// Construct.

+ 3 - 3
Source/Samples/07_Billboards/Billboards.cpp

@@ -44,7 +44,7 @@
 
 
 #include <Urho3D/DebugNew.h>
 #include <Urho3D/DebugNew.h>
 
 
-DEFINE_APPLICATION_MAIN(Billboards)
+URHO3D_DEFINE_APPLICATION_MAIN(Billboards)
 
 
 Billboards::Billboards(Context* context) :
 Billboards::Billboards(Context* context) :
     Sample(context),
     Sample(context),
@@ -239,11 +239,11 @@ void Billboards::SetupViewport()
 void Billboards::SubscribeToEvents()
 void Billboards::SubscribeToEvents()
 {
 {
     // Subscribe HandleUpdate() function for processing update events
     // Subscribe HandleUpdate() function for processing update events
-    SubscribeToEvent(E_UPDATE, HANDLER(Billboards, HandleUpdate));
+    SubscribeToEvent(E_UPDATE, URHO3D_HANDLER(Billboards, HandleUpdate));
 
 
     // Subscribe HandlePostRenderUpdate() function for processing the post-render update event, during which we request
     // Subscribe HandlePostRenderUpdate() function for processing the post-render update event, during which we request
     // debug geometry
     // debug geometry
-    SubscribeToEvent(E_POSTRENDERUPDATE, HANDLER(Billboards, HandlePostRenderUpdate));
+    SubscribeToEvent(E_POSTRENDERUPDATE, URHO3D_HANDLER(Billboards, HandlePostRenderUpdate));
 }
 }
 
 
 void Billboards::MoveCamera(float timeStep)
 void Billboards::MoveCamera(float timeStep)

+ 1 - 1
Source/Samples/07_Billboards/Billboards.h

@@ -39,7 +39,7 @@ class Scene;
 ///     - Examining rendering performance with a somewhat large object and light count
 ///     - Examining rendering performance with a somewhat large object and light count
 class Billboards : public Sample
 class Billboards : public Sample
 {
 {
-    OBJECT(Billboards, Sample);
+    URHO3D_OBJECT(Billboards, Sample);
 
 
 public:
 public:
     /// Construct.
     /// Construct.

+ 3 - 3
Source/Samples/08_Decals/Decals.cpp

@@ -44,7 +44,7 @@
 
 
 #include <Urho3D/DebugNew.h>
 #include <Urho3D/DebugNew.h>
 
 
-DEFINE_APPLICATION_MAIN(Decals)
+URHO3D_DEFINE_APPLICATION_MAIN(Decals)
 
 
 Decals::Decals(Context* context) :
 Decals::Decals(Context* context) :
     Sample(context),
     Sample(context),
@@ -192,11 +192,11 @@ void Decals::SetupViewport()
 void Decals::SubscribeToEvents()
 void Decals::SubscribeToEvents()
 {
 {
     // Subscribe HandleUpdate() function for processing update events
     // Subscribe HandleUpdate() function for processing update events
-    SubscribeToEvent(E_UPDATE, HANDLER(Decals, HandleUpdate));
+    SubscribeToEvent(E_UPDATE, URHO3D_HANDLER(Decals, HandleUpdate));
 
 
     // Subscribe HandlePostRenderUpdate() function for processing the post-render update event, during which we request
     // Subscribe HandlePostRenderUpdate() function for processing the post-render update event, during which we request
     // debug geometry
     // debug geometry
-    SubscribeToEvent(E_POSTRENDERUPDATE, HANDLER(Decals, HandlePostRenderUpdate));
+    SubscribeToEvent(E_POSTRENDERUPDATE, URHO3D_HANDLER(Decals, HandlePostRenderUpdate));
 }
 }
 
 
 void Decals::MoveCamera(float timeStep)
 void Decals::MoveCamera(float timeStep)

+ 1 - 1
Source/Samples/08_Decals/Decals.h

@@ -41,7 +41,7 @@ class Scene;
 ///     - Displaying renderer debug geometry to see the effect of occlusion
 ///     - Displaying renderer debug geometry to see the effect of occlusion
 class Decals : public Sample
 class Decals : public Sample
 {
 {
-    OBJECT(Decals, Sample);
+    URHO3D_OBJECT(Decals, Sample);
 
 
 public:
 public:
     /// Construct.
     /// Construct.

+ 3 - 3
Source/Samples/09_MultipleViewports/MultipleViewports.cpp

@@ -44,7 +44,7 @@
 
 
 #include <Urho3D/DebugNew.h>
 #include <Urho3D/DebugNew.h>
 
 
-DEFINE_APPLICATION_MAIN(MultipleViewports)
+URHO3D_DEFINE_APPLICATION_MAIN(MultipleViewports)
 
 
 MultipleViewports::MultipleViewports(Context* context) :
 MultipleViewports::MultipleViewports(Context* context) :
     Sample(context),
     Sample(context),
@@ -214,11 +214,11 @@ void MultipleViewports::SetupViewports()
 void MultipleViewports::SubscribeToEvents()
 void MultipleViewports::SubscribeToEvents()
 {
 {
     // Subscribe HandleUpdate() method for processing update events
     // Subscribe HandleUpdate() method for processing update events
-    SubscribeToEvent(E_UPDATE, HANDLER(MultipleViewports, HandleUpdate));
+    SubscribeToEvent(E_UPDATE, URHO3D_HANDLER(MultipleViewports, HandleUpdate));
 
 
     // Subscribe HandlePostRenderUpdate() method for processing the post-render update event, during which we request
     // Subscribe HandlePostRenderUpdate() method for processing the post-render update event, during which we request
     // debug geometry
     // debug geometry
-    SubscribeToEvent(E_POSTRENDERUPDATE, HANDLER(MultipleViewports, HandlePostRenderUpdate));
+    SubscribeToEvent(E_POSTRENDERUPDATE, URHO3D_HANDLER(MultipleViewports, HandlePostRenderUpdate));
 }
 }
 
 
 void MultipleViewports::MoveCamera(float timeStep)
 void MultipleViewports::MoveCamera(float timeStep)

+ 1 - 1
Source/Samples/09_MultipleViewports/MultipleViewports.h

@@ -38,7 +38,7 @@ class Scene;
 ///     - Adding post processing effects to a viewport's render path and toggling them
 ///     - Adding post processing effects to a viewport's render path and toggling them
 class MultipleViewports : public Sample
 class MultipleViewports : public Sample
 {
 {
-    OBJECT(MultipleViewports, Sample);
+    URHO3D_OBJECT(MultipleViewports, Sample);
 
 
 public:
 public:
     /// Construct.
     /// Construct.

+ 2 - 2
Source/Samples/10_RenderToTexture/RenderToTexture.cpp

@@ -45,7 +45,7 @@
 
 
 #include <Urho3D/DebugNew.h>
 #include <Urho3D/DebugNew.h>
 
 
-DEFINE_APPLICATION_MAIN(RenderToTexture)
+URHO3D_DEFINE_APPLICATION_MAIN(RenderToTexture)
 
 
 RenderToTexture::RenderToTexture(Context* context) :
 RenderToTexture::RenderToTexture(Context* context) :
     Sample(context)
     Sample(context)
@@ -268,7 +268,7 @@ void RenderToTexture::MoveCamera(float timeStep)
 void RenderToTexture::SubscribeToEvents()
 void RenderToTexture::SubscribeToEvents()
 {
 {
     // Subscribe HandleUpdate() function for processing update events
     // Subscribe HandleUpdate() function for processing update events
-    SubscribeToEvent(E_UPDATE, HANDLER(RenderToTexture, HandleUpdate));
+    SubscribeToEvent(E_UPDATE, URHO3D_HANDLER(RenderToTexture, HandleUpdate));
 }
 }
 
 
 void RenderToTexture::HandleUpdate(StringHash eventType, VariantMap& eventData)
 void RenderToTexture::HandleUpdate(StringHash eventType, VariantMap& eventData)

+ 1 - 1
Source/Samples/10_RenderToTexture/RenderToTexture.h

@@ -38,7 +38,7 @@ class Scene;
 ///     - Creating rendertarget texture and material programmatically
 ///     - Creating rendertarget texture and material programmatically
 class RenderToTexture : public Sample
 class RenderToTexture : public Sample
 {
 {
-    OBJECT(RenderToTexture, Sample);
+    URHO3D_OBJECT(RenderToTexture, Sample);
 
 
 public:
 public:
     /// Construct.
     /// Construct.

+ 1 - 1
Source/Samples/10_RenderToTexture/Rotator.h

@@ -30,7 +30,7 @@ using namespace Urho3D;
 /// Custom logic component for rotating a scene node.
 /// Custom logic component for rotating a scene node.
 class Rotator : public LogicComponent
 class Rotator : public LogicComponent
 {
 {
-    OBJECT(Rotator, LogicComponent);
+    URHO3D_OBJECT(Rotator, LogicComponent);
     
     
 public:
 public:
     /// Construct.
     /// Construct.

+ 3 - 3
Source/Samples/11_Physics/Physics.cpp

@@ -48,7 +48,7 @@
 
 
 #include <Urho3D/DebugNew.h>
 #include <Urho3D/DebugNew.h>
 
 
-DEFINE_APPLICATION_MAIN(Physics)
+URHO3D_DEFINE_APPLICATION_MAIN(Physics)
 
 
 Physics::Physics(Context* context) :
 Physics::Physics(Context* context) :
     Sample(context),
     Sample(context),
@@ -205,11 +205,11 @@ void Physics::SetupViewport()
 void Physics::SubscribeToEvents()
 void Physics::SubscribeToEvents()
 {
 {
     // Subscribe HandleUpdate() function for processing update events
     // Subscribe HandleUpdate() function for processing update events
-    SubscribeToEvent(E_UPDATE, HANDLER(Physics, HandleUpdate));
+    SubscribeToEvent(E_UPDATE, URHO3D_HANDLER(Physics, HandleUpdate));
 
 
     // Subscribe HandlePostRenderUpdate() function for processing the post-render update event, during which we request
     // Subscribe HandlePostRenderUpdate() function for processing the post-render update event, during which we request
     // debug geometry
     // debug geometry
-    SubscribeToEvent(E_POSTRENDERUPDATE, HANDLER(Physics, HandlePostRenderUpdate));
+    SubscribeToEvent(E_POSTRENDERUPDATE, URHO3D_HANDLER(Physics, HandlePostRenderUpdate));
 }
 }
 
 
 void Physics::MoveCamera(float timeStep)
 void Physics::MoveCamera(float timeStep)

+ 1 - 1
Source/Samples/11_Physics/Physics.h

@@ -40,7 +40,7 @@ class Scene;
 ///     - Saving a scene to a file and loading it to restore a previous state
 ///     - Saving a scene to a file and loading it to restore a previous state
 class Physics : public Sample
 class Physics : public Sample
 {
 {
-    OBJECT(Physics, Sample);
+    URHO3D_OBJECT(Physics, Sample);
 
 
 public:
 public:
     /// Construct.
     /// Construct.

+ 3 - 3
Source/Samples/12_PhysicsStressTest/PhysicsStressTest.cpp

@@ -48,7 +48,7 @@
 
 
 #include <Urho3D/DebugNew.h>
 #include <Urho3D/DebugNew.h>
 
 
-DEFINE_APPLICATION_MAIN(PhysicsStressTest)
+URHO3D_DEFINE_APPLICATION_MAIN(PhysicsStressTest)
 
 
 PhysicsStressTest::PhysicsStressTest(Context* context) :
 PhysicsStressTest::PhysicsStressTest(Context* context) :
     Sample(context),
     Sample(context),
@@ -211,11 +211,11 @@ void PhysicsStressTest::SetupViewport()
 void PhysicsStressTest::SubscribeToEvents()
 void PhysicsStressTest::SubscribeToEvents()
 {
 {
     // Subscribe HandleUpdate() function for processing update events
     // Subscribe HandleUpdate() function for processing update events
-    SubscribeToEvent(E_UPDATE, HANDLER(PhysicsStressTest, HandleUpdate));
+    SubscribeToEvent(E_UPDATE, URHO3D_HANDLER(PhysicsStressTest, HandleUpdate));
 
 
     // Subscribe HandlePostRenderUpdate() function for processing the post-render update event, during which we request
     // Subscribe HandlePostRenderUpdate() function for processing the post-render update event, during which we request
     // debug geometry
     // debug geometry
-    SubscribeToEvent(E_POSTRENDERUPDATE, HANDLER(PhysicsStressTest, HandlePostRenderUpdate));
+    SubscribeToEvent(E_POSTRENDERUPDATE, URHO3D_HANDLER(PhysicsStressTest, HandlePostRenderUpdate));
 }
 }
 
 
 void PhysicsStressTest::MoveCamera(float timeStep)
 void PhysicsStressTest::MoveCamera(float timeStep)

+ 1 - 1
Source/Samples/12_PhysicsStressTest/PhysicsStressTest.h

@@ -39,7 +39,7 @@ class Scene;
 ///     - Optimizing physics simulation by leaving out collision event signaling
 ///     - Optimizing physics simulation by leaving out collision event signaling
 class PhysicsStressTest : public Sample
 class PhysicsStressTest : public Sample
 {
 {
-    OBJECT(PhysicsStressTest, Sample);
+    URHO3D_OBJECT(PhysicsStressTest, Sample);
 
 
 public:
 public:
     /// Construct.
     /// Construct.

+ 4 - 4
Source/Samples/13_Ragdolls/CreateRagdoll.cpp

@@ -39,7 +39,7 @@ void CreateRagdoll::OnNodeSet(Node* node)
     // If the node pointer is non-null, this component has been created into a scene node. Subscribe to physics collisions that
     // If the node pointer is non-null, this component has been created into a scene node. Subscribe to physics collisions that
     // concern this scene node
     // concern this scene node
     if (node)
     if (node)
-        SubscribeToEvent(node, E_NODECOLLISION, HANDLER(CreateRagdoll, HandleNodeCollision));
+        SubscribeToEvent(node, E_NODECOLLISION, URHO3D_HANDLER(CreateRagdoll, HandleNodeCollision));
 }
 }
 
 
 void CreateRagdoll::HandleNodeCollision(StringHash eventType, VariantMap& eventData)
 void CreateRagdoll::HandleNodeCollision(StringHash eventType, VariantMap& eventData)
@@ -119,7 +119,7 @@ void CreateRagdoll::CreateRagdollBone(const String& boneName, ShapeType type, co
     Node* boneNode = node_->GetChild(boneName, true);
     Node* boneNode = node_->GetChild(boneName, true);
     if (!boneNode)
     if (!boneNode)
     {
     {
-        LOGWARNING("Could not find bone " + boneName + " for creating ragdoll physics components");
+        URHO3D_LOGWARNING("Could not find bone " + boneName + " for creating ragdoll physics components");
         return;
         return;
     }
     }
 
 
@@ -149,12 +149,12 @@ void CreateRagdoll::CreateRagdollConstraint(const String& boneName, const String
     Node* parentNode = node_->GetChild(parentName, true);
     Node* parentNode = node_->GetChild(parentName, true);
     if (!boneNode)
     if (!boneNode)
     {
     {
-        LOGWARNING("Could not find bone " + boneName + " for creating ragdoll constraint");
+        URHO3D_LOGWARNING("Could not find bone " + boneName + " for creating ragdoll constraint");
         return;
         return;
     }
     }
     if (!parentNode)
     if (!parentNode)
     {
     {
-        LOGWARNING("Could not find bone " + parentName + " for creating ragdoll constraint");
+        URHO3D_LOGWARNING("Could not find bone " + parentName + " for creating ragdoll constraint");
         return;
         return;
     }
     }
 
 

+ 1 - 1
Source/Samples/13_Ragdolls/CreateRagdoll.h

@@ -30,7 +30,7 @@ using namespace Urho3D;
 /// Custom component that creates a ragdoll upon collision.
 /// Custom component that creates a ragdoll upon collision.
 class CreateRagdoll : public Component
 class CreateRagdoll : public Component
 {
 {
-    OBJECT(CreateRagdoll, Component);
+    URHO3D_OBJECT(CreateRagdoll, Component);
     
     
 public:
 public:
     /// Construct.
     /// Construct.

+ 3 - 3
Source/Samples/13_Ragdolls/Ragdolls.cpp

@@ -48,7 +48,7 @@
 
 
 #include <Urho3D/DebugNew.h>
 #include <Urho3D/DebugNew.h>
 
 
-DEFINE_APPLICATION_MAIN(Ragdolls)
+URHO3D_DEFINE_APPLICATION_MAIN(Ragdolls)
 
 
 Ragdolls::Ragdolls(Context* context) :
 Ragdolls::Ragdolls(Context* context) :
     Sample(context),
     Sample(context),
@@ -285,11 +285,11 @@ void Ragdolls::SpawnObject()
 void Ragdolls::SubscribeToEvents()
 void Ragdolls::SubscribeToEvents()
 {
 {
     // Subscribe HandleUpdate() function for processing update events
     // Subscribe HandleUpdate() function for processing update events
-    SubscribeToEvent(E_UPDATE, HANDLER(Ragdolls, HandleUpdate));
+    SubscribeToEvent(E_UPDATE, URHO3D_HANDLER(Ragdolls, HandleUpdate));
 
 
     // Subscribe HandlePostRenderUpdate() function for processing the post-render update event, during which we request
     // Subscribe HandlePostRenderUpdate() function for processing the post-render update event, during which we request
     // debug geometry
     // debug geometry
-    SubscribeToEvent(E_POSTRENDERUPDATE, HANDLER(Ragdolls, HandlePostRenderUpdate));
+    SubscribeToEvent(E_POSTRENDERUPDATE, URHO3D_HANDLER(Ragdolls, HandlePostRenderUpdate));
 }
 }
 
 
 void Ragdolls::HandleUpdate(StringHash eventType, VariantMap& eventData)
 void Ragdolls::HandleUpdate(StringHash eventType, VariantMap& eventData)

+ 1 - 1
Source/Samples/13_Ragdolls/Ragdolls.h

@@ -39,7 +39,7 @@ class Scene;
 ///     - Using rolling friction to stop rolling objects from moving infinitely
 ///     - Using rolling friction to stop rolling objects from moving infinitely
 class Ragdolls : public Sample
 class Ragdolls : public Sample
 {
 {
-    OBJECT(Ragdolls, Sample);
+    URHO3D_OBJECT(Ragdolls, Sample);
 
 
 public:
 public:
     /// Construct.
     /// Construct.

+ 6 - 6
Source/Samples/14_SoundEffects/SoundEffects.cpp

@@ -55,7 +55,7 @@ static String soundResourceNames[] = {
     "Sounds/Powerup.wav"
     "Sounds/Powerup.wav"
 };
 };
 
 
-DEFINE_APPLICATION_MAIN(SoundEffects)
+URHO3D_DEFINE_APPLICATION_MAIN(SoundEffects)
 
 
 SoundEffects::SoundEffects(Context* context) :
 SoundEffects::SoundEffects(Context* context) :
     Sample(context)
     Sample(context)
@@ -98,26 +98,26 @@ void SoundEffects::CreateUI()
         Button* button = CreateButton(i * 140 + 20, 20, 120, 40, soundNames[i]);
         Button* button = CreateButton(i * 140 + 20, 20, 120, 40, soundNames[i]);
         // Store the sound effect resource name as a custom variable into the button
         // Store the sound effect resource name as a custom variable into the button
         button->SetVar(VAR_SOUNDRESOURCE, soundResourceNames[i]);
         button->SetVar(VAR_SOUNDRESOURCE, soundResourceNames[i]);
-        SubscribeToEvent(button, E_PRESSED, HANDLER(SoundEffects, HandlePlaySound));
+        SubscribeToEvent(button, E_PRESSED, URHO3D_HANDLER(SoundEffects, HandlePlaySound));
     }
     }
 
 
     // Create buttons for playing/stopping music
     // Create buttons for playing/stopping music
     Button* button = CreateButton(20, 80, 120, 40, "Play Music");
     Button* button = CreateButton(20, 80, 120, 40, "Play Music");
-    SubscribeToEvent(button, E_RELEASED, HANDLER(SoundEffects, HandlePlayMusic));
+    SubscribeToEvent(button, E_RELEASED, URHO3D_HANDLER(SoundEffects, HandlePlayMusic));
 
 
     button = CreateButton(160, 80, 120, 40, "Stop Music");
     button = CreateButton(160, 80, 120, 40, "Stop Music");
-    SubscribeToEvent(button, E_RELEASED, HANDLER(SoundEffects, HandleStopMusic));
+    SubscribeToEvent(button, E_RELEASED, URHO3D_HANDLER(SoundEffects, HandleStopMusic));
 
 
     Audio* audio = GetSubsystem<Audio>();
     Audio* audio = GetSubsystem<Audio>();
 
 
     // Create sliders for controlling sound and music master volume
     // Create sliders for controlling sound and music master volume
     Slider* slider = CreateSlider(20, 140, 200, 20, "Sound Volume");
     Slider* slider = CreateSlider(20, 140, 200, 20, "Sound Volume");
     slider->SetValue(audio->GetMasterGain(SOUND_EFFECT));
     slider->SetValue(audio->GetMasterGain(SOUND_EFFECT));
-    SubscribeToEvent(slider, E_SLIDERCHANGED, HANDLER(SoundEffects, HandleSoundVolume));
+    SubscribeToEvent(slider, E_SLIDERCHANGED, URHO3D_HANDLER(SoundEffects, HandleSoundVolume));
 
 
     slider = CreateSlider(20, 200, 200, 20, "Music Volume");
     slider = CreateSlider(20, 200, 200, 20, "Music Volume");
     slider->SetValue(audio->GetMasterGain(SOUND_MUSIC));
     slider->SetValue(audio->GetMasterGain(SOUND_MUSIC));
-    SubscribeToEvent(slider, E_SLIDERCHANGED, HANDLER(SoundEffects, HandleMusicVolume));
+    SubscribeToEvent(slider, E_SLIDERCHANGED, URHO3D_HANDLER(SoundEffects, HandleMusicVolume));
 }
 }
 
 
 Button* SoundEffects::CreateButton(int x, int y, int xSize, int ySize, const String& text)
 Button* SoundEffects::CreateButton(int x, int y, int xSize, int ySize, const String& text)

+ 1 - 1
Source/Samples/14_SoundEffects/SoundEffects.h

@@ -39,7 +39,7 @@ class Slider;
 ///     - Controlling sound and music master volume
 ///     - Controlling sound and music master volume
 class SoundEffects : public Sample
 class SoundEffects : public Sample
 {
 {
-    OBJECT(SoundEffects, Sample);
+    URHO3D_OBJECT(SoundEffects, Sample);
 
 
 public:
 public:
     /// Construct.
     /// Construct.

+ 3 - 3
Source/Samples/15_Navigation/Navigation.cpp

@@ -44,7 +44,7 @@
 
 
 #include <Urho3D/DebugNew.h>
 #include <Urho3D/DebugNew.h>
 
 
-DEFINE_APPLICATION_MAIN(Navigation)
+URHO3D_DEFINE_APPLICATION_MAIN(Navigation)
 
 
 Navigation::Navigation(Context* context) :
 Navigation::Navigation(Context* context) :
     Sample(context),
     Sample(context),
@@ -206,11 +206,11 @@ void Navigation::SetupViewport()
 void Navigation::SubscribeToEvents()
 void Navigation::SubscribeToEvents()
 {
 {
     // Subscribe HandleUpdate() function for processing update events
     // Subscribe HandleUpdate() function for processing update events
-    SubscribeToEvent(E_UPDATE, HANDLER(Navigation, HandleUpdate));
+    SubscribeToEvent(E_UPDATE, URHO3D_HANDLER(Navigation, HandleUpdate));
 
 
     // Subscribe HandlePostRenderUpdate() function for processing the post-render update event, during which we request
     // Subscribe HandlePostRenderUpdate() function for processing the post-render update event, during which we request
     // debug geometry
     // debug geometry
-    SubscribeToEvent(E_POSTRENDERUPDATE, HANDLER(Navigation, HandlePostRenderUpdate));
+    SubscribeToEvent(E_POSTRENDERUPDATE, URHO3D_HANDLER(Navigation, HandlePostRenderUpdate));
 }
 }
 
 
 void Navigation::MoveCamera(float timeStep)
 void Navigation::MoveCamera(float timeStep)

+ 1 - 1
Source/Samples/15_Navigation/Navigation.h

@@ -43,7 +43,7 @@ class Scene;
 ///     - Making a node follow the Detour path
 ///     - Making a node follow the Detour path
 class Navigation : public Sample
 class Navigation : public Sample
 {
 {
-    OBJECT(Navigation, Sample);
+    URHO3D_OBJECT(Navigation, Sample);
 
 
 public:
 public:
     /// Construct.
     /// Construct.

+ 11 - 11
Source/Samples/16_Chat/Chat.cpp

@@ -55,7 +55,7 @@ const int MSG_CHAT = 32;
 // UDP port we will use
 // UDP port we will use
 const unsigned short CHAT_SERVER_PORT = 2345;
 const unsigned short CHAT_SERVER_PORT = 2345;
 
 
-DEFINE_APPLICATION_MAIN(Chat)
+URHO3D_DEFINE_APPLICATION_MAIN(Chat)
 
 
 Chat::Chat(Context* context) :
 Chat::Chat(Context* context) :
     Sample(context)
     Sample(context)
@@ -119,20 +119,20 @@ void Chat::CreateUI()
 void Chat::SubscribeToEvents()
 void Chat::SubscribeToEvents()
 {
 {
     // Subscribe to UI element events
     // Subscribe to UI element events
-    SubscribeToEvent(textEdit_, E_TEXTFINISHED, HANDLER(Chat, HandleSend));
-    SubscribeToEvent(sendButton_, E_RELEASED, HANDLER(Chat, HandleSend));
-    SubscribeToEvent(connectButton_, E_RELEASED, HANDLER(Chat, HandleConnect));
-    SubscribeToEvent(disconnectButton_, E_RELEASED, HANDLER(Chat, HandleDisconnect));
-    SubscribeToEvent(startServerButton_, E_RELEASED, HANDLER(Chat, HandleStartServer));
+    SubscribeToEvent(textEdit_, E_TEXTFINISHED, URHO3D_HANDLER(Chat, HandleSend));
+    SubscribeToEvent(sendButton_, E_RELEASED, URHO3D_HANDLER(Chat, HandleSend));
+    SubscribeToEvent(connectButton_, E_RELEASED, URHO3D_HANDLER(Chat, HandleConnect));
+    SubscribeToEvent(disconnectButton_, E_RELEASED, URHO3D_HANDLER(Chat, HandleDisconnect));
+    SubscribeToEvent(startServerButton_, E_RELEASED, URHO3D_HANDLER(Chat, HandleStartServer));
 
 
     // Subscribe to log messages so that we can pipe them to the chat window
     // Subscribe to log messages so that we can pipe them to the chat window
-    SubscribeToEvent(E_LOGMESSAGE, HANDLER(Chat, HandleLogMessage));
+    SubscribeToEvent(E_LOGMESSAGE, URHO3D_HANDLER(Chat, HandleLogMessage));
 
 
     // Subscribe to network events
     // Subscribe to network events
-    SubscribeToEvent(E_NETWORKMESSAGE, HANDLER(Chat, HandleNetworkMessage));
-    SubscribeToEvent(E_SERVERCONNECTED, HANDLER(Chat, HandleConnectionStatus));
-    SubscribeToEvent(E_SERVERDISCONNECTED, HANDLER(Chat, HandleConnectionStatus));
-    SubscribeToEvent(E_CONNECTFAILED, HANDLER(Chat, HandleConnectionStatus));
+    SubscribeToEvent(E_NETWORKMESSAGE, URHO3D_HANDLER(Chat, HandleNetworkMessage));
+    SubscribeToEvent(E_SERVERCONNECTED, URHO3D_HANDLER(Chat, HandleConnectionStatus));
+    SubscribeToEvent(E_SERVERDISCONNECTED, URHO3D_HANDLER(Chat, HandleConnectionStatus));
+    SubscribeToEvent(E_CONNECTFAILED, URHO3D_HANDLER(Chat, HandleConnectionStatus));
 }
 }
 
 
 Button* Chat::CreateButton(const String& text, int width)
 Button* Chat::CreateButton(const String& text, int width)

+ 1 - 1
Source/Samples/16_Chat/Chat.h

@@ -40,7 +40,7 @@ class UIElement;
 ///     - Implementing simple chat functionality with network messages
 ///     - Implementing simple chat functionality with network messages
 class Chat : public Sample
 class Chat : public Sample
 {
 {
-    OBJECT(Chat, Sample);
+    URHO3D_OBJECT(Chat, Sample);
 
 
 public:
 public:
     /// Construct.
     /// Construct.

+ 12 - 12
Source/Samples/17_SceneReplication/SceneReplication.cpp

@@ -67,7 +67,7 @@ static const unsigned CTRL_BACK = 2;
 static const unsigned CTRL_LEFT = 4;
 static const unsigned CTRL_LEFT = 4;
 static const unsigned CTRL_RIGHT = 8;
 static const unsigned CTRL_RIGHT = 8;
 
 
-DEFINE_APPLICATION_MAIN(SceneReplication)
+URHO3D_DEFINE_APPLICATION_MAIN(SceneReplication)
 
 
 SceneReplication::SceneReplication(Context* context) :
 SceneReplication::SceneReplication(Context* context) :
     Sample(context)
     Sample(context)
@@ -211,26 +211,26 @@ void SceneReplication::SetupViewport()
 void SceneReplication::SubscribeToEvents()
 void SceneReplication::SubscribeToEvents()
 {
 {
     // Subscribe to fixed timestep physics updates for setting or applying controls
     // Subscribe to fixed timestep physics updates for setting or applying controls
-    SubscribeToEvent(E_PHYSICSPRESTEP, HANDLER(SceneReplication, HandlePhysicsPreStep));
+    SubscribeToEvent(E_PHYSICSPRESTEP, URHO3D_HANDLER(SceneReplication, HandlePhysicsPreStep));
 
 
     // Subscribe HandlePostUpdate() method for processing update events. Subscribe to PostUpdate instead
     // Subscribe HandlePostUpdate() method for processing update events. Subscribe to PostUpdate instead
     // of the usual Update so that physics simulation has already proceeded for the frame, and can
     // of the usual Update so that physics simulation has already proceeded for the frame, and can
     // accurately follow the object with the camera
     // accurately follow the object with the camera
-    SubscribeToEvent(E_POSTUPDATE, HANDLER(SceneReplication, HandlePostUpdate));
+    SubscribeToEvent(E_POSTUPDATE, URHO3D_HANDLER(SceneReplication, HandlePostUpdate));
 
 
     // Subscribe to button actions
     // Subscribe to button actions
-    SubscribeToEvent(connectButton_, E_RELEASED, HANDLER(SceneReplication, HandleConnect));
-    SubscribeToEvent(disconnectButton_, E_RELEASED, HANDLER(SceneReplication, HandleDisconnect));
-    SubscribeToEvent(startServerButton_, E_RELEASED, HANDLER(SceneReplication, HandleStartServer));
+    SubscribeToEvent(connectButton_, E_RELEASED, URHO3D_HANDLER(SceneReplication, HandleConnect));
+    SubscribeToEvent(disconnectButton_, E_RELEASED, URHO3D_HANDLER(SceneReplication, HandleDisconnect));
+    SubscribeToEvent(startServerButton_, E_RELEASED, URHO3D_HANDLER(SceneReplication, HandleStartServer));
 
 
     // Subscribe to network events
     // Subscribe to network events
-    SubscribeToEvent(E_SERVERCONNECTED, HANDLER(SceneReplication, HandleConnectionStatus));
-    SubscribeToEvent(E_SERVERDISCONNECTED, HANDLER(SceneReplication, HandleConnectionStatus));
-    SubscribeToEvent(E_CONNECTFAILED, HANDLER(SceneReplication, HandleConnectionStatus));
-    SubscribeToEvent(E_CLIENTCONNECTED, HANDLER(SceneReplication, HandleClientConnected));
-    SubscribeToEvent(E_CLIENTDISCONNECTED, HANDLER(SceneReplication, HandleClientDisconnected));
+    SubscribeToEvent(E_SERVERCONNECTED, URHO3D_HANDLER(SceneReplication, HandleConnectionStatus));
+    SubscribeToEvent(E_SERVERDISCONNECTED, URHO3D_HANDLER(SceneReplication, HandleConnectionStatus));
+    SubscribeToEvent(E_CONNECTFAILED, URHO3D_HANDLER(SceneReplication, HandleConnectionStatus));
+    SubscribeToEvent(E_CLIENTCONNECTED, URHO3D_HANDLER(SceneReplication, HandleClientConnected));
+    SubscribeToEvent(E_CLIENTDISCONNECTED, URHO3D_HANDLER(SceneReplication, HandleClientDisconnected));
     // This is a custom event, sent from the server to the client. It tells the node ID of the object the client should control
     // This is a custom event, sent from the server to the client. It tells the node ID of the object the client should control
-    SubscribeToEvent(E_CLIENTOBJECTID, HANDLER(SceneReplication, HandleClientObjectID));
+    SubscribeToEvent(E_CLIENTOBJECTID, URHO3D_HANDLER(SceneReplication, HandleClientObjectID));
     // Events sent between client & server (remote events) must be explicitly registered or else they are not allowed to be received
     // Events sent between client & server (remote events) must be explicitly registered or else they are not allowed to be received
     GetSubsystem<Network>()->RegisterRemoteEvent(E_CLIENTOBJECTID);
     GetSubsystem<Network>()->RegisterRemoteEvent(E_CLIENTOBJECTID);
 }
 }

+ 1 - 1
Source/Samples/17_SceneReplication/SceneReplication.h

@@ -43,7 +43,7 @@ class UIElement;
 ///     - Controlling a physics object's movement by applying forces
 ///     - Controlling a physics object's movement by applying forces
 class SceneReplication : public Sample
 class SceneReplication : public Sample
 {
 {
-    OBJECT(SceneReplication, Sample);
+    URHO3D_OBJECT(SceneReplication, Sample);
 
 
 public:
 public:
     /// Construct.
     /// Construct.

+ 6 - 6
Source/Samples/18_CharacterDemo/Character.cpp

@@ -47,17 +47,17 @@ void Character::RegisterObject(Context* context)
 
 
     // These macros register the class attributes to the Context for automatic load / save handling.
     // These macros register the class attributes to the Context for automatic load / save handling.
     // We specify the Default attribute mode which means it will be used both for saving into file, and network replication
     // We specify the Default attribute mode which means it will be used both for saving into file, and network replication
-    ATTRIBUTE("Controls Yaw", float, controls_.yaw_, 0.0f, AM_DEFAULT);
-    ATTRIBUTE("Controls Pitch", float, controls_.pitch_, 0.0f, AM_DEFAULT);
-    ATTRIBUTE("On Ground", bool, onGround_, false, AM_DEFAULT);
-    ATTRIBUTE("OK To Jump", bool, okToJump_, true, AM_DEFAULT);
-    ATTRIBUTE("In Air Timer", float, inAirTimer_, 0.0f, AM_DEFAULT);
+    URHO3D_ATTRIBUTE("Controls Yaw", float, controls_.yaw_, 0.0f, AM_DEFAULT);
+    URHO3D_ATTRIBUTE("Controls Pitch", float, controls_.pitch_, 0.0f, AM_DEFAULT);
+    URHO3D_ATTRIBUTE("On Ground", bool, onGround_, false, AM_DEFAULT);
+    URHO3D_ATTRIBUTE("OK To Jump", bool, okToJump_, true, AM_DEFAULT);
+    URHO3D_ATTRIBUTE("In Air Timer", float, inAirTimer_, 0.0f, AM_DEFAULT);
 }
 }
 
 
 void Character::Start()
 void Character::Start()
 {
 {
     // Component has been inserted into its scene node. Subscribe to events now
     // Component has been inserted into its scene node. Subscribe to events now
-    SubscribeToEvent(GetNode(), E_NODECOLLISION, HANDLER(Character, HandleNodeCollision));
+    SubscribeToEvent(GetNode(), E_NODECOLLISION, URHO3D_HANDLER(Character, HandleNodeCollision));
 }
 }
 
 
 void Character::FixedUpdate(float timeStep)
 void Character::FixedUpdate(float timeStep)

+ 1 - 1
Source/Samples/18_CharacterDemo/Character.h

@@ -43,7 +43,7 @@ const float INAIR_THRESHOLD_TIME = 0.1f;
 /// Character component, responsible for physical movement according to controls, as well as animation.
 /// Character component, responsible for physical movement according to controls, as well as animation.
 class Character : public LogicComponent
 class Character : public LogicComponent
 {
 {
-    OBJECT(Character, LogicComponent);
+    URHO3D_OBJECT(Character, LogicComponent);
 
 
 public:
 public:
     /// Construct.
     /// Construct.

+ 3 - 3
Source/Samples/18_CharacterDemo/CharacterDemo.cpp

@@ -49,7 +49,7 @@
 
 
 #include <Urho3D/DebugNew.h>
 #include <Urho3D/DebugNew.h>
 
 
-DEFINE_APPLICATION_MAIN(CharacterDemo)
+URHO3D_DEFINE_APPLICATION_MAIN(CharacterDemo)
 
 
 CharacterDemo::CharacterDemo(Context* context) :
 CharacterDemo::CharacterDemo(Context* context) :
     Sample(context),
     Sample(context),
@@ -241,10 +241,10 @@ void CharacterDemo::CreateInstructions()
 void CharacterDemo::SubscribeToEvents()
 void CharacterDemo::SubscribeToEvents()
 {
 {
     // Subscribe to Update event for setting the character controls before physics simulation
     // Subscribe to Update event for setting the character controls before physics simulation
-    SubscribeToEvent(E_UPDATE, HANDLER(CharacterDemo, HandleUpdate));
+    SubscribeToEvent(E_UPDATE, URHO3D_HANDLER(CharacterDemo, HandleUpdate));
 
 
     // Subscribe to PostUpdate event for updating the camera position after physics simulation
     // Subscribe to PostUpdate event for updating the camera position after physics simulation
-    SubscribeToEvent(E_POSTUPDATE, HANDLER(CharacterDemo, HandlePostUpdate));
+    SubscribeToEvent(E_POSTUPDATE, URHO3D_HANDLER(CharacterDemo, HandlePostUpdate));
 
 
     // Unsubscribe the SceneUpdate event from base class as the camera node is being controlled in HandlePostUpdate() in this sample
     // Unsubscribe the SceneUpdate event from base class as the camera node is being controlled in HandlePostUpdate() in this sample
     UnsubscribeFromEvent(E_SCENEUPDATE);
     UnsubscribeFromEvent(E_SCENEUPDATE);

+ 1 - 1
Source/Samples/18_CharacterDemo/CharacterDemo.h

@@ -45,7 +45,7 @@ class Touch;
 ///     - Using touch inputs/gyroscope for iOS/Android (implemented through an external file)
 ///     - Using touch inputs/gyroscope for iOS/Android (implemented through an external file)
 class CharacterDemo : public Sample
 class CharacterDemo : public Sample
 {
 {
-    OBJECT(CharacterDemo, Sample);
+    URHO3D_OBJECT(CharacterDemo, Sample);
 
 
 public:
 public:
     /// Construct.
     /// Construct.

+ 1 - 1
Source/Samples/18_CharacterDemo/Touch.h

@@ -46,7 +46,7 @@ const float CAMERA_MAX_DIST = 20.0f;
 /// - Call the update function 'UpdateTouches()' from HandleUpdate or equivalent update handler function
 /// - Call the update function 'UpdateTouches()' from HandleUpdate or equivalent update handler function
 class Touch : public Object
 class Touch : public Object
 {
 {
-    OBJECT(Touch, Object);
+    URHO3D_OBJECT(Touch, Object);
 
 
 public:
 public:
     /// Construct.
     /// Construct.

+ 7 - 7
Source/Samples/19_VehicleDemo/Vehicle.cpp

@@ -46,15 +46,15 @@ void Vehicle::RegisterObject(Context* context)
 {
 {
     context->RegisterFactory<Vehicle>();
     context->RegisterFactory<Vehicle>();
 
 
-    ATTRIBUTE("Controls Yaw", float, controls_.yaw_, 0.0f, AM_DEFAULT);
-    ATTRIBUTE("Controls Pitch", float, controls_.pitch_, 0.0f, AM_DEFAULT);
-    ATTRIBUTE("Steering", float, steering_, 0.0f, AM_DEFAULT);
+    URHO3D_ATTRIBUTE("Controls Yaw", float, controls_.yaw_, 0.0f, AM_DEFAULT);
+    URHO3D_ATTRIBUTE("Controls Pitch", float, controls_.pitch_, 0.0f, AM_DEFAULT);
+    URHO3D_ATTRIBUTE("Steering", float, steering_, 0.0f, AM_DEFAULT);
     // Register wheel node IDs as attributes so that the wheel nodes can be reaquired on deserialization. They need to be tagged
     // Register wheel node IDs as attributes so that the wheel nodes can be reaquired on deserialization. They need to be tagged
     // as node ID's so that the deserialization code knows to rewrite the IDs in case they are different on load than on save
     // as node ID's so that the deserialization code knows to rewrite the IDs in case they are different on load than on save
-    ATTRIBUTE("Front Left Node", int, frontLeftID_, 0, AM_DEFAULT | AM_NODEID);
-    ATTRIBUTE("Front Right Node", int, frontRightID_, 0, AM_DEFAULT | AM_NODEID);
-    ATTRIBUTE("Rear Left Node", int, rearLeftID_, 0, AM_DEFAULT | AM_NODEID);
-    ATTRIBUTE("Rear Right Node", int, rearRightID_, 0, AM_DEFAULT | AM_NODEID);
+    URHO3D_ATTRIBUTE("Front Left Node", int, frontLeftID_, 0, AM_DEFAULT | AM_NODEID);
+    URHO3D_ATTRIBUTE("Front Right Node", int, frontRightID_, 0, AM_DEFAULT | AM_NODEID);
+    URHO3D_ATTRIBUTE("Rear Left Node", int, rearLeftID_, 0, AM_DEFAULT | AM_NODEID);
+    URHO3D_ATTRIBUTE("Rear Right Node", int, rearRightID_, 0, AM_DEFAULT | AM_NODEID);
 }
 }
 
 
 void Vehicle::ApplyAttributes()
 void Vehicle::ApplyAttributes()

+ 1 - 1
Source/Samples/19_VehicleDemo/Vehicle.h

@@ -49,7 +49,7 @@ const float MAX_WHEEL_ANGLE = 22.5f;
 /// Vehicle component, responsible for physical movement according to controls.
 /// Vehicle component, responsible for physical movement according to controls.
 class Vehicle : public LogicComponent
 class Vehicle : public LogicComponent
 {
 {
-    OBJECT(Vehicle, LogicComponent)
+    URHO3D_OBJECT(Vehicle, LogicComponent)
 
 
 public:
 public:
     /// Construct.
     /// Construct.

+ 3 - 3
Source/Samples/19_VehicleDemo/VehicleDemo.cpp

@@ -51,7 +51,7 @@
 
 
 const float CAMERA_DISTANCE = 10.0f;
 const float CAMERA_DISTANCE = 10.0f;
 
 
-DEFINE_APPLICATION_MAIN(VehicleDemo)
+URHO3D_DEFINE_APPLICATION_MAIN(VehicleDemo)
 
 
 VehicleDemo::VehicleDemo(Context* context) :
 VehicleDemo::VehicleDemo(Context* context) :
     Sample(context)
     Sample(context)
@@ -190,10 +190,10 @@ void VehicleDemo::CreateInstructions()
 void VehicleDemo::SubscribeToEvents()
 void VehicleDemo::SubscribeToEvents()
 {
 {
     // Subscribe to Update event for setting the vehicle controls before physics simulation
     // Subscribe to Update event for setting the vehicle controls before physics simulation
-    SubscribeToEvent(E_UPDATE, HANDLER(VehicleDemo, HandleUpdate));
+    SubscribeToEvent(E_UPDATE, URHO3D_HANDLER(VehicleDemo, HandleUpdate));
 
 
     // Subscribe to PostUpdate event for updating the camera position after physics simulation
     // Subscribe to PostUpdate event for updating the camera position after physics simulation
-    SubscribeToEvent(E_POSTUPDATE, HANDLER(VehicleDemo, HandlePostUpdate));
+    SubscribeToEvent(E_POSTUPDATE, URHO3D_HANDLER(VehicleDemo, HandlePostUpdate));
 
 
     // Unsubscribe the SceneUpdate event from base class as the camera node is being controlled in HandlePostUpdate() in this sample
     // Unsubscribe the SceneUpdate event from base class as the camera node is being controlled in HandlePostUpdate() in this sample
     UnsubscribeFromEvent(E_SCENEUPDATE);
     UnsubscribeFromEvent(E_SCENEUPDATE);

+ 1 - 1
Source/Samples/19_VehicleDemo/VehicleDemo.h

@@ -41,7 +41,7 @@ class Vehicle;
 ///     - Defining attributes (including node and component references) of a custom component so that it can be saved and loaded
 ///     - Defining attributes (including node and component references) of a custom component so that it can be saved and loaded
 class VehicleDemo : public Sample
 class VehicleDemo : public Sample
 {
 {
-    OBJECT(VehicleDemo, Sample);
+    URHO3D_OBJECT(VehicleDemo, Sample);
 
 
 public:
 public:
     /// Construct.
     /// Construct.

+ 3 - 3
Source/Samples/20_HugeObjectCount/HugeObjectCount.cpp

@@ -42,7 +42,7 @@
 
 
 #include <Urho3D/DebugNew.h>
 #include <Urho3D/DebugNew.h>
 
 
-DEFINE_APPLICATION_MAIN(HugeObjectCount)
+URHO3D_DEFINE_APPLICATION_MAIN(HugeObjectCount)
 
 
 HugeObjectCount::HugeObjectCount(Context* context) :
 HugeObjectCount::HugeObjectCount(Context* context) :
     Sample(context),
     Sample(context),
@@ -192,7 +192,7 @@ void HugeObjectCount::SetupViewport()
 void HugeObjectCount::SubscribeToEvents()
 void HugeObjectCount::SubscribeToEvents()
 {
 {
     // Subscribe HandleUpdate() function for processing update events
     // Subscribe HandleUpdate() function for processing update events
-    SubscribeToEvent(E_UPDATE, HANDLER(HugeObjectCount, HandleUpdate));
+    SubscribeToEvent(E_UPDATE, URHO3D_HANDLER(HugeObjectCount, HandleUpdate));
 }
 }
 
 
 void HugeObjectCount::MoveCamera(float timeStep)
 void HugeObjectCount::MoveCamera(float timeStep)
@@ -230,7 +230,7 @@ void HugeObjectCount::MoveCamera(float timeStep)
 
 
 void HugeObjectCount::AnimateObjects(float timeStep)
 void HugeObjectCount::AnimateObjects(float timeStep)
 {
 {
-    PROFILE(AnimateObjects);
+    URHO3D_PROFILE(AnimateObjects);
 
 
     const float ROTATE_SPEED = 15.0f;
     const float ROTATE_SPEED = 15.0f;
     // Rotate about the Z axis (roll)
     // Rotate about the Z axis (roll)

+ 1 - 1
Source/Samples/20_HugeObjectCount/HugeObjectCount.h

@@ -41,7 +41,7 @@ class Scene;
 ///     - Optionally speeding up rendering by grouping objects with the StaticModelGroup component
 ///     - Optionally speeding up rendering by grouping objects with the StaticModelGroup component
 class HugeObjectCount : public Sample
 class HugeObjectCount : public Sample
 {
 {
-    OBJECT(HugeObjectCount, Sample);
+    URHO3D_OBJECT(HugeObjectCount, Sample);
 
 
 public:
 public:
     /// Construct.
     /// Construct.

+ 2 - 2
Source/Samples/21_AngelScriptIntegration/AngelScriptIntegration.cpp

@@ -44,7 +44,7 @@
 
 
 #include <Urho3D/DebugNew.h>
 #include <Urho3D/DebugNew.h>
 
 
-DEFINE_APPLICATION_MAIN(AngelScriptIntegration)
+URHO3D_DEFINE_APPLICATION_MAIN(AngelScriptIntegration)
 
 
 AngelScriptIntegration::AngelScriptIntegration(Context* context) :
 AngelScriptIntegration::AngelScriptIntegration(Context* context) :
     Sample(context)
     Sample(context)
@@ -155,7 +155,7 @@ void AngelScriptIntegration::SetupViewport()
 void AngelScriptIntegration::SubscribeToEvents()
 void AngelScriptIntegration::SubscribeToEvents()
 {
 {
     // Subscribe HandleUpdate() function for processing update events
     // Subscribe HandleUpdate() function for processing update events
-    SubscribeToEvent(E_UPDATE, HANDLER(AngelScriptIntegration, HandleUpdate));
+    SubscribeToEvent(E_UPDATE, URHO3D_HANDLER(AngelScriptIntegration, HandleUpdate));
 }
 }
 
 
 void AngelScriptIntegration::MoveCamera(float timeStep)
 void AngelScriptIntegration::MoveCamera(float timeStep)

+ 1 - 1
Source/Samples/21_AngelScriptIntegration/AngelScriptIntegration.h

@@ -38,7 +38,7 @@ class Scene;
 ///     - Creating a 3D scene and using a script object to animate the objects
 ///     - Creating a 3D scene and using a script object to animate the objects
 class AngelScriptIntegration : public Sample
 class AngelScriptIntegration : public Sample
 {
 {
-    OBJECT(AngelScriptIntegration, Sample);
+    URHO3D_OBJECT(AngelScriptIntegration, Sample);
 
 
 public:
 public:
     /// Construct.
     /// Construct.

+ 2 - 2
Source/Samples/22_LuaIntegration/LuaIntegration.cpp

@@ -45,7 +45,7 @@
 
 
 #include <Urho3D/DebugNew.h>
 #include <Urho3D/DebugNew.h>
 
 
-DEFINE_APPLICATION_MAIN(LuaIntegration)
+URHO3D_DEFINE_APPLICATION_MAIN(LuaIntegration)
 
 
 LuaIntegration::LuaIntegration(Context* context) :
 LuaIntegration::LuaIntegration(Context* context) :
     Sample(context)
     Sample(context)
@@ -164,7 +164,7 @@ void LuaIntegration::SetupViewport()
 void LuaIntegration::SubscribeToEvents()
 void LuaIntegration::SubscribeToEvents()
 {
 {
     // Subscribe HandleUpdate() function for processing update events
     // Subscribe HandleUpdate() function for processing update events
-    SubscribeToEvent(E_UPDATE, HANDLER(LuaIntegration, HandleUpdate));
+    SubscribeToEvent(E_UPDATE, URHO3D_HANDLER(LuaIntegration, HandleUpdate));
 }
 }
 
 
 void LuaIntegration::MoveCamera(float timeStep)
 void LuaIntegration::MoveCamera(float timeStep)

+ 1 - 1
Source/Samples/22_LuaIntegration/LuaIntegration.h

@@ -38,7 +38,7 @@ class Scene;
 ///     - Creating a 3D scene and using a script object to animate the objects
 ///     - Creating a 3D scene and using a script object to animate the objects
 class LuaIntegration : public Sample
 class LuaIntegration : public Sample
 {
 {
-    OBJECT(LuaIntegration, Sample);
+    URHO3D_OBJECT(LuaIntegration, Sample);
 
 
 public:
 public:
     /// Construct.
     /// Construct.

+ 2 - 2
Source/Samples/23_Water/Water.cpp

@@ -47,7 +47,7 @@
 
 
 #include <Urho3D/DebugNew.h>
 #include <Urho3D/DebugNew.h>
 
 
-DEFINE_APPLICATION_MAIN(Water)
+URHO3D_DEFINE_APPLICATION_MAIN(Water)
 
 
 Water::Water(Context* context) :
 Water::Water(Context* context) :
     Sample(context)
     Sample(context)
@@ -227,7 +227,7 @@ void Water::SetupViewport()
 void Water::SubscribeToEvents()
 void Water::SubscribeToEvents()
 {
 {
     // Subscribe HandleUpdate() function for processing update events
     // Subscribe HandleUpdate() function for processing update events
-    SubscribeToEvent(E_UPDATE, HANDLER(Water, HandleUpdate));
+    SubscribeToEvent(E_UPDATE, URHO3D_HANDLER(Water, HandleUpdate));
 }
 }
 
 
 void Water::MoveCamera(float timeStep)
 void Water::MoveCamera(float timeStep)

+ 1 - 1
Source/Samples/23_Water/Water.h

@@ -40,7 +40,7 @@ class Scene;
 ///     - Setting up a second camera to render reflections on the water surface
 ///     - Setting up a second camera to render reflections on the water surface
 class Water : public Sample
 class Water : public Sample
 {
 {
-    OBJECT(Water, Sample);
+    URHO3D_OBJECT(Water, Sample);
 
 
 public:
 public:
     /// Construct.
     /// Construct.

+ 2 - 2
Source/Samples/24_Urho2DSprite/Urho2DSprite.cpp

@@ -46,7 +46,7 @@ static const unsigned NUM_SPRITES = 200;
 static const StringHash VAR_MOVESPEED("MoveSpeed");
 static const StringHash VAR_MOVESPEED("MoveSpeed");
 static const StringHash VAR_ROTATESPEED("RotateSpeed");
 static const StringHash VAR_ROTATESPEED("RotateSpeed");
 
 
-DEFINE_APPLICATION_MAIN(Urho2DSprite)
+URHO3D_DEFINE_APPLICATION_MAIN(Urho2DSprite)
 
 
 Urho2DSprite::Urho2DSprite(Context* context) :
 Urho2DSprite::Urho2DSprite(Context* context) :
     Sample(context)
     Sample(context)
@@ -194,7 +194,7 @@ void Urho2DSprite::MoveCamera(float timeStep)
 void Urho2DSprite::SubscribeToEvents()
 void Urho2DSprite::SubscribeToEvents()
 {
 {
     // Subscribe HandleUpdate() function for processing update events
     // Subscribe HandleUpdate() function for processing update events
-    SubscribeToEvent(E_UPDATE, HANDLER(Urho2DSprite, HandleUpdate));
+    SubscribeToEvent(E_UPDATE, URHO3D_HANDLER(Urho2DSprite, HandleUpdate));
 
 
     // Unsubscribe the SceneUpdate event from base class to prevent camera pitch and yaw in 2D sample
     // Unsubscribe the SceneUpdate event from base class to prevent camera pitch and yaw in 2D sample
     UnsubscribeFromEvent(E_SCENEUPDATE);
     UnsubscribeFromEvent(E_SCENEUPDATE);

+ 1 - 1
Source/Samples/24_Urho2DSprite/Urho2DSprite.h

@@ -37,7 +37,7 @@ namespace Urho3D
 ///     - Handling keyboard to move and zoom 2D camera
 ///     - Handling keyboard to move and zoom 2D camera
 class Urho2DSprite : public Sample
 class Urho2DSprite : public Sample
 {
 {
-    OBJECT(Urho2DSprite, Sample);
+    URHO3D_OBJECT(Urho2DSprite, Sample);
 
 
 public:
 public:
     /// Construct.
     /// Construct.

+ 3 - 3
Source/Samples/25_Urho2DParticle/Urho2DParticle.cpp

@@ -39,7 +39,7 @@
 
 
 #include <Urho3D/DebugNew.h>
 #include <Urho3D/DebugNew.h>
 
 
-DEFINE_APPLICATION_MAIN(Urho2DParticle)
+URHO3D_DEFINE_APPLICATION_MAIN(Urho2DParticle)
 
 
 Urho2DParticle::Urho2DParticle(Context* context) :
 Urho2DParticle::Urho2DParticle(Context* context) :
     Sample(context)
     Sample(context)
@@ -130,9 +130,9 @@ void Urho2DParticle::SetupViewport()
 
 
 void Urho2DParticle::SubscribeToEvents()
 void Urho2DParticle::SubscribeToEvents()
 {
 {
-    SubscribeToEvent(E_MOUSEMOVE, HANDLER(Urho2DParticle, HandleMouseMove));
+    SubscribeToEvent(E_MOUSEMOVE, URHO3D_HANDLER(Urho2DParticle, HandleMouseMove));
     if (touchEnabled_)
     if (touchEnabled_)
-        SubscribeToEvent(E_TOUCHMOVE, HANDLER(Urho2DParticle, HandleMouseMove));
+        SubscribeToEvent(E_TOUCHMOVE, URHO3D_HANDLER(Urho2DParticle, HandleMouseMove));
 
 
     // Unsubscribe the SceneUpdate event from base class to prevent camera pitch and yaw in 2D sample
     // Unsubscribe the SceneUpdate event from base class to prevent camera pitch and yaw in 2D sample
     UnsubscribeFromEvent(E_SCENEUPDATE);
     UnsubscribeFromEvent(E_SCENEUPDATE);

+ 1 - 1
Source/Samples/25_Urho2DParticle/Urho2DParticle.h

@@ -37,7 +37,7 @@ namespace Urho3D
 //     - Handling mouse move to move particle
 //     - Handling mouse move to move particle
 class Urho2DParticle : public Sample
 class Urho2DParticle : public Sample
 {
 {
-    OBJECT(Urho2DParticle, Sample);
+    URHO3D_OBJECT(Urho2DParticle, Sample);
 
 
 public:
 public:
     /// Construct.
     /// Construct.

+ 5 - 5
Source/Samples/26_ConsoleInput/ConsoleInput.cpp

@@ -35,7 +35,7 @@
 #include <Urho3D/DebugNew.h>
 #include <Urho3D/DebugNew.h>
 
 
 // Expands to this example's entry-point
 // Expands to this example's entry-point
-DEFINE_APPLICATION_MAIN(ConsoleInput)
+URHO3D_DEFINE_APPLICATION_MAIN(ConsoleInput)
 
 
 // Hunger level descriptions
 // Hunger level descriptions
 String hungerLevels[] = {
 String hungerLevels[] = {
@@ -65,11 +65,11 @@ void ConsoleInput::Start()
     Sample::Start();
     Sample::Start();
 
 
     // Subscribe to console commands and the frame update
     // Subscribe to console commands and the frame update
-    SubscribeToEvent(E_CONSOLECOMMAND, HANDLER(ConsoleInput, HandleConsoleCommand));
-    SubscribeToEvent(E_UPDATE, HANDLER(ConsoleInput, HandleUpdate));
+    SubscribeToEvent(E_CONSOLECOMMAND, URHO3D_HANDLER(ConsoleInput, HandleConsoleCommand));
+    SubscribeToEvent(E_UPDATE, URHO3D_HANDLER(ConsoleInput, HandleUpdate));
 
 
     // Subscribe key down event
     // Subscribe key down event
-    SubscribeToEvent(E_KEYDOWN, HANDLER(ConsoleInput, HandleEscKeyDown));
+    SubscribeToEvent(E_KEYDOWN, URHO3D_HANDLER(ConsoleInput, HandleEscKeyDown));
 
 
     // Hide logo to make room for the console
     // Hide logo to make room for the console
     SetLogoVisible(false);
     SetLogoVisible(false);
@@ -269,5 +269,5 @@ void ConsoleInput::HandleInput(const String& input)
 void ConsoleInput::Print(const String& output)
 void ConsoleInput::Print(const String& output)
 {
 {
     // Logging appears both in the engine console and stdout
     // Logging appears both in the engine console and stdout
-    LOGRAW(output + "\n");
+    URHO3D_LOGRAW(output + "\n");
 }
 }

+ 1 - 1
Source/Samples/26_ConsoleInput/ConsoleInput.h

@@ -30,7 +30,7 @@
 ///       and standard input.
 ///       and standard input.
 class ConsoleInput : public Sample
 class ConsoleInput : public Sample
 {
 {
-    OBJECT(ConsoleInput, Sample);
+    URHO3D_OBJECT(ConsoleInput, Sample);
 
 
 public:
 public:
     /// Construct.
     /// Construct.

+ 2 - 2
Source/Samples/27_Urho2DPhysics/Urho2DPhysics.cpp

@@ -45,7 +45,7 @@
 
 
 #include <Urho3D/DebugNew.h>
 #include <Urho3D/DebugNew.h>
 
 
-DEFINE_APPLICATION_MAIN(Urho2DPhysics)
+URHO3D_DEFINE_APPLICATION_MAIN(Urho2DPhysics)
 
 
 static const unsigned NUM_OBJECTS = 100;
 static const unsigned NUM_OBJECTS = 100;
 
 
@@ -220,7 +220,7 @@ void Urho2DPhysics::MoveCamera(float timeStep)
 void Urho2DPhysics::SubscribeToEvents()
 void Urho2DPhysics::SubscribeToEvents()
 {
 {
     // Subscribe HandleUpdate() function for processing update events
     // Subscribe HandleUpdate() function for processing update events
-    SubscribeToEvent(E_UPDATE, HANDLER(Urho2DPhysics, HandleUpdate));
+    SubscribeToEvent(E_UPDATE, URHO3D_HANDLER(Urho2DPhysics, HandleUpdate));
 
 
     // Unsubscribe the SceneUpdate event from base class to prevent camera pitch and yaw in 2D sample
     // Unsubscribe the SceneUpdate event from base class to prevent camera pitch and yaw in 2D sample
     UnsubscribeFromEvent(E_SCENEUPDATE);
     UnsubscribeFromEvent(E_SCENEUPDATE);

+ 1 - 1
Source/Samples/27_Urho2DPhysics/Urho2DPhysics.h

@@ -36,7 +36,7 @@ namespace Urho3D
 ///     - Displaying physics debug geometry
 ///     - Displaying physics debug geometry
 class Urho2DPhysics : public Sample
 class Urho2DPhysics : public Sample
 {
 {
-    OBJECT(Urho2DPhysics, Sample);
+    URHO3D_OBJECT(Urho2DPhysics, Sample);
 
 
 public:
 public:
     /// Construct.
     /// Construct.

+ 2 - 2
Source/Samples/28_Urho2DPhysicsRope/Urho2DPhysicsRope.cpp

@@ -43,7 +43,7 @@
 
 
 #include <Urho3D/DebugNew.h>
 #include <Urho3D/DebugNew.h>
 
 
-DEFINE_APPLICATION_MAIN(Urho2DPhysicsRope)
+URHO3D_DEFINE_APPLICATION_MAIN(Urho2DPhysicsRope)
 
 
 static const unsigned NUM_OBJECTS = 10;
 static const unsigned NUM_OBJECTS = 10;
 
 
@@ -209,7 +209,7 @@ void Urho2DPhysicsRope::MoveCamera(float timeStep)
 void Urho2DPhysicsRope::SubscribeToEvents()
 void Urho2DPhysicsRope::SubscribeToEvents()
 {
 {
     // Subscribe HandleUpdate() function for processing update events
     // Subscribe HandleUpdate() function for processing update events
-    SubscribeToEvent(E_UPDATE, HANDLER(Urho2DPhysicsRope, HandleUpdate));
+    SubscribeToEvent(E_UPDATE, URHO3D_HANDLER(Urho2DPhysicsRope, HandleUpdate));
 
 
     // Unsubscribe the SceneUpdate event from base class to prevent camera pitch and yaw in 2D sample
     // Unsubscribe the SceneUpdate event from base class to prevent camera pitch and yaw in 2D sample
     UnsubscribeFromEvent(E_SCENEUPDATE);
     UnsubscribeFromEvent(E_SCENEUPDATE);

+ 1 - 1
Source/Samples/28_Urho2DPhysicsRope/Urho2DPhysicsRope.h

@@ -38,7 +38,7 @@ namespace Urho3D
 ///     - Displaying physics debug geometry
 ///     - Displaying physics debug geometry
 class Urho2DPhysicsRope : public Sample
 class Urho2DPhysicsRope : public Sample
 {
 {
-    OBJECT(Urho2DPhysicsRope, Sample);
+    URHO3D_OBJECT(Urho2DPhysicsRope, Sample);
 
 
 public:
 public:
     /// Construct.
     /// Construct.

+ 2 - 2
Source/Samples/29_SoundSynthesis/SoundSynthesis.cpp

@@ -36,7 +36,7 @@
 #include <Urho3D/DebugNew.h>
 #include <Urho3D/DebugNew.h>
 
 
 // Expands to this example's entry-point
 // Expands to this example's entry-point
-DEFINE_APPLICATION_MAIN(SoundSynthesis)
+URHO3D_DEFINE_APPLICATION_MAIN(SoundSynthesis)
 
 
 SoundSynthesis::SoundSynthesis(Context* context) :
 SoundSynthesis::SoundSynthesis(Context* context) :
     Sample(context),
     Sample(context),
@@ -133,7 +133,7 @@ void SoundSynthesis::CreateInstructions()
 void SoundSynthesis::SubscribeToEvents()
 void SoundSynthesis::SubscribeToEvents()
 {
 {
     // Subscribe HandleUpdate() function for processing update events
     // Subscribe HandleUpdate() function for processing update events
-    SubscribeToEvent(E_UPDATE, HANDLER(SoundSynthesis, HandleUpdate));
+    SubscribeToEvent(E_UPDATE, URHO3D_HANDLER(SoundSynthesis, HandleUpdate));
 }
 }
 
 
 void SoundSynthesis::HandleUpdate(StringHash eventType, VariantMap& eventData)
 void SoundSynthesis::HandleUpdate(StringHash eventType, VariantMap& eventData)

+ 1 - 1
Source/Samples/29_SoundSynthesis/SoundSynthesis.h

@@ -37,7 +37,7 @@ class BufferedSoundStream;
 ///     - Playing back a sound stream produced on-the-fly by a simple CPU synthesis algorithm
 ///     - Playing back a sound stream produced on-the-fly by a simple CPU synthesis algorithm
 class SoundSynthesis : public Sample
 class SoundSynthesis : public Sample
 {
 {
-    OBJECT(SoundSynthesis, Sample);
+    URHO3D_OBJECT(SoundSynthesis, Sample);
 
 
 public:
 public:
     /// Construct.
     /// Construct.

+ 2 - 2
Source/Samples/30_LightAnimation/LightAnimation.cpp

@@ -42,7 +42,7 @@
 
 
 #include <Urho3D/DebugNew.h>
 #include <Urho3D/DebugNew.h>
 
 
-DEFINE_APPLICATION_MAIN(LightAnimation)
+URHO3D_DEFINE_APPLICATION_MAIN(LightAnimation)
 
 
 LightAnimation::LightAnimation(Context* context) :
 LightAnimation::LightAnimation(Context* context) :
     Sample(context)
     Sample(context)
@@ -232,7 +232,7 @@ void LightAnimation::MoveCamera(float timeStep)
 void LightAnimation::SubscribeToEvents()
 void LightAnimation::SubscribeToEvents()
 {
 {
     // Subscribe HandleUpdate() function for processing update events
     // Subscribe HandleUpdate() function for processing update events
-    SubscribeToEvent(E_UPDATE, HANDLER(LightAnimation, HandleUpdate));
+    SubscribeToEvent(E_UPDATE, URHO3D_HANDLER(LightAnimation, HandleUpdate));
 }
 }
 
 
 void LightAnimation::HandleUpdate(StringHash eventType, VariantMap& eventData)
 void LightAnimation::HandleUpdate(StringHash eventType, VariantMap& eventData)

+ 1 - 1
Source/Samples/30_LightAnimation/LightAnimation.h

@@ -37,7 +37,7 @@ class Scene;
 ///     - Usage of attribute animation for light color animation
 ///     - Usage of attribute animation for light color animation
 class LightAnimation : public Sample
 class LightAnimation : public Sample
 {
 {
-    OBJECT(LightAnimation, Sample);
+    URHO3D_OBJECT(LightAnimation, Sample);
 
 
 public:
 public:
     /// Construct.
     /// Construct.

+ 2 - 2
Source/Samples/31_MaterialAnimation/MaterialAnimation.cpp

@@ -41,7 +41,7 @@
 
 
 #include <Urho3D/DebugNew.h>
 #include <Urho3D/DebugNew.h>
 
 
-DEFINE_APPLICATION_MAIN(MaterialAnimation)
+URHO3D_DEFINE_APPLICATION_MAIN(MaterialAnimation)
 
 
 MaterialAnimation::MaterialAnimation(Context* context) :
 MaterialAnimation::MaterialAnimation(Context* context) :
     Sample(context)
     Sample(context)
@@ -197,7 +197,7 @@ void MaterialAnimation::MoveCamera(float timeStep)
 void MaterialAnimation::SubscribeToEvents()
 void MaterialAnimation::SubscribeToEvents()
 {
 {
     // Subscribe HandleUpdate() function for processing update events
     // Subscribe HandleUpdate() function for processing update events
-    SubscribeToEvent(E_UPDATE, HANDLER(MaterialAnimation, HandleUpdate));
+    SubscribeToEvent(E_UPDATE, URHO3D_HANDLER(MaterialAnimation, HandleUpdate));
 }
 }
 
 
 void MaterialAnimation::HandleUpdate(StringHash eventType, VariantMap& eventData)
 void MaterialAnimation::HandleUpdate(StringHash eventType, VariantMap& eventData)

+ 1 - 1
Source/Samples/31_MaterialAnimation/MaterialAnimation.h

@@ -37,7 +37,7 @@ class Scene;
 ///     - Usage of material shader animation for mush room material
 ///     - Usage of material shader animation for mush room material
 class MaterialAnimation : public Sample
 class MaterialAnimation : public Sample
 {
 {
-    OBJECT(MaterialAnimation, Sample);
+    URHO3D_OBJECT(MaterialAnimation, Sample);
 
 
 public:
 public:
     /// Construct.
     /// Construct.

+ 9 - 9
Source/Samples/32_Urho2DConstraints/Urho2DConstraints.cpp

@@ -62,7 +62,7 @@
 
 
 #include <Urho3D/DebugNew.h>
 #include <Urho3D/DebugNew.h>
 
 
-DEFINE_APPLICATION_MAIN(Urho2DConstraints)
+URHO3D_DEFINE_APPLICATION_MAIN(Urho2DConstraints)
 
 
 Node* pickedNode;
 Node* pickedNode;
 RigidBody2D* dummyBody;
 RigidBody2D* dummyBody;
@@ -458,19 +458,19 @@ void Urho2DConstraints::MoveCamera(float timeStep)
 void Urho2DConstraints::SubscribeToEvents()
 void Urho2DConstraints::SubscribeToEvents()
 {
 {
     // Subscribe HandleUpdate() function for processing update events
     // Subscribe HandleUpdate() function for processing update events
-    SubscribeToEvent(E_UPDATE, HANDLER(Urho2DConstraints, HandleUpdate));
+    SubscribeToEvent(E_UPDATE, URHO3D_HANDLER(Urho2DConstraints, HandleUpdate));
 
 
     // Subscribe HandlePostRenderUpdate() function for processing the post-render update event, during which we request debug geometry
     // Subscribe HandlePostRenderUpdate() function for processing the post-render update event, during which we request debug geometry
-    SubscribeToEvent(E_POSTRENDERUPDATE, HANDLER(Urho2DConstraints, HandlePostRenderUpdate));
+    SubscribeToEvent(E_POSTRENDERUPDATE, URHO3D_HANDLER(Urho2DConstraints, HandlePostRenderUpdate));
 
 
     // Subscribe to mouse click
     // Subscribe to mouse click
-    SubscribeToEvent(E_MOUSEBUTTONDOWN, HANDLER(Urho2DConstraints, HandleMouseButtonDown));
+    SubscribeToEvent(E_MOUSEBUTTONDOWN, URHO3D_HANDLER(Urho2DConstraints, HandleMouseButtonDown));
 
 
     // Unsubscribe the SceneUpdate event from base class to prevent camera pitch and yaw in 2D sample
     // Unsubscribe the SceneUpdate event from base class to prevent camera pitch and yaw in 2D sample
     UnsubscribeFromEvent(E_SCENEUPDATE);
     UnsubscribeFromEvent(E_SCENEUPDATE);
 
 
     if (touchEnabled_)
     if (touchEnabled_)
-        SubscribeToEvent(E_TOUCHBEGIN, HANDLER(Urho2DConstraints, HandleTouchBegin3));
+        SubscribeToEvent(E_TOUCHBEGIN, URHO3D_HANDLER(Urho2DConstraints, HandleTouchBegin3));
 }
 }
 
 
 void Urho2DConstraints::HandleUpdate(StringHash eventType, VariantMap& eventData)
 void Urho2DConstraints::HandleUpdate(StringHash eventType, VariantMap& eventData)
@@ -523,8 +523,8 @@ void Urho2DConstraints::HandleMouseButtonDown(StringHash eventType, VariantMap&
         constraintMouse->SetOtherBody(dummyBody);  // Use dummy body instead of rigidBody. It's better to create a dummy body automatically in ConstraintMouse2D
         constraintMouse->SetOtherBody(dummyBody);  // Use dummy body instead of rigidBody. It's better to create a dummy body automatically in ConstraintMouse2D
         constraintMouse->SetDampingRatio(0.0f);
         constraintMouse->SetDampingRatio(0.0f);
     }
     }
-    SubscribeToEvent(E_MOUSEMOVE, HANDLER(Urho2DConstraints, HandleMouseMove));
-    SubscribeToEvent(E_MOUSEBUTTONUP, HANDLER(Urho2DConstraints, HandleMouseButtonUp));
+    SubscribeToEvent(E_MOUSEMOVE, URHO3D_HANDLER(Urho2DConstraints, HandleMouseMove));
+    SubscribeToEvent(E_MOUSEBUTTONUP, URHO3D_HANDLER(Urho2DConstraints, HandleMouseButtonUp));
 }
 }
 
 
 void Urho2DConstraints::HandleMouseButtonUp(StringHash eventType, VariantMap& eventData)
 void Urho2DConstraints::HandleMouseButtonUp(StringHash eventType, VariantMap& eventData)
@@ -581,8 +581,8 @@ void Urho2DConstraints::HandleTouchBegin3(StringHash eventType, VariantMap& even
         constraintMouse->SetOtherBody(dummyBody);  // Use dummy body instead of rigidBody. It's better to create a dummy body automatically in ConstraintMouse2D
         constraintMouse->SetOtherBody(dummyBody);  // Use dummy body instead of rigidBody. It's better to create a dummy body automatically in ConstraintMouse2D
         constraintMouse->SetDampingRatio(0);
         constraintMouse->SetDampingRatio(0);
     }
     }
-    SubscribeToEvent(E_TOUCHMOVE, HANDLER(Urho2DConstraints, HandleTouchMove3));
-    SubscribeToEvent(E_TOUCHEND, HANDLER(Urho2DConstraints, HandleTouchEnd3));
+    SubscribeToEvent(E_TOUCHMOVE, URHO3D_HANDLER(Urho2DConstraints, HandleTouchMove3));
+    SubscribeToEvent(E_TOUCHEND, URHO3D_HANDLER(Urho2DConstraints, HandleTouchEnd3));
 }
 }
 
 
 void Urho2DConstraints::HandleTouchMove3(StringHash eventType, VariantMap& eventData)
 void Urho2DConstraints::HandleTouchMove3(StringHash eventType, VariantMap& eventData)

+ 1 - 1
Source/Samples/32_Urho2DConstraints/Urho2DConstraints.h

@@ -52,7 +52,7 @@ namespace Urho3D
 ///     - Setting the background color for the scene
 ///     - Setting the background color for the scene
 class Urho2DConstraints : public Sample
 class Urho2DConstraints : public Sample
 {
 {
-    OBJECT(Urho2DConstraints, Sample);
+    URHO3D_OBJECT(Urho2DConstraints, Sample);
 
 
 public:
 public:
     /// Construct.
     /// Construct.

+ 3 - 3
Source/Samples/33_Urho2DSpriterAnimation/Urho2DSpriterAnimation.cpp

@@ -39,7 +39,7 @@
 
 
 #include <Urho3D/DebugNew.h>
 #include <Urho3D/DebugNew.h>
 
 
-DEFINE_APPLICATION_MAIN(Urho2DSpriterAnimation)
+URHO3D_DEFINE_APPLICATION_MAIN(Urho2DSpriterAnimation)
 
 
 Urho2DSpriterAnimation::Urho2DSpriterAnimation(Context* context) :
 Urho2DSpriterAnimation::Urho2DSpriterAnimation(Context* context) :
     Sample(context),
     Sample(context),
@@ -156,8 +156,8 @@ void Urho2DSpriterAnimation::MoveCamera(float timeStep)
 void Urho2DSpriterAnimation::SubscribeToEvents()
 void Urho2DSpriterAnimation::SubscribeToEvents()
 {
 {
     // Subscribe HandleUpdate() function for processing update events
     // Subscribe HandleUpdate() function for processing update events
-    SubscribeToEvent(E_UPDATE, HANDLER(Urho2DSpriterAnimation, HandleUpdate));
-    SubscribeToEvent(E_MOUSEBUTTONDOWN, HANDLER(Urho2DSpriterAnimation, HandleMouseButtonDown));
+    SubscribeToEvent(E_UPDATE, URHO3D_HANDLER(Urho2DSpriterAnimation, HandleUpdate));
+    SubscribeToEvent(E_MOUSEBUTTONDOWN, URHO3D_HANDLER(Urho2DSpriterAnimation, HandleMouseButtonDown));
 
 
 
 
     // Unsubscribe the SceneUpdate event from base class to prevent camera pitch and yaw in 2D sample
     // Unsubscribe the SceneUpdate event from base class to prevent camera pitch and yaw in 2D sample

+ 1 - 1
Source/Samples/33_Urho2DSpriterAnimation/Urho2DSpriterAnimation.h

@@ -37,7 +37,7 @@ namespace Urho3D
 ///     - Handling keyboard to move and zoom 2D camera
 ///     - Handling keyboard to move and zoom 2D camera
 class Urho2DSpriterAnimation : public Sample
 class Urho2DSpriterAnimation : public Sample
 {
 {
-    OBJECT(Urho2DSpriterAnimation, Sample);
+    URHO3D_OBJECT(Urho2DSpriterAnimation, Sample);
 
 
 public:
 public:
     /// Construct.
     /// Construct.

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

@@ -46,7 +46,7 @@
 
 
 #include <Urho3D/DebugNew.h>
 #include <Urho3D/DebugNew.h>
 
 
-DEFINE_APPLICATION_MAIN(DynamicGeometry)
+URHO3D_DEFINE_APPLICATION_MAIN(DynamicGeometry)
 
 
 DynamicGeometry::DynamicGeometry(Context* context) :
 DynamicGeometry::DynamicGeometry(Context* context) :
     Sample(context),
     Sample(context),
@@ -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;
     }
     }
 
 
@@ -281,7 +281,7 @@ void DynamicGeometry::SetupViewport()
 void DynamicGeometry::SubscribeToEvents()
 void DynamicGeometry::SubscribeToEvents()
 {
 {
     // Subscribe HandleUpdate() function for processing update events
     // Subscribe HandleUpdate() function for processing update events
-    SubscribeToEvent(E_UPDATE, HANDLER(DynamicGeometry, HandleUpdate));
+    SubscribeToEvent(E_UPDATE, URHO3D_HANDLER(DynamicGeometry, HandleUpdate));
 }
 }
 
 
 void DynamicGeometry::MoveCamera(float timeStep)
 void DynamicGeometry::MoveCamera(float timeStep)
@@ -319,7 +319,7 @@ void DynamicGeometry::MoveCamera(float timeStep)
 
 
 void DynamicGeometry::AnimateObjects(float timeStep)
 void DynamicGeometry::AnimateObjects(float timeStep)
 {
 {
-    PROFILE(AnimateObjects);
+    URHO3D_PROFILE(AnimateObjects);
 
 
     time_ += timeStep * 100.0f;
     time_ += timeStep * 100.0f;
 
 

+ 1 - 1
Source/Samples/34_DynamicGeometry/DynamicGeometry.h

@@ -39,7 +39,7 @@ class Scene;
 ///     - Creating a Model resource and its buffer data from scratch
 ///     - Creating a Model resource and its buffer data from scratch
 class DynamicGeometry : public Sample
 class DynamicGeometry : public Sample
 {
 {
-    OBJECT(DynamicGeometry, Sample);
+    URHO3D_OBJECT(DynamicGeometry, Sample);
 
 
 public:
 public:
     /// Construct.
     /// Construct.

+ 2 - 2
Source/Samples/35_SignedDistanceFieldText/SignedDistanceFieldText.cpp

@@ -41,7 +41,7 @@
 
 
 #include <Urho3D/DebugNew.h>
 #include <Urho3D/DebugNew.h>
 
 
-DEFINE_APPLICATION_MAIN(SignedDistanceFieldText)
+URHO3D_DEFINE_APPLICATION_MAIN(SignedDistanceFieldText)
 
 
 SignedDistanceFieldText::SignedDistanceFieldText(Context* context) :
 SignedDistanceFieldText::SignedDistanceFieldText(Context* context) :
     Sample(context)
     Sample(context)
@@ -208,7 +208,7 @@ void SignedDistanceFieldText::MoveCamera(float timeStep)
 void SignedDistanceFieldText::SubscribeToEvents()
 void SignedDistanceFieldText::SubscribeToEvents()
 {
 {
     // Subscribe HandleUpdate() function for processing update events
     // Subscribe HandleUpdate() function for processing update events
-    SubscribeToEvent(E_UPDATE, HANDLER(SignedDistanceFieldText, HandleUpdate));
+    SubscribeToEvent(E_UPDATE, URHO3D_HANDLER(SignedDistanceFieldText, HandleUpdate));
 }
 }
 
 
 void SignedDistanceFieldText::HandleUpdate(StringHash eventType, VariantMap& eventData)
 void SignedDistanceFieldText::HandleUpdate(StringHash eventType, VariantMap& eventData)

+ 1 - 1
Source/Samples/35_SignedDistanceFieldText/SignedDistanceFieldText.h

@@ -40,7 +40,7 @@ class Scene;
 ///     - Handling keyboard and mouse input to move a freelook camera
 ///     - Handling keyboard and mouse input to move a freelook camera
 class SignedDistanceFieldText : public Sample
 class SignedDistanceFieldText : public Sample
 {
 {
-    OBJECT(SignedDistanceFieldText, Sample);
+    URHO3D_OBJECT(SignedDistanceFieldText, Sample);
 
 
 public:
 public:
     /// Construct.
     /// Construct.

+ 2 - 2
Source/Samples/36_Urho2DTileMap/Urho2DTileMap.cpp

@@ -40,7 +40,7 @@
 
 
 #include <Urho3D/DebugNew.h>
 #include <Urho3D/DebugNew.h>
 
 
-DEFINE_APPLICATION_MAIN(Urho2DTileMap)
+URHO3D_DEFINE_APPLICATION_MAIN(Urho2DTileMap)
 
 
 Urho2DTileMap::Urho2DTileMap(Context* context) :
 Urho2DTileMap::Urho2DTileMap(Context* context) :
     Sample(context)
     Sample(context)
@@ -164,7 +164,7 @@ void Urho2DTileMap::MoveCamera(float timeStep)
 void Urho2DTileMap::SubscribeToEvents()
 void Urho2DTileMap::SubscribeToEvents()
 {
 {
     // Subscribe HandleUpdate() function for processing update events
     // Subscribe HandleUpdate() function for processing update events
-    SubscribeToEvent(E_UPDATE, HANDLER(Urho2DTileMap, HandleUpdate));
+    SubscribeToEvent(E_UPDATE, URHO3D_HANDLER(Urho2DTileMap, HandleUpdate));
 
 
     // Unsubscribe the SceneUpdate event from base class to prevent camera pitch and yaw in 2D sample
     // Unsubscribe the SceneUpdate event from base class to prevent camera pitch and yaw in 2D sample
     UnsubscribeFromEvent(E_SCENEUPDATE);
     UnsubscribeFromEvent(E_SCENEUPDATE);

+ 1 - 1
Source/Samples/36_Urho2DTileMap/Urho2DTileMap.h

@@ -37,7 +37,7 @@ namespace Urho3D
 ///     - Handling keyboard to move and zoom 2D camera
 ///     - Handling keyboard to move and zoom 2D camera
 class Urho2DTileMap : public Sample
 class Urho2DTileMap : public Sample
 {
 {
-    OBJECT(Urho2DTileMap, Sample);
+    URHO3D_OBJECT(Urho2DTileMap, Sample);
 
 
 public:
 public:
     /// Construct.
     /// Construct.

+ 6 - 6
Source/Samples/37_UIDrag/UIDrag.cpp

@@ -30,7 +30,7 @@
 
 
 #include <Urho3D/DebugNew.h>
 #include <Urho3D/DebugNew.h>
 
 
-DEFINE_APPLICATION_MAIN(UIDrag)
+URHO3D_DEFINE_APPLICATION_MAIN(UIDrag)
 
 
 UIDrag::UIDrag(Context* context) :
 UIDrag::UIDrag(Context* context) :
     Sample(context)
     Sample(context)
@@ -73,10 +73,10 @@ void UIDrag::CreateGUI()
         b->SetSize(300, 100);
         b->SetSize(300, 100);
         b->SetPosition(IntVector2(50*i, 50*i));
         b->SetPosition(IntVector2(50*i, 50*i));
 
 
-        SubscribeToEvent(b, E_DRAGMOVE, HANDLER(UIDrag, HandleDragMove));
-        SubscribeToEvent(b, E_DRAGBEGIN, HANDLER(UIDrag, HandleDragBegin));
-        SubscribeToEvent(b, E_DRAGCANCEL, HANDLER(UIDrag, HandleDragCancel));
-        SubscribeToEvent(b, E_DRAGEND, HANDLER(UIDrag, HandleDragEnd));
+        SubscribeToEvent(b, E_DRAGMOVE, URHO3D_HANDLER(UIDrag, HandleDragMove));
+        SubscribeToEvent(b, E_DRAGBEGIN, URHO3D_HANDLER(UIDrag, HandleDragBegin));
+        SubscribeToEvent(b, E_DRAGCANCEL, URHO3D_HANDLER(UIDrag, HandleDragCancel));
+        SubscribeToEvent(b, E_DRAGEND, URHO3D_HANDLER(UIDrag, HandleDragEnd));
 
 
         {
         {
             Text* t = new Text(context_);
             Text* t = new Text(context_);
@@ -134,7 +134,7 @@ void UIDrag::CreateInstructions()
 
 
 void UIDrag::SubscribeToEvents()
 void UIDrag::SubscribeToEvents()
 {
 {
-    SubscribeToEvent(E_UPDATE, HANDLER(UIDrag, HandleUpdate));
+    SubscribeToEvent(E_UPDATE, URHO3D_HANDLER(UIDrag, HandleUpdate));
 }
 }
 
 
 void UIDrag::HandleDragBegin(StringHash eventType, VariantMap& eventData)
 void UIDrag::HandleDragBegin(StringHash eventType, VariantMap& eventData)

+ 1 - 1
Source/Samples/37_UIDrag/UIDrag.h

@@ -37,7 +37,7 @@ namespace Urho3D
 ///     - Subscribing to GUI drag events and handling them.
 ///     - Subscribing to GUI drag events and handling them.
 class UIDrag : public Sample
 class UIDrag : public Sample
 {
 {
-    OBJECT(UIDrag, Sample);
+    URHO3D_OBJECT(UIDrag, Sample);
 
 
 public:
 public:
     /// Construct.
     /// Construct.

+ 4 - 4
Source/Samples/38_SceneAndUILoad/SceneAndUILoad.cpp

@@ -36,7 +36,7 @@
 
 
 #include <Urho3D/DebugNew.h>
 #include <Urho3D/DebugNew.h>
 
 
-DEFINE_APPLICATION_MAIN(SceneAndUILoad)
+URHO3D_DEFINE_APPLICATION_MAIN(SceneAndUILoad)
 
 
 SceneAndUILoad::SceneAndUILoad(Context* context) :
 SceneAndUILoad::SceneAndUILoad(Context* context) :
     Sample(context)
     Sample(context)
@@ -105,10 +105,10 @@ void SceneAndUILoad::CreateUI()
     // Subscribe to button actions (toggle scene lights when pressed then released)
     // Subscribe to button actions (toggle scene lights when pressed then released)
     Button* button = static_cast<Button*>(layoutRoot->GetChild("ToggleLight1", true));
     Button* button = static_cast<Button*>(layoutRoot->GetChild("ToggleLight1", true));
     if (button)
     if (button)
-        SubscribeToEvent(button, E_RELEASED, HANDLER(SceneAndUILoad, ToggleLight1));
+        SubscribeToEvent(button, E_RELEASED, URHO3D_HANDLER(SceneAndUILoad, ToggleLight1));
     button = static_cast<Button*>(layoutRoot->GetChild("ToggleLight2", true));
     button = static_cast<Button*>(layoutRoot->GetChild("ToggleLight2", true));
     if (button)
     if (button)
-        SubscribeToEvent(button, E_RELEASED, HANDLER(SceneAndUILoad, ToggleLight2));
+        SubscribeToEvent(button, E_RELEASED, URHO3D_HANDLER(SceneAndUILoad, ToggleLight2));
 }
 }
 
 
 void SceneAndUILoad::SetupViewport()
 void SceneAndUILoad::SetupViewport()
@@ -123,7 +123,7 @@ void SceneAndUILoad::SetupViewport()
 void SceneAndUILoad::SubscribeToEvents()
 void SceneAndUILoad::SubscribeToEvents()
 {
 {
     // Subscribe HandleUpdate() function for camera motion
     // Subscribe HandleUpdate() function for camera motion
-    SubscribeToEvent(E_UPDATE, HANDLER(SceneAndUILoad, HandleUpdate));
+    SubscribeToEvent(E_UPDATE, URHO3D_HANDLER(SceneAndUILoad, HandleUpdate));
 }
 }
 
 
 void SceneAndUILoad::MoveCamera(float timeStep)
 void SceneAndUILoad::MoveCamera(float timeStep)

+ 1 - 1
Source/Samples/38_SceneAndUILoad/SceneAndUILoad.h

@@ -40,7 +40,7 @@ class Scene;
 ///      - Subscribing to the UI layout's events
 ///      - Subscribing to the UI layout's events
 class SceneAndUILoad : public Sample
 class SceneAndUILoad : public Sample
 {
 {
-    OBJECT(SceneAndUILoad, Sample);
+    URHO3D_OBJECT(SceneAndUILoad, Sample);
 
 
 public:
 public:
     /// Construct.
     /// Construct.

+ 6 - 6
Source/Samples/39_CrowdNavigation/CrowdNavigation.cpp

@@ -51,7 +51,7 @@
 
 
 static const String INSTRUCTION("instructionText");
 static const String INSTRUCTION("instructionText");
 
 
-DEFINE_APPLICATION_MAIN(CrowdNavigation)
+URHO3D_DEFINE_APPLICATION_MAIN(CrowdNavigation)
 
 
 CrowdNavigation::CrowdNavigation(Context* context) :
 CrowdNavigation::CrowdNavigation(Context* context) :
     Sample(context),
     Sample(context),
@@ -235,20 +235,20 @@ void CrowdNavigation::SetupViewport()
 void CrowdNavigation::SubscribeToEvents()
 void CrowdNavigation::SubscribeToEvents()
 {
 {
     // Subscribe HandleUpdate() function for processing update events
     // Subscribe HandleUpdate() function for processing update events
-    SubscribeToEvent(E_UPDATE, HANDLER(CrowdNavigation, HandleUpdate));
+    SubscribeToEvent(E_UPDATE, URHO3D_HANDLER(CrowdNavigation, HandleUpdate));
 
 
     // Subscribe HandlePostRenderUpdate() function for processing the post-render update event, during which we request debug geometry
     // Subscribe HandlePostRenderUpdate() function for processing the post-render update event, during which we request debug geometry
-    SubscribeToEvent(E_POSTRENDERUPDATE, HANDLER(CrowdNavigation, HandlePostRenderUpdate));
+    SubscribeToEvent(E_POSTRENDERUPDATE, URHO3D_HANDLER(CrowdNavigation, HandlePostRenderUpdate));
 
 
     // Subscribe HandleCrowdAgentFailure() function for resolving invalidation issues with agents, during which we
     // Subscribe HandleCrowdAgentFailure() function for resolving invalidation issues with agents, during which we
     // use a larger extents for finding a point on the navmesh to fix the agent's position
     // use a larger extents for finding a point on the navmesh to fix the agent's position
-    SubscribeToEvent(E_CROWD_AGENT_FAILURE, HANDLER(CrowdNavigation, HandleCrowdAgentFailure));
+    SubscribeToEvent(E_CROWD_AGENT_FAILURE, URHO3D_HANDLER(CrowdNavigation, HandleCrowdAgentFailure));
 
 
     // Subscribe HandleCrowdAgentReposition() function for controlling the animation
     // Subscribe HandleCrowdAgentReposition() function for controlling the animation
-    SubscribeToEvent(E_CROWD_AGENT_REPOSITION, HANDLER(CrowdNavigation, HandleCrowdAgentReposition));
+    SubscribeToEvent(E_CROWD_AGENT_REPOSITION, URHO3D_HANDLER(CrowdNavigation, HandleCrowdAgentReposition));
 
 
     // Subscribe HandleCrowdAgentFormation() function for positioning agent into a formation
     // Subscribe HandleCrowdAgentFormation() function for positioning agent into a formation
-    SubscribeToEvent(E_CROWD_AGENT_FORMATION, HANDLER(CrowdNavigation, HandleCrowdAgentFormation));
+    SubscribeToEvent(E_CROWD_AGENT_FORMATION, URHO3D_HANDLER(CrowdNavigation, HandleCrowdAgentFormation));
 }
 }
 
 
 void CrowdNavigation::SpawnJack(const Vector3& pos, Node* jackGroup)
 void CrowdNavigation::SpawnJack(const Vector3& pos, Node* jackGroup)

+ 1 - 1
Source/Samples/39_CrowdNavigation/CrowdNavigation.h

@@ -45,7 +45,7 @@ class Scene;
 ///     - Using agents to simulate moving obstacles
 ///     - Using agents to simulate moving obstacles
 class CrowdNavigation : public Sample
 class CrowdNavigation : public Sample
 {
 {
-    OBJECT(CrowdNavigation, Sample);
+    URHO3D_OBJECT(CrowdNavigation, Sample);
 
 
 public:
 public:
     /// Construct.
     /// Construct.

+ 5 - 5
Source/Samples/40_Localization/L10n.cpp

@@ -39,7 +39,7 @@
 
 
 #include <Urho3D/DebugNew.h>
 #include <Urho3D/DebugNew.h>
 
 
-DEFINE_APPLICATION_MAIN(L10n)
+URHO3D_DEFINE_APPLICATION_MAIN(L10n)
 
 
 L10n::L10n(Context* context) :
 L10n::L10n(Context* context) :
     Sample(context)
     Sample(context)
@@ -73,7 +73,7 @@ void L10n::InitLocalizationSystem()
     // You can load multiple files
     // You can load multiple files
     l10n->LoadJSONFile("StringsDe.json");
     l10n->LoadJSONFile("StringsDe.json");
     // Hook up to the change language
     // Hook up to the change language
-    SubscribeToEvent(E_CHANGELANGUAGE, HANDLER(L10n, HandleChangeLanguage));
+    SubscribeToEvent(E_CHANGELANGUAGE, URHO3D_HANDLER(L10n, HandleChangeLanguage));
 }
 }
 
 
 void L10n::CreateGUI()
 void L10n::CreateGUI()
@@ -122,7 +122,7 @@ void L10n::CreateGUI()
 
 
     t->SetAlignment(HA_CENTER, VA_CENTER);
     t->SetAlignment(HA_CENTER, VA_CENTER);
     t->SetStyle("Text");
     t->SetStyle("Text");
-    SubscribeToEvent(b, E_RELEASED, HANDLER(L10n, HandleChangeLangButtonPressed));
+    SubscribeToEvent(b, E_RELEASED, URHO3D_HANDLER(L10n, HandleChangeLangButtonPressed));
 
 
     b = new Button(context_);
     b = new Button(context_);
     window->AddChild(b);
     window->AddChild(b);
@@ -135,7 +135,7 @@ void L10n::CreateGUI()
     // Manually set text in the current language
     // Manually set text in the current language
     t->SetText(l10n->Get("quit"));
     t->SetText(l10n->Get("quit"));
 
 
-    SubscribeToEvent(b, E_RELEASED, HANDLER(L10n, HandleQuitButtonPressed));
+    SubscribeToEvent(b, E_RELEASED, URHO3D_HANDLER(L10n, HandleQuitButtonPressed));
 }
 }
 
 
 void L10n::CreateScene()
 void L10n::CreateScene()
@@ -186,7 +186,7 @@ void L10n::CreateScene()
     SharedPtr<Viewport> viewport(new Viewport(context_, scene_, cameraNode_->GetComponent<Camera>()));
     SharedPtr<Viewport> viewport(new Viewport(context_, scene_, cameraNode_->GetComponent<Camera>()));
     renderer->SetViewport(0, viewport);
     renderer->SetViewport(0, viewport);
 
 
-    SubscribeToEvent(E_UPDATE, HANDLER(L10n, HandleUpdate));
+    SubscribeToEvent(E_UPDATE, URHO3D_HANDLER(L10n, HandleUpdate));
 }
 }
 
 
 void L10n::HandleUpdate(StringHash eventType, VariantMap& eventData)
 void L10n::HandleUpdate(StringHash eventType, VariantMap& eventData)

+ 1 - 1
Source/Samples/40_Localization/L10n.h

@@ -31,7 +31,7 @@
 ///     - The manually reaction to change language
 ///     - The manually reaction to change language
 class L10n : public Sample
 class L10n : public Sample
 {
 {
-    OBJECT(L10n, Sample);
+    URHO3D_OBJECT(L10n, Sample);
 
 
 public:
 public:
     /// Construct.
     /// Construct.

+ 6 - 6
Source/Samples/41_DatabaseDemo/DatabaseDemo.cpp

@@ -34,7 +34,7 @@
 #include "DatabaseDemo.h"
 #include "DatabaseDemo.h"
 
 
 // Expands to this example's entry-point
 // Expands to this example's entry-point
-DEFINE_APPLICATION_MAIN(DatabaseDemo)
+URHO3D_DEFINE_APPLICATION_MAIN(DatabaseDemo)
 
 
 DatabaseDemo::DatabaseDemo(Context* context) :
 DatabaseDemo::DatabaseDemo(Context* context) :
     Sample(context),
     Sample(context),
@@ -58,11 +58,11 @@ void DatabaseDemo::Start()
     Sample::Start();
     Sample::Start();
 
 
     // Subscribe to console commands and the frame update
     // Subscribe to console commands and the frame update
-    SubscribeToEvent(E_CONSOLECOMMAND, HANDLER(DatabaseDemo, HandleConsoleCommand));
-    SubscribeToEvent(E_UPDATE, HANDLER(DatabaseDemo, HandleUpdate));
+    SubscribeToEvent(E_CONSOLECOMMAND, URHO3D_HANDLER(DatabaseDemo, HandleConsoleCommand));
+    SubscribeToEvent(E_UPDATE, URHO3D_HANDLER(DatabaseDemo, HandleUpdate));
 
 
     // Subscribe key down event
     // Subscribe key down event
-    SubscribeToEvent(E_KEYDOWN, HANDLER(DatabaseDemo, HandleEscKeyDown));
+    SubscribeToEvent(E_KEYDOWN, URHO3D_HANDLER(DatabaseDemo, HandleEscKeyDown));
 
 
     // Hide logo to make room for the console
     // Hide logo to make room for the console
     SetLogoVisible(false);
     SetLogoVisible(false);
@@ -102,7 +102,7 @@ void DatabaseDemo::Start()
         GetSubsystem<Database>()->Connect(Database::GetAPI() == DBAPI_ODBC ? "Driver=SQLite3;Database=:memory:" : "file://");
         GetSubsystem<Database>()->Connect(Database::GetAPI() == DBAPI_ODBC ? "Driver=SQLite3;Database=:memory:" : "file://");
 
 
     // Subscribe to database cursor event to loop through query resultset
     // Subscribe to database cursor event to loop through query resultset
-    SubscribeToEvent(E_DBCURSOR, HANDLER(DatabaseDemo, HandleDbCursor));
+    SubscribeToEvent(E_DBCURSOR, URHO3D_HANDLER(DatabaseDemo, HandleDbCursor));
 
 
     // Show instruction
     // Show instruction
     Print("This demo connects to temporary in-memory database.\n"
     Print("This demo connects to temporary in-memory database.\n"
@@ -217,5 +217,5 @@ void DatabaseDemo::HandleInput(const String& input)
 void DatabaseDemo::Print(const String& output)
 void DatabaseDemo::Print(const String& output)
 {
 {
     // Logging appears both in the engine console and stdout
     // Logging appears both in the engine console and stdout
-    LOGRAW(output + "\n");
+    URHO3D_LOGRAW(output + "\n");
 }
 }

+ 1 - 1
Source/Samples/41_DatabaseDemo/DatabaseDemo.h

@@ -27,7 +27,7 @@
 /// Database demo. This sample demonstrates how to use database subsystem to connect to a database and execute adhoc SQL statements.
 /// Database demo. This sample demonstrates how to use database subsystem to connect to a database and execute adhoc SQL statements.
 class DatabaseDemo : public Sample
 class DatabaseDemo : public Sample
 {
 {
-    OBJECT(DatabaseDemo, Sample)
+    URHO3D_OBJECT(DatabaseDemo, Sample)
 
 
 public:
 public:
     /// Construct.
     /// Construct.

+ 1 - 1
Source/Samples/Sample.h

@@ -51,7 +51,7 @@ const float TOUCH_SENSITIVITY = 2.0f;
 class Sample : public Application
 class Sample : public Application
 {
 {
     // Enable type information.
     // Enable type information.
-    OBJECT(Sample, Application);
+    URHO3D_OBJECT(Sample, Application);
 
 
 public:
 public:
     /// Construct.
     /// Construct.

+ 3 - 3
Source/Samples/Sample.inl

@@ -68,7 +68,7 @@ void Sample::Start()
         InitTouchInput();
         InitTouchInput();
     else if (GetSubsystem<Input>()->GetNumJoysticks() == 0)
     else if (GetSubsystem<Input>()->GetNumJoysticks() == 0)
         // On desktop platform, do not detect touch when we already got a joystick
         // On desktop platform, do not detect touch when we already got a joystick
-        SubscribeToEvent(E_TOUCHBEGIN, HANDLER(Sample, HandleTouchBegin));
+        SubscribeToEvent(E_TOUCHBEGIN, URHO3D_HANDLER(Sample, HandleTouchBegin));
 
 
     // Create logo
     // Create logo
     CreateLogo();
     CreateLogo();
@@ -80,9 +80,9 @@ void Sample::Start()
     CreateConsoleAndDebugHud();
     CreateConsoleAndDebugHud();
 
 
     // Subscribe key down event
     // Subscribe key down event
-    SubscribeToEvent(E_KEYDOWN, HANDLER(Sample, HandleKeyDown));
+    SubscribeToEvent(E_KEYDOWN, URHO3D_HANDLER(Sample, HandleKeyDown));
     // Subscribe scene update event
     // Subscribe scene update event
-    SubscribeToEvent(E_SCENEUPDATE, HANDLER(Sample, HandleSceneUpdate));
+    SubscribeToEvent(E_SCENEUPDATE, URHO3D_HANDLER(Sample, HandleSceneUpdate));
 }
 }
 
 
 void Sample::Stop()
 void Sample::Stop()

+ 6 - 6
Source/Tools/SpritePacker/SpritePacker.cpp

@@ -174,7 +174,7 @@ void Run(Vector<String>& arguments)
     if (inputFiles.Size() > 1)
     if (inputFiles.Size() > 1)
     {
     {
         outputFile = inputFiles[inputFiles.Size() - 1];
         outputFile = inputFiles[inputFiles.Size() - 1];
-        LOGINFO("Output file set to " + outputFile + ".");
+        URHO3D_LOGINFO("Output file set to " + outputFile + ".");
         inputFiles.Erase(inputFiles.Size() - 1);
         inputFiles.Erase(inputFiles.Size() - 1);
     }
     }
 
 
@@ -188,7 +188,7 @@ void Run(Vector<String>& arguments)
     // check all input files exist
     // check all input files exist
     for (unsigned i = 0; i < inputFiles.Size(); ++i)
     for (unsigned i = 0; i < inputFiles.Size(); ++i)
     {
     {
-        LOGINFO("Checking " + inputFiles[i] + " to see if file exists.");
+        URHO3D_LOGINFO("Checking " + inputFiles[i] + " to see if file exists.");
         if (!fileSystem->FileExists(inputFiles[i]))
         if (!fileSystem->FileExists(inputFiles[i]))
             ErrorExit("File " + inputFiles[i] + " does not exist.");
             ErrorExit("File " + inputFiles[i] + " does not exist.");
     }
     }
@@ -362,7 +362,7 @@ void Run(Vector<String>& arguments)
             subTexture.SetInt("offsetY", packerInfo->offsetY);
             subTexture.SetInt("offsetY", packerInfo->offsetY);
         }
         }
 
 
-        LOGINFO("Transfering " + packerInfo->path + " to sprite sheet.");
+        URHO3D_LOGINFO("Transfering " + packerInfo->path + " to sprite sheet.");
 
 
         File file(context, packerInfo->path);
         File file(context, packerInfo->path);
         Image image(context);
         Image image(context);
@@ -386,7 +386,7 @@ void Run(Vector<String>& arguments)
         unsigned OUTER_BOUNDS_DEBUG_COLOR = Color::BLUE.ToUInt();
         unsigned OUTER_BOUNDS_DEBUG_COLOR = Color::BLUE.ToUInt();
         unsigned INNER_BOUNDS_DEBUG_COLOR = Color::GREEN.ToUInt();
         unsigned INNER_BOUNDS_DEBUG_COLOR = Color::GREEN.ToUInt();
 
 
-        LOGINFO("Drawing debug information.");
+        URHO3D_LOGINFO("Drawing debug information.");
         for (unsigned i = 0; i < packerInfos.Size(); ++i)
         for (unsigned i = 0; i < packerInfos.Size(); ++i)
         {
         {
             SharedPtr<PackerInfo> packerInfo = packerInfos[i];
             SharedPtr<PackerInfo> packerInfo = packerInfos[i];
@@ -417,10 +417,10 @@ void Run(Vector<String>& arguments)
         }
         }
     }
     }
 
 
-    LOGINFO("Saving output image.");
+    URHO3D_LOGINFO("Saving output image.");
     spriteSheetImage.SavePNG(outputFile);
     spriteSheetImage.SavePNG(outputFile);
 
 
-    LOGINFO("Saving SpriteSheet xml file.");
+    URHO3D_LOGINFO("Saving SpriteSheet xml file.");
     File spriteSheetFile(context);
     File spriteSheetFile(context);
     spriteSheetFile.Open(spriteSheetFileName, FILE_WRITE);
     spriteSheetFile.Open(spriteSheetFileName, FILE_WRITE);
     xml.Save(spriteSheetFile);
     xml.Save(spriteSheetFile);

+ 4 - 4
Source/Tools/Urho3DPlayer/Urho3DPlayer.cpp

@@ -38,7 +38,7 @@
 
 
 #include <Urho3D/DebugNew.h>
 #include <Urho3D/DebugNew.h>
 
 
-DEFINE_APPLICATION_MAIN(Urho3DPlayer);
+URHO3D_DEFINE_APPLICATION_MAIN(Urho3DPlayer);
 
 
 Urho3DPlayer::Urho3DPlayer(Context* context) :
 Urho3DPlayer::Urho3DPlayer(Context* context) :
     Application(context)
     Application(context)
@@ -142,9 +142,9 @@ void Urho3DPlayer::Start()
         if (scriptFile_ && scriptFile_->Execute("void Start()"))
         if (scriptFile_ && scriptFile_->Execute("void Start()"))
         {
         {
             // Subscribe to script's reload event to allow live-reload of the application
             // Subscribe to script's reload event to allow live-reload of the application
-            SubscribeToEvent(scriptFile_, E_RELOADSTARTED, HANDLER(Urho3DPlayer, HandleScriptReloadStarted));
-            SubscribeToEvent(scriptFile_, E_RELOADFINISHED, HANDLER(Urho3DPlayer, HandleScriptReloadFinished));
-            SubscribeToEvent(scriptFile_, E_RELOADFAILED, HANDLER(Urho3DPlayer, HandleScriptReloadFailed));
+            SubscribeToEvent(scriptFile_, E_RELOADSTARTED, URHO3D_HANDLER(Urho3DPlayer, HandleScriptReloadStarted));
+            SubscribeToEvent(scriptFile_, E_RELOADFINISHED, URHO3D_HANDLER(Urho3DPlayer, HandleScriptReloadFinished));
+            SubscribeToEvent(scriptFile_, E_RELOADFAILED, URHO3D_HANDLER(Urho3DPlayer, HandleScriptReloadFailed));
             return;
             return;
         }
         }
 #else
 #else

+ 1 - 1
Source/Tools/Urho3DPlayer/Urho3DPlayer.h

@@ -29,7 +29,7 @@ using namespace Urho3D;
 /// Urho3DPlayer application runs a script specified on the command line.
 /// Urho3DPlayer application runs a script specified on the command line.
 class Urho3DPlayer : public Application
 class Urho3DPlayer : public Application
 {
 {
-    OBJECT(Urho3DPlayer, Application);
+    URHO3D_OBJECT(Urho3DPlayer, Application);
 
 
 public:
 public:
     /// Construct.
     /// Construct.

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

@@ -41,7 +41,7 @@ namespace Urho3D
 
 
 class ScriptResourceRouter : public ResourceRouter
 class ScriptResourceRouter : public ResourceRouter
 {
 {
-    OBJECT(ScriptResourceRouter, ResourceRouter);
+    URHO3D_OBJECT(ScriptResourceRouter, ResourceRouter);
 
 
     /// Construct.
     /// Construct.
     ScriptResourceRouter(Context* context) :
     ScriptResourceRouter(Context* context) :
@@ -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;
     }
     }
 
 
@@ -166,7 +166,7 @@ Script::~Script()
 bool Script::Execute(const String& line)
 bool Script::Execute(const String& line)
 {
 {
     // Note: compiling code each time is slow. Not to be used for performance-critical or repeating activity
     // Note: compiling code each time is slow. Not to be used for performance-critical or repeating activity
-    PROFILE(ExecuteImmediate);
+    URHO3D_PROFILE(ExecuteImmediate);
 
 
     ClearObjectTypeCache();
     ClearObjectTypeCache();
 
 
@@ -215,7 +215,7 @@ void Script::SetExecuteConsoleCommands(bool enable)
 
 
     executeConsoleCommands_ = enable;
     executeConsoleCommands_ = enable;
     if (enable)
     if (enable)
-        SubscribeToEvent(E_CONSOLECOMMAND, HANDLER(Script, HandleConsoleCommand));
+        SubscribeToEvent(E_CONSOLECOMMAND, URHO3D_HANDLER(Script, HandleConsoleCommand));
     else
     else
         UnsubscribeFromEvent(E_CONSOLECOMMAND);
         UnsubscribeFromEvent(E_CONSOLECOMMAND);
 }
 }
@@ -228,15 +228,15 @@ 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:
-        LOGWARNING(message);
+        URHO3D_LOGWARNING(message);
         break;
         break;
 
 
     default:
     default:
-        LOGINFO(message);
+        URHO3D_LOGINFO(message);
         break;
         break;
     }
     }
 }
 }

+ 1 - 1
Source/Urho3D/AngelScript/Script.h

@@ -53,7 +53,7 @@ enum DumpMode
 /// Scripting subsystem. Allows execution of AngelScript.
 /// Scripting subsystem. Allows execution of AngelScript.
 class URHO3D_API Script : public Object
 class URHO3D_API Script : public Object
 {
 {
-    OBJECT(Script, Object);
+    URHO3D_OBJECT(Script, Object);
 
 
     friend class ScriptFile;
     friend class ScriptFile;
 
 

Alguns ficheiros não foram mostrados porque muitos ficheiros mudaram neste diff