Use a precompiled header.
continuous-integration/drone/push Build is failing Details

Signed-off-by: Deukhoofd <Deukhoofd@gmail.com>
This commit is contained in:
Deukhoofd 2020-09-25 13:05:15 +02:00
parent 5970dc5d90
commit 53bfbd36c2
Signed by: Deukhoofd
GPG Key ID: F63E044490819F6F
72 changed files with 6 additions and 158 deletions

View File

@ -1,4 +1,4 @@
cmake_minimum_required(VERSION 3.13)
cmake_minimum_required(VERSION 3.16)
project(CreatureLib)
# Enable all warnings, and make them error when occurring.
@ -47,6 +47,7 @@ endif ()
file(GLOB_RECURSE LIBRARY_SRC_FILES
"src/*.cpp" "src/*.hpp" "CInterface/*.cpp" "CInterface/*.hpp")
add_library(CreatureLib SHARED ${LIBRARY_SRC_FILES})
target_precompile_headers(CreatureLib PUBLIC src/Precompiled.hxx)
# If we are building for Windows we need to set some specific variables.
if (WINDOWS)

View File

@ -1,6 +1,5 @@
#ifndef CREATURELIB_EVENTDATAKIND_HPP
#define CREATURELIB_EVENTDATAKIND_HPP
#include <Arbutils/Enum.hpp>
namespace CreatureLib::Battling {
ENUM(EventDataKind, uint8_t, Damage, Heal, Faint, Switch, TurnStart, TurnEnd, ExperienceGain, Miss, DisplayText,

View File

@ -3,7 +3,6 @@
#include <functional>
#include <thread>
#include <vector>
#include "../../Library/Exceptions/CreatureException.hpp"
#include "Events/EventData.hpp"

View File

@ -1,7 +1,6 @@
#ifndef CREATURELIB_EVENTDATA_HPP
#define CREATURELIB_EVENTDATA_HPP
#include <Arbutils/Memory/BorrowedPtr.hpp>
#include "../EventDataKind.hpp"
namespace CreatureLib::Battling {

View File

@ -1,5 +1,4 @@
#include "ChoiceQueue.hpp"
#include <Arbutils/Assert.hpp>
bool CreatureLib::Battling::ChoiceQueue::MoveCreatureChoiceNext(CreatureLib::Battling::Creature* creature) {
AssertNotNull(creature)

View File

@ -1,9 +1,6 @@
#ifndef CREATURELIB_CHOICEQUEUE_HPP
#define CREATURELIB_CHOICEQUEUE_HPP
#include <Arbutils/Memory/UniquePtrList.hpp>
#include <utility>
#include <vector>
#include "../TurnChoices/BaseTurnChoice.hpp"
namespace CreatureLib::Battling {

View File

@ -1,8 +1,5 @@
#ifndef CREATURELIB_RESOLVETARGET_HPP
#define CREATURELIB_RESOLVETARGET_HPP
#include <Arbutils/Collections/List.hpp>
#include <Arbutils/Memory/BorrowedPtr.hpp>
#include <vector>
#include "../../Library/Attacks/AttackTarget.hpp"
#include "../Models/Battle.hpp"
#include "../Models/Creature.hpp"

View File

@ -1,6 +1,4 @@
#include "TurnHandler.hpp"
#include <Arbutils/Assert.hpp>
#include <unordered_set>
#include "../EventHooks/EventDataClasses.hpp"
#include "../History/HistoryElements/AttackUseHistory.hpp"
#include "../ScriptHandling/ScriptMacros.hpp"

View File

@ -1,5 +1,4 @@
#include "TurnOrdering.hpp"
#include <algorithm>
#include "../Models/Battle.hpp"
#include "../TurnChoices/AttackTurnChoice.hpp"

View File

@ -1,9 +1,6 @@
#ifndef CREATURELIB_TURNORDERING_HPP
#define CREATURELIB_TURNORDERING_HPP
#include <Arbutils/Random.hpp>
#include <memory>
#include <vector>
#include "../TurnChoices/BaseTurnChoice.hpp"
namespace CreatureLib::Battling {

View File

@ -1,6 +1,5 @@
#ifndef CREATURELIB_HISTORYELEMENTKIND_HPP
#define CREATURELIB_HISTORYELEMENTKIND_HPP
#include <Arbutils/Enum.hpp>
ENUM(HistoryElementKind, uint8_t, AttackUse)
#endif // CREATURELIB_HISTORYELEMENTKIND_HPP

View File

@ -1,8 +1,8 @@
#ifndef CREATURELIB_HISTORYELEMENT_HPP
#define CREATURELIB_HISTORYELEMENT_HPP
#include <Arbutils/Memory/BorrowedPtr.hpp>
#include "../HistoryElementKind.hpp"
namespace CreatureLib::Battling {
class HistoryElement {
friend class HistoryHolder;

View File

@ -1,8 +1,6 @@
#ifndef CREATURELIB_HISTORYHOLDER_HPP
#define CREATURELIB_HISTORYHOLDER_HPP
#include <cstddef>
#include <cstdint>
#include "../../Library/Exceptions/CreatureException.hpp"
#include "HistoryElements/HistoryElement.hpp"

View File

@ -1,5 +1,4 @@
#include "BattleLibrary.hpp"
#include <Arbutils/Assert.hpp>
using namespace CreatureLib::Battling;

View File

@ -1,5 +1,4 @@
#include "BattleStatCalculator.hpp"
#include <Arbutils/Assert.hpp>
#include "../Models/Creature.hpp"
using namespace CreatureLib;

View File

@ -1,5 +1,4 @@
#include "DamageLibrary.hpp"
#include <Arbutils/Assert.hpp>
#include "../ScriptHandling/ScriptMacros.hpp"
using namespace CreatureLib::Battling;

View File

@ -1,7 +1,5 @@
#ifndef CREATURELIB_EXPERIENCELIBRARY_HPP
#define CREATURELIB_EXPERIENCELIBRARY_HPP
#include <Arbutils/Memory/BorrowedPtr.hpp>
#include <unordered_set>
namespace CreatureLib::Battling {
class Creature;

View File

@ -1,5 +1,4 @@
#include "MiscLibrary.hpp"
#include <Arbutils/Assert.hpp>
#include "../Models/Battle.hpp"
#include "../TurnChoices/AttackTurnChoice.hpp"

View File

@ -1,6 +1,4 @@
#include "Battle.hpp"
#include <Arbutils/Assert.hpp>
#include <memory>
#include "../EventHooks/EventDataClasses.hpp"
#include "../Flow/TurnHandler.hpp"
#include "../Flow/TurnOrdering.hpp"

View File

@ -1,9 +1,6 @@
#ifndef CREATURELIB_BATTLE_HPP
#define CREATURELIB_BATTLE_HPP
#include <Arbutils/Assert.hpp>
#include <Arbutils/Collections/List.hpp>
#include <memory>
#include "../EventHooks/EventHook.hpp"
#include "../Flow/ChoiceQueue.hpp"
#include "../History/HistoryHolder.hpp"

View File

@ -1,8 +1,6 @@
#ifndef CREATURELIB_BATTLEPARTY_HPP
#define CREATURELIB_BATTLEPARTY_HPP
#include <Arbutils/Assert.hpp>
#include <Arbutils/Collections/List.hpp>
#include "CreatureIndex.hpp"
#include "CreatureParty.hpp"

View File

@ -1,7 +1,6 @@
#ifndef CREATURELIB_BATTLERESULT_HPP
#define CREATURELIB_BATTLERESULT_HPP
#include <cstdint>
namespace CreatureLib::Battling {
class BattleResult {
bool _conclusiveResult;

View File

@ -1,5 +1,4 @@
#include "BattleSide.hpp"
#include <algorithm>
#include "../EventHooks/EventDataClasses.hpp"
#include "Battle.hpp"

View File

@ -1,9 +1,6 @@
#ifndef CREATURELIB_BATTLESIDE_HPP
#define CREATURELIB_BATTLESIDE_HPP
#include <Arbutils/Assert.hpp>
#include <Arbutils/Collections/List.hpp>
#include <vector>
#include "../TurnChoices/BaseTurnChoice.hpp"
#include "Creature.hpp"

View File

@ -1,8 +1,5 @@
#include "CreateCreature.hpp"
#include <sstream>
#include <utility>
#include "../Library/BattleLibrary.hpp"
using namespace CreatureLib::Battling;

View File

@ -1,7 +1,6 @@
#ifndef CREATURELIB_CREATECREATURE_HPP
#define CREATURELIB_CREATECREATURE_HPP
#include <Arbutils/Collections/List.hpp>
#include "../../Library/DataLibrary.hpp"
#include "../Library/BattleLibrary.hpp"
#include "Creature.hpp"

View File

@ -1,6 +1,4 @@
#include "Creature.hpp"
#include <algorithm>
#include <utility>
#include "../EventHooks/EventDataClasses.hpp"
#include "../Models/Battle.hpp"
#include "../ScriptHandling/ScriptMacros.hpp"

View File

@ -1,9 +1,6 @@
#ifndef CREATURELIB_BATTLECREATURE_HPP
#define CREATURELIB_BATTLECREATURE_HPP
#include <Arbutils/Collections/List.hpp>
#include <Arbutils/Memory/BorrowedPtr.hpp>
#include <Arbutils/Memory/UniquePtrList.hpp>
#include "../../Defines.hpp"
#include "../../Library/ClampedStatisticSet.hpp"
#include "../../Library/CreatureData/CreatureSpecies.hpp"

View File

@ -1,7 +1,6 @@
#ifndef CREATURELIB_CREATUREINDEX_HPP
#define CREATURELIB_CREATUREINDEX_HPP
#include <cstdint>
#include "Creature.hpp"
namespace CreatureLib::Battling {

View File

@ -1,7 +1,6 @@
#ifndef CREATURELIB_CREATUREPARTY_HPP
#define CREATURELIB_CREATUREPARTY_HPP
#include <Arbutils/Collections/List.hpp>
#include "Creature.hpp"
namespace CreatureLib::Battling {

View File

@ -1,9 +1,6 @@
#ifndef CREATURELIB_DAMAGESOURCE_HPP
#define CREATURELIB_DAMAGESOURCE_HPP
#include <Arbutils/Enum.hpp>
#include <cstdint>
namespace CreatureLib::Battling {
ENUM(DamageSource, uint8_t, AttackDamage);
}

View File

@ -1,12 +1,6 @@
#ifndef CREATURELIB_EXECUTINGATTACK_HPP
#define CREATURELIB_EXECUTINGATTACK_HPP
#include <Arbutils/Assert.hpp>
#include <Arbutils/Collections/Dictionary.hpp>
#include <Arbutils/Collections/List.hpp>
#include <cstdint>
#include <unordered_map>
#include <vector>
#include "Creature.hpp"
namespace CreatureLib::Battling {

View File

@ -1,5 +1,5 @@
#include "LearnedAttack.hpp"
#include <Arbutils/Assert.hpp>
CreatureLib::Battling::LearnedAttack::LearnedAttack(
const ArbUt::BorrowedPtr<const CreatureLib::Library::AttackData>& attack, uint8_t maxUses,
AttackLearnMethod learnMethod)

View File

@ -1,8 +1,6 @@
#ifndef CREATURELIB_LEARNEDATTACK_HPP
#define CREATURELIB_LEARNEDATTACK_HPP
#include <Arbutils/Memory/BorrowedPtr.hpp>
#include <memory>
#include "../../Library/Attacks/AttackData.hpp"
#include "AttackLearnMethod.hpp"

View File

@ -1,8 +1,6 @@
#ifndef CREATURELIB_SCRIPT_HPP
#define CREATURELIB_SCRIPT_HPP
#include <Arbutils/Collections/List.hpp>
#include <Arbutils/StringView.hpp>
#include "../../Library/EffectParameter.hpp"
namespace CreatureLib::Battling {

View File

@ -1,7 +1,6 @@
#ifndef CREATURELIB_SCRIPTAGGREGATOR_HPP
#define CREATURELIB_SCRIPTAGGREGATOR_HPP
#include <Arbutils/Collections/List.hpp>
#include "Script.hpp"
#include "ScriptSet.hpp"
#include "ScriptWrapper.hpp"

View File

@ -1,8 +1,6 @@
#ifndef CREATURELIB_SCRIPTRESOLVER_HPP
#define CREATURELIB_SCRIPTRESOLVER_HPP
#include <Arbutils/Enum.hpp>
#include <string>
#include "Script.hpp"
#include "ScriptCategory.hpp"

View File

@ -1,8 +1,6 @@
#ifndef CREATURELIB_SCRIPTSET_HPP
#define CREATURELIB_SCRIPTSET_HPP
#include <Arbutils/Collections/Dictionary.hpp>
#include <Arbutils/Memory/UniquePtrList.hpp>
#include <any>
#include "Script.hpp"

View File

@ -1,7 +1,6 @@
#ifndef CREATURELIB_SCRIPTWRAPPER_HPP
#define CREATURELIB_SCRIPTWRAPPER_HPP
#include <memory>
#include "Script.hpp"
#include "ScriptSet.hpp"

View File

@ -1,7 +1,6 @@
#ifndef CREATURELIB_BASETURNCHOICE_HPP
#define CREATURELIB_BASETURNCHOICE_HPP
#include <Arbutils/Assert.hpp>
#include "../ScriptHandling/ScriptSource.hpp"
#include "TurnChoiceKind.hpp"

View File

@ -1,8 +1,6 @@
#ifndef CREATURELIB_TURNCHOICEKIND_HPP
#define CREATURELIB_TURNCHOICEKIND_HPP
#include <cstdint>
namespace CreatureLib::Battling {
ENUM(TurnChoiceKind, uint8_t, Pass, Attack, Item, Switch, Flee);
}

View File

@ -1,8 +1,6 @@
#ifndef CREATURELIB_DEFINES_HPP
#define CREATURELIB_DEFINES_HPP
#include <cstdint>
typedef uint8_t level_int_t;
#endif // CREATURELIB_DEFINES_HPP

View File

@ -1,10 +1,9 @@
#ifndef CREATURELIB_ATTACKLIBRARY_HPP
#define CREATURELIB_ATTACKLIBRARY_HPP
#include <string>
#include <unordered_map>
#include "Attacks/AttackData.hpp"
#include "BaseLibrary.hpp"
namespace CreatureLib::Library {
class AttackLibrary : public BaseLibrary<AttackData> {
public:

View File

@ -1,9 +1,6 @@
#ifndef CREATURELIB_ATTACKCATEGORY_HPP
#define CREATURELIB_ATTACKCATEGORY_HPP
#include <Arbutils/Enum.hpp>
#include <cstdint>
namespace CreatureLib::Library {
ENUM(AttackCategory, uint8_t, Physical, Magical, Status)
}

View File

@ -1,5 +1,4 @@
#include "AttackData.hpp"
#include <utility>
CreatureLib::Library::AttackData::AttackData(const ArbUt::StringView& name, uint8_t type,
CreatureLib::Library::AttackCategory category, uint8_t power,

View File

@ -1,10 +1,6 @@
#ifndef CREATURELIB_ATTACKDATA_HPP
#define CREATURELIB_ATTACKDATA_HPP
#include <Arbutils/StringView.hpp>
#include <memory>
#include <string>
#include <unordered_set>
#include "AttackCategory.hpp"
#include "AttackTarget.hpp"
#include "SecondaryEffect.hpp"

View File

@ -1,9 +1,6 @@
#ifndef CREATURELIB_ATTACKTARGET_HPP
#define CREATURELIB_ATTACKTARGET_HPP
#include <Arbutils/Enum.hpp>
#include <cstdint>
namespace CreatureLib::Library {
ENUM(AttackTarget, uint8_t, Adjacent, AdjacentAlly, AdjacentAllySelf, AdjacentOpponent,

View File

@ -1,8 +1,6 @@
#ifndef CREATURELIB_SECONDARYEFFECT_HPP
#define CREATURELIB_SECONDARYEFFECT_HPP
#include <Arbutils/Collections/List.hpp>
#include <Arbutils/StringView.hpp>
#include <any>
#include "../EffectParameter.hpp"

View File

@ -1,15 +1,7 @@
#ifndef CREATURELIB_BASELIBRARY_HPP
#define CREATURELIB_BASELIBRARY_HPP
#include <Arbutils/Assert.hpp>
#include <Arbutils/Collections/Dictionary.hpp>
#include <Arbutils/Collections/List.hpp>
#include <Arbutils/Memory/BorrowedPtr.hpp>
#include <Arbutils/Random.hpp>
#include <Arbutils/StringView.hpp>
#include <algorithm>
#include <memory>
#include <string>
namespace CreatureLib::Library {
template <class T> class BaseLibrary {

View File

@ -3,6 +3,7 @@
#include "Exceptions/CreatureException.hpp"
#include "Statistic.hpp"
namespace CreatureLib::Library {
template <class T, int Min, int Max> class ClampedStatisticSet {
protected:

View File

@ -1,6 +1,4 @@
#include "CreatureSpecies.hpp"
#include <Arbutils/Assert.hpp>
#include <utility>
using namespace CreatureLib::Library;

View File

@ -1,12 +1,6 @@
#ifndef CREATURELIB_CREATURESPECIES_HPP
#define CREATURELIB_CREATURESPECIES_HPP
#include <Arbutils/Collections/Dictionary.hpp>
#include <Arbutils/Memory/BorrowedPtr.hpp>
#include <Arbutils/StringView.hpp>
#include <memory>
#include <string>
#include <unordered_map>
#include "../Gender.hpp"
#include "SpeciesVariant.hpp"

View File

@ -1,12 +1,7 @@
#ifndef CREATURELIB_LEARNABLEATTACKS_HPP
#define CREATURELIB_LEARNABLEATTACKS_HPP
#include <Arbutils/Assert.hpp>
#include <Arbutils/Collections/Dictionary.hpp>
#include <Arbutils/Collections/List.hpp>
#include <Arbutils/Memory/BorrowedPtr.hpp>
#include <Arbutils/Random.hpp>
#include <unordered_map>
#include "../../Defines.hpp"
#include "../Attacks/AttackData.hpp"

View File

@ -1,5 +1,4 @@
#include "SpeciesVariant.hpp"
#include <algorithm>
const CreatureLib::Library::TalentIndex
CreatureLib::Library::SpeciesVariant::GetTalentIndex(const ArbUt::StringView& talent) const {

View File

@ -1,11 +1,6 @@
#ifndef CREATURELIB_SPECIESVARIANT_HPP
#define CREATURELIB_SPECIESVARIANT_HPP
#include <Arbutils/Collections/List.hpp>
#include <Arbutils/Memory/BorrowedPtr.hpp>
#include <Arbutils/Random.hpp>
#include <memory>
#include <string>
#include "../StatisticSet.hpp"
#include "LearnableAttacks.hpp"
#include "TalentIndex.hpp"

View File

@ -1,7 +1,6 @@
#ifndef CREATURELIB_TALENTINDEX_HPP
#define CREATURELIB_TALENTINDEX_HPP
#include <cstdint>
namespace CreatureLib::Library {
class TalentIndex {
bool _secret;

View File

@ -1,7 +1,5 @@
#ifndef CREATURELIB_EFFECTPARAMETER_HPP
#define CREATURELIB_EFFECTPARAMETER_HPP
#include <Arbutils/Enum.hpp>
#include <Arbutils/StringView.hpp>
#include <variant>
#include "Exceptions/CreatureException.hpp"

View File

@ -1,8 +1,6 @@
#ifndef CREATURELIB_CREATUREEXCEPTION_HPP
#define CREATURELIB_CREATUREEXCEPTION_HPP
#include <Arbutils/Exception.hpp>
#define try_creature(data, msg) \
try { \
data; \

View File

@ -1,9 +1,6 @@
#ifndef CREATURELIB_GENDER_HPP
#define CREATURELIB_GENDER_HPP
#include <Arbutils/Enum.hpp>
#include <cstdint>
namespace CreatureLib::Library {
/*!
\brief Might be somewhat controversial nowadays, but as many creature battling games only have two genders, we'll

View File

@ -1,7 +1,6 @@
#ifndef CREATURELIB_EXTERNGROWTHRATE_HPP
#define CREATURELIB_EXTERNGROWTHRATE_HPP
#include <Arbutils/Assert.hpp>
#include "../../Defines.hpp"
#include "GrowthRate.hpp"
namespace CreatureLib::Library {

View File

@ -1,11 +1,6 @@
#ifndef CREATURELIB_GROWTHRATELIBRARY_HPP
#define CREATURELIB_GROWTHRATELIBRARY_HPP
#include <Arbutils/StringView.hpp>
#include <cstdint>
#include <memory>
#include <string>
#include <unordered_map>
#include "GrowthRate.hpp"
namespace CreatureLib::Library {

View File

@ -1,7 +1,6 @@
#ifndef CREATURELIB_LOOKUPGROWTHRATE_HPP
#define CREATURELIB_LOOKUPGROWTHRATE_HPP
#include <Arbutils/Collections/List.hpp>
#include "GrowthRate.hpp"
namespace CreatureLib::Library {

View File

@ -1,8 +1,6 @@
#ifndef CREATURELIB_ITEMLIBRARY_HPP
#define CREATURELIB_ITEMLIBRARY_HPP
#include <string>
#include <unordered_map>
#include "BaseLibrary.hpp"
#include "Items/Item.hpp"

View File

@ -1,9 +1,6 @@
#ifndef CREATURELIB_BATTLEITEMCATEGORY_HPP
#define CREATURELIB_BATTLEITEMCATEGORY_HPP
#include <Arbutils/Enum.hpp>
#include <cstdint>
namespace CreatureLib::Library {
ENUM(BattleItemCategory, uint8_t, None, Healing, StatusHealing, CaptureDevice, MiscBattleItem)
}

View File

@ -1,9 +1,6 @@
#ifndef CREATURELIB_ITEM_HPP
#define CREATURELIB_ITEM_HPP
#include <Arbutils/StringView.hpp>
#include <string>
#include <unordered_set>
#include "BattleItemCategory.hpp"
#include "ItemCategory.hpp"

View File

@ -1,9 +1,6 @@
#ifndef CREATURELIB_ITEMCATEGORY_HPP
#define CREATURELIB_ITEMCATEGORY_HPP
#include <Arbutils/Enum.hpp>
#include <cstdint>
namespace CreatureLib::Library {
ENUM(ItemCategory, uint8_t, MiscItem, CaptureDevice, Medicine, Berry, MoveLearner, VariantChanger, KeyItem, Mail)
}

View File

@ -1,7 +1,6 @@
#ifndef CREATURELIB_LIBRARYSETTINGS_HPP
#define CREATURELIB_LIBRARYSETTINGS_HPP
#include <cstdint>
#include "../Defines.hpp"
namespace CreatureLib::Library {

View File

@ -1,8 +1,6 @@
#ifndef CREATURELIB_SPECIESLIBRARY_HPP
#define CREATURELIB_SPECIESLIBRARY_HPP
#include <string>
#include <unordered_map>
#include "BaseLibrary.hpp"
#include "CreatureData/CreatureSpecies.hpp"

View File

@ -1,9 +1,6 @@
#ifndef CREATURELIB_STATISTIC_HPP
#define CREATURELIB_STATISTIC_HPP
#include <Arbutils/Enum.hpp>
#include <cstdint>
namespace CreatureLib::Library {
ENUM(Statistic, uint8_t, Health, PhysicalAttack, PhysicalDefense, MagicalAttack, MagicalDefense, Speed)
}

View File

@ -1,7 +1,5 @@
#ifndef CREATURELIB_STATISTICSET_HPP
#define CREATURELIB_STATISTICSET_HPP
#include <exception>
#include <stdint.h>
#include "Exceptions/CreatureException.hpp"
#include "Statistic.hpp"

View File

@ -1,5 +1,4 @@
#include "TypeLibrary.hpp"
#include <Arbutils/Assert.hpp>
using namespace CreatureLib::Library;

View File

@ -1,12 +1,6 @@
#ifndef CREATURELIB_TYPELIBRARY_HPP
#define CREATURELIB_TYPELIBRARY_HPP
#include <Arbutils/Collections/Dictionary.hpp>
#include <Arbutils/Collections/List.hpp>
#include <Arbutils/StringView.hpp>
#include <numeric>
#include <unordered_set>
#include <vector>
#include "Exceptions/CreatureException.hpp"
namespace CreatureLib::Library {