From c03ed4cd505c7bdef9df22f3c632b98c922605c2 Mon Sep 17 00:00:00 2001 From: Capostrophic Date: Tue, 19 Feb 2019 01:10:55 +0300 Subject: [PATCH] Include cleanup --- apps/openmw/mwgui/enchantingdialog.cpp | 3 +++ apps/openmw/mwgui/spellbuyingwindow.hpp | 6 ++++-- apps/openmw/mwgui/windowmanagerimp.cpp | 1 + apps/openmw/mwmechanics/actors.cpp | 7 ++----- apps/openmw/mwmechanics/actors.hpp | 17 +++++++++++++++-- apps/openmw/mwmechanics/actorutil.hpp | 5 ++++- apps/openmw/mwmechanics/aicast.cpp | 1 + apps/openmw/mwmechanics/aicast.hpp | 7 +++++-- apps/openmw/mwmechanics/aiescort.hpp | 2 -- apps/openmw/mwmechanics/aiface.cpp | 2 +- apps/openmw/mwmechanics/aipackage.hpp | 2 -- apps/openmw/mwmechanics/aipursue.cpp | 1 + apps/openmw/mwmechanics/aipursue.hpp | 4 ---- apps/openmw/mwmechanics/aistate.hpp | 1 - apps/openmw/mwmechanics/aitravel.hpp | 2 -- apps/openmw/mwmechanics/autocalcspell.hpp | 11 ++++++++--- apps/openmw/mwmechanics/combat.hpp | 10 +++++++++- apps/openmw/mwmechanics/enchanting.cpp | 2 ++ apps/openmw/mwmechanics/enchanting.hpp | 3 --- apps/openmw/mwmechanics/objects.cpp | 1 + apps/openmw/mwmechanics/objects.hpp | 8 +++++++- apps/openmw/mwmechanics/spellpriority.cpp | 1 + apps/openmw/mwmechanics/spellpriority.hpp | 12 ++++++++++-- apps/openmw/mwmechanics/trading.hpp | 5 ++++- apps/openmw/mwworld/actionalchemy.cpp | 2 -- apps/openmw/mwworld/actionapply.hpp | 1 - apps/openmw/mwworld/actioneat.cpp | 3 --- apps/openmw/mwworld/actioneat.hpp | 1 - apps/openmw/mwworld/actionequip.cpp | 1 - apps/openmw/mwworld/actionopen.cpp | 3 --- apps/openmw/mwworld/actionopen.hpp | 2 -- apps/openmw/mwworld/actionread.hpp | 1 - apps/openmw/mwworld/actionsoulgem.cpp | 3 +-- apps/openmw/mwworld/actionsoulgem.hpp | 1 - apps/openmw/mwworld/actiontake.hpp | 1 - apps/openmw/mwworld/actiontalk.hpp | 1 - apps/openmw/mwworld/actiontrap.hpp | 1 - apps/openmw/mwworld/recordcmp.hpp | 2 -- apps/openmw/mwworld/refdata.hpp | 1 - 39 files changed, 80 insertions(+), 58 deletions(-) diff --git a/apps/openmw/mwgui/enchantingdialog.cpp b/apps/openmw/mwgui/enchantingdialog.cpp index 98980e339..af6567afb 100644 --- a/apps/openmw/mwgui/enchantingdialog.cpp +++ b/apps/openmw/mwgui/enchantingdialog.cpp @@ -9,7 +9,10 @@ #include #include +#include "../mwbase/environment.hpp" #include "../mwbase/mechanicsmanager.hpp" +#include "../mwbase/world.hpp" + #include "../mwworld/class.hpp" #include "../mwworld/containerstore.hpp" #include "../mwworld/esmstore.hpp" diff --git a/apps/openmw/mwgui/spellbuyingwindow.hpp b/apps/openmw/mwgui/spellbuyingwindow.hpp index 30727a545..c68ec2483 100644 --- a/apps/openmw/mwgui/spellbuyingwindow.hpp +++ b/apps/openmw/mwgui/spellbuyingwindow.hpp @@ -4,7 +4,10 @@ #include "windowbase.hpp" #include "referenceinterface.hpp" -#include "../mwworld/esmstore.hpp" +namespace ESM +{ + struct Spell; +} namespace MyGUI { @@ -17,7 +20,6 @@ namespace MWGui class WindowManager; } - namespace MWGui { class SpellBuyingWindow : public ReferenceInterface, public WindowBase diff --git a/apps/openmw/mwgui/windowmanagerimp.cpp b/apps/openmw/mwgui/windowmanagerimp.cpp index dc82cad9c..7e4ba0998 100644 --- a/apps/openmw/mwgui/windowmanagerimp.cpp +++ b/apps/openmw/mwgui/windowmanagerimp.cpp @@ -54,6 +54,7 @@ #include "../mwbase/inputmanager.hpp" #include "../mwbase/statemanager.hpp" #include "../mwbase/soundmanager.hpp" +#include "../mwbase/world.hpp" #include "../mwrender/vismask.hpp" diff --git a/apps/openmw/mwmechanics/actors.cpp b/apps/openmw/mwmechanics/actors.cpp index 769425053..a3906b98c 100644 --- a/apps/openmw/mwmechanics/actors.cpp +++ b/apps/openmw/mwmechanics/actors.cpp @@ -1,10 +1,7 @@ #include "actors.hpp" -#include -#include #include #include -#include #include #include @@ -507,7 +504,7 @@ namespace MWMechanics MagicEffects now = creatureStats.getSpells().getMagicEffects(); - if (creature.getTypeName()==typeid (ESM::NPC).name()) + if (creature.getClass().isNpc()) { MWWorld::InventoryStore& store = creature.getClass().getInventoryStore (creature); now += store.getMagicEffects(); @@ -1423,7 +1420,7 @@ namespace MWMechanics } } - if(iter->first.getTypeName() == typeid(ESM::NPC).name()) + if(iter->first.getClass().isNpc()) { updateDrowning(iter->first, duration, ctrl->isKnockedOut(), isPlayer); calculateNpcStatModifiers(iter->first, duration); diff --git a/apps/openmw/mwmechanics/actors.hpp b/apps/openmw/mwmechanics/actors.hpp index 61879c432..3b1b9e815 100644 --- a/apps/openmw/mwmechanics/actors.hpp +++ b/apps/openmw/mwmechanics/actors.hpp @@ -5,10 +5,23 @@ #include #include #include +#include -#include "../mwbase/world.hpp" +namespace ESM +{ + class ESMReader; + class ESMWriter; +} -#include "movement.hpp" +namespace osg +{ + class Vec3f; +} + +namespace Loading +{ + class Listener; +} namespace MWWorld { diff --git a/apps/openmw/mwmechanics/actorutil.hpp b/apps/openmw/mwmechanics/actorutil.hpp index 510e41db3..3c6dc940c 100644 --- a/apps/openmw/mwmechanics/actorutil.hpp +++ b/apps/openmw/mwmechanics/actorutil.hpp @@ -1,7 +1,10 @@ #ifndef OPENMW_MWMECHANICS_ACTORUTIL_H #define OPENMW_MWMECHANICS_ACTORUTIL_H -#include "../mwworld/ptr.hpp" +namespace MWWorld +{ + class Ptr; +} namespace MWMechanics { diff --git a/apps/openmw/mwmechanics/aicast.cpp b/apps/openmw/mwmechanics/aicast.cpp index 38dc2fa73..e448313bf 100644 --- a/apps/openmw/mwmechanics/aicast.cpp +++ b/apps/openmw/mwmechanics/aicast.cpp @@ -2,6 +2,7 @@ #include "../mwbase/environment.hpp" #include "../mwbase/mechanicsmanager.hpp" +#include "../mwbase/world.hpp" #include "../mwworld/class.hpp" diff --git a/apps/openmw/mwmechanics/aicast.hpp b/apps/openmw/mwmechanics/aicast.hpp index 70a8a6bbd..7128fe7a2 100644 --- a/apps/openmw/mwmechanics/aicast.hpp +++ b/apps/openmw/mwmechanics/aicast.hpp @@ -1,10 +1,13 @@ #ifndef GAME_MWMECHANICS_AICAST_H #define GAME_MWMECHANICS_AICAST_H -#include "../mwbase/world.hpp" - #include "aipackage.hpp" +namespace MWWorld +{ + class Ptr; +} + namespace MWMechanics { /// AiPackage which makes an actor to cast given spell. diff --git a/apps/openmw/mwmechanics/aiescort.hpp b/apps/openmw/mwmechanics/aiescort.hpp index 82dba960e..56c9b1c85 100644 --- a/apps/openmw/mwmechanics/aiescort.hpp +++ b/apps/openmw/mwmechanics/aiescort.hpp @@ -5,8 +5,6 @@ #include -#include "pathfinding.hpp" - namespace ESM { namespace AiSequence diff --git a/apps/openmw/mwmechanics/aiface.cpp b/apps/openmw/mwmechanics/aiface.cpp index 7d15cabf2..b99a8c1f4 100644 --- a/apps/openmw/mwmechanics/aiface.cpp +++ b/apps/openmw/mwmechanics/aiface.cpp @@ -1,6 +1,6 @@ #include "aiface.hpp" -#include "../mwbase/world.hpp" +#include "../mwworld/ptr.hpp" #include "steering.hpp" diff --git a/apps/openmw/mwmechanics/aipackage.hpp b/apps/openmw/mwmechanics/aipackage.hpp index 5be858b0b..d7287cd2f 100644 --- a/apps/openmw/mwmechanics/aipackage.hpp +++ b/apps/openmw/mwmechanics/aipackage.hpp @@ -7,8 +7,6 @@ #include "obstacle.hpp" #include "aistate.hpp" -#include - namespace MWWorld { class Ptr; diff --git a/apps/openmw/mwmechanics/aipursue.cpp b/apps/openmw/mwmechanics/aipursue.cpp index 4bec050d7..4dd644e6b 100644 --- a/apps/openmw/mwmechanics/aipursue.cpp +++ b/apps/openmw/mwmechanics/aipursue.cpp @@ -4,6 +4,7 @@ #include #include "../mwbase/environment.hpp" +#include "../mwbase/world.hpp" #include "../mwworld/class.hpp" #include "../mwworld/action.hpp" diff --git a/apps/openmw/mwmechanics/aipursue.hpp b/apps/openmw/mwmechanics/aipursue.hpp index 455b0a2fd..ea83a10e5 100644 --- a/apps/openmw/mwmechanics/aipursue.hpp +++ b/apps/openmw/mwmechanics/aipursue.hpp @@ -3,10 +3,6 @@ #include "aipackage.hpp" -#include "../mwbase/world.hpp" - -#include "pathfinding.hpp" - namespace ESM { namespace AiSequence diff --git a/apps/openmw/mwmechanics/aistate.hpp b/apps/openmw/mwmechanics/aistate.hpp index 40f4ab1d4..949fb74dd 100644 --- a/apps/openmw/mwmechanics/aistate.hpp +++ b/apps/openmw/mwmechanics/aistate.hpp @@ -2,7 +2,6 @@ #define AISTATE_H #include -#include namespace MWMechanics { diff --git a/apps/openmw/mwmechanics/aitravel.hpp b/apps/openmw/mwmechanics/aitravel.hpp index c297771d0..f9f9f43fc 100644 --- a/apps/openmw/mwmechanics/aitravel.hpp +++ b/apps/openmw/mwmechanics/aitravel.hpp @@ -3,8 +3,6 @@ #include "aipackage.hpp" -#include "pathfinding.hpp" - namespace ESM { namespace AiSequence diff --git a/apps/openmw/mwmechanics/autocalcspell.hpp b/apps/openmw/mwmechanics/autocalcspell.hpp index 50be8a5d9..460713ae3 100644 --- a/apps/openmw/mwmechanics/autocalcspell.hpp +++ b/apps/openmw/mwmechanics/autocalcspell.hpp @@ -1,9 +1,14 @@ #ifndef OPENMW_AUTOCALCSPELL_H #define OPENMW_AUTOCALCSPELL_H -#include -#include -#include +#include +#include + +namespace ESM +{ + struct Spell; + struct Race; +} namespace MWMechanics { diff --git a/apps/openmw/mwmechanics/combat.hpp b/apps/openmw/mwmechanics/combat.hpp index 8b93ca204..e5b6b5dd8 100644 --- a/apps/openmw/mwmechanics/combat.hpp +++ b/apps/openmw/mwmechanics/combat.hpp @@ -1,7 +1,15 @@ #ifndef OPENMW_MECHANICS_COMBAT_H #define OPENMW_MECHANICS_COMBAT_H -#include "../mwworld/ptr.hpp" +namespace osg +{ + class Vec3f; +} + +namespace MWWorld +{ + class Ptr; +} namespace MWMechanics { diff --git a/apps/openmw/mwmechanics/enchanting.cpp b/apps/openmw/mwmechanics/enchanting.cpp index e4bb0cf3f..20121c2d9 100644 --- a/apps/openmw/mwmechanics/enchanting.cpp +++ b/apps/openmw/mwmechanics/enchanting.cpp @@ -7,6 +7,8 @@ #include "../mwworld/containerstore.hpp" #include "../mwworld/esmstore.hpp" +#include "../mwbase/world.hpp" +#include "../mwbase/environment.hpp" #include "../mwbase/mechanicsmanager.hpp" #include "creaturestats.hpp" diff --git a/apps/openmw/mwmechanics/enchanting.hpp b/apps/openmw/mwmechanics/enchanting.hpp index 8e3b00e5a..275147671 100644 --- a/apps/openmw/mwmechanics/enchanting.hpp +++ b/apps/openmw/mwmechanics/enchanting.hpp @@ -7,9 +7,6 @@ #include "../mwworld/ptr.hpp" -#include "../mwbase/world.hpp" -#include "../mwbase/environment.hpp" - namespace MWMechanics { class Enchanting diff --git a/apps/openmw/mwmechanics/objects.cpp b/apps/openmw/mwmechanics/objects.cpp index 726508161..d4a393c72 100644 --- a/apps/openmw/mwmechanics/objects.cpp +++ b/apps/openmw/mwmechanics/objects.cpp @@ -7,6 +7,7 @@ #include "../mwbase/windowmanager.hpp" #include "../mwbase/world.hpp" +#include "character.hpp" #include "movement.hpp" namespace MWMechanics diff --git a/apps/openmw/mwmechanics/objects.hpp b/apps/openmw/mwmechanics/objects.hpp index 81b95baf8..1bcf646a4 100644 --- a/apps/openmw/mwmechanics/objects.hpp +++ b/apps/openmw/mwmechanics/objects.hpp @@ -3,8 +3,12 @@ #include #include +#include -#include "character.hpp" +namespace osg +{ + class Vec3f; +} namespace MWWorld { @@ -14,6 +18,8 @@ namespace MWWorld namespace MWMechanics { + class CharacterController; + class Objects { typedef std::map PtrControllerMap; diff --git a/apps/openmw/mwmechanics/spellpriority.cpp b/apps/openmw/mwmechanics/spellpriority.cpp index 3b242266c..c55d5ab10 100644 --- a/apps/openmw/mwmechanics/spellpriority.cpp +++ b/apps/openmw/mwmechanics/spellpriority.cpp @@ -3,6 +3,7 @@ #include #include +#include #include "../mwbase/environment.hpp" #include "../mwbase/world.hpp" diff --git a/apps/openmw/mwmechanics/spellpriority.hpp b/apps/openmw/mwmechanics/spellpriority.hpp index 4e5ff5c71..0305f24b5 100644 --- a/apps/openmw/mwmechanics/spellpriority.hpp +++ b/apps/openmw/mwmechanics/spellpriority.hpp @@ -1,9 +1,17 @@ #ifndef OPENMW_SPELL_PRIORITY_H #define OPENMW_SPELL_PRIORITY_H -#include +namespace ESM +{ + struct Spell; + struct EffectList; + struct ENAMstruct; +} -#include "../mwworld/ptr.hpp" +namespace MWWorld +{ + class Ptr; +} namespace MWMechanics { diff --git a/apps/openmw/mwmechanics/trading.hpp b/apps/openmw/mwmechanics/trading.hpp index e006370dd..e30b82f5e 100644 --- a/apps/openmw/mwmechanics/trading.hpp +++ b/apps/openmw/mwmechanics/trading.hpp @@ -1,7 +1,10 @@ #ifndef OPENMW_MECHANICS_TRADING_H #define OPENMW_MECHANICS_TRADING_H -#include "../mwworld/ptr.hpp" +namespace MWWorld +{ + class Ptr; +} namespace MWMechanics { diff --git a/apps/openmw/mwworld/actionalchemy.cpp b/apps/openmw/mwworld/actionalchemy.cpp index 37d811eb6..62b673dd2 100644 --- a/apps/openmw/mwworld/actionalchemy.cpp +++ b/apps/openmw/mwworld/actionalchemy.cpp @@ -2,9 +2,7 @@ #include "../mwbase/environment.hpp" #include "../mwbase/windowmanager.hpp" -#include "../mwbase/world.hpp" -#include "../mwworld/player.hpp" #include "../mwmechanics/actorutil.hpp" namespace MWWorld diff --git a/apps/openmw/mwworld/actionapply.hpp b/apps/openmw/mwworld/actionapply.hpp index 5294745a6..4a1d2aefa 100644 --- a/apps/openmw/mwworld/actionapply.hpp +++ b/apps/openmw/mwworld/actionapply.hpp @@ -4,7 +4,6 @@ #include #include "action.hpp" -#include "ptr.hpp" namespace MWWorld { diff --git a/apps/openmw/mwworld/actioneat.cpp b/apps/openmw/mwworld/actioneat.cpp index 84805c70e..ef435cca9 100644 --- a/apps/openmw/mwworld/actioneat.cpp +++ b/apps/openmw/mwworld/actioneat.cpp @@ -2,9 +2,6 @@ #include -#include "../mwbase/environment.hpp" -#include "../mwbase/world.hpp" - #include "../mwworld/containerstore.hpp" #include "../mwmechanics/actorutil.hpp" diff --git a/apps/openmw/mwworld/actioneat.hpp b/apps/openmw/mwworld/actioneat.hpp index ce5330db7..db21ffa17 100644 --- a/apps/openmw/mwworld/actioneat.hpp +++ b/apps/openmw/mwworld/actioneat.hpp @@ -2,7 +2,6 @@ #define GAME_MWWORLD_ACTIONEAT_H #include "action.hpp" -#include "ptr.hpp" namespace MWWorld { diff --git a/apps/openmw/mwworld/actionequip.cpp b/apps/openmw/mwworld/actionequip.cpp index da794bcd2..30f969193 100644 --- a/apps/openmw/mwworld/actionequip.cpp +++ b/apps/openmw/mwworld/actionequip.cpp @@ -1,7 +1,6 @@ #include "actionequip.hpp" #include "../mwbase/environment.hpp" -#include "../mwbase/world.hpp" #include "../mwbase/windowmanager.hpp" #include "../mwmechanics/actorutil.hpp" diff --git a/apps/openmw/mwworld/actionopen.cpp b/apps/openmw/mwworld/actionopen.cpp index f678037ce..f9866cd41 100644 --- a/apps/openmw/mwworld/actionopen.cpp +++ b/apps/openmw/mwworld/actionopen.cpp @@ -6,9 +6,6 @@ #include "../mwmechanics/disease.hpp" -#include "class.hpp" -#include "containerstore.hpp" - namespace MWWorld { ActionOpen::ActionOpen (const MWWorld::Ptr& container) diff --git a/apps/openmw/mwworld/actionopen.hpp b/apps/openmw/mwworld/actionopen.hpp index 3bce25c6b..e36b971a2 100644 --- a/apps/openmw/mwworld/actionopen.hpp +++ b/apps/openmw/mwworld/actionopen.hpp @@ -2,8 +2,6 @@ #define GAME_MWWORLD_ACTIONOPEN_H #include "action.hpp" -#include "ptr.hpp" - namespace MWWorld { diff --git a/apps/openmw/mwworld/actionread.hpp b/apps/openmw/mwworld/actionread.hpp index c23bf2900..7c4d7d2f4 100644 --- a/apps/openmw/mwworld/actionread.hpp +++ b/apps/openmw/mwworld/actionread.hpp @@ -2,7 +2,6 @@ #define GAME_MWWORLD_ACTIONREAD_H #include "action.hpp" -#include "ptr.hpp" namespace MWWorld { diff --git a/apps/openmw/mwworld/actionsoulgem.cpp b/apps/openmw/mwworld/actionsoulgem.cpp index 98fe8ee34..f7823daba 100644 --- a/apps/openmw/mwworld/actionsoulgem.cpp +++ b/apps/openmw/mwworld/actionsoulgem.cpp @@ -2,8 +2,7 @@ #include "../mwbase/windowmanager.hpp" #include "../mwbase/environment.hpp" -#include "../mwbase/world.hpp" -#include "../mwworld/player.hpp" + #include "../mwmechanics/actorutil.hpp" namespace MWWorld diff --git a/apps/openmw/mwworld/actionsoulgem.hpp b/apps/openmw/mwworld/actionsoulgem.hpp index 0dd526657..6a8f220bc 100644 --- a/apps/openmw/mwworld/actionsoulgem.hpp +++ b/apps/openmw/mwworld/actionsoulgem.hpp @@ -2,7 +2,6 @@ #define GAME_MWWORLD_ACTIONSOULGEM_H #include "action.hpp" -#include "ptr.hpp" namespace MWWorld { diff --git a/apps/openmw/mwworld/actiontake.hpp b/apps/openmw/mwworld/actiontake.hpp index b0a9b8247..fb8d2f4ce 100644 --- a/apps/openmw/mwworld/actiontake.hpp +++ b/apps/openmw/mwworld/actiontake.hpp @@ -2,7 +2,6 @@ #define GAME_MWWORLD_ACTIONTAKE_H #include "action.hpp" -#include "ptr.hpp" namespace MWWorld { diff --git a/apps/openmw/mwworld/actiontalk.hpp b/apps/openmw/mwworld/actiontalk.hpp index b88b168d8..01738a0bb 100644 --- a/apps/openmw/mwworld/actiontalk.hpp +++ b/apps/openmw/mwworld/actiontalk.hpp @@ -1,7 +1,6 @@ #ifndef GAME_MWWORLD_ACTIONTALK_H #define GAME_MWWORLD_ACTIONTALK_H -#include "ptr.hpp" #include "action.hpp" namespace MWWorld diff --git a/apps/openmw/mwworld/actiontrap.hpp b/apps/openmw/mwworld/actiontrap.hpp index 5ff91613f..5b0d429c4 100644 --- a/apps/openmw/mwworld/actiontrap.hpp +++ b/apps/openmw/mwworld/actiontrap.hpp @@ -4,7 +4,6 @@ #include #include "action.hpp" -#include "ptr.hpp" namespace MWWorld { diff --git a/apps/openmw/mwworld/recordcmp.hpp b/apps/openmw/mwworld/recordcmp.hpp index 500f86b1e..f749351ce 100644 --- a/apps/openmw/mwworld/recordcmp.hpp +++ b/apps/openmw/mwworld/recordcmp.hpp @@ -1,8 +1,6 @@ #ifndef OPENMW_MWWORLD_RECORDCMP_H #define OPENMW_MWWORLD_RECORDCMP_H -#include - #include #include diff --git a/apps/openmw/mwworld/refdata.hpp b/apps/openmw/mwworld/refdata.hpp index 75eec6742..6a59d9797 100644 --- a/apps/openmw/mwworld/refdata.hpp +++ b/apps/openmw/mwworld/refdata.hpp @@ -7,7 +7,6 @@ #include "../mwscript/locals.hpp" #include -#include namespace SceneUtil {