Update to latest CreatureLib.
continuous-integration/drone/push Build is passing Details

This commit is contained in:
Deukhoofd 2020-04-25 20:30:44 +02:00
parent e23165d489
commit ec1685aa14
Signed by: Deukhoofd
GPG Key ID: ADF2E9256009EDCE
2 changed files with 2 additions and 21 deletions

View File

@ -4,7 +4,6 @@
void RegisterExecutingAttack::Register(asIScriptEngine* engine) { void RegisterExecutingAttack::Register(asIScriptEngine* engine) {
RegisterHitData(engine); RegisterHitData(engine);
RegisterTargetData(engine);
RegisterExecutingAttackType(engine); RegisterExecutingAttackType(engine);
} }
void RegisterExecutingAttack::RegisterHitData(asIScriptEngine* engine) { void RegisterExecutingAttack::RegisterHitData(asIScriptEngine* engine) {
@ -31,28 +30,11 @@ void RegisterExecutingAttack::RegisterHitData(asIScriptEngine* engine) {
asCALL_THISCALL); asCALL_THISCALL);
assert(r >= 0); assert(r >= 0);
} }
void RegisterExecutingAttack::RegisterTargetData(asIScriptEngine* engine) {
[[maybe_unused]] int r = engine->RegisterObjectType("TargetData", 0, asOBJ_REF | asOBJ_NOCOUNT);
assert(r >= 0);
r = engine->RegisterObjectMethod("TargetData", "uint8 get_NumberOfHits() const property",
asMETHOD(CreatureLib::Battling::ExecutingAttack::TargetData, GetNumberOfHits),
asCALL_THISCALL);
assert(r >= 0);
r = engine->RegisterObjectMethod("TargetData", "bool get_IsHit() const property",
asMETHOD(CreatureLib::Battling::ExecutingAttack::TargetData, IsHit),
asCALL_THISCALL);
assert(r >= 0);
r = engine->RegisterObjectMethod("TargetData", "HitData@ GetHit(uint8 index) const",
asMETHOD(CreatureLib::Battling::ExecutingAttack::TargetData, GetHit),
asCALL_THISCALL);
assert(r >= 0);
}
void RegisterExecutingAttack::RegisterExecutingAttackType(asIScriptEngine* engine) { void RegisterExecutingAttack::RegisterExecutingAttackType(asIScriptEngine* engine) {
[[maybe_unused]] int r = engine->RegisterObjectType("ExecutingMove", 0, asOBJ_REF | asOBJ_NOCOUNT); [[maybe_unused]] int r = engine->RegisterObjectType("ExecutingMove", 0, asOBJ_REF | asOBJ_NOCOUNT);
assert(r >= 0); assert(r >= 0);
r = engine->RegisterObjectMethod("ExecutingMove", "TargetData@ GetAttackDataForTarget(Pokemon@ pkmn) const", r = engine->RegisterObjectMethod("ExecutingMove", "HitData@ GetHitData(Pokemon@ target, uint8 hit) const",
asMETHOD(CreatureLib::Battling::ExecutingAttack, GetAttackDataForTarget), asMETHOD(CreatureLib::Battling::ExecutingAttack, GetHitData),
asCALL_THISCALL); asCALL_THISCALL);
assert(r >= 0); assert(r >= 0);
r = engine->RegisterObjectMethod("ExecutingMove", "bool IsPokemonTarget(Pokemon@ pkmn) const", r = engine->RegisterObjectMethod("ExecutingMove", "bool IsPokemonTarget(Pokemon@ pkmn) const",

View File

@ -5,7 +5,6 @@
class RegisterExecutingAttack { class RegisterExecutingAttack {
static void RegisterHitData(asIScriptEngine* engine); static void RegisterHitData(asIScriptEngine* engine);
static void RegisterTargetData(asIScriptEngine* engine);
static void RegisterExecutingAttackType(asIScriptEngine* engine); static void RegisterExecutingAttackType(asIScriptEngine* engine);
public: public:
static void Register(asIScriptEngine* engine); static void Register(asIScriptEngine* engine);