2020-03-04 16:04:44 +00:00
|
|
|
#include "../../src/Battling/Library/BattleLibrary.hpp"
|
2020-03-25 18:07:36 +00:00
|
|
|
#include "../Core.hpp"
|
2020-03-04 16:04:44 +00:00
|
|
|
using namespace CreatureLib::Battling;
|
|
|
|
|
2020-04-04 11:42:06 +00:00
|
|
|
export uint8_t CreatureLib_BattleLibrary_Construct(const BattleLibrary*& out,
|
|
|
|
const CreatureLib::Library::DataLibrary* staticLib,
|
|
|
|
BattleStatCalculator* statCalculator, DamageLibrary* damageLibrary,
|
|
|
|
ExperienceLibrary* experienceLibrary, ScriptResolver* scriptResolver,
|
|
|
|
MiscLibrary* miscLibrary) {
|
|
|
|
Try(out = new BattleLibrary(staticLib, statCalculator, damageLibrary, experienceLibrary, scriptResolver,
|
|
|
|
miscLibrary);)
|
2020-03-04 16:04:44 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
export void CreatureLib_BattleLibrary_Destruct(const BattleLibrary* p) { delete p; }
|
|
|
|
|
|
|
|
#define SIMPLE_GET_FUNC(type, name, returnType) \
|
|
|
|
export returnType CreatureLib_##type##_##name(const type* p) { return p->name(); }
|
2020-05-26 13:11:04 +00:00
|
|
|
#define SIMPLE_GET_FUNC_SMART_PTR(type, name, returnType) \
|
|
|
|
export returnType CreatureLib_##type##_##name(const type* p) { return p->name().operator->(); }
|
2020-03-04 16:04:44 +00:00
|
|
|
|
2020-05-26 14:38:55 +00:00
|
|
|
SIMPLE_GET_FUNC_SMART_PTR(BattleLibrary, GetStaticLib, const CreatureLib::Library::DataLibrary*);
|
2020-05-26 13:11:04 +00:00
|
|
|
SIMPLE_GET_FUNC_SMART_PTR(BattleLibrary, GetStatCalculator, const BattleStatCalculator*);
|
|
|
|
SIMPLE_GET_FUNC_SMART_PTR(BattleLibrary, GetDamageLibrary, const DamageLibrary*);
|
|
|
|
SIMPLE_GET_FUNC_SMART_PTR(BattleLibrary, GetMiscLibrary, const MiscLibrary*);
|
|
|
|
SIMPLE_GET_FUNC_SMART_PTR(BattleLibrary, GetExperienceLibrary, const ExperienceLibrary*);
|
2020-03-04 16:04:44 +00:00
|
|
|
|
2020-05-26 13:11:04 +00:00
|
|
|
#undef SIMPLE_GET_FUNC
|
|
|
|
#undef SIMPLE_GET_FUNC_SMART_PTR
|