Add easy to use macro to generate enum helper functions for parsing, stringifying and iteration.
Some checks failed
continuous-integration/drone/push Build is failing
Some checks failed
continuous-integration/drone/push Build is failing
This commit is contained in:
@@ -2,9 +2,10 @@
|
||||
#define CREATURELIB_ATTACKCATEGORY_HPP
|
||||
|
||||
#include <cstdint>
|
||||
#include "../../Core/Enum.hpp"
|
||||
|
||||
namespace CreatureLib::Library {
|
||||
enum class AttackCategory : uint8_t { Physical, Magical, Status };
|
||||
ENUM(AttackCategory, uint8_t, Physical, Magical, Status)
|
||||
}
|
||||
|
||||
#endif // CREATURELIB_ATTACKCATEGORY_HPP
|
||||
|
||||
@@ -2,25 +2,16 @@
|
||||
#define CREATURELIB_ATTACKTARGET_HPP
|
||||
|
||||
#include <cstdint>
|
||||
#include "../../Core/Enum.hpp"
|
||||
|
||||
namespace CreatureLib::Library {
|
||||
enum class AttackTarget : uint8_t {
|
||||
Adjacent,
|
||||
AdjacentAlly,
|
||||
AdjacentAllySelf,
|
||||
AdjacentOpponent,
|
||||
ENUM(AttackTarget, uint8_t, Adjacent, AdjacentAlly, AdjacentAllySelf, AdjacentOpponent,
|
||||
|
||||
All,
|
||||
AllAdjacent,
|
||||
AllAdjacentOpponent,
|
||||
AllAlly,
|
||||
AllOpponent,
|
||||
All, AllAdjacent, AllAdjacentOpponent, AllAlly, AllOpponent,
|
||||
|
||||
Any,
|
||||
Any,
|
||||
|
||||
RandomOpponent,
|
||||
Self,
|
||||
};
|
||||
RandomOpponent, Self)
|
||||
}
|
||||
|
||||
#endif // CREATURELIB_ATTACKTARGET_HPP
|
||||
|
||||
@@ -2,13 +2,14 @@
|
||||
#define CREATURELIB_GENDER_HPP
|
||||
|
||||
#include <cstdint>
|
||||
#include "../Core/Enum.hpp"
|
||||
|
||||
namespace CreatureLib::Library {
|
||||
/*!
|
||||
\brief Might be somewhat controversial nowadays, but as many creature battling games only have two genders, we'll
|
||||
hardcode those.
|
||||
*/
|
||||
enum class Gender : uint8_t { Male, Female, Genderless };
|
||||
ENUM(Gender, uint8_t, Male, Female, Genderless)
|
||||
}
|
||||
|
||||
#endif // CREATURELIB_GENDER_HPP
|
||||
|
||||
Reference in New Issue
Block a user