Added DamageLibrary C Interface.
continuous-integration/drone/push Build is passing
Details
continuous-integration/drone/push Build is passing
Details
This commit is contained in:
parent
e7d3c6afd4
commit
679133ef4f
|
@ -0,0 +1,21 @@
|
||||||
|
#include "../../src/Battling/Library/DamageLibrary.hpp"
|
||||||
|
#define export extern "C"
|
||||||
|
using namespace CreatureLib::Battling;
|
||||||
|
|
||||||
|
export const DamageLibrary* CreatureLib_DamageLibrary_Construct() { return new DamageLibrary(); }
|
||||||
|
|
||||||
|
export void CreatureLib_DamageLibrary_Destruct(const DamageLibrary* p) { delete p; }
|
||||||
|
|
||||||
|
export uint32_t GetDamage(const DamageLibrary* p, ExecutingAttack* attack, Creature* target, uint8_t hitIndex) {
|
||||||
|
return p->GetDamage(attack, target, hitIndex);
|
||||||
|
}
|
||||||
|
|
||||||
|
export uint8_t GetBasePower(const DamageLibrary* p, ExecutingAttack* attack, Creature* target, uint8_t hitIndex) {
|
||||||
|
return p->GetBasePower(attack, target, hitIndex);
|
||||||
|
}
|
||||||
|
export float GetStatModifier(const DamageLibrary* p, ExecutingAttack* attack, Creature* target, uint8_t hitIndex) {
|
||||||
|
return p->GetStatModifier(attack, target, hitIndex);
|
||||||
|
}
|
||||||
|
export float GetDamageModifier(const DamageLibrary* p, ExecutingAttack* attack, Creature* target, uint8_t hitIndex) {
|
||||||
|
return p->GetDamageModifier(attack, target, hitIndex);
|
||||||
|
}
|
Loading…
Reference in New Issue