25 lines
1.5 KiB
C++
25 lines
1.5 KiB
C++
#include "../../src/Battling/Library/BattleLibrary.hpp"
|
|
#define export extern "C"
|
|
using namespace CreatureLib::Battling;
|
|
|
|
export const BattleLibrary* CreatureLib_BattleLibrary_Construct(const CreatureLib::Library::DataLibrary* staticLib,
|
|
BattleStatCalculator* statCalculator,
|
|
DamageLibrary* damageLibrary,
|
|
ExperienceLibrary* experienceLibrary,
|
|
ScriptResolver* scriptResolver,
|
|
MiscLibrary* miscLibrary) {
|
|
return new BattleLibrary(staticLib, statCalculator, damageLibrary, experienceLibrary, scriptResolver, miscLibrary);
|
|
}
|
|
|
|
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(); }
|
|
|
|
SIMPLE_GET_FUNC(BattleLibrary, GetStaticLib, const CreatureLib::Library::DataLibrary*);
|
|
SIMPLE_GET_FUNC(BattleLibrary, GetStatCalculator, const BattleStatCalculator*);
|
|
SIMPLE_GET_FUNC(BattleLibrary, GetDamageLibrary, const DamageLibrary*);
|
|
SIMPLE_GET_FUNC(BattleLibrary, GetMiscLibrary, const MiscLibrary*);
|
|
SIMPLE_GET_FUNC(BattleLibrary, GetExperienceLibrary, const ExperienceLibrary*);
|
|
|
|
#undef SIMPLE_GET_FUNC |