From 536715cf467eb52b98419e01309a19db22abff58 Mon Sep 17 00:00:00 2001 From: Koncord Date: Fri, 16 Dec 2016 16:59:15 +0800 Subject: [PATCH] Cleanup tes3mp headers --- apps/openmw/engine.cpp | 1 + apps/openmw/mwclass/npc.cpp | 1 + apps/openmw/mwgui/hud.cpp | 1 + apps/openmw/mwgui/inventorywindow.cpp | 1 + apps/openmw/mwgui/mapwindow.cpp | 1 + apps/openmw/mwgui/windowmanagerimp.cpp | 1 + apps/openmw/mwmechanics/actors.cpp | 3 ++- apps/openmw/mwmechanics/character.cpp | 1 + apps/openmw/mwmechanics/combat.cpp | 3 ++- apps/openmw/mwmechanics/security.cpp | 1 + apps/openmw/mwmechanics/spellcasting.cpp | 3 ++- apps/openmw/mwmp/DedicatedPlayer.cpp | 1 + apps/openmw/mwmp/GUIChat.cpp | 4 +--- apps/openmw/mwmp/GUIChat.hpp | 9 --------- apps/openmw/mwmp/GUIController.cpp | 2 ++ apps/openmw/mwmp/GUIDialogList.cpp | 2 ++ apps/openmw/mwmp/LocalPlayer.cpp | 1 + apps/openmw/mwmp/LocalPlayer.hpp | 2 +- apps/openmw/mwmp/Main.cpp | 5 ++++- apps/openmw/mwmp/Main.hpp | 9 +++++---- apps/openmw/mwmp/Networking.cpp | 3 +++ apps/openmw/mwmp/Networking.hpp | 9 --------- apps/openmw/mwscript/animationextensions.cpp | 2 ++ apps/openmw/mwscript/interpretercontext.cpp | 1 + apps/openmw/mwscript/miscextensions.cpp | 1 + apps/openmw/mwscript/soundextensions.cpp | 1 + apps/openmw/mwscript/statsextensions.cpp | 1 + apps/openmw/mwscript/transformationextensions.cpp | 1 + apps/openmw/mwworld/actiontake.cpp | 2 ++ apps/openmw/mwworld/worldimp.cpp | 1 + 30 files changed, 44 insertions(+), 30 deletions(-) diff --git a/apps/openmw/engine.cpp b/apps/openmw/engine.cpp index 30b614f52..e9da8922b 100644 --- a/apps/openmw/engine.cpp +++ b/apps/openmw/engine.cpp @@ -57,6 +57,7 @@ #include "mwstate/statemanagerimp.hpp" #include "mwmp/Main.hpp" +#include "mwmp/GUIController.hpp" namespace { diff --git a/apps/openmw/mwclass/npc.cpp b/apps/openmw/mwclass/npc.cpp index d578ad436..a15d7a453 100644 --- a/apps/openmw/mwclass/npc.cpp +++ b/apps/openmw/mwclass/npc.cpp @@ -11,6 +11,7 @@ #include "../mwmp/DedicatedPlayer.hpp" #include "../mwmp/Networking.hpp" #include "../mwmp/Main.hpp" +#include "../mwmp/LocalPlayer.hpp" #include "../mwbase/environment.hpp" #include "../mwbase/world.hpp" diff --git a/apps/openmw/mwgui/hud.cpp b/apps/openmw/mwgui/hud.cpp index 976094ab0..839b81590 100644 --- a/apps/openmw/mwgui/hud.cpp +++ b/apps/openmw/mwgui/hud.cpp @@ -2,6 +2,7 @@ #include #include "../mwmp/Main.hpp" +#include "../mwmp/Networking.hpp" #include "../mwworld/cellstore.hpp" #include diff --git a/apps/openmw/mwgui/inventorywindow.cpp b/apps/openmw/mwgui/inventorywindow.cpp index 50a036277..bc11a77b0 100644 --- a/apps/openmw/mwgui/inventorywindow.cpp +++ b/apps/openmw/mwgui/inventorywindow.cpp @@ -18,6 +18,7 @@ #include #include "../mwmp/Main.hpp" +#include "../mwmp/Networking.hpp" #include "../mwworld/cellstore.hpp" #include "../mwbase/world.hpp" diff --git a/apps/openmw/mwgui/mapwindow.cpp b/apps/openmw/mwgui/mapwindow.cpp index 22f9798bc..386c11af0 100644 --- a/apps/openmw/mwgui/mapwindow.cpp +++ b/apps/openmw/mwgui/mapwindow.cpp @@ -17,6 +17,7 @@ #include #include "../mwmp/Main.hpp" +#include "../mwmp/GUIController.hpp" #include "../mwbase/windowmanager.hpp" #include "../mwbase/world.hpp" diff --git a/apps/openmw/mwgui/windowmanagerimp.cpp b/apps/openmw/mwgui/windowmanagerimp.cpp index e71bcb61a..6634347cd 100644 --- a/apps/openmw/mwgui/windowmanagerimp.cpp +++ b/apps/openmw/mwgui/windowmanagerimp.cpp @@ -47,6 +47,7 @@ #include #include "../mwmp/Main.hpp" +#include "../mwmp/GUIController.hpp" #include "../mwbase/inputmanager.hpp" #include "../mwbase/statemanager.hpp" diff --git a/apps/openmw/mwmechanics/actors.cpp b/apps/openmw/mwmechanics/actors.cpp index 1e3ce3212..419fe54d4 100644 --- a/apps/openmw/mwmechanics/actors.cpp +++ b/apps/openmw/mwmechanics/actors.cpp @@ -11,6 +11,7 @@ #include "../mwmp/Main.hpp" #include "../mwmp/DedicatedPlayer.hpp" +#include "../mwmp/LocalPlayer.hpp" #include "../mwworld/esmstore.hpp" @@ -1047,7 +1048,7 @@ namespace MWMechanics } mwmp::DedicatedPlayer *dedicatedPlayer = mwmp::Players::getPlayer(iter->first); - if (dedicatedPlayer != nullptr) + if (dedicatedPlayer != NULL) dedicatedPlayer->updateActor(iter->second); diff --git a/apps/openmw/mwmechanics/character.cpp b/apps/openmw/mwmechanics/character.cpp index f378e8ad4..5b0ce8a74 100644 --- a/apps/openmw/mwmechanics/character.cpp +++ b/apps/openmw/mwmechanics/character.cpp @@ -28,6 +28,7 @@ #include #include "../mwmp/Main.hpp" +#include "../mwmp/LocalPlayer.hpp" #include "../mwrender/animation.hpp" diff --git a/apps/openmw/mwmechanics/combat.cpp b/apps/openmw/mwmechanics/combat.cpp index 543221aaf..280f3f2cd 100644 --- a/apps/openmw/mwmechanics/combat.cpp +++ b/apps/openmw/mwmechanics/combat.cpp @@ -7,6 +7,7 @@ #include "../mwmp/Networking.hpp" #include "../mwmp/Main.hpp" #include "../mwmp/DedicatedPlayer.hpp" +#include "../mwmp/LocalPlayer.hpp" #include "../mwbase/environment.hpp" #include "../mwbase/world.hpp" @@ -118,7 +119,7 @@ namespace MWMechanics mwmp::DedicatedPlayer *dedicatedPlayer = mwmp::Players::getPlayer(blocker); - bool isDedicated = dedicatedPlayer != nullptr; + bool isDedicated = dedicatedPlayer != NULL; if (attacker == MWMechanics::getPlayer()) mwmp::Main::get().getLocalPlayer()->getAttack()->block = false; diff --git a/apps/openmw/mwmechanics/security.cpp b/apps/openmw/mwmechanics/security.cpp index b3cbac5e1..398b8e5bc 100644 --- a/apps/openmw/mwmechanics/security.cpp +++ b/apps/openmw/mwmechanics/security.cpp @@ -2,6 +2,7 @@ #include #include "../mwmp/Main.hpp" +#include "../mwmp/Networking.hpp" #include "../mwworld/cellstore.hpp" diff --git a/apps/openmw/mwmechanics/spellcasting.cpp b/apps/openmw/mwmechanics/spellcasting.cpp index 4d9910567..6cb5cf921 100644 --- a/apps/openmw/mwmechanics/spellcasting.cpp +++ b/apps/openmw/mwmechanics/spellcasting.cpp @@ -10,6 +10,7 @@ #include "../mwmp/Main.hpp" #include "../mwmp/DedicatedPlayer.hpp" +#include "../mwmp/LocalPlayer.hpp" #include "../mwbase/windowmanager.hpp" #include "../mwbase/soundmanager.hpp" @@ -799,7 +800,7 @@ namespace MWMechanics float successChance = getSpellSuccessChance(spell, mCaster); mwmp::DedicatedPlayer *dedicatedPlayer = mwmp::Players::getPlayer(mCaster); - bool isDedicated = dedicatedPlayer != nullptr; + bool isDedicated = dedicatedPlayer != NULL; if (isDedicated) dedicatedPlayer->getAttack()->pressed = false; diff --git a/apps/openmw/mwmp/DedicatedPlayer.cpp b/apps/openmw/mwmp/DedicatedPlayer.cpp index eff53668b..f61fcada1 100644 --- a/apps/openmw/mwmp/DedicatedPlayer.cpp +++ b/apps/openmw/mwmp/DedicatedPlayer.cpp @@ -19,6 +19,7 @@ #include "../mwworld/cellstore.hpp" #include "../mwworld/action.hpp" #include "Main.hpp" +#include "GUIController.hpp" #include "../mwworld/inventorystore.hpp" #include #include diff --git a/apps/openmw/mwmp/GUIChat.cpp b/apps/openmw/mwmp/GUIChat.cpp index 8f65cda51..47f9b38ca 100644 --- a/apps/openmw/mwmp/GUIChat.cpp +++ b/apps/openmw/mwmp/GUIChat.cpp @@ -11,11 +11,9 @@ #include #include -#include "../mwbase/windowmanager.hpp" -#include "../mwworld/worldimp.hpp" -#include "../mwworld/player.hpp" #include "Networking.hpp" #include "Main.hpp" +#include "LocalPlayer.hpp" #include "GUIController.hpp" diff --git a/apps/openmw/mwmp/GUIChat.hpp b/apps/openmw/mwmp/GUIChat.hpp index 97a2aae45..d9a58a9ee 100644 --- a/apps/openmw/mwmp/GUIChat.hpp +++ b/apps/openmw/mwmp/GUIChat.hpp @@ -9,15 +9,6 @@ #include #include -#include -#include -#include -#include -#include -#include -#include - -#include "../mwgui/referenceinterface.hpp" #include "../mwgui/windowbase.hpp" namespace mwmp diff --git a/apps/openmw/mwmp/GUIController.cpp b/apps/openmw/mwmp/GUIController.cpp index 598faca45..eb1746331 100644 --- a/apps/openmw/mwmp/GUIController.cpp +++ b/apps/openmw/mwmp/GUIController.cpp @@ -29,6 +29,8 @@ #include "GUIController.hpp" #include "Main.hpp" #include "PlayerMarkerCollection.hpp" +#include "LocalPlayer.hpp" +#include "Networking.hpp" #include "DedicatedPlayer.hpp" #include "GUIDialogList.hpp" #include "GUIChat.hpp" diff --git a/apps/openmw/mwmp/GUIDialogList.cpp b/apps/openmw/mwmp/GUIDialogList.cpp index 42b19f675..b89143bbe 100644 --- a/apps/openmw/mwmp/GUIDialogList.cpp +++ b/apps/openmw/mwmp/GUIDialogList.cpp @@ -4,6 +4,8 @@ #include "GUIDialogList.hpp" #include "Main.hpp" +#include "LocalPlayer.hpp" +#include "Networking.hpp" #include #include #include diff --git a/apps/openmw/mwmp/LocalPlayer.cpp b/apps/openmw/mwmp/LocalPlayer.cpp index 39373961f..ffb43a40a 100644 --- a/apps/openmw/mwmp/LocalPlayer.cpp +++ b/apps/openmw/mwmp/LocalPlayer.cpp @@ -26,6 +26,7 @@ #include #include "LocalPlayer.hpp" +#include "Networking.hpp" #include "Main.hpp" using namespace mwmp; diff --git a/apps/openmw/mwmp/LocalPlayer.hpp b/apps/openmw/mwmp/LocalPlayer.hpp index a4bab099e..4fd7fc52e 100644 --- a/apps/openmw/mwmp/LocalPlayer.hpp +++ b/apps/openmw/mwmp/LocalPlayer.hpp @@ -7,10 +7,10 @@ #include #include -#include "Networking.hpp" namespace mwmp { + class Networking; class LocalPlayer : public BasePlayer { public: diff --git a/apps/openmw/mwmp/Main.cpp b/apps/openmw/mwmp/Main.cpp index 8b9774428..b341b1430 100644 --- a/apps/openmw/mwmp/Main.cpp +++ b/apps/openmw/mwmp/Main.cpp @@ -26,8 +26,11 @@ #include #include -#include "DedicatedPlayer.hpp" +#include "Networking.hpp" #include "LocalPlayer.hpp" +#include "DedicatedPlayer.hpp" +#include "GUIController.hpp" +#include "WorldController.hpp" using namespace mwmp; using namespace std; diff --git a/apps/openmw/mwmp/Main.hpp b/apps/openmw/mwmp/Main.hpp index 75b4b645e..bc4635f00 100644 --- a/apps/openmw/mwmp/Main.hpp +++ b/apps/openmw/mwmp/Main.hpp @@ -1,12 +1,13 @@ #include "../mwworld/ptr.hpp" #include -#include "Networking.hpp" -#include "LocalPlayer.hpp" -#include "GUIController.hpp" -#include "WorldController.hpp" namespace mwmp { + class WorldController; + class GUIController; + class LocalPlayer; + class Networking; + class Main { public: diff --git a/apps/openmw/mwmp/Networking.cpp b/apps/openmw/mwmp/Networking.cpp index 6b34a62a2..6ea26f748 100644 --- a/apps/openmw/mwmp/Networking.cpp +++ b/apps/openmw/mwmp/Networking.cpp @@ -28,6 +28,9 @@ #include #include #include "DedicatedPlayer.hpp" +#include "LocalPlayer.hpp" +#include "GUIController.hpp" +#include "WorldController.hpp" #include "Main.hpp" using namespace std; diff --git a/apps/openmw/mwmp/Networking.hpp b/apps/openmw/mwmp/Networking.hpp index 13005c2d9..9034ce207 100644 --- a/apps/openmw/mwmp/Networking.hpp +++ b/apps/openmw/mwmp/Networking.hpp @@ -10,15 +10,6 @@ #include #include -#include -#include -#include -#include -#include -#include -#include -#include -#include #include #include diff --git a/apps/openmw/mwscript/animationextensions.cpp b/apps/openmw/mwscript/animationextensions.cpp index aa273157c..a4142323c 100644 --- a/apps/openmw/mwscript/animationextensions.cpp +++ b/apps/openmw/mwscript/animationextensions.cpp @@ -5,6 +5,8 @@ #include #include "../mwmp/Main.hpp" +#include "../mwmp/Networking.hpp" + #include "../mwworld/cellstore.hpp" #include "../mwworld/class.hpp" diff --git a/apps/openmw/mwscript/interpretercontext.cpp b/apps/openmw/mwscript/interpretercontext.cpp index 7da31659c..c999940da 100644 --- a/apps/openmw/mwscript/interpretercontext.cpp +++ b/apps/openmw/mwscript/interpretercontext.cpp @@ -12,6 +12,7 @@ #include #include "../mwmp/Main.hpp" +#include "../mwmp/Networking.hpp" #include "../mwworld/esmstore.hpp" diff --git a/apps/openmw/mwscript/miscextensions.cpp b/apps/openmw/mwscript/miscextensions.cpp index 68803de45..064188d5b 100644 --- a/apps/openmw/mwscript/miscextensions.cpp +++ b/apps/openmw/mwscript/miscextensions.cpp @@ -4,6 +4,7 @@ #include #include "../mwmp/Main.hpp" +#include "../mwmp/Networking.hpp" #include #include diff --git a/apps/openmw/mwscript/soundextensions.cpp b/apps/openmw/mwscript/soundextensions.cpp index a7531cb3d..aed58b59c 100644 --- a/apps/openmw/mwscript/soundextensions.cpp +++ b/apps/openmw/mwscript/soundextensions.cpp @@ -2,6 +2,7 @@ #include #include "../mwmp/Main.hpp" +#include "../mwmp/Networking.hpp" #include #include diff --git a/apps/openmw/mwscript/statsextensions.cpp b/apps/openmw/mwscript/statsextensions.cpp index 5df5fc929..5ac63016e 100644 --- a/apps/openmw/mwscript/statsextensions.cpp +++ b/apps/openmw/mwscript/statsextensions.cpp @@ -4,6 +4,7 @@ #include #include "../mwmp/Main.hpp" +#include "../mwmp/LocalPlayer.hpp" #include diff --git a/apps/openmw/mwscript/transformationextensions.cpp b/apps/openmw/mwscript/transformationextensions.cpp index 32b359510..2e0c2de11 100644 --- a/apps/openmw/mwscript/transformationextensions.cpp +++ b/apps/openmw/mwscript/transformationextensions.cpp @@ -2,6 +2,7 @@ #include #include "../mwmp/Main.hpp" +#include "../mwmp/Networking.hpp" #include diff --git a/apps/openmw/mwworld/actiontake.cpp b/apps/openmw/mwworld/actiontake.cpp index cfdfca579..9bcfe48b3 100644 --- a/apps/openmw/mwworld/actiontake.cpp +++ b/apps/openmw/mwworld/actiontake.cpp @@ -2,6 +2,8 @@ #include #include "../mwmp/Main.hpp" +#include "../mwmp/Networking.hpp" +#include "../mwmp/LocalPlayer.hpp" #include "../mwworld/cellstore.hpp" #include "../mwbase/environment.hpp" diff --git a/apps/openmw/mwworld/worldimp.cpp b/apps/openmw/mwworld/worldimp.cpp index 608844f19..c20dacea9 100644 --- a/apps/openmw/mwworld/worldimp.cpp +++ b/apps/openmw/mwworld/worldimp.cpp @@ -7,6 +7,7 @@ #include #include "../mwmp/Main.hpp" +#include "../mwmp/Networking.hpp" #include #include