30 lines
1.4 KiB
C++
30 lines
1.4 KiB
C++
#include "../../src/Battling/Models/CreatureParty.hpp"
|
|
#include "../Core.hpp"
|
|
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) {
|
|
return new CreatureParty(ArbUt::List<Creature*>(creatures, creatures + size));
|
|
}
|
|
|
|
export void CreatureLib_CreatureParty_Destruct(const CreatureParty* p) { delete p; }
|
|
|
|
export uint8_t CreatureLib_CreatureParty_GetAtIndex(Creature*& out, const CreatureParty* p, size_t index) {
|
|
Try(out = p->GetAtIndex(index).GetValue();)
|
|
}
|
|
|
|
export uint8_t CreatureLib_CreatureParty_Switch(CreatureParty* p, size_t a, size_t b) { Try(p->Switch(a, b);) }
|
|
export uint8_t CreatureLib_CreatureParty_PackParty(CreatureParty* p) { Try(p->PackParty();) }
|
|
|
|
export uint8_t CreatureLib_CreatureParty_SwapInto(Creature*& out, CreatureParty* p, size_t index, Creature* creature) {
|
|
Try(out = p->SwapInto(index, creature);)
|
|
}
|
|
|
|
export bool CreatureLib_CreatureParty_HasAvailableCreatures(const CreatureParty* p) {
|
|
return p->HasAvailableCreatures();
|
|
}
|
|
|
|
export size_t CreatureLib_CreatureParty_GetLength(const CreatureParty* p) { return p->GetLength(); }
|
|
|
|
export Creature* const* CreatureLib_CreatureParty_GetParty(CreatureParty* p) { return p->GetParty().RawData(); }
|