Implements CInterface core, C Interface for LibrarySettings.
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
16
CInterface/Library/LibrarySettings.cpp
Normal file
16
CInterface/Library/LibrarySettings.cpp
Normal file
@@ -0,0 +1,16 @@
|
||||
#include "../../src/Library/LibrarySettings.hpp"
|
||||
#include "../Core.hpp"
|
||||
using namespace PkmnLib::Library;
|
||||
|
||||
export const LibrarySettings* PkmnLib_LibrarySettings_Construct(uint8_t maximalLevel, uint8_t maximalMoves, uint16_t shinyRate) {
|
||||
return new LibrarySettings(maximalLevel, maximalMoves, shinyRate);
|
||||
}
|
||||
|
||||
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
|
||||
Reference in New Issue
Block a user