diff options
author | Ben Longbons <b.r.longbons@gmail.com> | 2012-12-27 21:23:46 -0800 |
---|---|---|
committer | Ben Longbons <b.r.longbons@gmail.com> | 2013-01-07 15:31:38 -0800 |
commit | c080e504e4d74027b985b1ed675c172c083cea76 (patch) | |
tree | ac084d16d9d40c0a0c950b66eb62a0e16795d486 /src/common/mmo.hpp | |
parent | ae30173d71d3bfc8514dbe70b6c90c9a3324b8fc (diff) | |
download | tmwa-c080e504e4d74027b985b1ed675c172c083cea76.tar.gz tmwa-c080e504e4d74027b985b1ed675c172c083cea76.tar.bz2 tmwa-c080e504e4d74027b985b1ed675c172c083cea76.tar.xz tmwa-c080e504e4d74027b985b1ed675c172c083cea76.zip |
Use cxxstdio
Diffstat (limited to 'src/common/mmo.hpp')
-rw-r--r-- | src/common/mmo.hpp | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/src/common/mmo.hpp b/src/common/mmo.hpp index cda097a..197816f 100644 --- a/src/common/mmo.hpp +++ b/src/common/mmo.hpp @@ -21,6 +21,10 @@ # define MAX_CART 100 enum class SkillID : uint16_t; constexpr SkillID MAX_SKILL = SkillID(474); // not 450 +constexpr SkillID get_enum_min_value(SkillID) { return SkillID(); } +constexpr SkillID get_enum_max_value(SkillID) { return MAX_SKILL; } + + # define GLOBAL_REG_NUM 96 # define ACCOUNT_REG_NUM 16 # define ACCOUNT_REG2_NUM 16 @@ -71,6 +75,9 @@ enum class EPOS : uint16_t ARROW = 0x8000, }; ENUM_BITWISE_OPERATORS(EPOS) + +constexpr EPOS get_enum_min_value(EPOS) { return EPOS(0x0000); } +constexpr EPOS get_enum_max_value(EPOS) { return EPOS(0xffff); } } using e::EPOS; @@ -80,9 +87,9 @@ struct item short nameid; short amount; EPOS equip; - char identify; - char refine; - char attribute; + uint8_t identify; + uint8_t refine; + uint8_t attribute; short card[4]; short broken; }; @@ -116,6 +123,8 @@ struct global_reg namespace e { enum class Option : uint16_t; +constexpr Option get_enum_min_value(Option) { return Option(0x0000); } +constexpr Option get_enum_max_value(Option) { return Option(0xffff); } } using e::Option; |