C interface for Battle Stat Calculator.

This commit is contained in:
Deukhoofd 2020-03-04 18:11:08 +01:00
parent ea8afcd0b3
commit 7f197b05a3
Signed by: Deukhoofd
GPG Key ID: ADF2E9256009EDCE
1 changed files with 16 additions and 0 deletions

View File

@ -0,0 +1,16 @@
#include "../../src/Battling/Library/BattleStatCalculator.hpp"
#define export extern "C"
using namespace CreatureLib::Battling;
export const BattleStatCalculator* CreatureLib_BattleStatCalculator_Construct() { return new BattleStatCalculator(); }
export void CreatureLib_BattleStatCalculator_Destruct(const BattleStatCalculator* p) { delete p; }
export uint32_t CreatureLib_BattleStatCalculator_CalculateFlatStat(const BattleStatCalculator* p, Creature* creature,
CreatureLib::Core::Statistic stat) {
return p->CalculateFlatStat(creature, stat);
}
export uint32_t CreatureLib_BattleStatCalculator_CalculateBoostedStat(const BattleStatCalculator* p, Creature* creature,
CreatureLib::Core::Statistic stat) {
return p->CalculateBoostedStat(creature, stat);
}