diff --git a/AI/BattleAI/EnemyInfo.h b/AI/BattleAI/EnemyInfo.h index 66e2bddbe..f973aa3b7 100644 --- a/AI/BattleAI/EnemyInfo.h +++ b/AI/BattleAI/EnemyInfo.h @@ -9,7 +9,7 @@ */ #pragma once -#include "../../lib/BattleHex.h" +#include "../../lib/battle/BattleHex.h" class CStack; diff --git a/AI/StupidAI/StupidAI.h b/AI/StupidAI/StupidAI.h index 439a1d3cf..1b9a0b9ee 100644 --- a/AI/StupidAI/StupidAI.h +++ b/AI/StupidAI/StupidAI.h @@ -1,6 +1,6 @@ #pragma once -#include "../../lib/BattleHex.h" +#include "../../lib/battle/BattleHex.h" class CStupidAI : public CBattleGameInterface { diff --git a/CCallback.cpp b/CCallback.cpp index f79649627..23d76be44 100644 --- a/CCallback.cpp +++ b/CCallback.cpp @@ -18,7 +18,7 @@ #include "lib/GameConstants.h" #include "lib/CPlayerState.h" #include "lib/UnlockGuard.h" -#include "lib/BattleInfo.h" +#include "lib/battle/BattleInfo.h" /* * CCallback.cpp, part of VCMI engine diff --git a/client/Client.cpp b/client/Client.cpp index 0c429cb08..58a2aed02 100644 --- a/client/Client.cpp +++ b/client/Client.cpp @@ -11,7 +11,7 @@ #include "../lib/CGameState.h" #include "CPlayerInterface.h" #include "../lib/StartInfo.h" -#include "../lib/BattleInfo.h" +#include "../lib/battle/BattleInfo.h" #include "../lib/CModHandler.h" #include "../lib/CArtHandler.h" #include "../lib/CGeneralTextHandler.h" diff --git a/client/Client.h b/client/Client.h index 7e2cbf45f..cdaaecc23 100644 --- a/client/Client.h +++ b/client/Client.h @@ -2,7 +2,7 @@ #include "../lib/IGameCallback.h" -#include "../lib/BattleAction.h" +#include "../lib/battle/BattleAction.h" #include "../lib/CStopWatch.h" #include "../lib/int3.h" diff --git a/client/NetPacksClient.cpp b/client/NetPacksClient.cpp index 99bba1032..d39aa7bb4 100644 --- a/client/NetPacksClient.cpp +++ b/client/NetPacksClient.cpp @@ -25,7 +25,7 @@ #include "../lib/mapping/CCampaignHandler.h" #include "../lib/CGameState.h" #include "../lib/CStack.h" -#include "../lib/BattleInfo.h" +#include "../lib/battle/BattleInfo.h" #include "../lib/GameConstants.h" #include "../lib/CPlayerState.h" #include "gui/CGuiHandler.h" diff --git a/client/battle/CBattleAnimations.h b/client/battle/CBattleAnimations.h index 53d12fe47..424610c3b 100644 --- a/client/battle/CBattleAnimations.h +++ b/client/battle/CBattleAnimations.h @@ -1,6 +1,6 @@ #pragma once -#include "../../lib/BattleHex.h" +#include "../../lib/battle/BattleHex.h" #include "../widgets/Images.h" class CBattleInterface; diff --git a/client/battle/CBattleInterfaceClasses.h b/client/battle/CBattleInterfaceClasses.h index 2a1c0a1ec..2fc64631d 100644 --- a/client/battle/CBattleInterfaceClasses.h +++ b/client/battle/CBattleInterfaceClasses.h @@ -1,7 +1,7 @@ #pragma once #include "../gui/CIntObject.h" -#include "../../lib/BattleHex.h" +#include "../../lib/battle/BattleHex.h" #include "../windows/CWindowObject.h" struct SDL_Surface; diff --git a/lib/CGameInfoCallback.cpp b/lib/CGameInfoCallback.cpp index 28fd0b988..a31685412 100644 --- a/lib/CGameInfoCallback.cpp +++ b/lib/CGameInfoCallback.cpp @@ -15,7 +15,7 @@ #include "CGeneralTextHandler.h" #include "mapObjects/CObjectHandler.h" // for CGObjectInstance #include "StartInfo.h" // for StartInfo -#include "BattleInfo.h" // for BattleInfo +#include "battle/BattleInfo.h" // for BattleInfo #include "NetPacks.h" // for InfoWindow #include "CModHandler.h" #include "spells/CSpellHandler.h" diff --git a/lib/CGameInterface.h b/lib/CGameInterface.h index 08e293a63..86f60d373 100644 --- a/lib/CGameInterface.h +++ b/lib/CGameInterface.h @@ -1,7 +1,7 @@ #pragma once -#include "BattleAction.h" +#include "battle/BattleAction.h" #include "IGameEventsReceiver.h" #include "CGameStateFwd.h" diff --git a/lib/CGameState.cpp b/lib/CGameState.cpp index a1b8a6179..a0d4405d4 100644 --- a/lib/CGameState.cpp +++ b/lib/CGameState.cpp @@ -16,7 +16,7 @@ #include "StartInfo.h" #include "NetPacks.h" #include "registerTypes/RegisterTypes.h" -#include "BattleInfo.h" +#include "battle/BattleInfo.h" #include "JsonNode.h" #include "filesystem/Filesystem.h" #include "GameConstants.h" diff --git a/lib/CHeroHandler.cpp b/lib/CHeroHandler.cpp index 1489dc349..3dc8ff2db 100644 --- a/lib/CHeroHandler.cpp +++ b/lib/CHeroHandler.cpp @@ -6,7 +6,7 @@ #include "VCMI_Lib.h" #include "JsonNode.h" #include "StringConstants.h" -#include "BattleHex.h" +#include "battle/BattleHex.h" #include "CCreatureHandler.h" #include "CModHandler.h" #include "CTownHandler.h" diff --git a/lib/CMakeLists.txt b/lib/CMakeLists.txt index 8875975f5..6ca76f88d 100644 --- a/lib/CMakeLists.txt +++ b/lib/CMakeLists.txt @@ -76,9 +76,9 @@ set(lib_SRCS spells/CDefaultSpellMechanics.cpp spells/ViewSpellInt.cpp - BattleAction.cpp - BattleHex.cpp - BattleInfo.cpp + battle/BattleAction.cpp + battle/BattleHex.cpp + battle/BattleInfo.cpp battle/AccessibilityInfo.cpp battle/BattleAttackInfo.cpp battle/CBattleInfoCallback.cpp @@ -100,7 +100,7 @@ set(lib_SRCS CGeneralTextHandler.cpp CHeroHandler.cpp CModHandler.cpp - CObstacleInstance.cpp + battle/CObstacleInstance.cpp CRandomGenerator.cpp CThreadHelper.cpp diff --git a/lib/CStack.cpp b/lib/CStack.cpp index 3736dddfc..bfc613e47 100644 --- a/lib/CStack.cpp +++ b/lib/CStack.cpp @@ -9,7 +9,7 @@ */ #include "StdInc.h" #include "CStack.h" -#include "BattleInfo.h" +#include "battle/BattleInfo.h" #include "spells/CSpellHandler.h" #include "CRandomGenerator.h" #include "NetPacks.h" diff --git a/lib/CStack.h b/lib/CStack.h index 86f1bde8f..2edc9c341 100644 --- a/lib/CStack.h +++ b/lib/CStack.h @@ -8,7 +8,7 @@ * */ #pragma once -#include "BattleHex.h" +#include "battle/BattleHex.h" #include "CCreatureHandler.h" #include "mapObjects/CGHeroInstance.h" // for commander serialization diff --git a/lib/CTownHandler.h b/lib/CTownHandler.h index c08be54c9..f823d6328 100644 --- a/lib/CTownHandler.h +++ b/lib/CTownHandler.h @@ -6,7 +6,7 @@ #include "GameConstants.h" #include "IHandlerBase.h" #include "LogicalExpression.h" -#include "BattleHex.h" +#include "battle/BattleHex.h" /* * CTownHandler.h, part of VCMI engine diff --git a/lib/IGameEventsReceiver.h b/lib/IGameEventsReceiver.h index 472599a72..cfa5e619f 100644 --- a/lib/IGameEventsReceiver.h +++ b/lib/IGameEventsReceiver.h @@ -10,7 +10,7 @@ #pragma once -#include "BattleHex.h" +#include "battle/BattleHex.h" #include "int3.h" class CGTownInstance; diff --git a/lib/NetPacks.h b/lib/NetPacks.h index 700e43d7b..8f162047c 100644 --- a/lib/NetPacks.h +++ b/lib/NetPacks.h @@ -2,14 +2,14 @@ #include "NetPacksBase.h" -#include "BattleAction.h" +#include "battle/BattleAction.h" #include "mapObjects/CGHeroInstance.h" #include "ConstTransitivePtr.h" #include "int3.h" #include "ResourceSet.h" #include "CGameStateFwd.h" #include "mapping/CMapDefines.h" -#include "CObstacleInstance.h" +#include "battle/CObstacleInstance.h" #include "spells/ViewSpellInt.h" diff --git a/lib/NetPacksLib.cpp b/lib/NetPacksLib.cpp index b49f91bae..7ba96e5a5 100644 --- a/lib/NetPacksLib.cpp +++ b/lib/NetPacksLib.cpp @@ -13,7 +13,7 @@ #include "CCreatureHandler.h" #include "CGameState.h" #include "CStack.h" -#include "BattleInfo.h" +#include "battle/BattleInfo.h" #include "CTownHandler.h" #include "mapping/CMapInfo.h" #include "StartInfo.h" diff --git a/lib/BattleAction.cpp b/lib/battle/BattleAction.cpp similarity index 95% rename from lib/BattleAction.cpp rename to lib/battle/BattleAction.cpp index 4495a6e76..004ba5aed 100644 --- a/lib/BattleAction.cpp +++ b/lib/battle/BattleAction.cpp @@ -1,9 +1,3 @@ -#include "StdInc.h" -#include "BattleAction.h" - -#include "CStack.h" - - /* * BattleAction.cpp, part of VCMI engine * @@ -14,6 +8,10 @@ * */ +#include "StdInc.h" +#include "BattleAction.h" +#include "CStack.h" + using namespace Battle; BattleAction::BattleAction(): diff --git a/lib/BattleAction.h b/lib/battle/BattleAction.h similarity index 97% rename from lib/BattleAction.h rename to lib/battle/BattleAction.h index 255b8c7b4..751b2e8e5 100644 --- a/lib/BattleAction.h +++ b/lib/battle/BattleAction.h @@ -1,8 +1,3 @@ -#pragma once - - -#include "BattleHex.h" - /* * BattleAction.h, part of VCMI engine * @@ -12,10 +7,12 @@ * Full text of license available in license.txt file, in main folder * */ +#pragma once +#include "BattleHex.h" -/// A struct which handles battle actions like defending, walking,... - represents a creature stack in a battle class CStack; +/// A struct which handles battle actions like defending, walking,... - represents a creature stack in a battle struct DLL_LINKAGE BattleAction { ui8 side; //who made this action: false - left, true - right player diff --git a/lib/BattleHex.cpp b/lib/battle/BattleHex.cpp similarity index 100% rename from lib/BattleHex.cpp rename to lib/battle/BattleHex.cpp diff --git a/lib/BattleHex.h b/lib/battle/BattleHex.h similarity index 95% rename from lib/BattleHex.h rename to lib/battle/BattleHex.h index a5a3a0be3..18ba8d599 100644 --- a/lib/BattleHex.h +++ b/lib/battle/BattleHex.h @@ -8,7 +8,7 @@ * */ #pragma once -#include "GameConstants.h" +#include "../GameConstants.h" // for battle stacks' positions struct DLL_LINKAGE BattleHex //TODO: decide if this should be changed to class for better code design diff --git a/lib/BattleInfo.cpp b/lib/battle/BattleInfo.cpp similarity index 100% rename from lib/BattleInfo.cpp rename to lib/battle/BattleInfo.cpp diff --git a/lib/BattleInfo.h b/lib/battle/BattleInfo.h similarity index 100% rename from lib/BattleInfo.h rename to lib/battle/BattleInfo.h diff --git a/lib/CObstacleInstance.cpp b/lib/battle/CObstacleInstance.cpp similarity index 100% rename from lib/CObstacleInstance.cpp rename to lib/battle/CObstacleInstance.cpp diff --git a/lib/CObstacleInstance.h b/lib/battle/CObstacleInstance.h similarity index 100% rename from lib/CObstacleInstance.h rename to lib/battle/CObstacleInstance.h diff --git a/lib/registerTypes/RegisterTypes.h b/lib/registerTypes/RegisterTypes.h index caca90f9c..e8e862b25 100644 --- a/lib/registerTypes/RegisterTypes.h +++ b/lib/registerTypes/RegisterTypes.h @@ -11,7 +11,7 @@ #include "../mapObjects/CRewardableConstructor.h" #include "../mapObjects/CommonConstructors.h" #include "../mapObjects/MapObjects.h" -#include "../CObstacleInstance.h" +#include "../battle/CObstacleInstance.h" /* * RegisterTypes.h, part of VCMI engine diff --git a/lib/registerTypes/TypesClientPacks2.cpp b/lib/registerTypes/TypesClientPacks2.cpp index a38b35f3a..086c823f0 100644 --- a/lib/registerTypes/TypesClientPacks2.cpp +++ b/lib/registerTypes/TypesClientPacks2.cpp @@ -3,7 +3,7 @@ #include "../StartInfo.h" #include "../CStack.h" -#include "../BattleInfo.h" +#include "../battle/BattleInfo.h" #include "../CGameState.h" #include "../mapping/CMap.h" #include "../CModHandler.h" diff --git a/lib/registerTypes/TypesMapObjects2.cpp b/lib/registerTypes/TypesMapObjects2.cpp index 03184fded..b4156c7cd 100644 --- a/lib/registerTypes/TypesMapObjects2.cpp +++ b/lib/registerTypes/TypesMapObjects2.cpp @@ -3,7 +3,7 @@ #include "../StartInfo.h" #include "../CStack.h" -#include "../BattleInfo.h" +#include "../battle/BattleInfo.h" #include "../CGameState.h" #include "../mapping/CMap.h" #include "../CModHandler.h" diff --git a/lib/spells/BattleSpellMechanics.cpp b/lib/spells/BattleSpellMechanics.cpp index 2b29f98a7..b4c69cbb4 100644 --- a/lib/spells/BattleSpellMechanics.cpp +++ b/lib/spells/BattleSpellMechanics.cpp @@ -13,7 +13,7 @@ #include "../NetPacks.h" #include "../CStack.h" -#include "../BattleInfo.h" +#include "../battle/BattleInfo.h" #include "../mapObjects/CGHeroInstance.h" #include "../mapObjects/CGTownInstance.h" diff --git a/lib/spells/CDefaultSpellMechanics.cpp b/lib/spells/CDefaultSpellMechanics.cpp index 4bd4ee546..185bdd0ab 100644 --- a/lib/spells/CDefaultSpellMechanics.cpp +++ b/lib/spells/CDefaultSpellMechanics.cpp @@ -13,7 +13,7 @@ #include "CDefaultSpellMechanics.h" #include "../CStack.h" -#include "../BattleInfo.h" +#include "../battle/BattleInfo.h" #include "../CGeneralTextHandler.h" diff --git a/lib/spells/CSpellHandler.cpp b/lib/spells/CSpellHandler.cpp index 488b76e03..648d50d8e 100644 --- a/lib/spells/CSpellHandler.cpp +++ b/lib/spells/CSpellHandler.cpp @@ -23,7 +23,7 @@ #include "../StringConstants.h" #include "../CStack.h" -#include "../BattleInfo.h" +#include "../battle/BattleInfo.h" #include "../battle/CBattleInfoCallback.h" #include "../CGameState.h" //todo: remove diff --git a/lib/spells/CSpellHandler.h b/lib/spells/CSpellHandler.h index a60d84d68..03fc8f26e 100644 --- a/lib/spells/CSpellHandler.h +++ b/lib/spells/CSpellHandler.h @@ -14,7 +14,7 @@ #include "../ConstTransitivePtr.h" #include "../int3.h" #include "../GameConstants.h" -#include "../BattleHex.h" +#include "../battle/BattleHex.h" #include "../HeroBonus.h" class CGObjectInstance; diff --git a/lib/spells/CreatureSpellMechanics.cpp b/lib/spells/CreatureSpellMechanics.cpp index 7ed5ace1e..c9c1ee665 100644 --- a/lib/spells/CreatureSpellMechanics.cpp +++ b/lib/spells/CreatureSpellMechanics.cpp @@ -14,7 +14,7 @@ #include "../NetPacks.h" #include "../CStack.h" -#include "../BattleInfo.h" +#include "../battle/BattleInfo.h" ///AcidBreathDamageMechanics void AcidBreathDamageMechanics::applyBattleEffects(const SpellCastEnvironment * env, const BattleSpellCastParameters & parameters, SpellCastContext & ctx) const diff --git a/lib/spells/ISpellMechanics.cpp b/lib/spells/ISpellMechanics.cpp index 9ffc6ec1b..b1f961740 100644 --- a/lib/spells/ISpellMechanics.cpp +++ b/lib/spells/ISpellMechanics.cpp @@ -12,7 +12,7 @@ #include "ISpellMechanics.h" #include "../CStack.h" -#include "../BattleInfo.h" +#include "../battle/BattleInfo.h" #include "../NetPacks.h" diff --git a/lib/spells/ISpellMechanics.h b/lib/spells/ISpellMechanics.h index 3ee4059d1..6bf0fc499 100644 --- a/lib/spells/ISpellMechanics.h +++ b/lib/spells/ISpellMechanics.h @@ -11,7 +11,7 @@ #pragma once #include "CSpellHandler.h" -#include "../BattleHex.h" +#include "../battle/BattleHex.h" ///callback to be provided by server diff --git a/server/CGameHandler.cpp b/server/CGameHandler.cpp index d258e0084..d0428f00d 100644 --- a/server/CGameHandler.cpp +++ b/server/CGameHandler.cpp @@ -16,7 +16,7 @@ #include "../lib/CCreatureHandler.h" #include "../lib/CGameState.h" #include "../lib/CStack.h" -#include "../lib/BattleInfo.h" +#include "../lib/battle/BattleInfo.h" #include "../lib/CondSh.h" #include "../lib/NetPacks.h" #include "../lib/VCMI_Lib.h" diff --git a/server/CGameHandler.h b/server/CGameHandler.h index 6a04c6d50..485efc93e 100644 --- a/server/CGameHandler.h +++ b/server/CGameHandler.h @@ -3,7 +3,7 @@ #include "../lib/FunctionList.h" #include "../lib/IGameCallback.h" -#include "../lib/BattleAction.h" +#include "../lib/battle/BattleAction.h" #include "CQuery.h" diff --git a/server/CQuery.cpp b/server/CQuery.cpp index 773283689..f9a35e071 100644 --- a/server/CQuery.cpp +++ b/server/CQuery.cpp @@ -1,7 +1,7 @@ #include "StdInc.h" #include "CQuery.h" #include "CGameHandler.h" -#include "../lib/BattleInfo.h" +#include "../lib/battle/BattleInfo.h" #include "../lib/mapObjects/MiscObjects.h" boost::mutex Queries::mx; diff --git a/server/NetPacksServer.cpp b/server/NetPacksServer.cpp index b5ed4d514..c7b8c3b1b 100644 --- a/server/NetPacksServer.cpp +++ b/server/NetPacksServer.cpp @@ -6,8 +6,8 @@ #include "../lib/mapping/CMap.h" #include "../lib/CGameState.h" #include "../lib/CStack.h" -#include "../lib/BattleInfo.h" -#include "../lib/BattleAction.h" +#include "../lib/battle/BattleInfo.h" +#include "../lib/battle/BattleAction.h" #include "../lib/serializer/Connection.h" diff --git a/test/Battlefield.cpp b/test/Battlefield.cpp index b1bd02f69..a60726bd1 100644 --- a/test/Battlefield.cpp +++ b/test/Battlefield.cpp @@ -9,7 +9,7 @@ */ #include "StdInc.h" #include -#include "../lib/BattleHex.h" +#include "../lib/battle/BattleHex.h" BOOST_AUTO_TEST_SUITE(BattlefieldHex_Suite) BOOST_AUTO_TEST_CASE(getNeighbouringTiles)