40 lines
2.4 KiB
C++
40 lines
2.4 KiB
C++
|
#include "../../src/Library/GrowthRates/GrowthRateLibrary.hpp"
|
||
|
#define export extern "C"
|
||
|
|
||
|
export CreatureLib::Library::GrowthRateLibrary* CreatureLib_GrowthRateLibrary_Construct(size_t initialCapacity) {
|
||
|
return new CreatureLib::Library::GrowthRateLibrary(initialCapacity);
|
||
|
}
|
||
|
|
||
|
export void CreatureLib_GrowthRateLibrary_Destruct(CreatureLib::Library::GrowthRateLibrary* p) { delete p; }
|
||
|
|
||
|
export uint8_t CreatureLib_GrowthRateLibrary_CalculateLevel(CreatureLib::Library::GrowthRateLibrary* library,
|
||
|
const char* growthRate, uint32_t experience) {
|
||
|
return library->CalculateLevel(Arbutils::CaseInsensitiveConstString::GetHash(growthRate), experience);
|
||
|
}
|
||
|
export uint8_t CreatureLib_GrowthRateLibrary_CalculateLevelWithHash(CreatureLib::Library::GrowthRateLibrary* library,
|
||
|
uint32_t growthRateHash, uint32_t experience) {
|
||
|
return library->CalculateLevel(growthRateHash, experience);
|
||
|
}
|
||
|
|
||
|
export uint32_t CreatureLib_GrowthRateLibrary_CalculateExperience(CreatureLib::Library::GrowthRateLibrary* library,
|
||
|
const char* growthRate, uint8_t level) {
|
||
|
return library->CalculateExperience(Arbutils::CaseInsensitiveConstString::GetHash(growthRate), level);
|
||
|
}
|
||
|
|
||
|
export uint32_t
|
||
|
CreatureLib_GrowthRateLibrary_CalculateExperienceWithHash(CreatureLib::Library::GrowthRateLibrary* library,
|
||
|
uint32_t growthRateHash, uint8_t level) {
|
||
|
return library->CalculateExperience(growthRateHash, level);
|
||
|
}
|
||
|
export void CreatureLib_GrowthRateLibrary_AddGrowthRate(CreatureLib::Library::GrowthRateLibrary* library,
|
||
|
const char* growthRateName,
|
||
|
CreatureLib::Library::GrowthRate* growthRate) {
|
||
|
return library->AddGrowthRate(Arbutils::CaseInsensitiveConstString::GetHash(growthRateName), growthRate);
|
||
|
}
|
||
|
|
||
|
export void CreatureLib_GrowthRateLibrary_AddGrowthRateWithHash(CreatureLib::Library::GrowthRateLibrary* library,
|
||
|
uint32_t growthRateHash,
|
||
|
CreatureLib::Library::GrowthRate* growthRate) {
|
||
|
return library->AddGrowthRate(growthRateHash, growthRate);
|
||
|
}
|