diff --git a/apps/navmeshtool/main.cpp b/apps/navmeshtool/main.cpp index a40a4770bf..de3ccdcf96 100644 --- a/apps/navmeshtool/main.cpp +++ b/apps/navmeshtool/main.cpp @@ -4,6 +4,7 @@ #include #include #include +#include #include #include #include diff --git a/apps/navmeshtool/navmesh.cpp b/apps/navmeshtool/navmesh.cpp index 053809eca4..5a14ff3175 100644 --- a/apps/navmeshtool/navmesh.cpp +++ b/apps/navmeshtool/navmesh.cpp @@ -11,6 +11,7 @@ #include #include #include +#include #include #include #include diff --git a/apps/navmeshtool/worldspacedata.cpp b/apps/navmeshtool/worldspacedata.cpp index be9a0df084..efa5a212e5 100644 --- a/apps/navmeshtool/worldspacedata.cpp +++ b/apps/navmeshtool/worldspacedata.cpp @@ -6,6 +6,7 @@ #include #include #include +#include #include #include #include diff --git a/apps/openmw/mwmechanics/aipackage.cpp b/apps/openmw/mwmechanics/aipackage.cpp index 906894dd9c..58e8c4d901 100644 --- a/apps/openmw/mwmechanics/aipackage.cpp +++ b/apps/openmw/mwmechanics/aipackage.cpp @@ -3,6 +3,7 @@ #include #include #include +#include #include #include diff --git a/apps/openmw/mwrender/navmesh.cpp b/apps/openmw/mwrender/navmesh.cpp index 47c06abca1..7fd12686ae 100644 --- a/apps/openmw/mwrender/navmesh.cpp +++ b/apps/openmw/mwrender/navmesh.cpp @@ -8,16 +8,17 @@ #include #include #include +#include #include #include #include -#include "../mwbase/world.hpp" #include "../mwbase/environment.hpp" #include +#include namespace MWRender { diff --git a/apps/openmw/mwrender/renderingmanager.cpp b/apps/openmw/mwrender/renderingmanager.cpp index 403c915335..349b66de98 100644 --- a/apps/openmw/mwrender/renderingmanager.cpp +++ b/apps/openmw/mwrender/renderingmanager.cpp @@ -51,6 +51,7 @@ #include #include +#include #include "../mwworld/cellstore.hpp" #include "../mwworld/class.hpp" diff --git a/apps/openmw/mwworld/scene.cpp b/apps/openmw/mwworld/scene.cpp index e60be693e7..d49d6e8fda 100644 --- a/apps/openmw/mwworld/scene.cpp +++ b/apps/openmw/mwworld/scene.cpp @@ -14,6 +14,7 @@ #include #include #include +#include #include #include diff --git a/apps/openmw/mwworld/worldimp.cpp b/apps/openmw/mwworld/worldimp.cpp index d6f8db9f24..01d3ec82a5 100644 --- a/apps/openmw/mwworld/worldimp.cpp +++ b/apps/openmw/mwworld/worldimp.cpp @@ -32,6 +32,7 @@ #include #include +#include #include diff --git a/components/detournavigator/asyncnavmeshupdater.hpp b/components/detournavigator/asyncnavmeshupdater.hpp index abdd235678..30bbc59ee8 100644 --- a/components/detournavigator/asyncnavmeshupdater.hpp +++ b/components/detournavigator/asyncnavmeshupdater.hpp @@ -10,6 +10,8 @@ #include "navmeshdb.hpp" #include "changetype.hpp" #include "agentbounds.hpp" +#include "guardednavmeshcacheitem.hpp" +#include "sharednavmeshcacheitem.hpp" #include diff --git a/components/detournavigator/cachedrecastmeshmanager.cpp b/components/detournavigator/cachedrecastmeshmanager.cpp index e350c5591f..8038de2bc0 100644 --- a/components/detournavigator/cachedrecastmeshmanager.cpp +++ b/components/detournavigator/cachedrecastmeshmanager.cpp @@ -1,5 +1,4 @@ #include "cachedrecastmeshmanager.hpp" -#include "debug.hpp" namespace DetourNavigator { diff --git a/components/detournavigator/findsmoothpath.hpp b/components/detournavigator/findsmoothpath.hpp index 537d6bde2e..9a6ac0b5cd 100644 --- a/components/detournavigator/findsmoothpath.hpp +++ b/components/detournavigator/findsmoothpath.hpp @@ -1,7 +1,6 @@ #ifndef OPENMW_COMPONENTS_DETOURNAVIGATOR_FINDSMOOTHPATH_H #define OPENMW_COMPONENTS_DETOURNAVIGATOR_FINDSMOOTHPATH_H -#include "exceptions.hpp" #include "flags.hpp" #include "settings.hpp" #include "settingsutils.hpp" diff --git a/components/detournavigator/generatenavmeshtile.cpp b/components/detournavigator/generatenavmeshtile.cpp index 2beb9d6468..b47c723efc 100644 --- a/components/detournavigator/generatenavmeshtile.cpp +++ b/components/detournavigator/generatenavmeshtile.cpp @@ -2,11 +2,9 @@ #include "dbrefgeometryobject.hpp" #include "makenavmesh.hpp" -#include "offmeshconnectionsmanager.hpp" #include "preparednavmeshdata.hpp" #include "serialization.hpp" #include "settings.hpp" -#include "tilecachedrecastmeshmanager.hpp" #include diff --git a/components/detournavigator/guardednavmeshcacheitem.hpp b/components/detournavigator/guardednavmeshcacheitem.hpp new file mode 100644 index 0000000000..e101512b74 --- /dev/null +++ b/components/detournavigator/guardednavmeshcacheitem.hpp @@ -0,0 +1,17 @@ +#ifndef OPENMW_COMPONENTS_DETOURNAVIGATOR_GUARDEDNAVMESHCACHEITEM_H +#define OPENMW_COMPONENTS_DETOURNAVIGATOR_GUARDEDNAVMESHCACHEITEM_H + +namespace Misc +{ + template + class ScopeGuarded; +} + +namespace DetourNavigator +{ + class NavMeshCacheItem; + + using GuardedNavMeshCacheItem = Misc::ScopeGuarded; +} + +#endif diff --git a/components/detournavigator/makenavmesh.cpp b/components/detournavigator/makenavmesh.cpp index 3b26ad696f..192e919334 100644 --- a/components/detournavigator/makenavmesh.cpp +++ b/components/detournavigator/makenavmesh.cpp @@ -11,10 +11,8 @@ #include "navmeshdata.hpp" #include "recastmeshbuilder.hpp" #include "navmeshdb.hpp" -#include "serialization.hpp" -#include "dbrefgeometryobject.hpp" -#include "navmeshdbutils.hpp" #include "recastparams.hpp" +#include "offmeshconnection.hpp" #include #include diff --git a/components/detournavigator/makenavmesh.hpp b/components/detournavigator/makenavmesh.hpp index b890c5fcff..511cab747e 100644 --- a/components/detournavigator/makenavmesh.hpp +++ b/components/detournavigator/makenavmesh.hpp @@ -1,17 +1,9 @@ #ifndef OPENMW_COMPONENTS_DETOURNAVIGATOR_MAKENAVMESH_H #define OPENMW_COMPONENTS_DETOURNAVIGATOR_MAKENAVMESH_H -#include "offmeshconnectionsmanager.hpp" -#include "navmeshcacheitem.hpp" #include "tileposition.hpp" #include "sharednavmesh.hpp" -#include "navmeshtilescache.hpp" -#include "offmeshconnection.hpp" -#include "navmeshdb.hpp" - -#include - -#include +#include "recastmesh.hpp" #include #include @@ -21,10 +13,12 @@ struct rcConfig; namespace DetourNavigator { - class RecastMesh; struct Settings; struct PreparedNavMeshData; struct NavMeshData; + struct OffMeshConnection; + struct AgentBounds; + struct RecastSettings; inline float getLength(const osg::Vec2i& value) { diff --git a/components/detournavigator/navigator.hpp b/components/detournavigator/navigator.hpp index df2b202cdd..1379ebd835 100644 --- a/components/detournavigator/navigator.hpp +++ b/components/detournavigator/navigator.hpp @@ -2,7 +2,7 @@ #define OPENMW_COMPONENTS_DETOURNAVIGATOR_NAVIGATOR_H #include "objectid.hpp" -#include "navmeshcacheitem.hpp" +#include "sharednavmeshcacheitem.hpp" #include "recastmeshtiles.hpp" #include "waitconditiontype.hpp" #include "heightfieldshape.hpp" @@ -23,6 +23,11 @@ namespace Loading class Listener; } +namespace osg +{ + class Stats; +} + namespace DetourNavigator { struct Settings; diff --git a/components/detournavigator/navigatorimpl.cpp b/components/detournavigator/navigatorimpl.cpp index 45f2f56d3d..2738c4a3f6 100644 --- a/components/detournavigator/navigatorimpl.cpp +++ b/components/detournavigator/navigatorimpl.cpp @@ -1,5 +1,4 @@ #include "navigatorimpl.hpp" -#include "debug.hpp" #include "settingsutils.hpp" #include diff --git a/components/detournavigator/navigatorutils.hpp b/components/detournavigator/navigatorutils.hpp index 589334ae33..01a405d89e 100644 --- a/components/detournavigator/navigatorutils.hpp +++ b/components/detournavigator/navigatorutils.hpp @@ -5,6 +5,9 @@ #include "flags.hpp" #include "settings.hpp" #include "navigator.hpp" +#include "navmeshcacheitem.hpp" + +#include #include diff --git a/components/detournavigator/navmeshcacheitem.hpp b/components/detournavigator/navmeshcacheitem.hpp index 97ad68f1c7..005c2a4263 100644 --- a/components/detournavigator/navmeshcacheitem.hpp +++ b/components/detournavigator/navmeshcacheitem.hpp @@ -7,8 +7,6 @@ #include "navmeshdata.hpp" #include "version.hpp" -#include - #include #include #include @@ -148,9 +146,6 @@ namespace DetourNavigator std::map mUsedTiles; std::set mEmptyTiles; }; - - using GuardedNavMeshCacheItem = Misc::ScopeGuarded; - using SharedNavMeshCacheItem = std::shared_ptr; } #endif diff --git a/components/detournavigator/navmeshmanager.cpp b/components/detournavigator/navmeshmanager.cpp index 672741e089..50744731b1 100644 --- a/components/detournavigator/navmeshmanager.cpp +++ b/components/detournavigator/navmeshmanager.cpp @@ -6,6 +6,7 @@ #include "navmeshcacheitem.hpp" #include "settings.hpp" #include "waitconditiontype.hpp" +#include "settingsutils.hpp" #include #include diff --git a/components/detournavigator/navmeshmanager.hpp b/components/detournavigator/navmeshmanager.hpp index d4a5a58122..ade378aeec 100644 --- a/components/detournavigator/navmeshmanager.hpp +++ b/components/detournavigator/navmeshmanager.hpp @@ -2,7 +2,6 @@ #define OPENMW_COMPONENTS_DETOURNAVIGATOR_NAVMESHMANAGER_H #include "asyncnavmeshupdater.hpp" -#include "cachedrecastmeshmanager.hpp" #include "offmeshconnectionsmanager.hpp" #include "recastmeshtiles.hpp" #include "waitconditiontype.hpp" diff --git a/components/detournavigator/preparednavmeshdata.hpp b/components/detournavigator/preparednavmeshdata.hpp index b3de7a447f..3c0e27c640 100644 --- a/components/detournavigator/preparednavmeshdata.hpp +++ b/components/detournavigator/preparednavmeshdata.hpp @@ -22,6 +22,8 @@ namespace DetourNavigator ~PreparedNavMeshData() noexcept; + PreparedNavMeshData& operator=(const PreparedNavMeshData& other) = delete; + friend bool operator==(const PreparedNavMeshData& lhs, const PreparedNavMeshData& rhs) noexcept; }; diff --git a/components/detournavigator/recastmesh.hpp b/components/detournavigator/recastmesh.hpp index df9d6414d5..ebe372a015 100644 --- a/components/detournavigator/recastmesh.hpp +++ b/components/detournavigator/recastmesh.hpp @@ -2,8 +2,6 @@ #define OPENMW_COMPONENTS_DETOURNAVIGATOR_RECASTMESH_H #include "areatype.hpp" -#include "bounds.hpp" -#include "tilebounds.hpp" #include "objecttransform.hpp" #include diff --git a/components/detournavigator/recastmeshbuilder.cpp b/components/detournavigator/recastmeshbuilder.cpp index 08e7002cf8..7f3557f6d3 100644 --- a/components/detournavigator/recastmeshbuilder.cpp +++ b/components/detournavigator/recastmeshbuilder.cpp @@ -1,5 +1,4 @@ #include "recastmeshbuilder.hpp" -#include "debug.hpp" #include "exceptions.hpp" #include diff --git a/components/detournavigator/recastmeshmanager.cpp b/components/detournavigator/recastmeshmanager.cpp index a7b24766fc..b40da43d2d 100644 --- a/components/detournavigator/recastmeshmanager.cpp +++ b/components/detournavigator/recastmeshmanager.cpp @@ -1,6 +1,5 @@ #include "recastmeshmanager.hpp" #include "recastmeshbuilder.hpp" -#include "settings.hpp" #include "heightfieldshape.hpp" #include diff --git a/components/detournavigator/recastmeshprovider.hpp b/components/detournavigator/recastmeshprovider.hpp index b01b7c4ea1..5b512646f9 100644 --- a/components/detournavigator/recastmeshprovider.hpp +++ b/components/detournavigator/recastmeshprovider.hpp @@ -4,7 +4,6 @@ #include "tileposition.hpp" #include "recastmesh.hpp" #include "tilecachedrecastmeshmanager.hpp" -#include "version.hpp" #include #include diff --git a/components/detournavigator/serialization.cpp b/components/detournavigator/serialization.cpp index a0a097ab0b..e0aa971b68 100644 --- a/components/detournavigator/serialization.cpp +++ b/components/detournavigator/serialization.cpp @@ -6,6 +6,7 @@ #include "recastmesh.hpp" #include "settings.hpp" #include "agentbounds.hpp" +#include "tilebounds.hpp" #include #include diff --git a/components/detournavigator/sharednavmeshcacheitem.hpp b/components/detournavigator/sharednavmeshcacheitem.hpp new file mode 100644 index 0000000000..0a84a1e7fc --- /dev/null +++ b/components/detournavigator/sharednavmeshcacheitem.hpp @@ -0,0 +1,13 @@ +#ifndef OPENMW_COMPONENTS_DETOURNAVIGATOR_SHAREDNAVMESHCACHEITEM_H +#define OPENMW_COMPONENTS_DETOURNAVIGATOR_SHAREDNAVMESHCACHEITEM_H + +#include "guardednavmeshcacheitem.hpp" + +#include + +namespace DetourNavigator +{ + using SharedNavMeshCacheItem = std::shared_ptr; +} + +#endif diff --git a/components/detournavigator/tilecachedrecastmeshmanager.cpp b/components/detournavigator/tilecachedrecastmeshmanager.cpp index e7e46e96df..e01eb1521e 100644 --- a/components/detournavigator/tilecachedrecastmeshmanager.cpp +++ b/components/detournavigator/tilecachedrecastmeshmanager.cpp @@ -1,5 +1,4 @@ #include "tilecachedrecastmeshmanager.hpp" -#include "makenavmesh.hpp" #include "gettilespositions.hpp" #include "settingsutils.hpp" #include "changetype.hpp" diff --git a/components/detournavigator/tilecachedrecastmeshmanager.hpp b/components/detournavigator/tilecachedrecastmeshmanager.hpp index 5e168efc16..270db9e8ae 100644 --- a/components/detournavigator/tilecachedrecastmeshmanager.hpp +++ b/components/detournavigator/tilecachedrecastmeshmanager.hpp @@ -3,7 +3,6 @@ #include "cachedrecastmeshmanager.hpp" #include "tileposition.hpp" -#include "settingsutils.hpp" #include "gettilespositions.hpp" #include "version.hpp" #include "heightfieldshape.hpp"