Just realised I didn't export the C interface for battle,
continuous-integration/drone/push Build is passing Details

This commit is contained in:
Deukhoofd 2020-03-09 10:49:15 +01:00
parent ce2fc320bd
commit cc43e4fb8a
Signed by: Deukhoofd
GPG Key ID: ADF2E9256009EDCE
1 changed files with 32 additions and 26 deletions

View File

@ -11,50 +11,56 @@ export Battle* CreatureLib_Battle_Construct(const BattleLibrary* library, Battle
export void CreatureLib_Battle_Destruct(const Battle* p) { delete p; } export void CreatureLib_Battle_Destruct(const Battle* p) { delete p; }
const BattleLibrary* CreatureLib_Battle_GetLibrary(const Battle* p) { return p->GetLibrary(); } export const BattleLibrary* CreatureLib_Battle_GetLibrary(const Battle* p) { return p->GetLibrary(); }
bool CreatureLib_Battle_CanUse(Battle* p, const BaseTurnChoice* turnChoice) { return p->CanUse(turnChoice); } export bool CreatureLib_Battle_CanUse(Battle* p, const BaseTurnChoice* turnChoice) { return p->CanUse(turnChoice); }
bool CreatureLib_Battle_TrySetChoice(Battle* p, BaseTurnChoice* turnChoice) { return p->TrySetChoice(turnChoice); } export bool CreatureLib_Battle_TrySetChoice(Battle* p, BaseTurnChoice* turnChoice) {
bool CreatureLib_Battle_CanFlee(const Battle* p) { return p->CanFlee(); } return p->TrySetChoice(turnChoice);
void CreatureLib_Battle_CheckChoicesSetAndRun(Battle* p) { p->CheckChoicesSetAndRun(); } }
export bool CreatureLib_Battle_CanFlee(const Battle* p) { return p->CanFlee(); }
export void CreatureLib_Battle_CheckChoicesSetAndRun(Battle* p) { p->CheckChoicesSetAndRun(); }
ChoiceQueue* CreatureLib_Battle_GetCurrentTurnQueue(const Battle* p) { return p->GetCurrentTurnQueue(); } export ChoiceQueue* CreatureLib_Battle_GetCurrentTurnQueue(const Battle* p) { return p->GetCurrentTurnQueue(); }
BattleRandom* CreatureLib_Battle_GetRandom(Battle* p) { return p->GetRandom(); } export BattleRandom* CreatureLib_Battle_GetRandom(Battle* p) { return p->GetRandom(); }
bool CreatureLib_Battle_CreatureInField(const Battle* p, Creature* c) { return p->CreatureInField(c); } export bool CreatureLib_Battle_CreatureInField(const Battle* p, Creature* c) { return p->CreatureInField(c); }
Creature* CreatureLib_Battle_GetCreature(const Battle* p, uint8_t side, uint8_t target) { export Creature* CreatureLib_Battle_GetCreature(const Battle* p, uint8_t side, uint8_t target) {
return p->GetCreature(side, target); return p->GetCreature(side, target);
} }
void CreatureLib_Battle_ForceRecall(Battle* p, uint8_t side, uint8_t target) { p->ForceRecall(side, target); } export void CreatureLib_Battle_ForceRecall(Battle* p, uint8_t side, uint8_t target) { p->ForceRecall(side, target); }
void CreatureLib_Battle_SwitchCreature(Battle* p, uint8_t side, uint8_t target, Creature* c) { export void CreatureLib_Battle_SwitchCreature(Battle* p, uint8_t side, uint8_t target, Creature* c) {
p->SwitchCreature(side, target, c); p->SwitchCreature(side, target, c);
} }
bool CreatureLib_Battle_CanSlotBeFilled(const Battle* p, uint8_t side, uint8_t target) { export bool CreatureLib_Battle_CanSlotBeFilled(const Battle* p, uint8_t side, uint8_t target) {
return p->CanSlotBeFilled(side, target); return p->CanSlotBeFilled(side, target);
} }
void CreatureLib_Battle_ValidateBattleState(Battle* p) { p->ValidateBattleState(); } export void CreatureLib_Battle_ValidateBattleState(Battle* p) { p->ValidateBattleState(); }
bool CreatureLib_Battle_HasEnded(const Battle* p) { return p->HasEnded(); } export bool CreatureLib_Battle_HasEnded(const Battle* p) { return p->HasEnded(); }
bool CreatureLib_Battle_HasConclusiveResult(const Battle* p) { return p->GetResult().IsConclusiveResult(); } export bool CreatureLib_Battle_HasConclusiveResult(const Battle* p) { return p->GetResult().IsConclusiveResult(); }
bool CreatureLib_Battle_GetWinningSide(const Battle* p) { return p->GetResult().GetWinningSide(); } export bool CreatureLib_Battle_GetWinningSide(const Battle* p) { return p->GetResult().GetWinningSide(); }
size_t CreatureLib_Battle_GetSidesCount(const Battle* p) { return p->GetSides().size(); } export size_t CreatureLib_Battle_GetSidesCount(const Battle* p) { return p->GetSides().size(); }
BattleSide* const* CreatureLib_Battle_GetSides(const Battle* p) { return p->GetSides().data(); } export BattleSide* const* CreatureLib_Battle_GetSides(const Battle* p) { return p->GetSides().data(); }
Script* CreatureLib_Battle_GetVolatileScript(Battle* p, const char* key) { export Script* CreatureLib_Battle_GetVolatileScript(Battle* p, const char* key) {
return p->GetVolatileScript(ConstString::GetHash(key)); return p->GetVolatileScript(ConstString::GetHash(key));
} }
void CreatureLib_Battle_AddVolatileScriptByName(Battle* p, const char* key) { p->AddVolatileScript(ConstString(key)); } export void CreatureLib_Battle_AddVolatileScriptByName(Battle* p, const char* key) {
void CreatureLib_Battle_AddVolatileScript(Battle* p, Script* script) { p->AddVolatileScript(script); } p->AddVolatileScript(ConstString(key));
}
export void CreatureLib_Battle_AddVolatileScript(Battle* p, Script* script) { p->AddVolatileScript(script); }
void CreatureLib_Battle_RemoveVolatileScript(Battle* p, const char* key) { export void CreatureLib_Battle_RemoveVolatileScript(Battle* p, const char* key) {
p->RemoveVolatileScript(ConstString::GetHash(key)); p->RemoveVolatileScript(ConstString::GetHash(key));
} }
void CreatureLib_Battle_RemoveVolatileScriptWithScript(Battle* p, Script* script) { p->RemoveVolatileScript(script); } export void CreatureLib_Battle_RemoveVolatileScriptWithScript(Battle* p, Script* script) {
bool CreatureLib_Battle_HasVolatileScript(Battle* p, const char* key) { p->RemoveVolatileScript(script);
}
export bool CreatureLib_Battle_HasVolatileScript(Battle* p, const char* key) {
return p->HasVolatileScript(ConstString::GetHash(key)); return p->HasVolatileScript(ConstString::GetHash(key));
} }
void CreatureLib_Battle_RegisterEventListener(Battle* p, void (*func)(const EventData*)) { export void CreatureLib_Battle_RegisterEventListener(Battle* p, void (*func)(const EventData*)) {
p->RegisterEventListener(func); p->RegisterEventListener(func);
} }
void CreatureLib_Battle_TriggerEventListener(Battle* p, EventData* data) { p->TriggerEventListener(data); } export void CreatureLib_Battle_TriggerEventListener(Battle* p, EventData* data) { p->TriggerEventListener(data); }