2020-03-08 12:53:58 +00:00
|
|
|
#include "../../src/Battling/Models/CreatureParty.hpp"
|
2020-07-31 08:51:03 +00:00
|
|
|
#include "../Core.hpp"
|
2020-03-08 12:53:58 +00:00
|
|
|
using namespace CreatureLib::Battling;
|
|
|
|
|
|
|
|
export CreatureParty* CreatureLib_CreatureParty_ConstructWithSize(size_t size) { return new CreatureParty(size); }
|
|
|
|
export CreatureParty* CreatureLib_CreatureParty_ConstructFromArray(Creature* creatures[], size_t size) {
|
2020-05-26 16:31:06 +00:00
|
|
|
return new CreatureParty(ArbUt::List<Creature*>(creatures, creatures + size));
|
2020-03-08 12:53:58 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
export void CreatureLib_CreatureParty_Destruct(const CreatureParty* p) { delete p; }
|
|
|
|
|
2020-03-25 18:07:36 +00:00
|
|
|
export uint8_t CreatureLib_CreatureParty_GetAtIndex(Creature*& out, const CreatureParty* p, size_t index) {
|
2020-07-07 13:33:43 +00:00
|
|
|
Try(out = p->GetAtIndex(index).GetRaw();)
|
2020-03-08 12:53:58 +00:00
|
|
|
}
|
|
|
|
|
2020-03-25 18:07:36 +00:00
|
|
|
export uint8_t CreatureLib_CreatureParty_Switch(CreatureParty* p, size_t a, size_t b) { Try(p->Switch(a, b);) }
|
2020-08-10 15:37:30 +00:00
|
|
|
export uint8_t CreatureLib_CreatureParty_PackParty(CreatureParty* p) { Try(p->PackParty();) }
|
2020-03-08 12:53:58 +00:00
|
|
|
|
2020-08-24 18:37:22 +00:00
|
|
|
export uint8_t CreatureLib_CreatureParty_SwapInto(Creature*& out, CreatureParty* p, size_t index, Creature* creature) {
|
|
|
|
Try(out = p->SwapInto(index, creature);)
|
2020-07-25 12:35:13 +00:00
|
|
|
}
|
|
|
|
|
2020-03-08 12:53:58 +00:00
|
|
|
export bool CreatureLib_CreatureParty_HasAvailableCreatures(const CreatureParty* p) {
|
|
|
|
return p->HasAvailableCreatures();
|
|
|
|
}
|
|
|
|
|
|
|
|
export size_t CreatureLib_CreatureParty_GetLength(const CreatureParty* p) { return p->GetLength(); }
|
|
|
|
|
2020-03-22 18:21:40 +00:00
|
|
|
export Creature* const* CreatureLib_CreatureParty_GetParty(CreatureParty* p) { return p->GetParty().RawData(); }
|