Compile time option to change bit size of level.
Some checks failed
continuous-integration/drone/push Build is failing

Signed-off-by: Deukhoofd <Deukhoofd@gmail.com>
This commit is contained in:
2020-08-19 20:11:00 +02:00
parent ba97fa8579
commit 39e1295013
17 changed files with 70 additions and 36 deletions

View File

@@ -2,7 +2,7 @@
using namespace CreatureLib::Library;
void LearnableAttacks::AddLevelAttack(uint8_t level, ArbUt::BorrowedPtr<const AttackData> attack) {
void LearnableAttacks::AddLevelAttack(level_int_t level, ArbUt::BorrowedPtr<const AttackData> attack) {
if (_learnedByLevel.Has(level)) {
_learnedByLevel[level].Append(attack);
} else {

View File

@@ -7,6 +7,7 @@
#include <Arbutils/Memory/BorrowedPtr.hpp>
#include <Arbutils/Random.hpp>
#include <unordered_map>
#include "../../Defines.hpp"
#include "../Attacks/AttackData.hpp"
namespace CreatureLib::Library {
@@ -22,7 +23,7 @@ namespace CreatureLib::Library {
virtual ~LearnableAttacks() = default;
void AddLevelAttack(uint8_t level, ArbUt::BorrowedPtr<const AttackData> attack);
void AddLevelAttack(level_int_t level, ArbUt::BorrowedPtr<const AttackData> attack);
inline bool HasAttacksForLevel(uint8_t level) const noexcept { return _learnedByLevel.Has(level); }
inline const ArbUt::List<ArbUt::BorrowedPtr<const AttackData>>& GetAttacksForLevel(uint8_t level) const {