Made C Interface for BattleLibrary constructor try.
continuous-integration/drone/push Build is passing
Details
continuous-integration/drone/push Build is passing
Details
This commit is contained in:
parent
937071df59
commit
3429f1647c
|
@ -2,13 +2,13 @@
|
||||||
#include "../Core.hpp"
|
#include "../Core.hpp"
|
||||||
using namespace CreatureLib::Battling;
|
using namespace CreatureLib::Battling;
|
||||||
|
|
||||||
export const BattleLibrary* CreatureLib_BattleLibrary_Construct(const CreatureLib::Library::DataLibrary* staticLib,
|
export uint8_t CreatureLib_BattleLibrary_Construct(const BattleLibrary*& out,
|
||||||
BattleStatCalculator* statCalculator,
|
const CreatureLib::Library::DataLibrary* staticLib,
|
||||||
DamageLibrary* damageLibrary,
|
BattleStatCalculator* statCalculator, DamageLibrary* damageLibrary,
|
||||||
ExperienceLibrary* experienceLibrary,
|
ExperienceLibrary* experienceLibrary, ScriptResolver* scriptResolver,
|
||||||
ScriptResolver* scriptResolver,
|
MiscLibrary* miscLibrary) {
|
||||||
MiscLibrary* miscLibrary) {
|
Try(out = new BattleLibrary(staticLib, statCalculator, damageLibrary, experienceLibrary, scriptResolver,
|
||||||
return new BattleLibrary(staticLib, statCalculator, damageLibrary, experienceLibrary, scriptResolver, miscLibrary);
|
miscLibrary);)
|
||||||
}
|
}
|
||||||
|
|
||||||
export void CreatureLib_BattleLibrary_Destruct(const BattleLibrary* p) { delete p; }
|
export void CreatureLib_BattleLibrary_Destruct(const BattleLibrary* p) { delete p; }
|
||||||
|
|
|
@ -6,7 +6,14 @@ BattleLibrary::BattleLibrary(const CreatureLib::Library::DataLibrary* staticLib,
|
||||||
DamageLibrary* damageLibrary, ExperienceLibrary* experienceLibrary,
|
DamageLibrary* damageLibrary, ExperienceLibrary* experienceLibrary,
|
||||||
ScriptResolver* scriptResolver, MiscLibrary* miscLibrary)
|
ScriptResolver* scriptResolver, MiscLibrary* miscLibrary)
|
||||||
: _staticLib(staticLib), _statCalculator(statCalculator), _damageLibrary(damageLibrary),
|
: _staticLib(staticLib), _statCalculator(statCalculator), _damageLibrary(damageLibrary),
|
||||||
_experienceLibrary(experienceLibrary), _scriptResolver(scriptResolver), _miscLibrary(miscLibrary) {}
|
_experienceLibrary(experienceLibrary), _scriptResolver(scriptResolver), _miscLibrary(miscLibrary) {
|
||||||
|
AssertNotNull(_staticLib);
|
||||||
|
AssertNotNull(_statCalculator);
|
||||||
|
AssertNotNull(_damageLibrary);
|
||||||
|
AssertNotNull(_experienceLibrary);
|
||||||
|
AssertNotNull(_scriptResolver);
|
||||||
|
AssertNotNull(_miscLibrary);
|
||||||
|
}
|
||||||
|
|
||||||
BattleLibrary::~BattleLibrary() {
|
BattleLibrary::~BattleLibrary() {
|
||||||
delete _staticLib;
|
delete _staticLib;
|
||||||
|
|
Loading…
Reference in New Issue