CreatureLib/CInterface/Library/DataLibrary.cpp

20 lines
1.2 KiB
C++
Raw Normal View History

2020-02-29 13:09:03 +00:00
#include "../../src/Library/DataLibrary.hpp"
#include "../Core.hpp"
using namespace CreatureLib::Library;
2020-02-29 13:09:03 +00:00
2022-04-02 10:33:26 +00:00
export_func u8 CreatureLib_DataLibrary_Construct(const DataLibrary*& out, LibrarySettings* settings,
SpeciesLibrary* species, AttackLibrary* attacks, ItemLibrary* items,
GrowthRateLibrary* growthRates, TypeLibrary* typeLibrary,
TalentLibrary* talentLibrary) {
2021-11-15 11:04:45 +00:00
Try(out = new DataLibrary(settings, species, attacks, items, growthRates, typeLibrary, talentLibrary);)
2020-02-29 13:09:03 +00:00
}
2022-04-02 10:33:26 +00:00
export_func void CreatureLib_DataLibrary_Destruct(const DataLibrary* p) { delete p; }
2020-02-29 13:09:03 +00:00
SMART_GET_FUNC(DataLibrary, GetSettings, const LibrarySettings*);
SMART_GET_FUNC(DataLibrary, GetSpeciesLibrary, const SpeciesLibrary*);
SMART_GET_FUNC(DataLibrary, GetAttackLibrary, const AttackLibrary*);
SMART_GET_FUNC(DataLibrary, GetItemLibrary, const ItemLibrary*);
SMART_GET_FUNC(DataLibrary, GetGrowthRates, const GrowthRateLibrary*);
2021-11-15 11:04:45 +00:00
SMART_GET_FUNC(DataLibrary, GetTypeLibrary, const TypeLibrary*);
SMART_GET_FUNC(DataLibrary, GetTalentLibrary, const TalentLibrary*);