2020-04-16 13:04:53 +00:00
|
|
|
#include "../../src/Library/Species/PokemonSpecies.hpp"
|
|
|
|
#include "../Core.hpp"
|
|
|
|
using namespace PkmnLib::Library;
|
|
|
|
|
2020-05-03 10:46:35 +00:00
|
|
|
export uint8_t PkmnLib_PokemonSpecies_Construct(const PokemonSpecies*& out, uint16_t id, const char* name,
|
|
|
|
const PokemonForme* defaultForme, float genderRatio,
|
2020-05-22 11:43:02 +00:00
|
|
|
const char* growthRate, uint8_t captureRate, uint8_t baseHappiness) {
|
2020-07-04 13:50:30 +00:00
|
|
|
Try(auto cName = ArbUt::StringView(name); auto cGrowthRate = ArbUt::StringView(growthRate);
|
2020-05-22 11:43:02 +00:00
|
|
|
out = new PokemonSpecies(id, cName, defaultForme, genderRatio, cGrowthRate, captureRate, baseHappiness);)
|
2020-04-16 13:04:53 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
export void PkmnLib_PokemonSpecies_Destruct(const PokemonSpecies* p) { delete p; }
|
|
|
|
|
|
|
|
SIMPLE_GET_FUNC(PokemonSpecies, GetBaseHappiness, uint8_t);
|
|
|
|
export void PkmnLib_PokemonSpecies_AddEvolution(PokemonSpecies* p, EvolutionData* evo) { p->AddEvolution(evo); }
|
|
|
|
|
|
|
|
export size_t PkmnLib_PokemonSpecies_GetEvolutionCount(const PokemonSpecies* p) { return p->GetEvolutions().Count(); }
|
|
|
|
|
|
|
|
export uint8_t PkmnLib_PokemonSpecies_GetEvolution(const PokemonSpecies* p, size_t index, const EvolutionData*& out) {
|
2020-06-02 18:37:21 +00:00
|
|
|
Try(out = p->GetEvolutions().At(index).GetRaw());
|
2020-04-16 13:04:53 +00:00
|
|
|
}
|