diff --git a/source/simulation2/Simulation2.cpp b/source/simulation2/Simulation2.cpp index c513c31dc7..b4230e28ec 100644 --- a/source/simulation2/Simulation2.cpp +++ b/source/simulation2/Simulation2.cpp @@ -63,7 +63,6 @@ #include #include #include -#include #include #include #include diff --git a/source/simulation2/components/CCmpRangeManager.cpp b/source/simulation2/components/CCmpRangeManager.cpp index fd0c19388f..ce921d5699 100644 --- a/source/simulation2/components/CCmpRangeManager.cpp +++ b/source/simulation2/components/CCmpRangeManager.cpp @@ -66,7 +66,6 @@ #include #include #include -#include #include #include #include diff --git a/source/simulation2/components/CCmpUnitMotion.h b/source/simulation2/components/CCmpUnitMotion.h index a31616ed04..fab143b744 100644 --- a/source/simulation2/components/CCmpUnitMotion.h +++ b/source/simulation2/components/CCmpUnitMotion.h @@ -18,31 +18,45 @@ #ifndef INCLUDED_CCMPUNITMOTION #define INCLUDED_CCMPUNITMOTION -#include "simulation2/system/Component.h" -#include "ICmpUnitMotion.h" - -#include "simulation2/components/CCmpUnitMotionManager.h" -#include "simulation2/components/ICmpObstruction.h" -#include "simulation2/components/ICmpObstructionManager.h" -#include "simulation2/components/ICmpOwnership.h" -#include "simulation2/components/ICmpPosition.h" -#include "simulation2/components/ICmpPathfinder.h" -#include "simulation2/components/ICmpRangeManager.h" -#include "simulation2/components/ICmpValueModificationManager.h" -#include "simulation2/components/ICmpVisual.h" -#include "simulation2/helpers/Geometry.h" -#include "simulation2/helpers/Render.h" -#include "simulation2/MessageTypes.h" -#include "simulation2/serialization/SerializedPathfinder.h" -#include "simulation2/serialization/SerializedTypes.h" - +#include "graphics/Color.h" #include "graphics/Overlay.h" +#include "lib/debug.h" +#include "lib/types.h" +#include "maths/Fixed.h" #include "maths/FixedVector2D.h" +#include "maths/FixedVector3D.h" +#include "maths/MathUtil.h" #include "ps/CLogger.h" #include "ps/Profile.h" #include "renderer/Scene.h" +#include "simulation2/MessageTypes.h" +#include "simulation2/components/CCmpUnitMotionManager.h" +#include "simulation2/components/ICmpObstruction.h" +#include "simulation2/components/ICmpObstructionManager.h" +#include "simulation2/components/ICmpPathfinder.h" +#include "simulation2/components/ICmpPosition.h" +#include "simulation2/components/ICmpUnitMotion.h" +#include "simulation2/components/ICmpUnitMotionManager.h" +#include "simulation2/components/ICmpValueModificationManager.h" +#include "simulation2/components/ICmpVisual.h" +#include "simulation2/helpers/Geometry.h" +#include "simulation2/helpers/PathGoal.h" +#include "simulation2/helpers/Pathfinding.h" +#include "simulation2/helpers/Position.h" +#include "simulation2/helpers/Render.h" +#include "simulation2/serialization/SerializeTemplates.h" +#include "simulation2/serialization/SerializedPathfinder.h" +#include "simulation2/serialization/SerializedTypes.h" +#include "simulation2/system/Component.h" +#include "simulation2/system/Entity.h" +#include "simulation2/system/Message.h" #include +#include +#include +#include +#include +#include // NB: this implementation of ICmpUnitMotion is very tightly coupled with UnitMotionManager. // As such, both are compiled in the same TU. diff --git a/source/simulation2/components/CCmpUnitMotionManager.h b/source/simulation2/components/CCmpUnitMotionManager.h index ee2f5a7fe0..f9fdd3cdbe 100644 --- a/source/simulation2/components/CCmpUnitMotionManager.h +++ b/source/simulation2/components/CCmpUnitMotionManager.h @@ -18,12 +18,13 @@ #ifndef INCLUDED_CCMPUNITMOTIONMANAGER #define INCLUDED_CCMPUNITMOTIONMANAGER -#include "simulation2/system/Component.h" -#include "ICmpUnitMotionManager.h" - #include "simulation2/MessageTypes.h" +#include "simulation2/components/ICmpPosition.h" #include "simulation2/components/ICmpTerrain.h" +#include "simulation2/components/ICmpUnitMotionManager.h" #include "simulation2/helpers/Grid.h" +#include "simulation2/helpers/Position.h" +#include "simulation2/system/Component.h" #include "simulation2/system/EntityMap.h" class CCmpUnitMotion; diff --git a/source/simulation2/components/CCmpVisualActor.cpp b/source/simulation2/components/CCmpVisualActor.cpp index 1c88c7d443..dedc405b8c 100644 --- a/source/simulation2/components/CCmpVisualActor.cpp +++ b/source/simulation2/components/CCmpVisualActor.cpp @@ -17,42 +17,57 @@ #include "precompiled.h" -#include "simulation2/system/Component.h" #include "ICmpVisual.h" -#include "simulation2/MessageTypes.h" -#include "simulation2/serialization/SerializedTypes.h" - -#include "ICmpFootprint.h" -#include "ICmpIdentity.h" -#include "ICmpMirage.h" -#include "ICmpOwnership.h" -#include "ICmpPlayer.h" -#include "ICmpPlayerManager.h" -#include "ICmpPosition.h" -#include "ICmpTemplateManager.h" -#include "ICmpTerrain.h" -#include "ICmpUnitMotion.h" -#include "ICmpUnitRenderer.h" -#include "ICmpValueModificationManager.h" -#include "ICmpVisibility.h" -#include "ICmpSound.h" - +#include "graphics/Color.h" #include "graphics/Decal.h" +#include "graphics/HeightMipmap.h" #include "graphics/Model.h" +#include "graphics/ModelAbstract.h" #include "graphics/ObjectBase.h" #include "graphics/ObjectEntry.h" #include "graphics/Unit.h" #include "graphics/UnitAnimation.h" #include "graphics/UnitManager.h" +#include "lib/debug.h" +#include "lib/path.h" +#include "lib/types.h" +#include "lib/utf8.h" +#include "maths/BoundingBoxAligned.h" +#include "maths/BoundingBoxOriented.h" #include "maths/BoundingSphere.h" -#include "maths/Frustum.h" +#include "maths/Fixed.h" +#include "maths/FixedVector3D.h" #include "maths/Matrix3D.h" #include "maths/Vector3D.h" -#include "ps/algorithm.h" #include "ps/CLogger.h" -#include "ps/GameSetup/Config.h" +#include "ps/CStr.h" +#include "ps/algorithm.h" #include "renderer/Scene.h" +#include "simulation2/MessageTypes.h" +#include "simulation2/components/ICmpFootprint.h" +#include "simulation2/components/ICmpIdentity.h" +#include "simulation2/components/ICmpMirage.h" +#include "simulation2/components/ICmpOwnership.h" +#include "simulation2/components/ICmpPlayerManager.h" +#include "simulation2/components/ICmpPosition.h" +#include "simulation2/components/ICmpSound.h" +#include "simulation2/components/ICmpTemplateManager.h" +#include "simulation2/components/ICmpUnitRenderer.h" +#include "simulation2/components/ICmpValueModificationManager.h" +#include "simulation2/components/ICmpVisibility.h" +#include "simulation2/helpers/Player.h" +#include "simulation2/helpers/Position.h" +#include "simulation2/serialization/SerializeTemplates.h" +#include "simulation2/serialization/SerializedTypes.h" +#include "simulation2/system/Component.h" +#include "simulation2/system/Message.h" + +#include +#include +#include +#include +#include class CCmpVisualActor final : public ICmpVisual { diff --git a/source/simulation2/components/ICmpAIInterface.h b/source/simulation2/components/ICmpAIInterface.h index 33aea463c4..d12853e277 100644 --- a/source/simulation2/components/ICmpAIInterface.h +++ b/source/simulation2/components/ICmpAIInterface.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2011 Wildfire Games. +/* Copyright (C) 2025 Wildfire Games. * This file is part of 0 A.D. * * 0 A.D. is free software: you can redistribute it and/or modify @@ -18,8 +18,12 @@ #ifndef INCLUDED_ICMPAIINTERFACE #define INCLUDED_ICMPAIINTERFACE +#include "simulation2/system/Component.h" #include "simulation2/system/Interface.h" +#include +#include + class ICmpAIInterface : public IComponent { public: diff --git a/source/simulation2/components/ICmpAIManager.h b/source/simulation2/components/ICmpAIManager.h index c5d3d75fbb..2cc9feecf0 100644 --- a/source/simulation2/components/ICmpAIManager.h +++ b/source/simulation2/components/ICmpAIManager.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2017 Wildfire Games. +/* Copyright (C) 2025 Wildfire Games. * This file is part of 0 A.D. * * 0 A.D. is free software: you can redistribute it and/or modify @@ -18,9 +18,15 @@ #ifndef INCLUDED_ICMPAIMANAGER #define INCLUDED_ICMPAIMANAGER +#include "simulation2/helpers/Player.h" +#include "simulation2/system/Component.h" #include "simulation2/system/Interface.h" -#include "simulation2/helpers/Player.h" +#include +#include +#include + +class ScriptInterface; class ICmpAIManager : public IComponent { diff --git a/source/simulation2/components/ICmpAttack.h b/source/simulation2/components/ICmpAttack.h index e44e54ada9..1933e6461d 100644 --- a/source/simulation2/components/ICmpAttack.h +++ b/source/simulation2/components/ICmpAttack.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2020 Wildfire Games. +/* Copyright (C) 2025 Wildfire Games. * This file is part of 0 A.D. * * 0 A.D. is free software: you can redistribute it and/or modify @@ -19,8 +19,11 @@ #define INCLUDED_ICMPATTACK #include "ps/CStr.h" +#include "simulation2/system/Component.h" #include "simulation2/system/Interface.h" +#include +#include #include class ICmpAttack : public IComponent diff --git a/source/simulation2/components/ICmpDecay.h b/source/simulation2/components/ICmpDecay.h index 60d6be643c..556744c34a 100644 --- a/source/simulation2/components/ICmpDecay.h +++ b/source/simulation2/components/ICmpDecay.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2010 Wildfire Games. +/* Copyright (C) 2025 Wildfire Games. * This file is part of 0 A.D. * * 0 A.D. is free software: you can redistribute it and/or modify @@ -18,8 +18,11 @@ #ifndef INCLUDED_ICMPDECAY #define INCLUDED_ICMPDECAY +#include "simulation2/system/Component.h" #include "simulation2/system/Interface.h" +#include + /** * Animated corpse-decay. */ diff --git a/source/simulation2/components/ICmpFogging.h b/source/simulation2/components/ICmpFogging.h index cde8d4d902..f8803de895 100644 --- a/source/simulation2/components/ICmpFogging.h +++ b/source/simulation2/components/ICmpFogging.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2015 Wildfire Games. +/* Copyright (C) 2025 Wildfire Games. * This file is part of 0 A.D. * * 0 A.D. is free software: you can redistribute it and/or modify @@ -18,9 +18,11 @@ #ifndef INCLUDED_ICMPFOGGING #define INCLUDED_ICMPFOGGING +#include "simulation2/helpers/Player.h" +#include "simulation2/system/Component.h" #include "simulation2/system/Interface.h" -#include "simulation2/helpers/Player.h" +#include /** * Handles the fogging of out-of-sight enemy entities, by creating mirage diff --git a/source/simulation2/components/ICmpFootprint.h b/source/simulation2/components/ICmpFootprint.h index 05074eafe1..5160dd4207 100644 --- a/source/simulation2/components/ICmpFootprint.h +++ b/source/simulation2/components/ICmpFootprint.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2017 Wildfire Games. +/* Copyright (C) 2025 Wildfire Games. * This file is part of 0 A.D. * * 0 A.D. is free software: you can redistribute it and/or modify @@ -18,9 +18,12 @@ #ifndef INCLUDED_ICMPFOOTPRINT #define INCLUDED_ICMPFOOTPRINT +#include "simulation2/helpers/Position.h" +#include "simulation2/system/Component.h" +#include "simulation2/system/Entity.h" #include "simulation2/system/Interface.h" -#include "simulation2/helpers/Position.h" +#include class CFixedVector3D; diff --git a/source/simulation2/components/ICmpGarrisonHolder.h b/source/simulation2/components/ICmpGarrisonHolder.h index a81a3b2548..bd01940610 100644 --- a/source/simulation2/components/ICmpGarrisonHolder.h +++ b/source/simulation2/components/ICmpGarrisonHolder.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2021 Wildfire Games. +/* Copyright (C) 2025 Wildfire Games. * This file is part of 0 A.D. * * 0 A.D. is free software: you can redistribute it and/or modify @@ -18,8 +18,11 @@ #ifndef INCLUDED_ICMPGARRISONHOLDER #define INCLUDED_ICMPGARRISONHOLDER +#include "simulation2/system/Component.h" +#include "simulation2/system/Entity.h" #include "simulation2/system/Interface.h" +#include #include class ICmpGarrisonHolder : public IComponent diff --git a/source/simulation2/components/ICmpGuiInterface.h b/source/simulation2/components/ICmpGuiInterface.h index cc214cc601..cf55dc9894 100644 --- a/source/simulation2/components/ICmpGuiInterface.h +++ b/source/simulation2/components/ICmpGuiInterface.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2021 Wildfire Games. +/* Copyright (C) 2025 Wildfire Games. * This file is part of 0 A.D. * * 0 A.D. is free software: you can redistribute it and/or modify @@ -18,8 +18,13 @@ #ifndef INCLUDED_ICMPGUIINTERFACE #define INCLUDED_ICMPGUIINTERFACE +#include "simulation2/system/Component.h" #include "simulation2/system/Interface.h" +#include +#include +#include + class ICmpGuiInterface : public IComponent { public: diff --git a/source/simulation2/components/ICmpIdentity.h b/source/simulation2/components/ICmpIdentity.h index 0003c71757..1f6873d680 100644 --- a/source/simulation2/components/ICmpIdentity.h +++ b/source/simulation2/components/ICmpIdentity.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2022 Wildfire Games. +/* Copyright (C) 2025 Wildfire Games. * This file is part of 0 A.D. * * 0 A.D. is free software: you can redistribute it and/or modify @@ -18,8 +18,12 @@ #ifndef INCLUDED_ICMPIDENTITY #define INCLUDED_ICMPIDENTITY +#include "simulation2/system/Component.h" #include "simulation2/system/Interface.h" +#include +#include + /** * Identity data. * (This interface only includes the functions needed by native code for entity selection) diff --git a/source/simulation2/components/ICmpMinimap.h b/source/simulation2/components/ICmpMinimap.h index b508805c54..f87458c442 100644 --- a/source/simulation2/components/ICmpMinimap.h +++ b/source/simulation2/components/ICmpMinimap.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2022 Wildfire Games. +/* Copyright (C) 2025 Wildfire Games. * This file is part of 0 A.D. * * 0 A.D. is free software: you can redistribute it and/or modify @@ -18,10 +18,12 @@ #ifndef INCLUDED_ICMPMINIMAP #define INCLUDED_ICMPMINIMAP +#include "lib/types.h" +#include "simulation2/helpers/Position.h" +#include "simulation2/system/Component.h" #include "simulation2/system/Interface.h" -#include "simulation2/helpers/Position.h" - +#include #include /** diff --git a/source/simulation2/components/ICmpMirage.h b/source/simulation2/components/ICmpMirage.h index 5edb22734f..f15267aede 100644 --- a/source/simulation2/components/ICmpMirage.h +++ b/source/simulation2/components/ICmpMirage.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2014 Wildfire Games. +/* Copyright (C) 2025 Wildfire Games. * This file is part of 0 A.D. * * 0 A.D. is free software: you can redistribute it and/or modify @@ -18,9 +18,13 @@ #ifndef INCLUDED_ICMPMIRAGE #define INCLUDED_ICMPMIRAGE +#include "simulation2/helpers/Player.h" +#include "simulation2/helpers/Player.h" +#include "simulation2/system/Component.h" +#include "simulation2/system/Interface.h" #include "simulation2/system/Interface.h" -#include "simulation2/helpers/Player.h" +#include /** * Component allowing mirage entities to communicate with their parent entity. diff --git a/source/simulation2/components/ICmpObstruction.h b/source/simulation2/components/ICmpObstruction.h index c2c5e6641a..2c233635a9 100644 --- a/source/simulation2/components/ICmpObstruction.h +++ b/source/simulation2/components/ICmpObstruction.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2021 Wildfire Games. +/* Copyright (C) 2025 Wildfire Games. * This file is part of 0 A.D. * * 0 A.D. is free software: you can redistribute it and/or modify @@ -18,9 +18,18 @@ #ifndef INCLUDED_ICMPOBSTRUCTION #define INCLUDED_ICMPOBSTRUCTION +#include "simulation2/components/ICmpObstructionManager.h" +#include "simulation2/helpers/Position.h" +#include "simulation2/system/Component.h" +#include "simulation2/system/Entity.h" #include "simulation2/system/Interface.h" -#include "simulation2/components/ICmpObstructionManager.h" +#include +#include +#include +#include + +class CFixedVector2D; /** * Flags an entity as obstructing movement for other units, diff --git a/source/simulation2/components/ICmpObstructionManager.h b/source/simulation2/components/ICmpObstructionManager.h index 902c3f9d9b..ebd27d3790 100644 --- a/source/simulation2/components/ICmpObstructionManager.h +++ b/source/simulation2/components/ICmpObstructionManager.h @@ -18,20 +18,24 @@ #ifndef INCLUDED_ICMPOBSTRUCTIONMANAGER #define INCLUDED_ICMPOBSTRUCTIONMANAGER -#include "simulation2/system/Interface.h" - +#include "lib/debug.h" +#include "lib/types.h" +#include "maths/Fixed.h" #include "maths/FixedVector2D.h" #include "simulation2/helpers/Position.h" +#include "simulation2/system/Component.h" +#include "simulation2/system/Entity.h" +#include "simulation2/system/Interface.h" +#include #include class IObstructionTestFilter; -template -class Grid; -struct GridUpdateInformation; -using NavcellData = u16; class PathfinderPassability; +struct GridUpdateInformation; +template class Grid; +using NavcellData = u16; /** * Obstruction manager: provides efficient spatial queries over objects in the world. diff --git a/source/simulation2/components/ICmpOwnership.h b/source/simulation2/components/ICmpOwnership.h index 9e253a255a..d181256b54 100644 --- a/source/simulation2/components/ICmpOwnership.h +++ b/source/simulation2/components/ICmpOwnership.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2017 Wildfire Games. +/* Copyright (C) 2025 Wildfire Games. * This file is part of 0 A.D. * * 0 A.D. is free software: you can redistribute it and/or modify @@ -18,8 +18,11 @@ #ifndef INCLUDED_ICMPOWNERSHIP #define INCLUDED_ICMPOWNERSHIP -#include "simulation2/system/Interface.h" #include "simulation2/helpers/Player.h" +#include "simulation2/system/Component.h" +#include "simulation2/system/Interface.h" + +#include /** * Player ownership. diff --git a/source/simulation2/components/ICmpParticleManager.h b/source/simulation2/components/ICmpParticleManager.h index c1e8d52c36..8ff1b7f841 100644 --- a/source/simulation2/components/ICmpParticleManager.h +++ b/source/simulation2/components/ICmpParticleManager.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2013 Wildfire Games. +/* Copyright (C) 2025 Wildfire Games. * This file is part of 0 A.D. * * 0 A.D. is free software: you can redistribute it and/or modify @@ -18,8 +18,11 @@ #ifndef INCLUDED_ICMPPARTICLEMANAGER #define INCLUDED_ICMPPARTICLEMANAGER +#include "simulation2/system/Component.h" #include "simulation2/system/Interface.h" +#include + /** * Minimal interface for particle rendering */ diff --git a/source/simulation2/components/ICmpPathfinder.h b/source/simulation2/components/ICmpPathfinder.h index 53873244e2..cddd54ebd6 100644 --- a/source/simulation2/components/ICmpPathfinder.h +++ b/source/simulation2/components/ICmpPathfinder.h @@ -18,21 +18,25 @@ #ifndef INCLUDED_ICMPPATHFINDER #define INCLUDED_ICMPPATHFINDER -#include "simulation2/system/Interface.h" - +#include "lib/types.h" #include "simulation2/components/ICmpObstruction.h" #include "simulation2/helpers/Pathfinding.h" +#include "simulation2/helpers/Position.h" +#include "simulation2/system/Component.h" +#include "simulation2/system/Entity.h" +#include "simulation2/system/Interface.h" +#include #include +#include +#include +class CFixedVector2D; class IObstructionTestFilter; class PathGoal; - +struct GridUpdateInformation; template class Grid; -// Returned by asynchronous workers, used to send messages in the main thread. -struct WaypointPath; - struct PathResult { PathResult() = default; diff --git a/source/simulation2/components/ICmpVisibility.cpp b/source/simulation2/components/ICmpVisibility.cpp index 41018d0a25..62ceac77d9 100644 --- a/source/simulation2/components/ICmpVisibility.cpp +++ b/source/simulation2/components/ICmpVisibility.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2022 Wildfire Games. +/* Copyright (C) 2025 Wildfire Games. * This file is part of 0 A.D. * * 0 A.D. is free software: you can redistribute it and/or modify @@ -19,9 +19,12 @@ #include "ICmpVisibility.h" +#include "ps/CLogger.h" #include "simulation2/scripting/ScriptComponent.h" #include "simulation2/system/InterfaceScripted.h" +#include + BEGIN_INTERFACE_WRAPPER(Visibility) END_INTERFACE_WRAPPER(Visibility) diff --git a/source/simulation2/components/ICmpVisibility.h b/source/simulation2/components/ICmpVisibility.h index 1faf5c8593..eaf27bfb2e 100644 --- a/source/simulation2/components/ICmpVisibility.h +++ b/source/simulation2/components/ICmpVisibility.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2020 Wildfire Games. +/* Copyright (C) 2025 Wildfire Games. * This file is part of 0 A.D. * * 0 A.D. is free software: you can redistribute it and/or modify @@ -18,9 +18,12 @@ #ifndef INCLUDED_ICMPVISIBILITY #define INCLUDED_ICMPVISIBILITY +#include "simulation2/components/ICmpRangeManager.h" +#include "simulation2/helpers/Player.h" +#include "simulation2/system/Component.h" #include "simulation2/system/Interface.h" -#include "simulation2/components/ICmpRangeManager.h" +#include /** * The Visibility component is a scripted component that allows any part of the simulation to diff --git a/source/simulation2/components/ICmpVision.h b/source/simulation2/components/ICmpVision.h index b9d2c3d3b9..1021aec2f4 100644 --- a/source/simulation2/components/ICmpVision.h +++ b/source/simulation2/components/ICmpVision.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2017 Wildfire Games. +/* Copyright (C) 2025 Wildfire Games. * This file is part of 0 A.D. * * 0 A.D. is free software: you can redistribute it and/or modify @@ -18,9 +18,11 @@ #ifndef INCLUDED_ICMPVISION #define INCLUDED_ICMPVISION +#include "simulation2/helpers/Position.h" +#include "simulation2/system/Component.h" #include "simulation2/system/Interface.h" -#include "simulation2/helpers/Position.h" +#include /** * Vision range interface diff --git a/source/simulation2/components/ICmpWaterManager.h b/source/simulation2/components/ICmpWaterManager.h index 02d8403041..be53609ab0 100644 --- a/source/simulation2/components/ICmpWaterManager.h +++ b/source/simulation2/components/ICmpWaterManager.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2021 Wildfire Games. +/* Copyright (C) 2025 Wildfire Games. * This file is part of 0 A.D. * * 0 A.D. is free software: you can redistribute it and/or modify @@ -18,9 +18,11 @@ #ifndef INCLUDED_ICMPWATERMANAGER #define INCLUDED_ICMPWATERMANAGER +#include "simulation2/helpers/Position.h" +#include "simulation2/system/Component.h" #include "simulation2/system/Interface.h" -#include "simulation2/helpers/Position.h" +#include class ICmpWaterManager : public IComponent { diff --git a/source/simulation2/components/tests/test_scripts.h b/source/simulation2/components/tests/test_scripts.h index 1add87d35f..4f469f48c8 100644 --- a/source/simulation2/components/tests/test_scripts.h +++ b/source/simulation2/components/tests/test_scripts.h @@ -34,7 +34,6 @@ #include "simulation2/serialization/StdSerializer.h" #include "simulation2/system/Component.h" -#include #include #include #include diff --git a/source/simulation2/helpers/CinemaPath.cpp b/source/simulation2/helpers/CinemaPath.cpp index 44031880a4..5e2961e956 100644 --- a/source/simulation2/helpers/CinemaPath.cpp +++ b/source/simulation2/helpers/CinemaPath.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2017 Wildfire Games. +/* Copyright (C) 2025 Wildfire Games. * This file is part of 0 A.D. * * 0 A.D. is free software: you can redistribute it and/or modify @@ -19,16 +19,19 @@ #include "CinemaPath.h" -#include -#include - #include "graphics/Camera.h" +#include "lib/debug.h" #include "maths/MathUtil.h" +#include "maths/Matrix3D.h" #include "maths/Quaternion.h" #include "maths/Vector3D.h" #include "ps/CLogger.h" #include "ps/CStr.h" +#include +#include +#include + CCinemaPath::CCinemaPath(const CCinemaData& data, const TNSpline& spline, const TNSpline& targetSpline) : CCinemaData(data), TNSpline(spline), m_TargetSpline(targetSpline), m_TimeElapsed(0.f) { diff --git a/source/simulation2/helpers/HierarchicalPathfinder.h b/source/simulation2/helpers/HierarchicalPathfinder.h index c0733d9c66..909519ef58 100644 --- a/source/simulation2/helpers/HierarchicalPathfinder.h +++ b/source/simulation2/helpers/HierarchicalPathfinder.h @@ -26,7 +26,6 @@ #include "lib/types.h" #include "ps/CLogger.h" #include "renderer/TerrainOverlay.h" -#include "simulation2/helpers/Grid.h" #include #include @@ -39,6 +38,7 @@ class CSimContext; class PathGoal; struct SOverlayLine; +template class Grid; /** * Hierarchical pathfinder. diff --git a/source/simulation2/helpers/LongPathfinder.cpp b/source/simulation2/helpers/LongPathfinder.cpp index 9ac979c6a7..69a91f94b5 100644 --- a/source/simulation2/helpers/LongPathfinder.cpp +++ b/source/simulation2/helpers/LongPathfinder.cpp @@ -19,13 +19,21 @@ #include "LongPathfinder.h" +#include "graphics/SColor.h" #include "lib/bits.h" -#include "ps/Profile.h" - -#include "Geometry.h" -#include "HierarchicalPathfinder.h" +#include "maths/Fixed.h" +#include "maths/FixedVector2D.h" +#include "ps/CLogger.h" +#include "ps/Profiler2.h" +#include "renderer/TerrainOverlay.h" +#include "simulation2/helpers/HierarchicalPathfinder.h" +#include "simulation2/helpers/Pathfinding.h" +#include +#include +#include #include +#include namespace { diff --git a/source/simulation2/helpers/LongPathfinder.h b/source/simulation2/helpers/LongPathfinder.h index fc3fec9b3f..566d3b589d 100644 --- a/source/simulation2/helpers/LongPathfinder.h +++ b/source/simulation2/helpers/LongPathfinder.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2021 Wildfire Games. +/* Copyright (C) 2025 Wildfire Games. * This file is part of 0 A.D. * * 0 A.D. is free software: you can redistribute it and/or modify @@ -20,13 +20,21 @@ #include "Pathfinding.h" -#include "graphics/Overlay.h" -#include "renderer/Scene.h" -#include "renderer/TerrainOverlay.h" +#include "lib/code_generation.h" +#include "lib/debug.h" +#include "lib/types.h" #include "simulation2/helpers/Grid.h" +#include "simulation2/helpers/PathGoal.h" +#include "simulation2/helpers/Position.h" #include "simulation2/helpers/PriorityQueue.h" +#include +#include #include +#include +#include +#include +#include /** * Represents the 2D coordinates of a tile. diff --git a/source/simulation2/helpers/PathGoal.cpp b/source/simulation2/helpers/PathGoal.cpp index d6710849f2..037c1b411f 100644 --- a/source/simulation2/helpers/PathGoal.cpp +++ b/source/simulation2/helpers/PathGoal.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2018 Wildfire Games. +/* Copyright (C) 2025 Wildfire Games. * This file is part of 0 A.D. * * 0 A.D. is free software: you can redistribute it and/or modify @@ -19,10 +19,12 @@ #include "PathGoal.h" -#include "graphics/Terrain.h" -#include "Pathfinding.h" +#include "lib/code_annotation.h" +#include "maths/MathUtil.h" +#include "simulation2/helpers/Geometry.h" +#include "simulation2/helpers/Pathfinding.h" -#include "Geometry.h" +#include static bool NavcellContainsCircle(int i, int j, fixed x, fixed z, fixed r, bool inside) { diff --git a/source/simulation2/helpers/PathGoal.h b/source/simulation2/helpers/PathGoal.h index 83ccbe92be..e1ffb1d069 100644 --- a/source/simulation2/helpers/PathGoal.h +++ b/source/simulation2/helpers/PathGoal.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2018 Wildfire Games. +/* Copyright (C) 2025 Wildfire Games. * This file is part of 0 A.D. * * 0 A.D. is free software: you can redistribute it and/or modify @@ -18,6 +18,7 @@ #ifndef INCLUDED_PATHGOAL #define INCLUDED_PATHGOAL +#include "maths/Fixed.h" #include "maths/FixedVector2D.h" #include "simulation2/helpers/Position.h" diff --git a/source/simulation2/helpers/Pathfinding.cpp b/source/simulation2/helpers/Pathfinding.cpp index ec53b4fd3f..c1c0ff8abd 100644 --- a/source/simulation2/helpers/Pathfinding.cpp +++ b/source/simulation2/helpers/Pathfinding.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2021 Wildfire Games. +/* Copyright (C) 2025 Wildfire Games. * This file is part of 0 A.D. * * 0 A.D. is free software: you can redistribute it and/or modify @@ -19,10 +19,13 @@ #include "Pathfinding.h" -#include "graphics/Terrain.h" +#include "lib/debug.h" +#include "maths/FixedVector2D.h" #include "ps/CLogger.h" #include "simulation2/helpers/Grid.h" -#include "simulation2/system/ParamNode.h" +#include "simulation2/system/Component.h" + +#include namespace Pathfinding { diff --git a/source/simulation2/helpers/Pathfinding.h b/source/simulation2/helpers/Pathfinding.h index 9680d5e7db..7b7a30e1eb 100644 --- a/source/simulation2/helpers/Pathfinding.h +++ b/source/simulation2/helpers/Pathfinding.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2022 Wildfire Games. +/* Copyright (C) 2025 Wildfire Games. * This file is part of 0 A.D. * * 0 A.D. is free software: you can redistribute it and/or modify @@ -19,16 +19,19 @@ #define INCLUDED_PATHFINDING #include "graphics/Terrain.h" +#include "lib/types.h" +#include "maths/Fixed.h" #include "maths/MathUtil.h" - +#include "simulation2/helpers/PathGoal.h" +#include "simulation2/helpers/Position.h" #include "simulation2/system/Entity.h" -#include "PathGoal.h" + +#include class CParamNode; +template class Grid; typedef u16 pass_class_t; -template -class Grid; struct LongPathRequest { diff --git a/source/simulation2/helpers/Rasterize.cpp b/source/simulation2/helpers/Rasterize.cpp index c8ad5b606e..51717d0d16 100644 --- a/source/simulation2/helpers/Rasterize.cpp +++ b/source/simulation2/helpers/Rasterize.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2015 Wildfire Games. +/* Copyright (C) 2025 Wildfire Games. * This file is part of 0 A.D. * * 0 A.D. is free software: you can redistribute it and/or modify @@ -19,9 +19,13 @@ #include "Rasterize.h" +#include "maths/Fixed.h" +#include "maths/FixedVector2D.h" #include "simulation2/helpers/Geometry.h" #include "simulation2/helpers/Pathfinding.h" +#include + void SimRasterize::RasterizeRectWithClearance(Spans& spans, const ICmpObstructionManager::ObstructionSquare& shape, entity_pos_t clearance, entity_pos_t cellSize) diff --git a/source/simulation2/helpers/Rasterize.h b/source/simulation2/helpers/Rasterize.h index d1c6423b85..ee47744494 100644 --- a/source/simulation2/helpers/Rasterize.h +++ b/source/simulation2/helpers/Rasterize.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2012 Wildfire Games. +/* Copyright (C) 2025 Wildfire Games. * This file is part of 0 A.D. * * 0 A.D. is free software: you can redistribute it and/or modify @@ -23,9 +23,12 @@ * Helper functions related to rasterizing geometric shapes to grids. */ +#include "lib/types.h" #include "simulation2/components/ICmpObstructionManager.h" #include "simulation2/helpers/Position.h" +#include + namespace SimRasterize { diff --git a/source/simulation2/helpers/Selection.h b/source/simulation2/helpers/Selection.h index 21cb508d38..0dddb0ac7e 100644 --- a/source/simulation2/helpers/Selection.h +++ b/source/simulation2/helpers/Selection.h @@ -19,14 +19,15 @@ #define INCLUDED_SELECTION #include "ps/Profiler2.h" -#include "simulation2/helpers/Player.h" #include "simulation2/Simulation2.h" +#include "simulation2/helpers/Player.h" +#include "simulation2/system/Component.h" #include "simulation2/system/Entity.h" -#include "simulation2/system/IComponent.h" +#include +#include #include -class CSimulation2; class CCamera; bool CheckEntityInRect(CEntityHandle handle, const CCamera& camera, int sx0, int sy0, int sx1, int sy1, bool allowEditorSelectables); diff --git a/source/simulation2/helpers/SimulationCommand.h b/source/simulation2/helpers/SimulationCommand.h index 17e184deba..1a62c833f9 100644 --- a/source/simulation2/helpers/SimulationCommand.h +++ b/source/simulation2/helpers/SimulationCommand.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2015 Wildfire Games. +/* Copyright (C) 2025 Wildfire Games. * This file is part of 0 A.D. * * 0 A.D. is free software: you can redistribute it and/or modify @@ -21,6 +21,12 @@ #include "scriptinterface/ScriptTypes.h" #include "simulation2/helpers/Player.h" +#include +#include +#include + +struct JSContext; + /** * Simulation command, typically received over the network in multiplayer games. */ diff --git a/source/simulation2/helpers/Spatial.h b/source/simulation2/helpers/Spatial.h index bcffee87c0..e1626a47dc 100644 --- a/source/simulation2/helpers/Spatial.h +++ b/source/simulation2/helpers/Spatial.h @@ -18,8 +18,13 @@ #ifndef INCLUDED_SPATIAL #define INCLUDED_SPATIAL +#include "maths/FixedVector2D.h" +#include "maths/MathUtil.h" +#include "simulation2/helpers/Position.h" #include "simulation2/serialization/SerializeTemplates.h" +#include + /** * A very basic subdivision scheme for finding items in ranges. * Items are stored in lists in dynamic-sized divisions. diff --git a/source/simulation2/helpers/VertexPathfinder.cpp b/source/simulation2/helpers/VertexPathfinder.cpp index 932d025f0e..01fc992102 100644 --- a/source/simulation2/helpers/VertexPathfinder.cpp +++ b/source/simulation2/helpers/VertexPathfinder.cpp @@ -34,16 +34,24 @@ #include "VertexPathfinder.h" -#include "lib/timer.h" -#include "ps/Profile.h" +#include "graphics/Color.h" +#include "lib/code_generation.h" +#include "lib/debug.h" +#include "maths/MathUtil.h" +#include "ps/Profiler2.h" #include "renderer/Scene.h" #include "simulation2/components/ICmpObstructionManager.h" #include "simulation2/helpers/Grid.h" +#include "simulation2/helpers/PathGoal.h" +#include "simulation2/helpers/Position.h" #include "simulation2/helpers/PriorityQueue.h" #include "simulation2/helpers/Render.h" -#include "simulation2/system/SimContext.h" +#include +#include +#include #include +#include namespace { diff --git a/source/simulation2/helpers/VertexPathfinder.h b/source/simulation2/helpers/VertexPathfinder.h index baeef8b476..260e6a4320 100644 --- a/source/simulation2/helpers/VertexPathfinder.h +++ b/source/simulation2/helpers/VertexPathfinder.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2021 Wildfire Games. +/* Copyright (C) 2025 Wildfire Games. * This file is part of 0 A.D. * * 0 A.D. is free software: you can redistribute it and/or modify @@ -19,12 +19,20 @@ #define INCLUDED_VERTEXPATHFINDER #include "graphics/Overlay.h" +#include "lib/types.h" +#include "maths/Fixed.h" +#include "maths/FixedVector2D.h" #include "simulation2/helpers/Pathfinding.h" -#include "simulation2/system/CmpPtr.h" +#include "simulation2/system/Component.h" #include #include +class ICmpObstructionManager; +class PathGoal; +class SceneCollector; +template class Grid; + // A vertex around the corners of an obstruction // (paths will be sequences of these vertexes) struct Vertex diff --git a/source/simulation2/scripting/JSInterface_Simulation.cpp b/source/simulation2/scripting/JSInterface_Simulation.cpp index c98c3f3322..02c4eaa68a 100644 --- a/source/simulation2/scripting/JSInterface_Simulation.cpp +++ b/source/simulation2/scripting/JSInterface_Simulation.cpp @@ -51,7 +51,6 @@ #include #include #include -#include #include #include #include diff --git a/source/simulation2/scripting/MessageTypeConversions.cpp b/source/simulation2/scripting/MessageTypeConversions.cpp index cac5c51882..d40dd0242a 100644 --- a/source/simulation2/scripting/MessageTypeConversions.cpp +++ b/source/simulation2/scripting/MessageTypeConversions.cpp @@ -16,9 +16,29 @@ */ #include "precompiled.h" -#include "ps/CLogger.h" #include "scriptinterface/ScriptConversions.h" + +#include "maths/Fixed.h" +#include "ps/CLogger.h" +#include "ps/CStr.h" +#include "scriptinterface/ScriptRequest.h" #include "simulation2/MessageTypes.h" +#include "simulation2/helpers/Player.h" +#include "simulation2/helpers/Position.h" +#include "simulation2/system/Entity.h" +#include "simulation2/system/Message.h" + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include #define TOJSVAL_SETUP() \ JS::RootedObject obj(rq.cx, JS_NewPlainObject(rq.cx)); \ diff --git a/source/simulation2/scripting/ScriptComponent.cpp b/source/simulation2/scripting/ScriptComponent.cpp index b85e0cc19c..6ad0a3be89 100644 --- a/source/simulation2/scripting/ScriptComponent.cpp +++ b/source/simulation2/scripting/ScriptComponent.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2024 Wildfire Games. +/* Copyright (C) 2025 Wildfire Games. * This file is part of 0 A.D. * * 0 A.D. is free software: you can redistribute it and/or modify @@ -21,11 +21,13 @@ #include "scriptinterface/FunctionWrapper.h" #include "scriptinterface/JSON.h" -#include "scriptinterface/ScriptInterface.h" #include "scriptinterface/Object.h" -#include "simulation2/serialization/ISerializer.h" -#include "simulation2/serialization/IDeserializer.h" -#include "simulation2/system/ComponentManager.h" +#include "simulation2/system/Component.h" +#include "simulation2/system/Message.h" + +#include + +class ScriptInterface; CComponentTypeScript::CComponentTypeScript(const ScriptInterface& scriptInterface, JS::HandleValue instance) : m_ScriptInterface(scriptInterface), m_Instance(instance) diff --git a/source/simulation2/serialization/BinarySerializer.cpp b/source/simulation2/serialization/BinarySerializer.cpp index 219a4c3883..a44e508289 100644 --- a/source/simulation2/serialization/BinarySerializer.cpp +++ b/source/simulation2/serialization/BinarySerializer.cpp @@ -19,15 +19,36 @@ #include "BinarySerializer.h" -#include "lib/alignment.h" #include "lib/utf8.h" #include "ps/CLogger.h" #include "scriptinterface/FunctionWrapper.h" +#include "scriptinterface/JSON.h" #include "scriptinterface/ScriptExtraHeaders.h" #include "scriptinterface/ScriptRequest.h" -#include "scriptinterface/JSON.h" +#include "simulation2/serialization/SerializedScriptTypes.h" -#include "SerializedScriptTypes.h" +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +class JSObject; static u8 GetArrayType(js::Scalar::Type arrayType) { diff --git a/source/simulation2/serialization/BinarySerializer.h b/source/simulation2/serialization/BinarySerializer.h index 026aa89699..5632930948 100644 --- a/source/simulation2/serialization/BinarySerializer.h +++ b/source/simulation2/serialization/BinarySerializer.h @@ -21,13 +21,27 @@ #include "ISerializer.h" #include "lib/byte_order.h" - +#include "lib/code_annotation.h" +#include "lib/debug.h" +#include "lib/types.h" +#include "maths/Fixed.h" #include "scriptinterface/ScriptExtraHeaders.h" -#include "scriptinterface/ScriptForward.h" +#include "simulation2/system/Component.h" +#include +#include +#include +#include +#include +#include +#include #include #include -#include +#include + +class JSTracer; +class ScriptInterface; +class ScriptRequest; /** * Wrapper for redirecting ostream writes to CBinarySerializer's impl diff --git a/source/simulation2/serialization/DebugSerializer.cpp b/source/simulation2/serialization/DebugSerializer.cpp index c6949f452f..a68f4852b8 100644 --- a/source/simulation2/serialization/DebugSerializer.cpp +++ b/source/simulation2/serialization/DebugSerializer.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2021 Wildfire Games. +/* Copyright (C) 2025 Wildfire Games. * This file is part of 0 A.D. * * 0 A.D. is free software: you can redistribute it and/or modify @@ -19,17 +19,18 @@ #include "DebugSerializer.h" +#include "lib/debug.h" +#include "lib/secure_crt.h" +#include "ps/CStr.h" #include "scriptinterface/FunctionWrapper.h" +#include "scriptinterface/JSON.h" #include "scriptinterface/Object.h" #include "scriptinterface/ScriptRequest.h" -#include "scriptinterface/JSON.h" -#include "lib/secure_crt.h" -#include "lib/utf8.h" -#include "ps/CStr.h" - -#include #include +#include +#include +#include /* * The output format here is intended to be compatible with YAML, diff --git a/source/simulation2/serialization/DebugSerializer.h b/source/simulation2/serialization/DebugSerializer.h index f8a533bdc6..586ea535dd 100644 --- a/source/simulation2/serialization/DebugSerializer.h +++ b/source/simulation2/serialization/DebugSerializer.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2017 Wildfire Games. +/* Copyright (C) 2025 Wildfire Games. * This file is part of 0 A.D. * * 0 A.D. is free software: you can redistribute it and/or modify @@ -20,6 +20,19 @@ #include "ISerializer.h" +#include "simulation2/system/Component.h" +#include "lib/code_annotation.h" +#include "lib/types.h" +#include "maths/Fixed.h" + +#include +#include +#include +#include +#include + +class ScriptInterface; + /** * Serialize to a human-readable YAML-like format. */ diff --git a/source/simulation2/serialization/HashSerializer.cpp b/source/simulation2/serialization/HashSerializer.cpp index c2957abae5..55d777cdb6 100644 --- a/source/simulation2/serialization/HashSerializer.cpp +++ b/source/simulation2/serialization/HashSerializer.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2017 Wildfire Games. +/* Copyright (C) 2025 Wildfire Games. * This file is part of 0 A.D. * * 0 A.D. is free software: you can redistribute it and/or modify @@ -19,6 +19,10 @@ #include "HashSerializer.h" +#include "simulation2/serialization/BinarySerializer.h" + +class ScriptInterface; + CHashSerializer::CHashSerializer(const ScriptInterface& scriptInterface) : CBinarySerializer(scriptInterface) { diff --git a/source/simulation2/serialization/HashSerializer.h b/source/simulation2/serialization/HashSerializer.h index 2aa422b7f6..1158ab5048 100644 --- a/source/simulation2/serialization/HashSerializer.h +++ b/source/simulation2/serialization/HashSerializer.h @@ -18,9 +18,13 @@ #ifndef INCLUDED_HASHSERIALIZER #define INCLUDED_HASHSERIALIZER -#include "BinarySerializer.h" - +#include "lib/types.h" #include "maths/MD5.h" +#include "simulation2/serialization/BinarySerializer.h" + +#include + +class ScriptInterface; class CHashSerializerImpl { diff --git a/source/simulation2/serialization/StdDeserializer.h b/source/simulation2/serialization/StdDeserializer.h index b0abd15b0f..5557357107 100644 --- a/source/simulation2/serialization/StdDeserializer.h +++ b/source/simulation2/serialization/StdDeserializer.h @@ -18,11 +18,23 @@ #ifndef INCLUDED_STDDESERIALIZER #define INCLUDED_STDDESERIALIZER -#include "IDeserializer.h" +#include "lib/code_annotation.h" +#include "lib/types.h" +#include "simulation2/system/Component.h" +#include +#include +#include +#include +#include #include #include +class JSObject; +class JSTracer; +class ScriptInterface; +namespace JS { template class Heap; } + class CStdDeserializer : public IDeserializer { NONCOPYABLE(CStdDeserializer); diff --git a/source/simulation2/serialization/StdSerializer.cpp b/source/simulation2/serialization/StdSerializer.cpp index 95667efc4b..1ef424fe11 100644 --- a/source/simulation2/serialization/StdSerializer.cpp +++ b/source/simulation2/serialization/StdSerializer.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2017 Wildfire Games. +/* Copyright (C) 2025 Wildfire Games. * This file is part of 0 A.D. * * 0 A.D. is free software: you can redistribute it and/or modify @@ -19,6 +19,10 @@ #include "StdSerializer.h" +#include "simulation2/serialization/BinarySerializer.h" + +class ScriptInterface; + CStdSerializerImpl::CStdSerializerImpl(std::ostream& stream) : m_Stream(stream) { diff --git a/source/simulation2/serialization/StdSerializer.h b/source/simulation2/serialization/StdSerializer.h index e21fa54b7f..0a9e329d12 100644 --- a/source/simulation2/serialization/StdSerializer.h +++ b/source/simulation2/serialization/StdSerializer.h @@ -18,10 +18,14 @@ #ifndef INCLUDED_STDSERIALIZER #define INCLUDED_STDSERIALIZER -#include "BinarySerializer.h" +#include "lib/code_annotation.h" +#include "lib/types.h" +#include "simulation2/serialization/BinarySerializer.h" #include -#include +#include + +class ScriptInterface; #define DEBUG_SERIALIZER_ANNOTATE 0 // annotate the stream to help debugging if you're reading the output in a hex editor diff --git a/source/simulation2/system/ComponentManager.cpp b/source/simulation2/system/ComponentManager.cpp index 2da20f6d56..825ecffb05 100644 --- a/source/simulation2/system/ComponentManager.cpp +++ b/source/simulation2/system/ComponentManager.cpp @@ -43,7 +43,6 @@ #include #include #include -#include #include #include #include diff --git a/source/simulation2/system/EntityMap.h b/source/simulation2/system/EntityMap.h index 0486606b7d..f6952d02b1 100644 --- a/source/simulation2/system/EntityMap.h +++ b/source/simulation2/system/EntityMap.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2023 Wildfire Games. +/* Copyright (C) 2025 Wildfire Games. * This file is part of 0 A.D. * * 0 A.D. is free software: you can redistribute it and/or modify @@ -17,9 +17,17 @@ #ifndef INCLUDED_ENTITYMAP #define INCLUDED_ENTITYMAP -#include "Entity.h" - +#include "lib/debug.h" +#include "lib/types.h" #include "simulation2/serialization/SerializeTemplates.h" +#include "simulation2/system/Component.h" +#include "simulation2/system/Entity.h" + +#include +#include +#include +#include +#include /** * A fast replacement for map. diff --git a/source/simulation2/system/Message.h b/source/simulation2/system/Message.h index 8bf49caff5..ca09a2e52e 100644 --- a/source/simulation2/system/Message.h +++ b/source/simulation2/system/Message.h @@ -21,6 +21,11 @@ #include "lib/code_annotation.h" #include "scriptinterface/ScriptTypes.h" +#include +#include +#include +#include + class ScriptRequest; class CMessage diff --git a/source/simulation2/tests/test_CmpTemplateManager.h b/source/simulation2/tests/test_CmpTemplateManager.h index 14083b483a..57a80633c6 100644 --- a/source/simulation2/tests/test_CmpTemplateManager.h +++ b/source/simulation2/tests/test_CmpTemplateManager.h @@ -17,8 +17,6 @@ #include "lib/self_test.h" -#include "simulation2/system/ComponentManager.h" - #include "graphics/Terrain.h" #include "lib/file/file_system.h" #include "lib/file/vfs/vfs.h"