1
0
mirror of https://github.com/vcmi/vcmi.git synced 2024-11-28 08:48:48 +02:00

Fix build

This commit is contained in:
Ivan Savenko 2023-06-26 17:25:29 +03:00
parent 098e68b8dd
commit 3d66455cd1
12 changed files with 63 additions and 31 deletions

View File

@ -55,6 +55,7 @@
#include "../lib/mapObjects/ObjectTemplate.h"
#include "../lib/gameState/CGameState.h"
#include "../lib/gameState/InfoAboutArmy.h"
#include "../lib/gameState/SThievesGuildInfo.h"
#include "../lib/CArtHandler.h"
#include "../lib/CBuildingHandler.h"
#include "../lib/CConfigHandler.h"

View File

@ -392,6 +392,7 @@ macro(add_main_lib TARGET_NAME LIBRARY_TYPE)
${MAIN_LIB_DIR}/gameState/CGameStateCampaign.h
${MAIN_LIB_DIR}/gameState/EVictoryLossCheckResult.h
${MAIN_LIB_DIR}/gameState/InfoAboutArmy.h
${MAIN_LIB_DIR}/gameState/SThievesGuildInfo.h
${MAIN_LIB_DIR}/gameState/QuestInfo.h
${MAIN_LIB_DIR}/logging/CBasicLogConfigurator.h

View File

@ -12,6 +12,7 @@
#include "gameState/CGameState.h"
#include "gameState/InfoAboutArmy.h"
#include "gameState/SThievesGuildInfo.h"
#include "CGeneralTextHandler.h"
#include "StartInfo.h" // for StartInfo
#include "battle/BattleInfo.h" // for BattleInfo

View File

@ -40,6 +40,8 @@ PlayerState::PlayerState(PlayerState && other) noexcept:
std::swap(quests, other.quests);
}
PlayerState::~PlayerState() = default;
std::string PlayerState::nodeName() const
{
return "Player " + color.getStrCap(false);

View File

@ -43,6 +43,7 @@ public:
PlayerState();
PlayerState(PlayerState && other) noexcept;
~PlayerState();
std::string nodeName() const override;

View File

@ -54,5 +54,4 @@ enum class CampaignScenarioID : int8_t
// no members - fake enum to create integer type that is not implicitly convertible to int
};
VCMI_LIB_NAMESPACE_END

View File

@ -9,6 +9,8 @@
*/
#pragma once
VCMI_LIB_NAMESPACE_BEGIN
struct DLL_LINKAGE CampaignScenarioPrologEpilog
{
bool hasPrologEpilog = false;
@ -24,3 +26,5 @@ struct DLL_LINKAGE CampaignScenarioPrologEpilog
h & prologText;
}
};
VCMI_LIB_NAMESPACE_END

View File

@ -418,3 +418,5 @@ bool CampaignState::isCampaignFinished() const
{
return conqueredScenarios() == allScenarios();
}
VCMI_LIB_NAMESPACE_END

View File

@ -13,6 +13,7 @@
#include "EVictoryLossCheckResult.h"
#include "InfoAboutArmy.h"
#include "CGameStateCampaign.h"
#include "SThievesGuildInfo.h"
#include "../ArtifactUtils.h"
#include "../CBuildingHandler.h"

View File

@ -29,40 +29,11 @@ struct EventCondition;
struct CampaignTravel;
class CStackInstance;
class CGameStateCampaign;
struct SThievesGuildInfo;
template<typename T> class CApplier;
class CBaseForGSApply;
struct DLL_LINKAGE SThievesGuildInfo
{
std::vector<PlayerColor> playerColors; //colors of players that are in-game
std::vector< std::vector< PlayerColor > > numOfTowns, numOfHeroes, gold, woodOre, mercSulfCrystGems, obelisks, artifacts, army, income; // [place] -> [colours of players]
std::map<PlayerColor, InfoAboutHero> colorToBestHero; //maps player's color to his best heros'
std::map<PlayerColor, EAiTactic::EAiTactic> personality; // color to personality // ai tactic
std::map<PlayerColor, si32> bestCreature; // color to ID // id or -1 if not known
// template <typename Handler> void serialize(Handler &h, const int version)
// {
// h & playerColors;
// h & numOfTowns;
// h & numOfHeroes;
// h & gold;
// h & woodOre;
// h & mercSulfCrystGems;
// h & obelisks;
// h & artifacts;
// h & army;
// h & income;
// h & colorToBestHero;
// h & personality;
// h & bestCreature;
// }
};
struct DLL_LINKAGE RumorState
{
enum ERumorType : ui8

View File

@ -81,3 +81,5 @@ private:
si32 intValue; // uses EResultult
};
VCMI_LIB_NAMESPACE_END

View File

@ -0,0 +1,47 @@
/*
* SThievesGuildInfo.h, part of VCMI engine
*
* Authors: listed in file AUTHORS in main folder
*
* License: GNU General Public License v2.0 or later
* Full text of license available in license.txt file, in main folder
*
*/
#pragma once
#include "../GameConstants.h"
#include "InfoAboutArmy.h"
VCMI_LIB_NAMESPACE_BEGIN
struct DLL_LINKAGE SThievesGuildInfo
{
std::vector<PlayerColor> playerColors; //colors of players that are in-game
std::vector< std::vector< PlayerColor > > numOfTowns, numOfHeroes, gold, woodOre, mercSulfCrystGems, obelisks, artifacts, army, income; // [place] -> [colours of players]
std::map<PlayerColor, InfoAboutHero> colorToBestHero; //maps player's color to his best heros'
std::map<PlayerColor, EAiTactic::EAiTactic> personality; // color to personality // ai tactic
std::map<PlayerColor, si32> bestCreature; // color to ID // id or -1 if not known
// template <typename Handler> void serialize(Handler &h, const int version)
// {
// h & playerColors;
// h & numOfTowns;
// h & numOfHeroes;
// h & gold;
// h & woodOre;
// h & mercSulfCrystGems;
// h & obelisks;
// h & artifacts;
// h & army;
// h & income;
// h & colorToBestHero;
// h & personality;
// h & bestCreature;
// }
};
VCMI_LIB_NAMESPACE_END