diff --git a/Code/Framework/AzCore/AzCore/EBus/Event.h b/Code/Framework/AzCore/AzCore/EBus/Event.h index 2edce0ecca..b3c29b63a2 100644 --- a/Code/Framework/AzCore/AzCore/EBus/Event.h +++ b/Code/Framework/AzCore/AzCore/EBus/Event.h @@ -9,11 +9,12 @@ #pragma once #include +#include #include #include #include #include -#include +#include namespace AZ { diff --git a/Code/Framework/AzCore/AzCore/Math/Frustum.h b/Code/Framework/AzCore/AzCore/Math/Frustum.h index c9eadfbceb..d9c6f5547e 100644 --- a/Code/Framework/AzCore/AzCore/Math/Frustum.h +++ b/Code/Framework/AzCore/AzCore/Math/Frustum.h @@ -14,6 +14,7 @@ #include #include #include +#include namespace AZ { diff --git a/Code/Framework/AzCore/AzCore/Math/Transform.cpp b/Code/Framework/AzCore/AzCore/Math/Transform.cpp index e1d5dcf399..5cb09fe9a8 100644 --- a/Code/Framework/AzCore/AzCore/Math/Transform.cpp +++ b/Code/Framework/AzCore/AzCore/Math/Transform.cpp @@ -13,9 +13,32 @@ #include #include #include +#include namespace AZ { + namespace + { + class TransformSerializer + : public SerializeContext::IDataSerializer + { + public: + // number of floats in the serialized representation, 4 for rotation, 1 for scale and 3 for translation + static constexpr int NumFloats = 8; + + // number of floats in version 1, which used 4 for rotation, 3 for scale and 3 for translation + static constexpr int NumFloatsVersion1 = 10; + + // number of floats in version 0, which stored a 3x4 matrix + static constexpr int NumFloatsVersion0 = 12; + + size_t Save(const void* classPtr, IO::GenericStream& stream, bool isDataBigEndian) override; + size_t DataToText(IO::GenericStream& in, IO::GenericStream& out, bool isDataBigEndian) override; + size_t TextToData(const char* text, unsigned int textVersion, IO::GenericStream& stream, bool isDataBigEndian) override; + bool Load(void* classPtr, IO::GenericStream& stream, unsigned int version, bool isDataBigEndian) override; + bool CompareValueData(const void* lhs, const void* rhs) override; + }; + } namespace Internal { void TransformDefaultConstructor(Transform* thisPtr) diff --git a/Code/Framework/AzCore/AzCore/Math/Transform.h b/Code/Framework/AzCore/AzCore/Math/Transform.h index 394c9d31a6..c231063c77 100644 --- a/Code/Framework/AzCore/AzCore/Math/Transform.h +++ b/Code/Framework/AzCore/AzCore/Math/Transform.h @@ -13,30 +13,9 @@ #include #include #include -#include namespace AZ { - class TransformSerializer - : public SerializeContext::IDataSerializer - { - public: - // number of floats in the serialized representation, 4 for rotation, 1 for scale and 3 for translation - static constexpr int NumFloats = 8; - - // number of floats in version 1, which used 4 for rotation, 3 for scale and 3 for translation - static constexpr int NumFloatsVersion1 = 10; - - // number of floats in version 0, which stored a 3x4 matrix - static constexpr int NumFloatsVersion0 = 12; - - size_t Save(const void* classPtr, IO::GenericStream& stream, bool isDataBigEndian) override; - size_t DataToText(IO::GenericStream& in, IO::GenericStream& out, bool isDataBigEndian) override; - size_t TextToData(const char* text, unsigned int textVersion, IO::GenericStream& stream, bool isDataBigEndian) override; - bool Load(void* classPtr, IO::GenericStream& stream, unsigned int version, bool isDataBigEndian) override; - bool CompareValueData(const void* lhs, const void* rhs) override; - }; - //! Limits for transform scale values. //! The scale should not be zero to avoid problems with inverting. //! @{ diff --git a/Code/Framework/AzCore/AzCore/Math/Vector3.h b/Code/Framework/AzCore/AzCore/Math/Vector3.h index 3c7d702f41..4be70aa02e 100644 --- a/Code/Framework/AzCore/AzCore/Math/Vector3.h +++ b/Code/Framework/AzCore/AzCore/Math/Vector3.h @@ -10,7 +10,6 @@ #include #include -#include namespace AZ { diff --git a/Code/Framework/AzFramework/AzFramework/Physics/Common/PhysicsSceneQueries.h b/Code/Framework/AzFramework/AzFramework/Physics/Common/PhysicsSceneQueries.h index f84a4f55bb..8d25922f58 100644 --- a/Code/Framework/AzFramework/AzFramework/Physics/Common/PhysicsSceneQueries.h +++ b/Code/Framework/AzFramework/AzFramework/Physics/Common/PhysicsSceneQueries.h @@ -7,6 +7,7 @@ */ #pragma once +#include #include #include #include diff --git a/Code/Framework/AzFramework/AzFramework/UnitTest/TestDebugDisplayRequests.h b/Code/Framework/AzFramework/AzFramework/UnitTest/TestDebugDisplayRequests.h index 38aba9be27..d4c6992057 100644 --- a/Code/Framework/AzFramework/AzFramework/UnitTest/TestDebugDisplayRequests.h +++ b/Code/Framework/AzFramework/AzFramework/UnitTest/TestDebugDisplayRequests.h @@ -7,6 +7,8 @@ */ #pragma once + +#include #include namespace UnitTest diff --git a/Code/Framework/AzFramework/AzFramework/Visibility/OctreeSystemComponent.cpp b/Code/Framework/AzFramework/AzFramework/Visibility/OctreeSystemComponent.cpp index 86454e26d0..5ef1cda30e 100644 --- a/Code/Framework/AzFramework/AzFramework/Visibility/OctreeSystemComponent.cpp +++ b/Code/Framework/AzFramework/AzFramework/Visibility/OctreeSystemComponent.cpp @@ -8,6 +8,7 @@ #include #include +#include namespace AzFramework { diff --git a/Code/Framework/AzFramework/Platform/Common/Default/AzFramework/Input/User/LocalUserId_Default.h b/Code/Framework/AzFramework/Platform/Common/Default/AzFramework/Input/User/LocalUserId_Default.h index 114bb6dc73..727f103c9a 100644 --- a/Code/Framework/AzFramework/Platform/Common/Default/AzFramework/Input/User/LocalUserId_Default.h +++ b/Code/Framework/AzFramework/Platform/Common/Default/AzFramework/Input/User/LocalUserId_Default.h @@ -9,7 +9,12 @@ #pragma once #include -#include +#include + +namespace AZ +{ + class ReflectContext; +} // namespace Az //////////////////////////////////////////////////////////////////////////////////////////////////// namespace AzFramework diff --git a/Code/Framework/AzToolsFramework/AzToolsFramework/Manipulators/ManipulatorSpace.h b/Code/Framework/AzToolsFramework/AzToolsFramework/Manipulators/ManipulatorSpace.h index 6c2b8971a3..c372afcf32 100644 --- a/Code/Framework/AzToolsFramework/AzToolsFramework/Manipulators/ManipulatorSpace.h +++ b/Code/Framework/AzToolsFramework/AzToolsFramework/Manipulators/ManipulatorSpace.h @@ -8,6 +8,7 @@ #pragma once #include +#include namespace AZ { diff --git a/Code/Framework/AzToolsFramework/Tests/Prefab/PrefabTestComponent.cpp b/Code/Framework/AzToolsFramework/Tests/Prefab/PrefabTestComponent.cpp index 2a0cb72692..8f7ee398a0 100644 --- a/Code/Framework/AzToolsFramework/Tests/Prefab/PrefabTestComponent.cpp +++ b/Code/Framework/AzToolsFramework/Tests/Prefab/PrefabTestComponent.cpp @@ -7,6 +7,7 @@ */ #include +#include namespace UnitTest { diff --git a/Code/Tools/SceneAPI/SceneCore/Utilities/CoordinateSystemConverter.h b/Code/Tools/SceneAPI/SceneCore/Utilities/CoordinateSystemConverter.h index 5c14b14c7d..24f7243b32 100644 --- a/Code/Tools/SceneAPI/SceneCore/Utilities/CoordinateSystemConverter.h +++ b/Code/Tools/SceneAPI/SceneCore/Utilities/CoordinateSystemConverter.h @@ -11,6 +11,7 @@ #include #include #include +#include #include namespace AZ::SceneAPI diff --git a/Code/Tools/SceneAPI/SceneCore/Utilities/DebugOutput.cpp b/Code/Tools/SceneAPI/SceneCore/Utilities/DebugOutput.cpp index 50fefce632..e688ebccd4 100644 --- a/Code/Tools/SceneAPI/SceneCore/Utilities/DebugOutput.cpp +++ b/Code/Tools/SceneAPI/SceneCore/Utilities/DebugOutput.cpp @@ -7,6 +7,7 @@ */ #include "DebugOutput.h" +#include namespace AZ::SceneAPI::Utilities { diff --git a/Code/Tools/SceneAPI/SceneCore/Utilities/DebugOutput.h b/Code/Tools/SceneAPI/SceneCore/Utilities/DebugOutput.h index 7032696bbb..5bb57a6167 100644 --- a/Code/Tools/SceneAPI/SceneCore/Utilities/DebugOutput.h +++ b/Code/Tools/SceneAPI/SceneCore/Utilities/DebugOutput.h @@ -11,6 +11,8 @@ #include #include #include +#include +#include #include namespace AZ::SceneAPI::Utilities diff --git a/Gems/Atom/RHI/Code/Include/Atom/RHI/DrawItem.h b/Gems/Atom/RHI/Code/Include/Atom/RHI/DrawItem.h index 9c9e7c9930..4a342a06d1 100644 --- a/Gems/Atom/RHI/Code/Include/Atom/RHI/DrawItem.h +++ b/Gems/Atom/RHI/Code/Include/Atom/RHI/DrawItem.h @@ -7,7 +7,6 @@ */ #pragma once -#include #include #include #include @@ -23,6 +22,10 @@ namespace AZ class ShaderResourceGroup; struct Scissor; struct Viewport; + struct DefaultNamespaceType; + // Forward declaration to + template + struct Handle; struct DrawLinear { @@ -149,13 +152,13 @@ namespace AZ }; using DrawItemSortKey = int64_t; - + // A filter associate to a DrawItem which can be used to filter the DrawItem when submitting to command list - using DrawFilterTag = Handle; + using DrawFilterTag = Handle; using DrawFilterMask = uint32_t; // AZStd::bitset's impelmentation is too expensive. constexpr uint32_t DrawFilterMaskDefaultValue = uint32_t(-1); // Default all bit to 1. static_assert(sizeof(DrawFilterMask) * 8 >= Limits::Pipeline::DrawFilterTagCountMax, "DrawFilterMask doesn't have enough bits for maximum tag count"); - + struct DrawItemProperties { DrawItemProperties() = default; diff --git a/Gems/AtomLyIntegration/CommonFeatures/Code/Source/PostProcess/GradientWeightModifier/GradientWeightModifierController.cpp b/Gems/AtomLyIntegration/CommonFeatures/Code/Source/PostProcess/GradientWeightModifier/GradientWeightModifierController.cpp index f8a43063f9..dd1eef9039 100644 --- a/Gems/AtomLyIntegration/CommonFeatures/Code/Source/PostProcess/GradientWeightModifier/GradientWeightModifierController.cpp +++ b/Gems/AtomLyIntegration/CommonFeatures/Code/Source/PostProcess/GradientWeightModifier/GradientWeightModifierController.cpp @@ -6,7 +6,9 @@ * */ + #include +#include namespace AZ { diff --git a/Gems/AtomLyIntegration/CommonFeatures/Code/Source/PostProcess/RadiusWeightModifier/RadiusWeightModifierComponentController.cpp b/Gems/AtomLyIntegration/CommonFeatures/Code/Source/PostProcess/RadiusWeightModifier/RadiusWeightModifierComponentController.cpp index 8c02b200c1..c2d7176436 100644 --- a/Gems/AtomLyIntegration/CommonFeatures/Code/Source/PostProcess/RadiusWeightModifier/RadiusWeightModifierComponentController.cpp +++ b/Gems/AtomLyIntegration/CommonFeatures/Code/Source/PostProcess/RadiusWeightModifier/RadiusWeightModifierComponentController.cpp @@ -7,6 +7,7 @@ */ #include +#include namespace AZ { diff --git a/Gems/AtomLyIntegration/CommonFeatures/Code/Source/PostProcess/ShapeWeightModifier/ShapeWeightModifierComponentController.cpp b/Gems/AtomLyIntegration/CommonFeatures/Code/Source/PostProcess/ShapeWeightModifier/ShapeWeightModifierComponentController.cpp index 62eed9252b..42898cd188 100644 --- a/Gems/AtomLyIntegration/CommonFeatures/Code/Source/PostProcess/ShapeWeightModifier/ShapeWeightModifierComponentController.cpp +++ b/Gems/AtomLyIntegration/CommonFeatures/Code/Source/PostProcess/ShapeWeightModifier/ShapeWeightModifierComponentController.cpp @@ -8,6 +8,7 @@ #include #include +#include namespace AZ { diff --git a/Gems/AtomLyIntegration/CommonFeatures/Code/Source/Scripting/EntityReferenceComponentController.cpp b/Gems/AtomLyIntegration/CommonFeatures/Code/Source/Scripting/EntityReferenceComponentController.cpp index 00a1142446..b1ef3f97d6 100644 --- a/Gems/AtomLyIntegration/CommonFeatures/Code/Source/Scripting/EntityReferenceComponentController.cpp +++ b/Gems/AtomLyIntegration/CommonFeatures/Code/Source/Scripting/EntityReferenceComponentController.cpp @@ -7,6 +7,7 @@ */ #include +#include namespace AZ { diff --git a/Gems/AudioSystem/Code/Platform/Common/Default/AudioSystemGemSystemComponent_default.cpp b/Gems/AudioSystem/Code/Platform/Common/Default/AudioSystemGemSystemComponent_default.cpp index ac565c89b2..9078b07aaa 100644 --- a/Gems/AudioSystem/Code/Platform/Common/Default/AudioSystemGemSystemComponent_default.cpp +++ b/Gems/AudioSystem/Code/Platform/Common/Default/AudioSystemGemSystemComponent_default.cpp @@ -9,6 +9,7 @@ #include #include #include +#include namespace Audio::Platform { diff --git a/Gems/EMotionFX/Code/EMotionFX/Source/Mesh.h b/Gems/EMotionFX/Code/EMotionFX/Source/Mesh.h index 07b8401895..f9a9f960ce 100644 --- a/Gems/EMotionFX/Code/EMotionFX/Source/Mesh.h +++ b/Gems/EMotionFX/Code/EMotionFX/Source/Mesh.h @@ -10,6 +10,7 @@ #include "EMotionFXConfig.h" #include +#include #include #include "BaseObject.h" #include "VertexAttributeLayer.h" diff --git a/Gems/ImGui/Code/Source/LYCommonMenu/ImGuiLYAssetExplorer.h b/Gems/ImGui/Code/Source/LYCommonMenu/ImGuiLYAssetExplorer.h index bf7b00c5aa..6d264c2f4e 100644 --- a/Gems/ImGui/Code/Source/LYCommonMenu/ImGuiLYAssetExplorer.h +++ b/Gems/ImGui/Code/Source/LYCommonMenu/ImGuiLYAssetExplorer.h @@ -14,6 +14,7 @@ #include #include #include +#include namespace ImGui { diff --git a/Gems/LmbrCentral/Code/Source/Asset/AssetSystemDebugComponent.cpp b/Gems/LmbrCentral/Code/Source/Asset/AssetSystemDebugComponent.cpp index f3d4d34b42..1f95f2a55d 100644 --- a/Gems/LmbrCentral/Code/Source/Asset/AssetSystemDebugComponent.cpp +++ b/Gems/LmbrCentral/Code/Source/Asset/AssetSystemDebugComponent.cpp @@ -12,6 +12,7 @@ #include "AzCore/Asset/AssetManager.h" #include #include +#include namespace LmbrCentral { diff --git a/Gems/LyShine/Code/Source/UiFlipbookAnimationComponent.cpp b/Gems/LyShine/Code/Source/UiFlipbookAnimationComponent.cpp index 5986714100..f0423c93a3 100644 --- a/Gems/LyShine/Code/Source/UiFlipbookAnimationComponent.cpp +++ b/Gems/LyShine/Code/Source/UiFlipbookAnimationComponent.cpp @@ -12,6 +12,7 @@ #include #include #include +#include #include #include @@ -130,6 +131,29 @@ public: } }; +//////////////////////////////////////////////////////////////////////////////////////////////////// +static bool UiFlipbookAnimationComponentVersionConverter(AZ::SerializeContext& context, + AZ::SerializeContext::DataElementNode& classElement) +{ + // conversion from version 2: + // - Rename "frame delay" to "framerate" + // - Set "framerate unit" to seconds (default moving forward is FPS, but we use seconds for legacy compatibility) + if (classElement.GetVersion() <= 2) + { + if (!ConvertFrameDelayToFramerate(context, classElement)) + { + return false; + } + + if (!ConvertFramerateUnitToSeconds(context, classElement)) + { + return false; + } + } + + return true; +} + //////////////////////////////////////////////////////////////////////////////////////////////////// void UiFlipbookAnimationComponent::Reflect(AZ::ReflectContext* context) @@ -138,7 +162,7 @@ void UiFlipbookAnimationComponent::Reflect(AZ::ReflectContext* context) if (serializeContext) { serializeContext->Class() - ->Version(3, &VersionConverter) + ->Version(3, &UiFlipbookAnimationComponentVersionConverter) ->Field("Start Frame", &UiFlipbookAnimationComponent::m_startFrame) ->Field("End Frame", &UiFlipbookAnimationComponent::m_endFrame) ->Field("Loop Start Frame", &UiFlipbookAnimationComponent::m_loopStartFrame) @@ -268,29 +292,6 @@ void UiFlipbookAnimationComponent::Reflect(AZ::ReflectContext* context) } } -//////////////////////////////////////////////////////////////////////////////////////////////////// -bool UiFlipbookAnimationComponent::VersionConverter(AZ::SerializeContext& context, - AZ::SerializeContext::DataElementNode& classElement) -{ - // conversion from version 2: - // - Rename "frame delay" to "framerate" - // - Set "framerate unit" to seconds (default moving forward is FPS, but we use seconds for legacy compatibility) - if (classElement.GetVersion() <= 2) - { - if (!ConvertFrameDelayToFramerate(context, classElement)) - { - return false; - } - - if (!ConvertFramerateUnitToSeconds(context, classElement)) - { - return false; - } - } - - return true; -} - //////////////////////////////////////////////////////////////////////////////////////////////////// AZ::u32 UiFlipbookAnimationComponent::GetMaxFrame() const { diff --git a/Gems/LyShine/Code/Source/UiFlipbookAnimationComponent.h b/Gems/LyShine/Code/Source/UiFlipbookAnimationComponent.h index 12b6200802..ec47dbcd3d 100644 --- a/Gems/LyShine/Code/Source/UiFlipbookAnimationComponent.h +++ b/Gems/LyShine/Code/Source/UiFlipbookAnimationComponent.h @@ -107,9 +107,6 @@ protected: // static functions static void Reflect(AZ::ReflectContext* context); ////////////////////////////////////////////////////////////////////////// - static bool VersionConverter(AZ::SerializeContext& context, - AZ::SerializeContext::DataElementNode& classElement); - protected: // functions //! Returns a string representation of the indices used to index sprite-sheet types. diff --git a/Gems/PhysX/Code/Source/System/PhysXJointInterface.cpp b/Gems/PhysX/Code/Source/System/PhysXJointInterface.cpp index 4338d51dbd..f92801b0c7 100644 --- a/Gems/PhysX/Code/Source/System/PhysXJointInterface.cpp +++ b/Gems/PhysX/Code/Source/System/PhysXJointInterface.cpp @@ -8,6 +8,7 @@ #include #include +#include #include #include