From e3bbc369fc6a89e1ae86c0557dfaf853da5f4958 Mon Sep 17 00:00:00 2001 From: Deukhoofd Date: Sat, 18 Jan 2020 13:38:47 +0100 Subject: [PATCH] Revert "Make Script functions use pointers for out variables, instead of references." This reverts commit c3877e01 --- src/Battling/ScriptHandling/Script.hpp | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/Battling/ScriptHandling/Script.hpp b/src/Battling/ScriptHandling/Script.hpp index 560f7b2..1f0d4f2 100644 --- a/src/Battling/ScriptHandling/Script.hpp +++ b/src/Battling/ScriptHandling/Script.hpp @@ -31,16 +31,16 @@ namespace CreatureLib::Battling { virtual void OnBeforeTurn(const BaseTurnChoice* choice){}; - virtual void ChangeAttack(AttackTurnChoice* choice, std::string* attack){}; - virtual void PreventAttack(ExecutingAttack* attack, bool* result){}; - virtual void FailAttack(ExecutingAttack* attack, bool* failed){}; + virtual void ChangeAttack(AttackTurnChoice* choice, std::string& attack){}; + virtual void PreventAttack(ExecutingAttack* attack, bool& result){}; + virtual void FailAttack(ExecutingAttack* attack, bool& failed){}; virtual void StopBeforeAttack(ExecutingAttack* attack){}; virtual void OnBeforeAttack(ExecutingAttack* attack){}; - virtual void FailIncomingAttack(ExecutingAttack* attack, Creature* target, bool* result){}; - virtual void IsInvulnerable(ExecutingAttack* attack, Creature* target, bool* result){}; + virtual void FailIncomingAttack(ExecutingAttack* attack, Creature* target, bool& result){}; + virtual void IsInvulnerable(ExecutingAttack* attack, Creature* target, bool& result){}; virtual void OnAttackMiss(ExecutingAttack* attack, Creature* target){}; - virtual void ChangeAttackType(ExecutingAttack* attack, Creature* target, uint8_t hitNumber, uint8_t* type){}; + virtual void ChangeAttackType(ExecutingAttack* attack, Creature* target, uint8_t hitNumber, uint8_t& type){}; virtual void OnStatusMove(const ExecutingAttack* attack, Creature* target, uint8_t hitNumber){}; virtual void PreventSecondaryEffects(const ExecutingAttack* attack, Creature* target, uint8_t hitNumber, bool& result){}; @@ -48,7 +48,7 @@ namespace CreatureLib::Battling { virtual void OnAfterHits(const ExecutingAttack* attack, Creature* target){}; - virtual void PreventSelfSwitch(const SwitchTurnChoice* choice, bool* result){}; + virtual void PreventSelfSwitch(const SwitchTurnChoice* choice, bool& result){}; }; }