diff --git a/CMakeLists.txt b/CMakeLists.txt index bb535bf..5d0bd33 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -84,6 +84,7 @@ endif () file(GLOB_RECURSE CORE_SRC_FILES ${FILE_SOURCE}) add_library(pkmnLib ${LIBTYPE} ${CORE_SRC_FILES}) +target_precompile_headers(pkmnLib PUBLIC src/Precompiled.hxx) SET(_LINKS CreatureLib Arbutils) SET(_TESTLINKS pkmnLib CreatureLib Arbutils) diff --git a/src/Battling/EventHooks/PkmnEventKind.hpp b/src/Battling/EventHooks/PkmnEventKind.hpp index b2c0a0c..6b2926a 100644 --- a/src/Battling/EventHooks/PkmnEventKind.hpp +++ b/src/Battling/EventHooks/PkmnEventKind.hpp @@ -1,6 +1,5 @@ #ifndef PKMNLIB_PKMNEVENTKIND_HPP #define PKMNLIB_PKMNEVENTKIND_HPP -#include #include ENUM_WITH_START_VALUE(PkmnEventDataKind, uint8_t, 128, WeatherChange, StatusChange) diff --git a/src/Battling/EventHooks/StatusChangeEvent.hpp b/src/Battling/EventHooks/StatusChangeEvent.hpp index 0b7b37c..dd2a4c7 100644 --- a/src/Battling/EventHooks/StatusChangeEvent.hpp +++ b/src/Battling/EventHooks/StatusChangeEvent.hpp @@ -1,7 +1,6 @@ #ifndef PKMNLIB_STATUSCHANGEEVENT_HPP #define PKMNLIB_STATUSCHANGEEVENT_HPP -#include #include #include "../Pokemon/Pokemon.hpp" #include "PkmnEventKind.hpp" diff --git a/src/Battling/EventHooks/WeatherChangeEvent.hpp b/src/Battling/EventHooks/WeatherChangeEvent.hpp index 70d546d..f766d5b 100644 --- a/src/Battling/EventHooks/WeatherChangeEvent.hpp +++ b/src/Battling/EventHooks/WeatherChangeEvent.hpp @@ -1,6 +1,5 @@ #ifndef PKMNLIB_WEATHERCHANGEEVENT_HPP #define PKMNLIB_WEATHERCHANGEEVENT_HPP -#include #include #include "PkmnEventKind.hpp" diff --git a/src/Battling/Library/BattleLibrary.hpp b/src/Battling/Library/BattleLibrary.hpp index e998425..58b8b7d 100644 --- a/src/Battling/Library/BattleLibrary.hpp +++ b/src/Battling/Library/BattleLibrary.hpp @@ -2,7 +2,6 @@ #define PKMNLIB_BATTLELIBRARY_HPP #include -#include #include "../../Library/PokemonLibrary.hpp" #include "DamageLibrary.hpp" #include "ExperienceLibrary.hpp" diff --git a/src/Battling/PkmnDamageSource.hpp b/src/Battling/PkmnDamageSource.hpp index bdf8a3d..e160f24 100644 --- a/src/Battling/PkmnDamageSource.hpp +++ b/src/Battling/PkmnDamageSource.hpp @@ -1,7 +1,6 @@ #ifndef PKMNLIB_PKMNDAMAGESOURCE_HPP #define PKMNLIB_PKMNDAMAGESOURCE_HPP -#include #include ENUM_WITH_START_VALUE(PkmnDamageSource, uint8_t, ((uint8_t)CreatureLib::Battling::DamageSourceHelper::Highest()) + 1, diff --git a/src/Battling/PkmnScriptCategory.hpp b/src/Battling/PkmnScriptCategory.hpp index 113ffad..dcf0452 100644 --- a/src/Battling/PkmnScriptCategory.hpp +++ b/src/Battling/PkmnScriptCategory.hpp @@ -1,6 +1,5 @@ #ifndef PKMNLIB_PKMNSCRIPTCATEGORY_HPP #define PKMNLIB_PKMNSCRIPTCATEGORY_HPP -#include #include ENUM_WITH_START_VALUE(PkmnScriptCategory, uint8_t, 128, Weather, Status) diff --git a/src/Battling/Pokemon/CreatePokemon.hpp b/src/Battling/Pokemon/CreatePokemon.hpp index 8882853..9df2b83 100644 --- a/src/Battling/Pokemon/CreatePokemon.hpp +++ b/src/Battling/Pokemon/CreatePokemon.hpp @@ -1,7 +1,6 @@ #ifndef PKMNLIB_CREATEPOKEMON_HPP #define PKMNLIB_CREATEPOKEMON_HPP -#include #include "Pokemon.hpp" namespace PkmnLib::Battling { class CreatePokemon { diff --git a/src/Battling/Pokemon/Pokemon.hpp b/src/Battling/Pokemon/Pokemon.hpp index 8a72893..40069dc 100644 --- a/src/Battling/Pokemon/Pokemon.hpp +++ b/src/Battling/Pokemon/Pokemon.hpp @@ -2,7 +2,6 @@ #define PKMNLIB_POKEMON_HPP #include -#include #include "../../Library/Statistic.hpp" #include "../Library/BattleLibrary.hpp" #include "LearnedMove.hpp" diff --git a/src/Battling/Pokemon/PokemonParty.hpp b/src/Battling/Pokemon/PokemonParty.hpp index 1ebb8f8..440f6aa 100644 --- a/src/Battling/Pokemon/PokemonParty.hpp +++ b/src/Battling/Pokemon/PokemonParty.hpp @@ -2,7 +2,6 @@ #define PKMNLIB_POKEMONPARTY_HPP #include -#include #include "Pokemon.hpp" namespace PkmnLib::Battling { class PokemonParty : public CreatureLib::Battling::CreatureParty { diff --git a/src/Library/Evolutions/EvolutionData.hpp b/src/Library/Evolutions/EvolutionData.hpp index 0fd8677..88a5692 100644 --- a/src/Library/Evolutions/EvolutionData.hpp +++ b/src/Library/Evolutions/EvolutionData.hpp @@ -1,13 +1,8 @@ #ifndef PKMNLIB_EVOLUTIONDATA_HPP #define PKMNLIB_EVOLUTIONDATA_HPP -#include -#include -#include #include #include -#include -#include #include "../TimeOfDay.hpp" #include "EvolutionMethod.hpp" diff --git a/src/Library/Evolutions/EvolutionMethod.hpp b/src/Library/Evolutions/EvolutionMethod.hpp index 30abbe1..6ecfb1c 100644 --- a/src/Library/Evolutions/EvolutionMethod.hpp +++ b/src/Library/Evolutions/EvolutionMethod.hpp @@ -1,7 +1,6 @@ #ifndef PKMNLIB_EVOLUTIONMETHOD_HPP #define PKMNLIB_EVOLUTIONMETHOD_HPP -#include namespace PkmnLib::Library { ENUM(EvolutionMethod, uint8_t, Level, HighFriendship, KnownMove, LocationBased, TimeBased, HoldsItem, IsGenderAndLevel, EvolutionItemUse, EvolutionItemUseWithGender, Trade, TradeWithHeldItem, diff --git a/src/Library/Moves/MoveCategory.hpp b/src/Library/Moves/MoveCategory.hpp index 22d8758..0cb992a 100644 --- a/src/Library/Moves/MoveCategory.hpp +++ b/src/Library/Moves/MoveCategory.hpp @@ -1,8 +1,6 @@ #ifndef PKMNLIB_MOVECATEGORY_HPP #define PKMNLIB_MOVECATEGORY_HPP -#include - namespace PkmnLib::Library { enum class MoveCategory : uint8_t { Physical, Special, Status }; } diff --git a/src/Library/Moves/MoveData.cpp b/src/Library/Moves/MoveData.cpp index de7e513..b5bbe52 100644 --- a/src/Library/Moves/MoveData.cpp +++ b/src/Library/Moves/MoveData.cpp @@ -1,5 +1,4 @@ #include "MoveData.hpp" -#include PkmnLib::Library::MoveData::MoveData(const ArbUt::StringView& name, uint8_t type, PkmnLib::Library::MoveCategory category, uint8_t power, uint8_t accuracy, uint8_t baseUsage, CreatureLib::Library::AttackTarget target, int8_t priority, diff --git a/src/Library/Natures/NatureLibrary.hpp b/src/Library/Natures/NatureLibrary.hpp index d4cb795..3b07118 100644 --- a/src/Library/Natures/NatureLibrary.hpp +++ b/src/Library/Natures/NatureLibrary.hpp @@ -1,14 +1,8 @@ #ifndef PKMNLIB_NATURELIBRARY_HPP #define PKMNLIB_NATURELIBRARY_HPP -#include -#include -#include #include -#include #include -#include -#include #include "Nature.hpp" namespace PkmnLib::Library { diff --git a/src/Library/Species/LearnableMoves.hpp b/src/Library/Species/LearnableMoves.hpp index 91cdc30..e35668f 100644 --- a/src/Library/Species/LearnableMoves.hpp +++ b/src/Library/Species/LearnableMoves.hpp @@ -1,8 +1,6 @@ #ifndef PKMNLIB_LEARNABLEMOVES_HPP #define PKMNLIB_LEARNABLEMOVES_HPP -#include -#include #include #include "../Moves/MoveData.hpp" diff --git a/src/Library/Species/PokemonForme.cpp b/src/Library/Species/PokemonForme.cpp index 3d83872..2b7c644 100644 --- a/src/Library/Species/PokemonForme.cpp +++ b/src/Library/Species/PokemonForme.cpp @@ -1,5 +1,4 @@ #include "PokemonForme.hpp" -#include PkmnLib::Library::PokemonForme::PokemonForme(const ArbUt::StringView& name, float height, float weight, uint32_t baseExperience, const ArbUt::List& types, CreatureLib::Library::StatisticSet baseStats, diff --git a/src/Library/Species/PokemonForme.hpp b/src/Library/Species/PokemonForme.hpp index ec183ea..8f9b58a 100644 --- a/src/Library/Species/PokemonForme.hpp +++ b/src/Library/Species/PokemonForme.hpp @@ -2,7 +2,6 @@ #define PKMNLIB_POKEMONFORME_HPP #include -#include #include "LearnableMoves.hpp" namespace PkmnLib::Library { diff --git a/src/Library/Species/PokemonSpecies.hpp b/src/Library/Species/PokemonSpecies.hpp index 1e9f8d3..6025a6f 100644 --- a/src/Library/Species/PokemonSpecies.hpp +++ b/src/Library/Species/PokemonSpecies.hpp @@ -1,6 +1,5 @@ #ifndef PKMNLIB_POKEMONSPECIES_HPP #define PKMNLIB_POKEMONSPECIES_HPP -#include #include #include "../Evolutions/EvolutionData.hpp" #include "PokemonForme.hpp" diff --git a/src/Library/TimeOfDay.hpp b/src/Library/TimeOfDay.hpp index fdacf65..a6a95e8 100644 --- a/src/Library/TimeOfDay.hpp +++ b/src/Library/TimeOfDay.hpp @@ -1,9 +1,6 @@ #ifndef PKMNLIB_TIMEOFDAY_HPP #define PKMNLIB_TIMEOFDAY_HPP -#include -#include - namespace PkmnLib::Library { ENUM(TimeOfDay, uint8_t, Night, Morning, Afternoon, Evening) } diff --git a/src/Precompiled.hxx b/src/Precompiled.hxx new file mode 100644 index 0000000..68b2191 --- /dev/null +++ b/src/Precompiled.hxx @@ -0,0 +1,6 @@ +#ifndef PKMNLIB_PRECOMPILED_HXX +#define PKMNLIB_PRECOMPILED_HXX + +#include + +#endif // PKMNLIB_PRECOMPILED_HXX diff --git a/src/ScriptResolving/AngelScript/AngelScriptResolver.cpp b/src/ScriptResolving/AngelScript/AngelScriptResolver.cpp index 95467b2..fd2046a 100644 --- a/src/ScriptResolving/AngelScript/AngelScriptResolver.cpp +++ b/src/ScriptResolving/AngelScript/AngelScriptResolver.cpp @@ -1,6 +1,5 @@ #include "AngelScriptResolver.hpp" #include -#include #include #include "../../../extern/angelscript_addons/scripthandle/scripthandle.h" #include "../../../extern/angelscript_addons/scripthelper/scripthelper.h" @@ -74,12 +73,11 @@ void AngelScriptResolver::Initialize(CreatureLib::Battling::BattleLibrary* arg, // Register Script Array type RegisterScriptArray(_engine, true); RegisterScriptHandle(_engine); + r = _engine->RegisterGlobalFunction("void print(const string &in)", asFUNCTION(Print), asCALL_CDECL); + if (r < 0) + throw ArbUt::Exception("Registering print function failed."); } - r = _engine->RegisterGlobalFunction("void print(const string &in)", asFUNCTION(Print), asCALL_CDECL); - if (r < 0) - throw ArbUt::Exception("Registering print function failed."); - _builder.StartNewModule(_engine, "pkmn"); _mainModule = _builder.GetModule(); diff --git a/src/ScriptResolving/AngelScript/AngelScriptResolver.hpp b/src/ScriptResolving/AngelScript/AngelScriptResolver.hpp index 8f63f6e..bb30901 100644 --- a/src/ScriptResolving/AngelScript/AngelScriptResolver.hpp +++ b/src/ScriptResolving/AngelScript/AngelScriptResolver.hpp @@ -7,7 +7,6 @@ #define ANGELSCRIPT_DLL_LIBRARY_IMPORT #include -#include #include "AngelScriptScript.hpp" #include "AngelScriptTypeInfo.hpp" diff --git a/src/ScriptResolving/AngelScript/AngelScriptScript.hpp b/src/ScriptResolving/AngelScript/AngelScriptScript.hpp index 9ac24c3..b5e2374 100644 --- a/src/ScriptResolving/AngelScript/AngelScriptScript.hpp +++ b/src/ScriptResolving/AngelScript/AngelScriptScript.hpp @@ -3,7 +3,6 @@ #include #define ANGELSCRIPT_DLL_LIBRARY_IMPORT #include -#include #include "../../../extern/angelscript_addons/scriptarray/scriptarray.h" #include "../../Battling/PkmnScript.hpp" #include "AngelScriptTypeInfo.hpp" diff --git a/src/ScriptResolving/AngelScript/AngelScriptTypeInfo.hpp b/src/ScriptResolving/AngelScript/AngelScriptTypeInfo.hpp index 9cc0916..db98410 100644 --- a/src/ScriptResolving/AngelScript/AngelScriptTypeInfo.hpp +++ b/src/ScriptResolving/AngelScript/AngelScriptTypeInfo.hpp @@ -2,13 +2,8 @@ #define PKMNLIB_ANGELSCRIPTTYPEINFO_HPP #define ANGELSCRIPT_DLL_LIBRARY_IMPORT -#include -#include #include #include -#include -#include -#include class AngelScriptTypeInfo { private: diff --git a/src/ScriptResolving/AngelScript/ContextPool.hpp b/src/ScriptResolving/AngelScript/ContextPool.hpp index 3653aee..6696c45 100644 --- a/src/ScriptResolving/AngelScript/ContextPool.hpp +++ b/src/ScriptResolving/AngelScript/ContextPool.hpp @@ -2,7 +2,6 @@ #define PKMNLIB_CONTEXTPOOL_HPP #include -#include class ContextPool { std::vector _pool; diff --git a/src/ScriptResolving/AngelScript/TypeRegistry/BasicScriptClass.cpp b/src/ScriptResolving/AngelScript/TypeRegistry/BasicScriptClass.cpp index d2ebaa3..050c37c 100644 --- a/src/ScriptResolving/AngelScript/TypeRegistry/BasicScriptClass.cpp +++ b/src/ScriptResolving/AngelScript/TypeRegistry/BasicScriptClass.cpp @@ -1,5 +1,4 @@ #include "BasicScriptClass.hpp" -#include void BasicScriptClass::Register(asIScriptEngine* engine) { // As far as I am aware at the moment you can't create an abstract class with virtual members through the @@ -46,5 +45,5 @@ shared abstract class PkmnScript { void DoesShareExperience(Pokemon@ faintedMon, Pokemon@ winningMon, bool& shareExperience){}; } )"); - assert(r >= 0); + Assert(r >= 0); } diff --git a/src/ScriptResolving/AngelScript/TypeRegistry/Battling/RegisterBattleClass.cpp b/src/ScriptResolving/AngelScript/TypeRegistry/Battling/RegisterBattleClass.cpp index bcb5587..b245d25 100644 --- a/src/ScriptResolving/AngelScript/TypeRegistry/Battling/RegisterBattleClass.cpp +++ b/src/ScriptResolving/AngelScript/TypeRegistry/Battling/RegisterBattleClass.cpp @@ -1,6 +1,5 @@ #include "RegisterBattleClass.hpp" #include -#include #include "../../../../Battling/Battle/Battle.hpp" #include "../HelperFile.hpp" diff --git a/src/ScriptResolving/AngelScript/TypeRegistry/Battling/RegisterBattleLibrary.cpp b/src/ScriptResolving/AngelScript/TypeRegistry/Battling/RegisterBattleLibrary.cpp index 664e471..237b3f6 100644 --- a/src/ScriptResolving/AngelScript/TypeRegistry/Battling/RegisterBattleLibrary.cpp +++ b/src/ScriptResolving/AngelScript/TypeRegistry/Battling/RegisterBattleLibrary.cpp @@ -1,5 +1,4 @@ #include "RegisterBattleLibrary.hpp" -#include #include "../../../../Battling/Library/BattleLibrary.hpp" void RegisterBattleLibrary::Register(asIScriptEngine* engine) { diff --git a/src/ScriptResolving/AngelScript/TypeRegistry/Battling/RegisterExecutingAttack.cpp b/src/ScriptResolving/AngelScript/TypeRegistry/Battling/RegisterExecutingAttack.cpp index 33ecb62..aa63cc1 100644 --- a/src/ScriptResolving/AngelScript/TypeRegistry/Battling/RegisterExecutingAttack.cpp +++ b/src/ScriptResolving/AngelScript/TypeRegistry/Battling/RegisterExecutingAttack.cpp @@ -1,5 +1,4 @@ #include "RegisterExecutingAttack.hpp" -#include #include #include "../HelperFile.hpp" diff --git a/src/ScriptResolving/AngelScript/TypeRegistry/Battling/RegisterPokemonClass.cpp b/src/ScriptResolving/AngelScript/TypeRegistry/Battling/RegisterPokemonClass.cpp index 718b2c1..0ae6309 100644 --- a/src/ScriptResolving/AngelScript/TypeRegistry/Battling/RegisterPokemonClass.cpp +++ b/src/ScriptResolving/AngelScript/TypeRegistry/Battling/RegisterPokemonClass.cpp @@ -1,5 +1,4 @@ #include "RegisterPokemonClass.hpp" -#include #include #include "../../../../../extern/angelscript_addons/scriptarray/scriptarray.h" #include "../../../../Battling/PkmnDamageSource.hpp" diff --git a/src/ScriptResolving/AngelScript/TypeRegistry/ConstString.cpp b/src/ScriptResolving/AngelScript/TypeRegistry/ConstString.cpp index 5a5f979..152fb39 100644 --- a/src/ScriptResolving/AngelScript/TypeRegistry/ConstString.cpp +++ b/src/ScriptResolving/AngelScript/TypeRegistry/ConstString.cpp @@ -1,5 +1,4 @@ #include "ConstString.hpp" -#include static void ConstructConstString(void* self) { new (self) ArbUt::StringView(); } static void ConstructConstStringFromStd(void* self, const std::string& s) { diff --git a/src/ScriptResolving/AngelScript/TypeRegistry/ConstString.hpp b/src/ScriptResolving/AngelScript/TypeRegistry/ConstString.hpp index 00cbce7..e497ff2 100644 --- a/src/ScriptResolving/AngelScript/TypeRegistry/ConstString.hpp +++ b/src/ScriptResolving/AngelScript/TypeRegistry/ConstString.hpp @@ -1,7 +1,6 @@ #ifndef PKMNLIB_CONSTSTRING_HPP #define PKMNLIB_CONSTSTRING_HPP -#include #include class ConstStringRegister { diff --git a/src/ScriptResolving/AngelScript/TypeRegistry/Library/RegisterEffectParameter.cpp b/src/ScriptResolving/AngelScript/TypeRegistry/Library/RegisterEffectParameter.cpp index d45bf12..371a95c 100644 --- a/src/ScriptResolving/AngelScript/TypeRegistry/Library/RegisterEffectParameter.cpp +++ b/src/ScriptResolving/AngelScript/TypeRegistry/Library/RegisterEffectParameter.cpp @@ -1,5 +1,4 @@ #include "RegisterEffectParameter.hpp" -#include #include static CreatureLib::Library::EffectParameter* Ref_Factory() { return new CreatureLib::Library::EffectParameter(); } diff --git a/src/ScriptResolving/AngelScript/TypeRegistry/Library/RegisterGrowthRateTypes.cpp b/src/ScriptResolving/AngelScript/TypeRegistry/Library/RegisterGrowthRateTypes.cpp index 6da3b08..aae08e1 100644 --- a/src/ScriptResolving/AngelScript/TypeRegistry/Library/RegisterGrowthRateTypes.cpp +++ b/src/ScriptResolving/AngelScript/TypeRegistry/Library/RegisterGrowthRateTypes.cpp @@ -1,7 +1,6 @@ #include "RegisterGrowthRateTypes.hpp" #include #include -#include void RegisterGrowthRateTypes::Register(asIScriptEngine* engine) { RegisterGrowthRateType(engine); @@ -9,13 +8,13 @@ void RegisterGrowthRateTypes::Register(asIScriptEngine* engine) { } void RegisterGrowthRateTypes::RegisterGrowthRateType(asIScriptEngine* engine) { [[maybe_unused]] int r = engine->RegisterObjectType("GrowthRate", 0, asOBJ_REF | asOBJ_NOCOUNT); - assert(r >= 0); + Assert(r >= 0); r = engine->RegisterObjectMethod("GrowthRate", "uint8 CalculateLevel(uint experience) const", asMETHOD(CreatureLib::Library::GrowthRate, CalculateLevel), asCALL_THISCALL); - assert(r >= 0); + Assert(r >= 0); r = engine->RegisterObjectMethod("GrowthRate", "uint CalculateExperience(uint8 level) const", asMETHOD(CreatureLib::Library::GrowthRate, CalculateExperience), asCALL_THISCALL); - assert(r >= 0); + Assert(r >= 0); } static uint8_t CalculateLevel(const CreatureLib::Library::GrowthRateLibrary* obj, const ArbUt::StringView& str, @@ -29,13 +28,13 @@ static uint32_t CalculateExperience(const CreatureLib::Library::GrowthRateLibrar void RegisterGrowthRateTypes::RegisterGrowthRateLibrary(asIScriptEngine* engine) { [[maybe_unused]] int r = engine->RegisterObjectType("GrowthRateLibrary", 0, asOBJ_REF | asOBJ_NOCOUNT); - assert(r >= 0); + Assert(r >= 0); r = engine->RegisterObjectMethod("GrowthRateLibrary", "uint8 CalculateLevel(const constString &in growthRate, uint experience) const", asFUNCTION(CalculateLevel), asCALL_CDECL_OBJLAST); - assert(r >= 0); + Assert(r >= 0); r = engine->RegisterObjectMethod( "GrowthRateLibrary", "uint CalculateExperience(const constString &in growthRate, uint8 experience) const", asFUNCTION(CalculateExperience), asCALL_CDECL_OBJLAST); - assert(r >= 0); + Assert(r >= 0); } diff --git a/src/ScriptResolving/AngelScript/TypeRegistry/Library/RegisterItemTypes.cpp b/src/ScriptResolving/AngelScript/TypeRegistry/Library/RegisterItemTypes.cpp index ca086bc..26bef3b 100644 --- a/src/ScriptResolving/AngelScript/TypeRegistry/Library/RegisterItemTypes.cpp +++ b/src/ScriptResolving/AngelScript/TypeRegistry/Library/RegisterItemTypes.cpp @@ -1,5 +1,4 @@ #include "RegisterItemTypes.hpp" -#include #include "../../../../Library/Items/Item.hpp" #include "../../../../Library/Items/ItemLibrary.hpp" diff --git a/src/ScriptResolving/AngelScript/TypeRegistry/Library/RegisterSpeciesTypes.cpp b/src/ScriptResolving/AngelScript/TypeRegistry/Library/RegisterSpeciesTypes.cpp index 336595d..8484664 100644 --- a/src/ScriptResolving/AngelScript/TypeRegistry/Library/RegisterSpeciesTypes.cpp +++ b/src/ScriptResolving/AngelScript/TypeRegistry/Library/RegisterSpeciesTypes.cpp @@ -1,5 +1,4 @@ #include "RegisterSpeciesTypes.hpp" -#include #include "../../../../Library/Species/PokemonSpecies.hpp" #include "../../../../Library/Species/SpeciesLibrary.hpp" #include "../../../../Library/Statistic.hpp" diff --git a/src/ScriptResolving/AngelScript/TypeRegistry/Library/RegisterStaticLibraryTypes.cpp b/src/ScriptResolving/AngelScript/TypeRegistry/Library/RegisterStaticLibraryTypes.cpp index abd3cce..f04f3c3 100644 --- a/src/ScriptResolving/AngelScript/TypeRegistry/Library/RegisterStaticLibraryTypes.cpp +++ b/src/ScriptResolving/AngelScript/TypeRegistry/Library/RegisterStaticLibraryTypes.cpp @@ -1,5 +1,4 @@ #include "RegisterStaticLibraryTypes.hpp" -#include #include "../../../../Library/PokemonLibrary.hpp" #include "../HelperFile.hpp" diff --git a/src/ScriptResolving/AngelScript/TypeRegistry/Library/RegisterTypeLibrary.cpp b/src/ScriptResolving/AngelScript/TypeRegistry/Library/RegisterTypeLibrary.cpp index 165fe89..234eca6 100644 --- a/src/ScriptResolving/AngelScript/TypeRegistry/Library/RegisterTypeLibrary.cpp +++ b/src/ScriptResolving/AngelScript/TypeRegistry/Library/RegisterTypeLibrary.cpp @@ -1,6 +1,5 @@ #include "RegisterTypeLibrary.hpp" #include -#include void RegisterTypeLibrary::Register(asIScriptEngine* engine) { RegisterTypeLibraryType(engine); } @@ -10,13 +9,13 @@ static bool GetTypeId(const CreatureLib::Library::TypeLibrary* obj, const ArbUt: void RegisterTypeLibrary::RegisterTypeLibraryType(asIScriptEngine* engine) { [[maybe_unused]] int r = engine->RegisterObjectType("TypeLibrary", 0, asOBJ_REF | asOBJ_NOCOUNT); - assert(r >= 0); + Assert(r >= 0); r = engine->RegisterObjectMethod("TypeLibrary", "uint8 GetTypeId(const constString &in name) const", asFUNCTION(GetTypeId), asCALL_CDECL_OBJLAST); - assert(r >= 0); + Assert(r >= 0); r = engine->RegisterObjectMethod( "TypeLibrary", "float GetSingleEffectiveness(uint8 attacking, uint8 defensive) const", asMETHOD(CreatureLib::Library::TypeLibrary, GetSingleEffectiveness), asCALL_THISCALL); - assert(r >= 0); + Assert(r >= 0); // TODO: Register get full effectiveness method. }