mirror of
https://github.com/vcmi/vcmi.git
synced 2024-12-24 22:14:36 +02:00
Fix more includes and move SideInBattle / SiegeInfo into battle
This commit is contained in:
parent
ab4c848169
commit
2ce02202c1
@ -145,6 +145,10 @@
|
||||
<Unit filename="battle/CPlayerBattleCallback.h" />
|
||||
<Unit filename="battle/ReachabilityInfo.cpp" />
|
||||
<Unit filename="battle/ReachabilityInfo.h" />
|
||||
<Unit filename="battle/SideInBattle.cpp" />
|
||||
<Unit filename="battle/SideInBattle.h" />
|
||||
<Unit filename="battle/SiegeInfo.cpp" />
|
||||
<Unit filename="battle/SiegeInfo.h" />
|
||||
<Unit filename="CArtHandler.cpp" />
|
||||
<Unit filename="CArtHandler.h" />
|
||||
<Unit filename="CBonusTypeHandler.cpp" />
|
||||
@ -215,10 +219,6 @@
|
||||
<Unit filename="ResourceSet.cpp" />
|
||||
<Unit filename="ResourceSet.h" />
|
||||
<Unit filename="ScopeGuard.h" />
|
||||
<Unit filename="SideInBattle.cpp" />
|
||||
<Unit filename="SideInBattle.h" />
|
||||
<Unit filename="SiegeInfo.cpp" />
|
||||
<Unit filename="SiegeInfo.h" />
|
||||
<Unit filename="StartInfo.h" />
|
||||
<Unit filename="StdInc.h">
|
||||
<Option compile="1" />
|
||||
|
@ -211,8 +211,8 @@
|
||||
<ClCompile Include="serializer\JsonDeserializer.cpp" />
|
||||
<ClCompile Include="serializer\JsonSerializeFormat.cpp" />
|
||||
<ClCompile Include="serializer\JsonSerializer.cpp" />
|
||||
<ClCompile Include="SideInBattle.cpp" />
|
||||
<ClCompile Include="SiegeInfo.cpp" />
|
||||
<ClCompile Include="battle\SideInBattle.cpp" />
|
||||
<ClCompile Include="battle\SiegeInfo.cpp" />
|
||||
<ClCompile Include="spells\CSpellHandler.cpp" />
|
||||
<ClCompile Include="spells\ISpellMechanics.cpp" />
|
||||
<ClCompile Include="spells\AdventureSpellMechanics.cpp" />
|
||||
@ -415,8 +415,8 @@
|
||||
<ClInclude Include="serializer\JsonDeserializer.h" />
|
||||
<ClInclude Include="serializer\JsonSerializeFormat.h" />
|
||||
<ClInclude Include="serializer\JsonSerializer.h" />
|
||||
<ClInclude Include="SideInBattle.h" />
|
||||
<ClInclude Include="SiegeInfo.h" />
|
||||
<ClInclude Include="battle\SideInBattle.h" />
|
||||
<ClInclude Include="battle\SiegeInfo.h" />
|
||||
<ClInclude Include="spells\AdventureSpellMechanics.h" />
|
||||
<ClInclude Include="spells\BattleSpellMechanics.h" />
|
||||
<ClInclude Include="spells\CDefaultSpellMechanics.h" />
|
||||
|
@ -267,8 +267,8 @@
|
||||
<ClCompile Include="serializer\CTypeList.cpp" />
|
||||
<ClCompile Include="serializer\Connection.cpp" />
|
||||
<ClCompile Include="CStack.cpp" />
|
||||
<ClCompile Include="SideInBattle.cpp" />
|
||||
<ClCompile Include="SiegeInfo.cpp" />
|
||||
<ClCompile Include="battle\SideInBattle.cpp" />
|
||||
<ClCompile Include="battle\SiegeInfo.cpp" />
|
||||
<ClCompile Include="battle\BattleInfo.cpp" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
@ -686,10 +686,10 @@
|
||||
<ClInclude Include="CStack.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="SideInBattle.h">
|
||||
<ClInclude Include="battle\SideInBattle.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="SiegeInfo.h">
|
||||
<ClInclude Include="battle\SiegeInfo.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
</ItemGroup>
|
||||
|
@ -7,9 +7,9 @@
|
||||
* Full text of license available in license.txt file, in main folder
|
||||
*
|
||||
*/
|
||||
#include "StdInc.h"
|
||||
#include "../StdInc.h"
|
||||
#include "AccessibilityInfo.h"
|
||||
#include "CStack.h"
|
||||
#include "../CStack.h"
|
||||
|
||||
bool AccessibilityInfo::accessible(BattleHex tile, const CStack * stack) const
|
||||
{
|
||||
|
@ -8,9 +8,9 @@
|
||||
*
|
||||
*/
|
||||
|
||||
#include "StdInc.h"
|
||||
#include "../StdInc.h"
|
||||
#include "BattleAction.h"
|
||||
#include "CStack.h"
|
||||
#include "../CStack.h"
|
||||
|
||||
using namespace Battle;
|
||||
|
||||
|
@ -7,9 +7,9 @@
|
||||
* Full text of license available in license.txt file, in main folder
|
||||
*
|
||||
*/
|
||||
#include "StdInc.h"
|
||||
#include "../StdInc.h"
|
||||
#include "BattleAttackInfo.h"
|
||||
#include "CStack.h"
|
||||
#include "../CStack.h"
|
||||
|
||||
|
||||
BattleAttackInfo::BattleAttackInfo(const CStack * Attacker, const CStack * Defender, bool Shooting)
|
||||
|
@ -7,7 +7,7 @@
|
||||
* Full text of license available in license.txt file, in main folder
|
||||
*
|
||||
*/
|
||||
#include "StdInc.h"
|
||||
#include "../StdInc.h"
|
||||
#include "BattleHex.h"
|
||||
|
||||
BattleHex::BattleHex() : hex(INVALID) {}
|
||||
|
@ -7,13 +7,13 @@
|
||||
* Full text of license available in license.txt file, in main folder
|
||||
*
|
||||
*/
|
||||
#include "StdInc.h"
|
||||
#include "../StdInc.h"
|
||||
#include "BattleInfo.h"
|
||||
#include "CStack.h"
|
||||
#include "CHeroHandler.h"
|
||||
#include "NetPacks.h"
|
||||
#include "filesystem/Filesystem.h"
|
||||
#include "mapObjects/CGTownInstance.h"
|
||||
#include "../CStack.h"
|
||||
#include "../CHeroHandler.h"
|
||||
#include "../NetPacks.h"
|
||||
#include "../filesystem/Filesystem.h"
|
||||
#include "../mapObjects/CGTownInstance.h"
|
||||
|
||||
const CStack * BattleInfo::getNextStack() const
|
||||
{
|
||||
|
@ -7,13 +7,13 @@
|
||||
* Full text of license available in license.txt file, in main folder
|
||||
*
|
||||
*/
|
||||
#include "StdInc.h"
|
||||
#include "../StdInc.h"
|
||||
#include "CBattleInfoCallback.h"
|
||||
#include "CStack.h"
|
||||
#include "../CStack.h"
|
||||
#include "BattleInfo.h"
|
||||
#include "NetPacks.h"
|
||||
#include "spells/CSpellHandler.h"
|
||||
#include "mapObjects/CGTownInstance.h"
|
||||
#include "../NetPacks.h"
|
||||
#include "../spells/CSpellHandler.h"
|
||||
#include "../mapObjects/CGTownInstance.h"
|
||||
|
||||
namespace SiegeStuffThatShouldBeMovedToHandlers // <=== TODO
|
||||
{
|
||||
|
@ -7,12 +7,12 @@
|
||||
* Full text of license available in license.txt file, in main folder
|
||||
*
|
||||
*/
|
||||
#include "StdInc.h"
|
||||
#include "../StdInc.h"
|
||||
#include "CBattleInfoEssentials.h"
|
||||
#include "CStack.h"
|
||||
#include "../CStack.h"
|
||||
#include "BattleInfo.h"
|
||||
#include "NetPacks.h"
|
||||
#include "mapObjects/CGTownInstance.h"
|
||||
#include "../NetPacks.h"
|
||||
#include "../mapObjects/CGTownInstance.h"
|
||||
|
||||
ETerrainType CBattleInfoEssentials::battleTerrainType() const
|
||||
{
|
||||
|
@ -7,10 +7,10 @@
|
||||
* Full text of license available in license.txt file, in main folder
|
||||
*
|
||||
*/
|
||||
#include "StdInc.h"
|
||||
#include "../StdInc.h"
|
||||
#include "CCallbackBase.h"
|
||||
#include "BattleInfo.h"
|
||||
#include "CGameState.h"
|
||||
#include "../CGameState.h"
|
||||
|
||||
bool CCallbackBase::duringBattle() const
|
||||
{
|
||||
|
@ -1,9 +1,9 @@
|
||||
#include "StdInc.h"
|
||||
#include "../StdInc.h"
|
||||
#include "CObstacleInstance.h"
|
||||
#include "CHeroHandler.h"
|
||||
#include "CTownHandler.h"
|
||||
#include "VCMI_Lib.h"
|
||||
#include "spells/CSpellHandler.h"
|
||||
#include "../CHeroHandler.h"
|
||||
#include "../CTownHandler.h"
|
||||
#include "../VCMI_Lib.h"
|
||||
#include "../spells/CSpellHandler.h"
|
||||
|
||||
/*
|
||||
* CObstacleInstance.cpp, part of VCMI engine
|
||||
|
@ -7,10 +7,10 @@
|
||||
* Full text of license available in license.txt file, in main folder
|
||||
*
|
||||
*/
|
||||
#include "StdInc.h"
|
||||
#include "../StdInc.h"
|
||||
#include "CPlayerBattleCallback.h"
|
||||
#include "CStack.h"
|
||||
#include "CGameState.h"
|
||||
#include "../CStack.h"
|
||||
#include "../CGameState.h"
|
||||
|
||||
bool CPlayerBattleCallback::battleCanFlee() const
|
||||
{
|
||||
|
@ -8,9 +8,9 @@
|
||||
*
|
||||
*/
|
||||
|
||||
#include "StdInc.h"
|
||||
#include "../StdInc.h"
|
||||
#include "ReachabilityInfo.h"
|
||||
#include "CStack.h"
|
||||
#include "../CStack.h"
|
||||
|
||||
|
||||
ReachabilityInfo::Parameters::Parameters()
|
||||
|
@ -7,9 +7,9 @@
|
||||
* Full text of license available in license.txt file, in main folder
|
||||
*
|
||||
*/
|
||||
#include "StdInc.h"
|
||||
#include "../StdInc.h"
|
||||
#include "SideInBattle.h"
|
||||
#include "mapObjects/CArmedInstance.h"
|
||||
#include "../mapObjects/CArmedInstance.h"
|
||||
|
||||
SideInBattle::SideInBattle()
|
||||
{
|
@ -8,7 +8,7 @@
|
||||
*
|
||||
*/
|
||||
#pragma once
|
||||
#include "GameConstants.h"
|
||||
#include "../GameConstants.h"
|
||||
|
||||
class CGHeroInstance;
|
||||
class CArmedInstance;
|
@ -7,7 +7,7 @@
|
||||
* Full text of license available in license.txt file, in main folder
|
||||
*
|
||||
*/
|
||||
#include "StdInc.h"
|
||||
#include "../StdInc.h"
|
||||
#include "SiegeInfo.h"
|
||||
|
||||
|
||||
@ -27,9 +27,13 @@ EWallState::EWallState SiegeInfo::applyDamage(EWallState::EWallState state, unsi
|
||||
|
||||
switch(applyDamage(state, value - 1))
|
||||
{
|
||||
case EWallState::INTACT : return EWallState::DAMAGED;
|
||||
case EWallState::DAMAGED : return EWallState::DESTROYED;
|
||||
case EWallState::DESTROYED : return EWallState::DESTROYED;
|
||||
default: return EWallState::NONE;
|
||||
case EWallState::INTACT:
|
||||
return EWallState::DAMAGED;
|
||||
case EWallState::DAMAGED:
|
||||
return EWallState::DESTROYED;
|
||||
case EWallState::DESTROYED:
|
||||
return EWallState::DESTROYED;
|
||||
default:
|
||||
return EWallState::NONE;
|
||||
}
|
||||
}
|
@ -8,7 +8,7 @@
|
||||
*
|
||||
*/
|
||||
#pragma once
|
||||
#include "GameConstants.h"
|
||||
#include "../GameConstants.h"
|
||||
|
||||
//only for use in BattleInfo
|
||||
struct DLL_LINKAGE SiegeInfo
|
Loading…
Reference in New Issue
Block a user