diff options
Diffstat (limited to 'src/mmo/ids.hpp')
-rw-r--r-- | src/mmo/ids.hpp | 18 |
1 files changed, 4 insertions, 14 deletions
diff --git a/src/mmo/ids.hpp b/src/mmo/ids.hpp index 4e2b97c..28b146a 100644 --- a/src/mmo/ids.hpp +++ b/src/mmo/ids.hpp @@ -23,8 +23,6 @@ #include "../ints/little.hpp" #include "../ints/wrap.hpp" -#include "extract.hpp" - namespace tmwa { @@ -32,17 +30,7 @@ class Species : public Wrapped<uint16_t> { public: explicit operator bool() cons constexpr Species NEGATIVE_SPECIES = Species(); -inline -bool extract(XString str, Species *w) -{ - // lots of data files use this - if (str == "-1"_s) - { - *w = NEGATIVE_SPECIES; - return true; - } - return extract(str, &w->_value); -} +bool impl_extract(XString str, Species *w); class AccountId : public Wrapped<uint32_t> { public: constexpr AccountId() : Wrapped<uint32_t>() {} protected: constexpr explicit AccountId(uint32_t a) : Wrapped<uint32_t>(a) {} }; @@ -52,12 +40,14 @@ class PartyId : public Wrapped<uint32_t> { public: constexpr PartyId() : Wrapped class ItemNameId : public Wrapped<uint16_t> { public: constexpr ItemNameId() : Wrapped<uint16_t>() {} protected: constexpr explicit ItemNameId(uint16_t a) : Wrapped<uint16_t>(a) {} }; class BlockId : public Wrapped<uint32_t> { public: constexpr BlockId() : Wrapped<uint32_t>() {} protected: constexpr explicit BlockId(uint32_t a) : Wrapped<uint32_t>(a) {} }; +class QuestId : public Wrapped<uint16_t> { public: constexpr QuestId() : Wrapped<uint16_t>() {} protected: constexpr explicit QuestId(uint16_t a) : Wrapped<uint16_t>(a) {} }; +bool impl_extract(XString str, GmLevel *lvl); class GmLevel { uint32_t bits; - friend bool extract(XString str, GmLevel *lvl) { return extract(str, &lvl->bits); } + friend bool impl_extract(XString str, GmLevel *lvl); constexpr explicit GmLevel(uint32_t b) : bits(b) {} constexpr explicit |