Cleanup of CInterface, removed operator-> on BorrowedPtr, as it throws when null.
Some checks failed
continuous-integration/drone/push Build is failing
Some checks failed
continuous-integration/drone/push Build is failing
This commit is contained in:
@@ -16,9 +16,4 @@ export Item* PkmnLib_Item_Construct(const char* name, CreatureLib::Library::Item
|
||||
|
||||
export void PkmnLib_Item_Destruct(const Item* p) { delete p; }
|
||||
|
||||
#define SIMPLE_GET_FUNC(type, name, returnType) \
|
||||
export returnType PkmnLib_##type##_##name(const PkmnLib::Library::type* p) { return p->name(); }
|
||||
|
||||
SIMPLE_GET_FUNC(Item, GetFlingPower, uint8_t)
|
||||
|
||||
#undef SIMPLE_GET_FUNC
|
||||
SIMPLE_GET_FUNC(Item, GetFlingPower, uint8_t)
|
||||
@@ -9,9 +9,4 @@ export const LibrarySettings* PkmnLib_LibrarySettings_Construct(uint8_t maximalL
|
||||
|
||||
export void PkmnLib_LibrarySettings_Destruct(const LibrarySettings* p) { delete p; }
|
||||
|
||||
#define SIMPLE_GET_FUNC(type, name, returnType) \
|
||||
export returnType PkmnLib_##type##_##name(const PkmnLib::Library::type* p) { return p->name(); }
|
||||
|
||||
SIMPLE_GET_FUNC(LibrarySettings, GetShinyRate, uint16_t);
|
||||
|
||||
#undef SIMPLE_GET_FUNC
|
||||
SIMPLE_GET_FUNC(LibrarySettings, GetShinyRate, uint16_t);
|
||||
@@ -9,16 +9,11 @@ export Nature* PkmnLib_Nature_Construct(CreatureLib::Library::Statistic increase
|
||||
}
|
||||
export void PkmnLib_Nature_Destruct(const Nature* p) { delete p; }
|
||||
|
||||
#define SIMPLE_GET_FUNC(type, name, returnType) \
|
||||
export returnType PkmnLib_##type##_##name(const PkmnLib::Library::type* p) { return p->name(); }
|
||||
|
||||
SIMPLE_GET_FUNC(Nature, GetIncreaseModifier, float)
|
||||
SIMPLE_GET_FUNC(Nature, GetDecreaseModifier, float)
|
||||
SIMPLE_GET_FUNC(Nature, GetIncreasedStat, CreatureLib::Library::Statistic)
|
||||
SIMPLE_GET_FUNC(Nature, GetDecreasedStat, CreatureLib::Library::Statistic)
|
||||
|
||||
#undef SIMPLE_GET_FUNC
|
||||
|
||||
export float PkmnLib_Nature_GetStatModifier(const PkmnLib::Library::Nature* nature,
|
||||
CreatureLib::Library::Statistic stat) {
|
||||
return nature->GetStatModifier(stat);
|
||||
|
||||
@@ -11,13 +11,7 @@ export uint8_t PkmnLib_PokemonSpecies_Construct(const PokemonSpecies*& out, uint
|
||||
|
||||
export void PkmnLib_PokemonSpecies_Destruct(const PokemonSpecies* p) { delete p; }
|
||||
|
||||
#define SIMPLE_GET_FUNC(type, name, returnType) \
|
||||
export returnType PkmnLib_##type##_##name(const PkmnLib::Library::type* p) { return p->name(); }
|
||||
|
||||
SIMPLE_GET_FUNC(PokemonSpecies, GetBaseHappiness, uint8_t);
|
||||
|
||||
#undef SIMPLE_GET_FUNC
|
||||
|
||||
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(); }
|
||||
|
||||
Reference in New Issue
Block a user