PkmnLib/CInterface/Library/SpeciesLibrary.cpp

14 lines
580 B
C++

#include "../../src/Library/Species/SpeciesLibrary.hpp"
#include "../Core.hpp"
using namespace PkmnLib::Library;
export const SpeciesLibrary* PkmnLib_SpeciesLibrary_Construct(size_t initialCapacity) {
return new SpeciesLibrary(initialCapacity);
};
export u8 PkmnLib_SpeciesLibrary_FindPreEvolution(const PokemonSpecies*& out, const SpeciesLibrary* p,
const PokemonSpecies* species) {
Try(
auto v = p->FindPreEvolution(species);
if (!v.has_value()) { out = nullptr; } else { out = v.value().GetRaw(); })
}